[PD] why does PD round numbers? (in tables, in messageboxes, etc)

Martin Peach martin.peach at sympatico.ca
Sun Apr 8 04:58:02 CEST 2012


It's because Pd saves the value by printing it as text into the patch 
file using a reduced precision format specifier (%g instead of %f, or 
%0.6f) so that the numbers look good on screen, with no extra zeros for 
example.
I don't like it either.

Martin

On 2012-04-07 22:40, Angakok Thoth wrote:
> that's not what i mean.
>
> i mean, that when i write 12345678 (must be 100% accurate within 32bit
> float with 24bit mantissa) into an array and read it from there, it's
> still 12345678.
> but when i save that patch, close it and reload it, and i read from the
> array, i get 12345700.
>
> nothing to do with limitations of floating point number.
>
>
> On Sun, Apr 8, 2012 at 4:23 AM, i go bananas <hard.off at gmail.com
> <mailto:hard.off at gmail.com>> wrote:
>
>     http://en.wikipedia.org/wiki/Floating_point
>
>
>
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->  http://lists.puredata.info/listinfo/pd-list




More information about the Pd-list mailing list