Found a bug? Have a suggestion? File a bug report!
Looking for HG/SS? Have an unnatural hatred for brown? Enjoy cool new things? You probably want the beta Pokédex.
No avatar

Silverbolt

User since 05/12/09 08:12

Last active on 05/12/09 08:47, which was 27 weeks, 4 days ago


Numbers

Posts: 1 (Uninterested)

Average posts per day: 0.005

Contact

Send private message PM
not yet

Groups

Signature

Last post by Silverbolt (05/12/09 08:33)

On the Stat Mechanics Page (http://veekun.com/dex/mechanics/stats), in the Nerd Stuff: Formulas section, you state that all calculations are done in integer precision and with normal order of operations. This makes the formulae perfectly correct, but since I'm a human and not a computer, my first instinct is to group that little level/100 calculation and do it first. In floating point, that wouldn't make a difference, but in integer precision it makes a huge difference since level/100 would be 0 unless level were 100.

Obviously, I was doing the calculations in wrong order; level is multiplied by the parenthetical result first. However, I suspect I'm not the first and won't be the last to be initially confused by thinking the division could be done first. A little blurb about the fact that level is multiplied first would make this point more obvious. A more subtle solution would be to place parentheses around the multiplication, although that would make the formulae bulkier.

Hm... After thinking a moment, the fact that I assume the multiplication is done first is based on a left to right reading. Any computer language that didn't read the code that direction (although I personally am not aware of any such languages) might actually get a different result. That makes the addition of parentheses a bit more appealing to me personally, but the decision is yours, of course.