Boost logo

Boost :

From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2008-02-22 16:00:10

> The review of Johan Rade's floating point utilities starts today.
> Code and docs can be downloaded from :
> action=downloadfile&
> M
> ath%20-%20Numerics&
> The library consists of three parts:
> 1) Floating point classification routines: these are optimised
> implementations of the C99 and C++ TR1 functions fpclassify, isinf,
> isnan,
> isnormal and isfinite. From Boost-1.35 onwards these are already a
> part of
> Boost.Math (see
> math_toolkit/special/fpclass.html)
> so if accepted the two implementations will get merged.
> The review here should focus on the implementation used, and testing on
> whatever platforms you have available - in particular are there any
> circumstances (compiler optimisation settings etc) where this
> implementation
> breaks?
> 2) Sign manipulation functions: implementations of the C99 and C++ TR1
> functions copysign and signbit, plus the changesign function. Two of
> these
> (signbit and copysign) are currently undocumented members of
> Boost.Math, and
> again the two implementations will get merged if this library is
> accepted.
> Again the main focus of the review here is the implementation, and
> testing
> thereof especially in the presence of compiler optimisations.
> 3) C++ locale facets: these will read and write non-finite numbers in a
> portable and round-trippable way: that is not otherwise possible with
> current C++ std library implementations. These are particularly
> useful for
> number-serialisation for example.
> Since the design is already specified by the C++ standard for these
> facets,
> your review here should focus on implementation, testing,
> documentation, and
> perhaps where in Boost these should best be placed if accepted.
> These look to be a useful collection of utilities, so I'll look
> forward to
> your reviews,

This turns out to be a very short review from my end, but I thought I share
some thoughts anyway.

* What is your evaluation of the design?

Very problem oriented and helping to abstract the platform specifics.

* What is your evaluation of the implementation?

I didn't look at the code in detail.

* What is your evaluation of the documentation?


* What is your evaluation of the potential usefulness of the library?

Very useful. In fact Joel and I are using the floating point classification
and sign-bit routines in SpiritV2 (for both, parsing and generation), and it
turned out to be a huge time saver for us.

* Did you try to use the library? With what compiler? Did you have any

Yes, SpiritV2 is using it. We tried with different versions of gcc, intel
and msvc (mainly on windows)

* How much effort did you put into your evaluation?

Essentially no extra time. I'm reporting what I've learned while writing the
Spirit code.

* Are you knowledgeable about the problem domain?

Using this library helped me to understand some of the problems in this
domain. I'm not considering myself to be an expert, though.

* Do you think the library should be accepted as a Boost library?

Definitely, yes.

Regards Hartmut

Boost list run by bdawes at, gregod at, cpdaniel at, john at