Re: [boost] Fixed point integer proposal

25 Jun
2009
25 Jun
'09
5:09 p.m.
2009/6/25 Andrey Upadyshev <oliora@gmail.com>
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 template specializations. Soren
5829
Age (days ago)
5829
Last active (days ago)
0 comments
1 participants
participants (1)
-
Soren Holstebroe