|
Boost : |
Subject: Re: [boost] [fixed_point] Request for interest in a binary fixed point library
From: Christopher Kormanyos (e_float_at_[hidden])
Date: 2012-04-17 19:39:42
>>> Do you expect this to work in the closed fixed point-world
>>> fixed_point<4, -14> result2 = pi_rep<2, -8>() * pi_rep<2, -6>();
>> I do. Others might not.
> So you don't expect the preceding to work
> fixed_point<4, -14> result2 = pi_rep<2, -8>() * pi_rep<2, -6>();
Thank you for the careful reading, Vicente. I was going
too fast and did not see the different bits in pi_rep().
No, I don't expect it to work. I don't even want it to.
Others might expect it to work.
> Thanks for all your comments that encourage myself to try to make
> a better library. Even if at some points in time it could seem that the
> library could be to complex and that I'm building a cathedral I hope
> at the end of the walk it will easy of use and efficient.
> Best, Vicnte
We, in the community, don't have any clearly specified fixed-point
implementation. This forces everyone to "roll-their-own", as was posted
previously. I believe that we definitely need that solid *first implementation*.
You know, the C language actually has a spec for a <7, -23> fixed-point.
I use this on Atmel(R) AVR(R) 8-bit processors. Hardly anyone actually
knows about it. Maybe you want to consider C-compatibility.
(I don't care about C-compatibility, others might).
It is here:
http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51126
"ISO/IEC TR 18037, Programming languages --- C --- Extensions to support
embedded processors"
Best regards, Chris.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk