[PD] weird float/add limitation
Alexandre Torres Porres
porres at gmail.com
Wed Jan 28 17:47:55 CET 2015
> it's a limitation of 32 bit float
I thought so, but same happens when I use the new Pd Vanilla 64 bits...
what now? :)
2015-01-28 14:41 GMT-02:00 Cyrille Henry <ch at chnry.net>:
> Le 28/01/2015 17:20, Alexandre Torres Porres a écrit :
> howdy, check the attached patch.
>> 1e+06 + 1 is not equal to 1e+06
>> but 1e+09 + 1 is equal to 1e+09
>> meaning it didn't add 1 to 1e+09! Meaning there's a limit where it stops
>> adding 1 to something.
>> how's that and why?
> it's a limitation of 32 bit float.
> since 1 bit is used for the sign, 8 for the exponent, 23 bit are left for
> the significant.
> this mean that you can't have more precision in the significant than 2^24
> -1 (a bit less than 1.7*10^7)
>> Pd-list at lists.iem.at mailing list
>> UNSUBSCRIBE and account-management -> http://lists.puredata.info/
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pd-list