Boost logo

Boost :

Subject: Re: [boost] floating point FUD
From: John Maddock (john_at_[hidden])
Date: 2010-01-24 11:17:44


> FP algorithms are all about accumulation of error, aren't they? Would be
> nice to have some kind of debugging facility (integrated with the code),
> that somehow keeps track of all kinds of error bounds/measures you're
> interested in.

I've experimented with that - a "dual precision" type - basically a class
that evaluates every expression it's subject to at two different
precisions - say double and with an arbitrary precision type, and then
optionally prints out the accumulated error. The idea is one can then step
through code, or else set a break when the accumulated error reaches some
threshold, and see where the error is coming from in the algorithm. That's
the theory anyway, in practice I've found good old fashioned pen and paper
analysis of the algorithm is often as good...

John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk