[PD] weird float/add limitation

Claude Heiland-Allen claude at mathr.co.uk
Wed Jan 28 17:29:52 CET 2015


On 28/01/15 16:20, Alexandre Torres Porres wrote:
> 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?

welcome to floating point :)

https://en.wikipedia.org/wiki/Floating_point#Representable_numbers.2C_conversion_and_rounding
https://en.wikipedia.org/wiki/Machine_epsilon


Claude
-- 
http://mathr.co.uk




More information about the Pd-list mailing list