Subject: [boost] [fixed_point] Request for interest in a binary fixed point library
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2012-04-04 17:33:15
the recent discussion on the MultiplePrecission Arithmetic library has
show that some people has its ow fixed point library.
Is there an interest in a Boost library having as base
I have started a prototype
http://svn.boost.org/svn/boost/sandbox/fixed_point (there is no doc yet
but the basic goal is quite close to the N3352 C++ proposal). This
prototype should allow you to play a little bit with.
If yes, what would you like to be changed, added or improved in n3352?
Next follows some design decisions that IMO need to be decided before hand.
* Should integers and reals be represented by separated classes?
* Should signed and unsigned be represented by separated classes?
* Should the library use a specific representation for signed numbers
(separated sign, 2-complement? Let the user choose?
* Should the library provide arbitrary range and resolution and allocators?
* Should the library be open to overflow and rounding or just implement
some of the possible policies? and in this case which ones?
* Should fixed_point be convertible to/from integer/float/double?
* Could the result of an arithmetic operation have more range and
resolution than his arguments?
* Is there a need for a specific I/O?
* is there a need for radix other than 2 (binary)?
* Should the library implement the basic functions, or should it
imperatively implement the C++11 math functions? Could a first version
just forward to the c++11 math functions?
* Should the library support just one of the know ways to name a
fixed-point, a U(a,b), nQm, ...? Provide some ways to move from one to
* Could expect the same/better performances respect to hand written code?
* What should be the size used by a fixed_point instance? _fast? _least?
Should the user be able to decide which approach is better for his needs?
* Which should be the namespace? boost? boost/fixed_point?
* others you can think of.
Please, replay if you are interested, have some experience in the
domain, good ideas, ..
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk