Boost logo

Boost :

From: Paul A. Bristow (boost_at_[hidden])
Date: 2003-07-16 16:13:02


| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]]On Behalf Of Gabriel Dos Reis
| Sent: Sunday, July 13, 2003 9:22 AM
| To: Boost mailing list
| Subject: Re: [boost] Re: Re: is_nan
|
|
| "Paul A. Bristow" <boost_at_[hidden]> writes:
| | There is also a single IEEE FP pattern called 'indeterminate' or
| what Intel call
| | 'NotAVal" (0x1fffe000...) which might become useful as a Portable Standard
| | "missing value" marker if portably supported?

| I won't take that road.

Well if not then can you suggest a potentially Portable and Standard way to
indicate 'missing values' in arrays etc of floating point values. I'm not sure
that a qNaN is the best way to do this - it seems better suited to the result of
compuational mishaps.

| Signalling NaNs are used to indicate missing initialization values.

This is OK for catching missing initialization by mistake - but not for OK for
deliberately missing because there really is no value (measurement missing).

In this case, for example calculating the mean, you want to test if the value is
present/valid 'is_not_missing' before you add it to the sum and increment the
count.

Testing !is_nan is possible solution but I'm not sure it is ideal.

Suggestions?

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]


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