Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2003-06-14 21:06:25


[...]
> BOOST_CHECK_CLOSE( 1.49012e-8, 0.0, 1e-6 );
[...]
> error in "BOOST_CHECK_CLOSE_test": test 1.49012e-8 ~= 0.0 failed
[1.49012e-008 !~= 0 (+/-1e-006)]

This is how it's supposed to be. Check floating pointer comparison algorithm
description for more detailes and links to references. The general idea is
that it compares *relative error* with epsilon value. It proves to closer
reflect real-life needs.

Gennadiy.

P.S. Should I update sourceforge?


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