发明名称 DETECTION OF POTENTIAL NEED TO USE A LARGER DATA FORMAT IN PERFORMING FLOATING POINT OPERATIONS
摘要 Detection of whether a result of a floating point operation is safe. Characteristics of the result are examined to determine whether the result is safe or potentially unsafe, as defined by the user. An instruction is provided to facilitate detection of safe or potentially unsafe results.
申请公布号 US2014181481(A1) 申请公布日期 2014.06.26
申请号 US201414193322 申请日期 2014.02.28
申请人 International Business Machines Corporation 发明人 Cowlishaw Michael F.;Lundvall Shawn D.;Smith Ronald M.;Yeh Phil C.
分类号 G06F9/30 主分类号 G06F9/30
代理机构 代理人
主权项 1. A method for determining whether a decimal floating point number is safe or unsafe, said method comprising: obtaining a machine instruction for execution, the machine instruction comprising an opcode, a register field, an index field, a base field and a displacement value; and obtaining, by a processor of a processing environment, a first operand in a decimal floating point format, the first operand included in a register specified by the register field; performing a function defined by the opcode of the machine instruction of determining whether the first operand is a safe decimal floating point number or is a potentially unsafe decimal floating point number, said function comprising:determining a data group and a sign for the first operand;determining a plurality of second operand bits using the index field, base field and displacement value of the machine instruction, each bit of the plurality of second operand bits corresponding to a data group and sign combination;selecting a bit of the plurality of second operand bits based on the data group and sign determined for the first operand;determining a value of the selected bit; andsetting a condition code based on the value of the selected bit, the condition code indicating whether a result of a floating point operation is safe or potentially unsafe wherein unsafe indicates that use of a larger data format would produce a different value or quantum.
地址 Armonk NY US