Page 1 of 1

Floats and rounding errors

Posted: Thu Sep 17, 2009 11:38 pm
by pev_2
Hi all,

So, first proper question up from me, perhaps showing some green-ness here but if so, a quick "ignore it" answer will do :-)

I'm running through all the tutorials as a good place to get going again, and in "03mNumbersAndLists" the fourth patch sending a message of "22 33.9 -5 -44.2" generates output of "22 33.900002 -5 -44.200001". Are these rounding errors expected? If so I'd have thought a nod to them in the tutorial document would be in order.

~Pev

(Note : This is in v5.1.0a1, build 39951)

Re: Floats and rounding errors

Posted: Fri Sep 18, 2009 3:43 am
by Jean-Francois Charles
Ignore it.
(32bit floating point numbers => limited number of possible numbers => rounded to the closest...
Infinite number of threads on the subject on the Max forum, but the bottomline is most of the time, ignore it.
J-F

Re: Floats and rounding errors

Posted: Fri Sep 18, 2009 6:01 am
by pev_2
Thanks for that - I'd assumed that would be the case, but has anyone submitted a report to suggest updating the documentation? Sounds like a FAQ that the tutorial should nod to...

~Pev