|
Boost : |
From: Marcus Lindblom (macke_at_[hidden])
Date: 2007-05-29 05:02:48
John Maddock wrote:
> AlisdairM wrote:
>
>> How does math_info report signalling NaN values?
>>
>> I am trying to find regressions in a certain compiler config, and it
>> fails math_info test as soon as it tries to evaluate the signalling
>> NaN values - as it duly generates an unhandled signal and terminates.
>>
>
> Borland eh?
>
> Math_info relies on numeric_limits to return the correct answers to it's
> queries: with Borland it reports that it *does* have a quiet NaN, but as
> soon as you *call* numeric_limits<>::quiet_NaN() the program aborts with an
> unhandled hardware exception! :-(
>
> Maybe we should add some #ifdef's in there so the program does at least run
> to completion?
My 0.02: I've heard rumors about Borland enabling hardware exceptions
for floating point. It can be manually set (which needs to be done for
borland users coding OpenGL, otherwise they end up with divide-by-zero).
Perhaps set the control word and make Borland work in the tests as other
compilers, and mentioning it in the docs (and/or test/assert, if possible?)
Cheers,
/Marcus
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk