Am I right in finding that 0.5 is occasionally rounded down instead of up? Is it that rounding decimal places in Javascript can go “quirky”? And can it be solved in TF calculation fields?
What would be the best approach?
Thanks for any advise.
Eric
I’ve not personally noticed the rounding behaviour but it sounds to me like an implementation of IEEE 754’s rounding rules for round half to even which is a strategy for mitigating rounding bias.
You might be able to use a script field to have Javascript do the rounding for you, I believe it uses the round up strategy.
Hi Sam,
Thanks for your reply and pointing this out!
Field script does the trick, rounds up from 0,5.
So it works!
I’m anything but a programmer, didn’t know about these rounding rules (Rounding is no a straightforward subject though once you start reading on the subject ;-) But interesting ).
Cheers
Eric