[PD] floating-point question
Mathieu Bouchard
matju at artengine.ca
Mon Feb 20 04:51:51 CET 2012
Le 2012-02-19 à 19:42:00, Jonathan Wilkes a écrit :
> With 64-bit floats does this problem practically go away (like getting
> an index into a large table)?
Depends on how practical you need it to be.
32-bit floats have 23 explicit bits of numerator, and an implicit high bit
that is always one. This causes the numerators to always be whole numbers
picked between 16777216 and 33554431.
64-bit floats have 52 explicit bits of numerator, and an implicit high
bit. This means 29 doublings of precision. Every error is 536870912 times
smaller.
For indexing into a table, it's very hard to do something wrong using
float64. For other things, ... you can always find something more picky
about precision of floats, but they can get really hard to find as you
increase precision.
______________________________________________________________________
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC
More information about the Pd-list
mailing list