RE: [boost] Re: test_fp_comparisons and rounding errors

2003-07-08 Thread Beman Dawes
At 05:54 PM 7/7/2003, Rozental, Gennadiy wrote: >> A half-way solution is to have something like: >> >> BOOST_CHECK_EQUAL_NUMBERS(x,y,IsEqual) >> >> and let users specify their own Preciates. > >There is BOOST_CHECK_PREDICATE > >> By default, the Test library could provide >> a straight-forward ABS

RE: [boost] Re: test_fp_comparisons and rounding errors

2003-07-07 Thread Rozental, Gennadiy
> A half-way solution is to have something like: > > BOOST_CHECK_EQUAL_NUMBERS(x,y,IsEqual) > > and let users specify their own Preciates. There is BOOST_CHECK_PREDICATE > By default, the Test library could provide > a straight-forward ABSOLUTE-ERROR comparator: By default, the Test library p

[boost] Re: test_fp_comparisons and rounding errors

2003-07-07 Thread Fernando Cacciola
Beman Dawes <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > At 02:22 PM 7/7/2003, Rozental, Gennadiy wrote: > > >I could probably prohibit usage of CHECK_CLOSE with number of rounding > >errors provided. > >Is there any other general recommendations how to choose the tolerance to >

[boost] Re: test_fp_comparisons and rounding errors

2003-07-07 Thread Fernando Cacciola
IMHO, the problem with test_fp_comparisons is that it is fundamentally flawed. As Guillaume said, ULPs just don't add. The approach of trying to bound the relaive error based on the number of roundings, which is what is intended, just doesn't work, and it won't work no matter how you try the adjust

[boost] Re: test_fp_comparisons and rounding errors

2003-07-05 Thread Gennadiy Rozental
"Beman Dawes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > test_fp_comparisons has been failing for a long time. The issue has to do > with how much tolerance to allow for rounding errors. > > The close_at_tolerance algorithm calculates tolerance as follows: > > n*std::numeric_