Subject: Re: [boost] Fixed point integer proposal
From: Soren Holstebroe (holstebroe_at_[hidden])
Date: 2009-06-25 13:09:14
> 2009/6/25 Andrey Upadyshev <oliora_at_[hidden]>
>> Yes, it is very interesting. I think it will be also useful in finance calculations.
> Actually, on that note, would it be possible to allow an arbitrary
> scale factor instead of specifying a shift? It ought to still be as
> efficient for power-of-two scales, on the assumption that compilers
> optimize multiplication and division by such constants...
I suppose that it would indeed be possible to use an arbitrary scale.
If it is unclear if the compiler will optimize correctly, it should be
straight forward to implement a scaling template with power-of-two as
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk