Template:Arsum
From Tales of Maj'Eyal
Simple arithmetic sum function.
Use:{{arsum|<start>|<end>|<count>}}
Eg: {{arsum|0.5|5|10}} returns 27.5
Description
- start - min value
- count - number of steps
- end - max value
eg: Sum (x/2) from 1->10
- Start = 1/2 = 0.5
- Count = 10
- End = 10/2 = 5
Correct formula is: (0.5*count*(start+end))
For above example:
(0.5*10*(1/2+10/2)) = 5*(11/2) = 27.5