[PD] numbers seem to be wrongly adding up

rolfm at dds.nl rolfm at dds.nl
Wed May 19 13:38:50 CEST 2021


working on a simulation patch i've difficulties with wrong results from

in a periodic loop a [value V] is added up with a constant. 

a simplified version: 

[t b] - [v V] - [+ 0.0025] - [v V] 

it starts at 0. 

looking at the numbers when put in an array i see that e.g. 

the value that should be 0.1250 is actually 0.1249999 

and 0.75 is actually 0.7499994. 

in the loop this variable is used for calculations which multiply the

why does this simple addition not giving the exact result? 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20210519/97d0dc91/attachment.htm>

More information about the Pd-list mailing list