Patent ID: 8219605

Claim:
A method for detecting decimal floating point quantum exceptions, the method comprising: performing the following with a processor: accepting at least one decimal floating point operand; obtaining a machine instruction comprising an opcode for a decimal floating point operation; and executing the machine instruction, the executing comprising: determining a preferred quantum based upon the at least one decimal floating point operand, the preferred quantum indicating a defined value represented by a least significant digit of a significand of the decimal floating point result; performing a decimal floating point operation on the at least one decimal floating point operand to produce a decimal floating point result; determining, in response to the performing and determining the preferred quantum, that a quantum of the decimal floating point result is different than the preferred quantum; and providing, in response to the determining that the quantum of the decimal floating point result is different than the preferred quantum, an output indicating a quantum exception, the quantum exception occurring only in response to the quantum of the decimal floating point result being different than the preferred quantum.