$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Paul A Bristow (pbristow_at_[hidden])
Date: 2006-10-13 13:26:09
 
|  -----Original Message-----
|  From: boost-bounces_at_[hidden] 
|  [mailto:boost-bounces_at_[hidden]] On Behalf Of Johan Råde
|  Sent: 12 October 2006 16:40
|  To: boost_at_[hidden]
|  Subject: Re: [boost] Optimized portable isnan, isfinite, 
|  fpclassify etc
|  
|  John Maddock wrote:
|  > Johan Råde wrote:
|  >> 3. Your <limits> header is a bit funny.
|  >> numeric_limits<T>::quiet_NaN() returns a NaN with the signbit set.
|  >> This triggered the assertion.
|  > 
|  > You need to allow for the possibility that the sign bit is 
|  set anyway.
|  
|  I will.
|  
|  > 
|  >> (Does it matter? Maybe. According to C99, positive NaN should be
|  >> written to text files as "nan" or "+nan"  and negative 
|  NaN as "-nan".
|  >> And this will probably be part of C++0x as well.)
|  > 
|  > C++ doesn't guarentee any particular format for printing 
|  NaN's or Infinities 
|  > :-(
|  
|  C99 does. And C99 will become part of C++0X, right?
|
I have also raised this issue
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2022.pdf
and suggest that, with NaNs (like other types), sign bit should be
detectable and printed, without implying any mathematical sense.
Paul
--- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539561830 & SMS, Mobile +44 7714 330204 & SMS pbristow_at_[hidden]