– Pasted Max Patch, click to expand. –

]]>
With [flonum] you can do that :

– Pasted Max Patch, click to expand. –

]]>
Not sure using

p

]]>take a look at http://www.h-schmidt.net/FloatConverter/IEEE754.html and enter 20.3 in the box. here you can see how this number is internally represented and what that actually comes out as

]]>@leehu: doubles *are* used for internal arithmetic (mostly), but for message-passing between objects it has always been convenient to use data types that are the same size for floating-point, integers, and symbols (pointers). And the common “denominator” was a 32-bit word. Never mind that in the mid-1980s a lot of computers didn’t even support 64-bit float registers (plus Apple’s software double-precision float was an 80-bit datum).

Nor is it “random” what can be represented exactly. If it’s a binary fraction, it can be represented exactly. If it ain’t, it cain’t.

]]>(And it may be instructive to read a few of the links!)

My description of what can and cannot be precisely represented is a bit of an over-simplification, but once you’ve got binary fractions in your head, you’ll have far fewer wtf-moments in Max.

]]>