Andrew Lentvorski wrote:
Gus Wirth wrote:
James G. Sack (jim) wrote:
So, I wonder:
-what's the current state of the decimal floating point movement
IEEE 854, as always.
-and what's the prognosis for general availability & adoption?
Mixed.
Decimal floating point is specified legislatively for all financial
transactions. However, only IBM has a processor which does IEEE 854 in
hardware and it's for very specialized use.
Not sure what the current state is but I have suddenly found myself
having to implement BCD arithmetic. In an effort to replace some
proprietary code I have to independently come up with a way to do
functions with up to 64 digits of precision, with the BCD numbers
being packed into a byte array of two digits per byte and the array
being 32 bytes.
Does this help Gus?
http://www.delphiforfun.org/Programs/Library/BigFloat.htm
Lots of Decimal Floating Point links:
http://www2.hursley.ibm.com/decimal/
You would probably be better off using a generalized decimal floating
point library and writing BCD conversion functions rather than having to
work out all of the math.
Thanks for the links. In particular, the Delphi For Fun link lead me to
this:
http://citeseer.ist.psu.edu/cache/papers/cs/27835/http:zSzzSzwww.cs.ubc.cazSzlocalzSzreadingzSzproceedingszSzspe91-95zSzspezSz.zSzvol24zSzissue6zSzspe903.pdf/multiple-length-division-revisited.pdf
The URL might wrap in some browsers. The referenced article is a 23 page
paper on long division complete with a Pascal implementation! Bingo!
Now to read it and adapt it to my chunk of code. As far as the other
parts: addition, subtraction, and multiplication, I've already done
this. The problem with using a decimal library is that it needs to be
"bug-for-bug" compatible with the commercial version. It's not bugs
really, but ways of setting the precision, decimal places and doing
normalization and rounding. I'm trying to imagine what the Wine guys go
through with MS Windows and I don't think I would have the stomach for it.
Gus
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg