MAXMSP 6.0.5, OSX 10.6.8, Mac Pro 1,1 : Message Box displays wrong numbers

Nov 22, 2013 at 8:22am

MAXMSP 6.0.5, OSX 10.6.8, Mac Pro 1,1 : Message Box displays wrong numbers

_slightly_ wrong numbers, but it matters here.

1) create a floating number box
2) set it to 1548.3870
3) connect a button to the inlet
4) connect the outlet to the right inlet of a message box
5) lock the patch
6) click the button

expected result: the message should read 1548.3870
actual result: the message reads 1548.386963

I thought using [float] instead of a message might fix the problem … not so.

Strangely 15483870. – the same figures, but a different decimal point/magnitude transfers just fine, … so, my next attempt at a workaround goes like this:

1) send 15483870. via a [float] object
2) divide by 10000.
3)result: 1548.386963

OUCH !!!
what on Earth is the story behind this behavior

#272061
Nov 24, 2013 at 6:31am

Hi CORKCITYGAMELAN,

what you are experiencing this is not a Max specific error but has to do with floating point calculations in computing in general. Floating point numbers do have rounding errors. In 64bit mode (available for max 6.1) these rounding error will be smaller.

Cheers, Jan

#273648

You must be logged in to reply to this topic.