[PD] 32bit integer float

Roman Haefeli reduzierer at yahoo.de
Sat Mar 25 20:31:39 CET 2006


hi tim, eni


"Tim Blechmann" wrote:
>
> no, because there is no possibility to encode 0.4 as a floating point
> number without rounding ... an equality test only makes sense, if a
> number can be encoded as floating point number and it's sure, you're
> experiencing rounding problems ...

of course, it is a rounding problem. but the fact, that some objects in some 
cases are rounding up ([print], [numberbox], [msgbox]) and others down 
([int]) makes the story more complicated, see attached patch. it could be 
annoying sometimes, since represantion differs from effective values. what 
is a good solution for handling with this? insert a [+ 1e-006]?

roman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 32bitfloats.pd
Type: application/octet-stream
Size: 371 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20060325/11a95cb6/attachment.obj>


More information about the Pd-list mailing list