On 20/02/12 04:42, Jonathan Wilkes wrote:
----- Original Message -----
From: Mathieu Bouchardmatju@artengine.ca To: Hans-Christoph Steinerhans@at.or.at Cc: pd-list@iem.at; Mirko Petrovichmirko.petrovich@gmail.com Sent: Sunday, February 19, 2012 10:12 PM Subject: Re: [PD] floating-point question
Le 2012-02-19 à 21:52:00, Hans-Christoph Steiner a écrit :
On Feb 17, 2012, at 4:27 PM, Mirko Petrovich wrote:
I'm having a problem with a patch doing some very simple math. The
problem is that float 0.1 represents as 0.0999985 in some cases.
That's a problem with floating point calculations on computers,
unfortuantely. Hard to work around that.
...
With 64-bit floats does this problem practically go away (like getting an index into a large table)?
Careful, though, if you convert it back to 32 or 16 bit. Especially if you are using expensive gear: