Monday, December 25, 2006
z390 Supports new Decimal Floating Point (DFP) instructions
The latest PTF update v1.2.00f for the z390 portable mainframe assembler now includes support for 57 new Decimal Floating Point (DFP) instructions. The z390 macro assembler now supports 3 new data types: ED for 7 digits, DD for 16 digits, and LD for 34 digits. These new instructions and data formats plus the z390 extended macros (CTD and CFD) for conversion to and from decimal scientific notation, enable assembler programs to perform decimal arithmetic with the same precision and ease as Excel without those annoying rounding errors that creep in when using hex HFP or binary BFP floating point. For example, the addition of 1.1 + 2.2 equals exactly 3.3 when using the new DFP instructions where as the result is 3.30......03 when using HFP or BFP due to the inexact conversion between base 10 and base 2. The PTF open source for z390 includes the pz390.java emulator code for these new instructions plus new regression test TESTDFP1.MLC with examples of each instruction.
Subscribe to:
Post Comments (Atom)
2 comments:
Actually, you can now do ratehr better than Excel with the new instructions :-). See:
http://www.cs.berkeley.edu/~wkahan/ARITH_17.pdf
for a few of the problems with Excel.
mfc
Very interesting article with some good examples of where Excel goes wrong also using binary floating point Intel instructions to perform decimal arithmetic. DFP standard hardware and software will definitely help in the future.
Post a Comment