[PD] "wrong" floating point values in pyext
geiger
geiger at xdv.org
Mon Feb 20 12:00:13 CET 2006
On Mon, 20 Feb 2006, Frank Barknecht wrote:
> However if I set this float x to a floating point value like "0.02", Pd will
> print a value that is only near the target value:
>
> "x 0.2" results in a printout of 0.20000000298
>
> Is there something wrong?
floating point is not very good at representing some numbers, it can only
do it approximately, this is also troublesome if you want to build a
counter that counts by 0.01 increments and stops if the sum == 100
This will not work, because it never sums up to 100.
Guenter
>
> Ciao
> --
> Frank Barknecht _ ______footils.org_ __goto10.org__
>
> _______________________________________________
> 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