|
Boost : |
From: Jens Maurer (Jens.Maurer_at_[hidden])
Date: 2003-07-23 17:25:26
The library has been reviewed by a number of boost contributors,
including Paul Bristow, Ilya Buchkin, Fernando Cacciola, Daryle
Walker and others. Thanks for your effort!
Taking the review comments into considerations, the library
will not be accepted into boost at its present state.
Here's a short summary of what I believe are the most
outstanding issues, but each review comment should be taken
into account individually for a rework.
- The documentation needs serious overhaul in both presentation
and content. Words such as "precision" and "scale" should be
defined, not all readers are experts in the domain. Specific
technical requirements on the abstract type to be defined should
be layed out ("financial applications" is not enough), and
sound reasoning in the forest of alternatives should be provided.
A comparison of the design to other programming languages or
numerics standards is appreciated. Detailed semantics of each of
the functions should be given, possibly similar in layout as the
description of the standard library in the C++ standard. The
discussion of the internal implementation should be moved to the
very end to not distract readers from the interface.
- The design should be reviewed. What happens with overflow?
Financial people may want overflow signalled instead of
silently eaten and producing wrong results. What happens with
intermediate loss of precision? A number type is very
surprising if its +,* operations are non-commutative.
For a relatively simple value-based numerical type, inability
to serve as a value type for STL containers is not acceptable.
Providing a multitude of maths operators for various alien
types such as int, double, and string instead of conversion
or explicit constructors requires detailed reasoning to
support the added complexity.
On the positive side, boost::numeric has been agreed as the
namespace for the library, and fixed_decimal appears to be
a good name given the very interesting idea of standardized
floating-point decimal numbers. Plus, the rounding control
appears really ingenious syntax-wise.
Nonetheless, thanks to Bill Seymour for bringing forward this
library. Some boost readers wishing to code financial
applications may now better understand the issues involved.
Personally, I'm looking forward to a IEEE-conforming
decimal floating-point library.
Jens Maurer, Review Manager
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk