Boost logo

Boost :

Subject: [boost] [Boost.FixedPoint] Choose notation
From: Dmitriy Gorbel (dmitriycpp_at_[hidden])
Date: 2013-04-28 18:18:34


Hello, community!

I propose extending the Boost Libraries to provide binary
fixed-point arithmetic, within GSOC project.

Fixed-point library will provide nonnegative and negatable
class templates for fractional arithmetic, and cardinal
and integral for integer arithmetic. In total, four class templates.

Fixed-point arithmetic use more than one notation, and I want
to provide several notation to make happy all.

Now I plan to implement two notations - Q notation and
notation from C++1y proposal.
Examples:
 
C++1y proposal notation:
cardinal<16> 0 <= n < 65536
integral<4> -16 < n < 16
nonnegative<8,-4> 0 <= n < 256 in increments of 2^-4 = 1/16
negatable<16,-8> -65536 < n < 65536 in increments of 2^-8 = 1/256

Q notation:
cardinal<16> 0 <= n < 65536
integral<4> -16 < n < 16
nonnegative<8, 4> 0 <= n < 256 has 4 bit for fractional part
negatable<16, 8> -65536 < n < 65536 has 8 bit for fractional part

Please, help me to choose default notation, propose other
notation, or just make any feedback.

Sincerely,
Dmitriy.

--
View this message in context: http://boost.2283326.n4.nabble.com/Boost-FixedPoint-Choose-notation-tp4646262.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

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