|
Boost : |
Subject: Re: [boost] floating point FUD
From: Hervé Brönnimann (hervebronnimann_at_[hidden])
Date: 2010-01-24 14:44:43
This by the way was the very motivation behind Boost.interval library. And it's used to guarantee consistent floating-point driven logic (with overlapping intervals triggering exact computation) with the cost (in most cases) of floating point additions (well, a bit more, for the interval bounds, and a bit more yet for changing the rounding mode).
-- Hervé Brönnimann hervebronnimann_at_[hidden] On Jan 24, 2010, at 11:17 AM, John Maddock wrote: >> 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. > _______________________________________________ > Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk