Boost logo

Boost :

From: Paul A. Bristow (boost_at_[hidden])
Date: 2003-07-17 14:17:21


Fools step in where angels fear to tread -

so I think I should not volunteer and keep my :-( to myself ;-)

But I still faintly hope that Boost could provide some lead here. Anyone with
wide experience in this minefield?

I agree that the value should be a qNaN because one does not want to risk
causing a trap by testing for it (or indeed outputing it - as "missing"),

leaving sNaN(s) to catch mistaken failure to initialise.

Paul

Paul A Bristow, Prizet Farmhouse, Kendal, Cumbria, LA8 8AB UK
+44 1539 561830 Mobile +44 7714 33 02 04
Mobile mailto:pabristow_at_[hidden]
mailto:pbristow_at_[hidden]

| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]]On Behalf Of Gabriel Dos Reis
| Sent: Thursday, July 17, 2003 3:34 PM
| To: Boost mailing list
| Subject: Re: [boost] Re: Re: is_nan - how to flag missing values?
|
|
| "Paul A. Bristow" <boost_at_[hidden]> writes:
|
| | Thanks but this still leaves me feeling that there is a need for a
| | 'Standard and Portable' way of indicating 'missing value',
|
| sorry if I sounded negative, that wasn't the intent. I would to make
| sure we all undertsand and agree on what is going on.
|
| By "standard and Portable", we need to specifiy exactly what that means.
| On some plateform, the notion of special values like NaN just does not
| make sens -- either a floating point always object represents a value.
| So on those plateforms, we won't have the notion of "missing value".
| Clearly such plateform don't have things like NaNs.
|
| | but perhaps this will remain one of the many unmet needs. Choosing a
| | bit pattern(s) for 'missing value'etc doesn't seem easily portable
| | from your other posts on detecting NaNs in general.
|
| this is an area where practice varies from one community to another;
| unfortuenatly. But, from time to time, some architwectures manuals
| seem to recommand some practices.
|
| | Does we have to
| | have processor specific macros to implement an bool
| | is_missing(double)?
|
| Yes, I think that we would need some target-specific macros to
| implement notions that missing values (I would prefer singular
| values).
|
| | Can one be sure that the bit pattern chosen for
| | the 'missing value' NaN won't be produced from a computational
| | mishap?
|
| That is why I would suggest conducting some analysis to see how much
| practice varies.
|
| | Is there a reason why it should it be a quiet or signalling NaN?
|
| If we were to stay in the real of C99, I would say it should be a qNaN
| -- because C99 does not support yet sNaNs. On the other hand the only
| traditional use of sNaN was for unitialized objets.
|
| | Leaves me a bit :-(
|
| Floating point arithmetic really is a minefield :-(
|
| -- Gaby
| _______________________________________________
| Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
|
|


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