[PD] weird float/add limitation

Cyrille Henry ch at chnry.net
Wed Jan 28 18:00:04 CET 2015



Le 28/01/2015 17:47, Alexandre Torres Porres a écrit :
>  > it's a limitation of 32 bit float
>
> I thought so, but same happens when I use the new Pd Vanilla 64 bits...
this mean that it's compiled for 64 bit CPU, not that float are store on 64 bits


you can have 8 bit int, 32 bit float and 64 bit float (and more) on a 32 bit CPU.
and also on a 64 bit CPU.
even 8 bit cpu can deal with 32/64 bit float...

cheers
c

>
> what now? :)
>
> 2015-01-28 14:41 GMT-02:00 Cyrille Henry <ch at chnry.net <mailto: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)
>
>     cheers
>     c
>
>
>         cheers
>
>
>         _________________________________________________
>         Pd-list at lists.iem.at <mailto:Pd-list at lists.iem.at> mailing list
>         UNSUBSCRIBE and account-management -> http://lists.puredata.info/__listinfo/pd-list <http://lists.puredata.info/listinfo/pd-list>
>
>
>     _________________________________________________
>     Pd-list at lists.iem.at <mailto:Pd-list at lists.iem.at> mailing list
>     UNSUBSCRIBE and account-management -> http://lists.puredata.info/__listinfo/pd-list <http://lists.puredata.info/listinfo/pd-list>
>
>
>
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>



More information about the Pd-list mailing list