
Boost : 
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 20010326 17:39:29
k.hagan_at_[hidden]
wrote
> (The main reason why the x86 provides these "load constant"
> instructions is to support rounding modes correctly. The most
> accurate representation differs if the rounding mode is towards
> +/ infinity. In one case we want the closest value below the
> constant, and in the other case we want the closest value above it.
> No compiletime constant can reproduce this behaviour, and working
> it out at runtime is not terribly fast, at least for the "long
> double" case! We probably don't care about this. Jens might, in the
> context of his boost interval library, where he needs a pi for
> argument reduction, if I remember correctly.)
Do we want to try to produce constants which show the intervals?
(Am I right in presuming this means nearest value + the smallest binary
digit,
and minus it?)
Can't one handle this adding or substracting std::limits<double>epsilon()?
Or is it more complicated, as even?
Paul
Dr Paul A Bristow, hetp Chromatography
Prizet Farmhouse
Kendal, Cumbria
LA8 8AB UK
+44 1539 561830
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