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

Hans-Christoph Steiner hans at at.or.at
Sun Apr 8 20:43:54 CEST 2012


The main reason why this is still like this is because no one has written better code, then done thorough testing in order to prove that the new code doesn't break anything.  People have written better code for this before, no one has done the thorough testing part...

.hc

On Apr 7, 2012, at 10:58 PM, Martin Peach wrote:

> 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
> 
> 
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list


----------------------------------------------------------------------------

"A cellphone to me is just an opportunity to be irritated wherever you are." - Linus Torvalds




More information about the Pd-list mailing list