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 emulator code for these new instructions plus new regression test TESTDFP1.MLC with examples of each instruction.