Subject: Re: [boost] floating point FUD
From: Steve M. Robbins (steve_at_[hidden])
Date: 2010-01-23 12:42:33
On Sat, Jan 23, 2010 at 04:25:56PM +0100, Thomas Klimpel wrote:
> When I found out that some code with floating
> point driven logic (I had written years ago) to analytically
> integrate radial symmetric functions over rectangular domains was
> showing unexpected behavior, [...]
> I also have to admit that I write code with floating point driven
> logic from time to time in case it seems unavoidable to me, and that
> this code often has bugs that are only discovered months after the
> code is already finished.
... or years in the present case you described above.
> But I never found a bug in such code that
> would have been a fundamental problem with floating point, but
> always just the "usual" floating point traps I keep overlooking by
I'm curious: what distinction are you drawing between "fundamental
problems" and "usual traps that are continually overlooked"?
And what is the moral of your story? My reading is that you're
essentially saying that floating point-driven logic is fine as long as
you take care to avoid the usual traps. But: isn't the very fact that
most of us stumble over them continually -- and they can lie
undiscovered for years -- reason enough to look for something better?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk