Difference between revisions of "YiffieMon:Hplus(Formula)"
(Created page with "HPlus:Take the highest plus the the highest times 1-(0.5 ** (the total of the others(1/ highest))) <math>1-0.5^{\left(x\cdot\frac{1}{a}\right)}</math> <nowiki>def hplus(num...") |
m (Cmdrtako moved page Hplus(Formula) to YiffieMon:Hplus(Formula) without leaving a redirect) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
HPlus:Take the highest plus the the highest times 1-(0.5 ** (the total of the others(1/ highest))) | HPlus:Take the highest plus the the highest times 1-(0.5 ** (the total of the others(1/ highest))) | ||
− | <math>1-0.5^{\left( | + | <math>1-0.5^{\left(Others\cdot\frac{1}{Highest}\right)}</math> |
<nowiki>def hplus(numbers): | <nowiki>def hplus(numbers): | ||
− | + | sum=0 | |
− | + | highest = numbers[0] | |
− | + | for x in numbers: | |
sum += x | sum += x | ||
− | + | if x > highest: | |
− | + | highest = x | |
sum -= highest | sum -= highest | ||
return highest + (highest * (1 - (0.5 ** (sum * (1 / highest))))) | return highest + (highest * (1 - (0.5 ** (sum * (1 / highest))))) | ||
</nowiki> | </nowiki> |
Latest revision as of 04:37, 22 May 2022
HPlus:Take the highest plus the the highest times 1-(0.5 ** (the total of the others(1/ highest)))
[math]\displaystyle{ 1-0.5^{\left(Others\cdot\frac{1}{Highest}\right)} }[/math]
def hplus(numbers): sum=0 highest = numbers[0] for x in numbers: sum += x if x > highest: highest = x sum -= highest return highest + (highest * (1 - (0.5 ** (sum * (1 / highest)))))