Difference between revisions of "Template:Harmonic number generator"

From comp.tf
Jump to navigation Jump to search
(Created page with "{| ! ''n=1'' ! {{{1|}}} ! {{{2|}}} ! {{{3|}}} |- ! 2 | {{#expr:(2/3)*{{{1|}}} round 2}} | {{#expr:(2/3)*{{{2|}}} round 2}} | {{#expr:(2/3)*{{{3|}}} round 2}} |- ! 3 | {{#expr:...")
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{|
+
<includeonly>{| class="wikitable"
 
! ''n=1''
 
! ''n=1''
 
! {{{1|}}}
 
! {{{1|}}}
Line 6: Line 6:
 
|-
 
|-
 
! 2
 
! 2
| {{#expr:(2/3)*{{{1|}}} round 2}}
+
| {{#expr:{{#expr:(2/3)*{{{1|}}}*100 round 0}}/100}}
| {{#expr:(2/3)*{{{2|}}} round 2}}
+
| {{#expr:{{#expr:(2/3)*{{{2|}}}*100 round 0}}/100}}
| {{#expr:(2/3)*{{{3|}}} round 2}}
+
| {{#expr:{{#expr:(2/3)*{{{3|}}}*100 round 0}}/100}}
 
|-
 
|-
 
! 3
 
! 3
| {{#expr:(6/11)*{{{1|}}} round 2}}
+
| {{#expr:{{#expr:(6/11)*{{{1|}}}*100 round 0}}/100}}
| {{#expr:(6/11)*{{{2|}}} round 2}}
+
| {{#expr:{{#expr:(6/11)*{{{2|}}}*100 round 0}}/100}}
| {{#expr:(6/11)*{{{3|}}} round 2}}
+
| {{#expr:{{#expr:(6/11)*{{{3|}}}*100 round 0}}/100}}
 
|-
 
|-
 
! 4
 
! 4
| {{#expr:(12/25)*{{{1|}}} round 2}}
+
| {{#expr:{{#expr:(12/25)*{{{1|}}}*100 round 0}}/100}}
| {{#expr:(12/25)*{{{2|}}} round 2}}
+
| {{#expr:{{#expr:(12/25)*{{{2|}}}*100 round 0}}/100}}
| {{#expr:(12/25)*{{{3|}}} round 2}}
+
| {{#expr:{{#expr:(12/25)*{{{3|}}}*100 round 0}}/100}}
 
|-
 
|-
 
! 5
 
! 5
| {{#expr:(60/137)*{{{1|}}} round 2}}
+
| {{#expr:{{#expr:(60/137)*{{{1|}}}*100 round 0}}/100}}
| {{#expr:(60/137)*{{{2|}}} round 2}}
+
| {{#expr:{{#expr:(60/137)*{{{2|}}}*100 round 0}}/100}}
| {{#expr:(60/137)*{{{3|}}} round 2}}
+
| {{#expr:{{#expr:(60/137)*{{{3|}}}*100 round 0}}/100}}
 
|-
 
|-
 
! 6
 
! 6
| {{#expr:(20/49)*{{{1|}}} round 2}}
+
| {{#expr:{{#expr:(20/49)*{{{1|}}}*100 round 0}}/100}}
| {{#expr:(20/49)*{{{2|}}} round 2}}
+
| {{#expr:{{#expr:(20/49)*{{{2|}}}*100 round 0}}/100}}
| {{#expr:(20/49)*{{{3|}}} round 2}}
+
| {{#expr:{{#expr:(20/49)*{{{3|}}}*100 round 0}}/100}}
 
|-
 
|-
 
! 7
 
! 7
| {{#expr:(140/363)*{{{1|}}} round 2}}
+
| {{#expr:{{#expr:(140/363)*{{{1|}}}*100 round 0}}/100}}
| {{#expr:(140/363)*{{{2|}}} round 2}}
+
| {{#expr:{{#expr:(140/363)*{{{2|}}}*100 round 0}}/100}}
| {{#expr:(140/363)*{{{3|}}} round 2}}
+
| {{#expr:{{#expr:(140/363)*{{{3|}}}*100 round 0}}/100}}
 
|-
 
|-
 
! 8
 
! 8
| {{#expr:(280/761)*{{{1|}}} round 2}}
+
| {{#expr:{{#expr:(280/761)*{{{1|}}}*100 round 0}}/100}}
| {{#expr:(280/761)*{{{2|}}} round 2}}
+
| {{#expr:{{#expr:(280/761)*{{{2|}}}*100 round 0}}/100}}
| {{#expr:(280/761)*{{{3|}}} round 2}}
+
| {{#expr:{{#expr:(280/761)*{{{3|}}}*100 round 0}}/100}}
 
|-
 
|-
 
! 9
 
! 9
| {{#expr:(2520/7129)*{{{1|}}} round 2}}
+
| {{#expr:{{#expr:(2520/7129)*{{{1|}}}*100 round 0}}/100}}
| {{#expr:(2520/7129)*{{{2|}}} round 2}}
+
| {{#expr:{{#expr:(2520/7129)*{{{2|}}}*100 round 0}}/100}}
| {{#expr:(2520/7129)*{{{3|}}} round 2}}
+
| {{#expr:{{#expr:(2520/7129)*{{{3|}}}*100 round 0}}/100}}
 
|-
 
|-
 
! 10
 
! 10
| {{#expr:(2520/7381)*{{{1|}}} round 2}}
+
| {{#expr:{{#expr:(2520/7381)*{{{1|}}}*100 round 0}}/100}}
| {{#expr:(2520/7381)*{{{2|}}} round 2}}
+
| {{#expr:{{#expr:(2520/7381)*{{{2|}}}*100 round 0}}/100}}
| {{#expr:(2520/7381)*{{{3|}}} round 2}}
+
| {{#expr:{{#expr:(2520/7381)*{{{3|}}}*100 round 0}}/100}}
 
|-
 
|-
 
! 11
 
! 11
| {{#expr:(27720/83711)*{{{1|}}} round 2}}
+
| {{#expr:{{#expr:(27720/83711)*{{{1|}}}*100 round 0}}/100}}
| {{#expr:(27720/83711)*{{{2|}}} round 2}}
+
| {{#expr:{{#expr:(27720/83711)*{{{2|}}}*100 round 0}}/100}}
| {{#expr:(27720/83711)*{{{3|}}} round 2}}
+
| {{#expr:{{#expr:(27720/83711)*{{{3|}}}*100 round 0}}/100}}
|}
+
|}</includeonly><noinclude>{{Documentation}}</noinclude>

Latest revision as of 11:27, 23 June 2022

(view - edit) Documentation

Template:Harmonic number generator takes 3 base numbers b1, b2, b3 and returns a decreasing, inverse harmonic sequence for each in the form 1/H(n) × bi up to n=11. The main purpose of this template is to quickly find point capture times for map pages.

The template uses the parser function #expr for its calculations. It rounds to 2 decimal places. Note that the template will not include zeros in decimal places.

Example

Process has base point capture times of 22, 14 and 4 seconds for its mid, second and last points respectively. We can use Template:Harmonic number generator to find the capture times for each player multiplier up to x11.

{{Harmonic number generator|22|14|4}}

Will yield:

n=1 22 14 4
2 14.67 9.33 2.67
3 12 7.64 2.18
4 10.56 6.72 1.92
5 9.64 6.13 1.75
6 8.98 5.71 1.63
7 8.48 5.4 1.54
8 8.09 5.15 1.47
9 7.78 4.95 1.41
10 7.51 4.78 1.37
11 7.29 4.64 1.32