Boost logo

Boost :

From: Greg Chicares (chicares_at_[hidden])
Date: 2001-05-18 06:52:43


On 2001-04-23T12:21:10 -0400 Beman Dawes wrote:
>
> I'm run the Win32 regression tests, preliminary to the next release. The
> tests are looking quite good, but it would be nice to clear the floating
> point failures for several of the config/limits_test.cpp tests, which are
> uniformly failing on the Borland, Metrowerks, and Microsoft compilers.
>
> Since I don't know the first thing about floating point arithmetic, could
> someone who does please take a look at the errors and see if there is any
> obvious fix.
>
> See ftp://boost.sourceforge.net/pub/boost/regression-logs/win32.zip

1. Since I'm responding to a message that's almost a month old,
I'd like to ask whether this problem has been resolved before
spending more time on it. (I searched the yahoo group archive
and found no response, but might there have been private email?)

2. With this modification to limits_test.cpp

+ #if defined(__BORLANDC__)
+ # include <float.h>
+ #endif

  int test_main(int, char*[])
  {
+ // mask underflow, zero-divide, and invalid
+ volatile unsigned short cw = 0x01361;
+ #if defined(__BORLANDC__)
+ _control87(cw, 0x0ffff);
+ #endif

borland C++ 5.5.1 will at least run to completion rather than
throwing a hardware exception. Then it generates the same 12
errors as the intel compiler, all of which have to do with
comparison with a quiet NaN, arising in this code:

  // NaNs shall always compare "false" when compared for equality
  // If one of these fail, your compiler may be optimizing incorrectly
  BOOST_TEST(! (qnan == 42));
  BOOST_TEST(! (qnan == qnan));
  BOOST_TEST(qnan != 42);
  BOOST_TEST(qnan != qnan);

My day job beckons; I'll dig into this more tonight if no one
else says they've already done that.


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