Boost logo

Boost :

From: Michael Marcin (mmarcin_at_[hidden])
Date: 2007-04-19 00:20:09


Jeff Garland wrote:
>> Phil Endecott wrote:
>>> Dear All,
>>>
>>> I have recently written some code for fixed point arithmetic which I
>>> would be happy to contribute to Boost, if it is considered worthy.
>
>
> I'm interested. You may not know that there was a fixed decimal
> proposal that rejected...5 years ago now?
>
> http://f1.grp.yahoofs.com/v1/IM0mRnFUa0mZSoJEp3yqTReGrwCdpzLigMsOuJuijMvLOeFw0Z2XpsPciI-AFOZ4GeWQNRr0iYXYN3C855UIi0SYUeIf-z3G/fixdec23.zip
>
> You'll probably want to try and look at the review comments and see
> why it was rejected.

I'll try to find the review but a cursory glance looks like this is supposed
to be for something like BCD ala
http://en.wikipedia.org/wiki/Binary-coded_decimal

What I'm referring to is binary scaling ala
http://en.wikipedia.org/wiki/Binary_scaling

Maybe there is too much confusion using the term fixed-point? Although
fixed is such a nice class name to use for a drop in replacement for float
on machines that have a FPU... I can't really think of anything I'd accept
in its place.

Maybe boost::binary_scaling::fixed and boost::binary_decimal::fixed could
coexist?

> Michael Marcin wrote:
>> AFAIK Boost.Integer doesn't support 64-bit types which forced me to
>> roll my own solution.
>
> That's incorrect. There is support for 64-bit types. The
> documentation, unfortunately, doesn't say so -- you have to read the
> header. I use boost::int64_t and boost::uint64_t in date-time --
> works on every platform boost is ported to AFAIK.
>

Oh? Okay I'll take a look again

Thanks,

Michael Marcin


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