|
FAST Protocol
< Previous Next >
Re: Representing a double as a Fast scaled decimal
Daniel May / SpryWare, LLC <> 8 Oct 2008 5:27PM ETDimitry,
I had posted a related thread a while back, see http://fixprotocol.org/discuss/read/eebb5ac9
I think the optimal way to do this is to determine the amount of precision you want from the IEEE float or double, and extract the mantissa and exponent to create a scaled decimal. As you would expect, this needs to be optimized, and I am not sure the standard C lib methods are the way to go. Then comes the question of rounding vs. truncation.
So, does someone want to submit a good algorithm for conversion ?
/Daniel
Re: Representing a double as a Fast scaled decimal Daniel May / SpryWare, LLC 8 Oct 2008 5:27PM ET
|