Insert/extract biased exponent of decimal floating point data
Abstract
A decimal floating point finite number in a decimal floating point format is composed from the number in a different format. A decimal floating point format includes fields to hold information relating to the sign, exponent and significand of the decimal floating point finite number. Other decimal floating point data, including infinities and NaNs (not a number), are also composed. Decimal floating point data are also decomposed from the decimal floating point format to a different format. For composition and decomposition, one or more instructions may be employed, including an insert biased exponent or extract biased exponent instruction.
Claims
exact text as granted — not AI-modified1 . An article of manufacture comprising:
at least one computer usable medium having computer readable program code logic to execute a machine instruction in a central processing unit, said computer readable program code logic when executing performing the following:
obtaining a machine instruction for execution, the machine instruction being defined for computer execution according to a computer architecture, the machine instruction comprising an opcode, a first register field, a second register field and a third register field; and
performing an insert function of an input exponent as defined by the opcode of the machine instruction, said input exponent stored in a location designated by the second register field, said insert function comprising:
expanding at least one value of a datum in decimal floating point format stored in a location designated by the third register field from the decimal floating point format to a working format different from the decimal floating point format, wherein a datum in working format is provided;
replacing an exponent of the datum in working format with the input exponent;
converting the datum in working format to the datum in decimal floating point format; and
placing the datum in decimal floating point format in a location designated by the first register field.
2 . The article of manufacture of claim 1 , wherein the at least one value comprises a significand of the datum in decimal floating point format.
3 . The article of manufacture of claim 2 , further comprising determining a type of the datum in decimal floating point format, and wherein the expanding the significand comprises performing the expanding based on the type.
4 . The article of manufacture of claim 3 , wherein the type is a finite number, and the expanding comprises combining a leftmost digit of the significand with remaining digits of the significand to provide the significand in the working format.
5 . The article of manufacture of claim 4 , wherein the leftmost digit of the significant is in a combination field of the datum in decimal floating point format and the remaining digits of the significand are in an encoded trailing significand field of the datum in decimal floating point format.
6 . The article of manufacture of claim 3 , wherein the type is an infinity or NaN, and the expanding comprises combining a default leftmost digit of the significand with remaining digits of the significand to provide the significand in the working format.
7 . The article of manufacture of claim 3 , wherein the type is an infinity or NaN, and the expanding comprises providing digits of the significand as the significand in working format, wherein a leftmost digit of the significand is ignored.
8 . The article of manufacture of claim 1 , wherein the converting comprises:
providing a combination field of the datum in decimal floating point format, wherein the combination field comprises a leftmost digit of the significand in the working format and the exponent of the working format; and providing an encoded trailing significand of the datum in decimal floating point format, wherein the encoded trailing significand comprises remaining digits of the significand in the working format.
9 . The article of manufacture of claim 8 , wherein the converting further comprises providing a sign of the datum in decimal floating point format.
10 . The article of manufacture of claim 8 , wherein the leftmost digit of the significand is ignored, in response to an indication that the datum is an infinity or NaN.
11 . The article of manufacture of claim 1 , wherein the input exponent comprises a biased exponent.
12 . A method to execute a machine instruction in a central processing unit, said method comprising:
obtaining a machine instruction for execution, the machine instruction being defined for computer execution according to a computer architecture, the machine instruction comprising an opcode, a first register field, a second register field and a third register field; and performing an insert function of an input exponent as defined by the opcode of the machine instruction, said input exponent stored in a location designated by the second register field, said insert function comprising:
expanding at least one value of a datum in decimal floating point format stored in a location designated by the third register field from the decimal floating point format to a working format different from the decimal floating point format, wherein a datum in working format is provided;
replacing an exponent of the datum in working format with the input exponent;
converting the datum in working format to the datum in decimal floating point format; and
placing the datum in decimal floating point format in a location designated by the first register field.
13 . The method of claim 12 , wherein the at least one value comprises a significand of the datum in decimal floating point format.
14 . The method of claim 13 , further comprising determining a type of the datum in decimal floating point format, and wherein the expanding the significand comprises performing the expanding based on the type.
15 . The method of claim 14 , wherein the type is a finite number, and the expanding comprises combining a leftmost digit of the significand with remaining digits of the significand to provide the significand in the working format.
16 . The method of claim 15 , wherein the leftmost digit of the significant is in a combination field of the datum in decimal floating point format and the remaining digits of the significand are in an encoded trailing significand field of the datum in decimal floating point format.
17 . The method of claim 14 , wherein the type is an infinity or NaN, and the expanding comprises combining a default leftmost digit of the significand with remaining digits of the significand to provide the significand in the working format.
18 . The method of claim 14 , wherein the type is an infinity or NaN, and the expanding comprises providing digits of the significand as the significand in working format, wherein a leftmost digit of the significand is ignored.
19 . The method of claim 12 , wherein the converting comprises:
providing a combination field of the datum in decimal floating point format, wherein the combination field comprises a leftmost digit of the significand in the working format and the exponent of the working format; and providing an encoded trailing significand of the datum in decimal floating point format, wherein the encoded trailing significand comprises remaining digits of the significand in the working format.
20 . The method of claim 19 , wherein the converting further comprises providing a sign of the datum in decimal floating point format.
21 . The method of claim 19 , wherein the leftmost digit of the significand is ignored, in response to an indication that the datum is an infinity or NaN.
22 . The method of claim 12 , wherein the input exponent comprises a biased exponent.
23 . A system of executing a machine instruction in a central processing unit, said system comprising:
a memory; a processor to obtain a machine instruction for execution, the machine instruction being defined for computer execution according to a computer architecture, the machine instruction comprising an opcode, a first register field, a second register field and a third register field; and the processor to perform an insert function of an input exponent as defined by the opcode of the machine instruction, said input exponent stored in a location designated by the second register field, said insert function comprising:
expanding at least one value of a datum in decimal floating point format stored in a location designated by the third register field from the decimal floating point format to a working format different from the decimal floating point format, wherein a datum in working format is provided;
replacing an exponent of the datum in working format with the input exponent;
converting the datum in working format to the datum in decimal floating point format; and
placing the datum in decimal floating point format in a location designated by the first register field.
24 . The system of claim 23 , wherein the at least one value comprises a significand of the datum in decimal floating point format.
25 . The system of claim 24 , further comprising determining a type of the datum in decimal floating point format, and wherein the expanding the significand comprises performing the expanding based on the type.
26 . The system of claim 25 , wherein the type is a finite number, and the expanding comprises combining a leftmost digit of the significand with remaining digits of the significand to provide the significand in the working format.
27 . The system of claim 26 , wherein the leftmost digit of the significant is in a combination field of the datum in decimal floating point format and the remaining digits of the significand are in an encoded trailing significand field of the datum in decimal floating point format.
28 . The system of claim 25 , wherein the type is an infinity or NaN, and the expanding comprises combining a default leftmost digit of the significand with remaining digits of the significand to provide the significand in the working format.
29 . The system of claim 25 , wherein the type is an infinity or NaN, and the expanding comprises providing digits of the significand as the significand in working format, wherein a leftmost digit of the significand is ignored.
30 . The system of claim 23 , wherein the converting comprises:
providing a combination field of the datum in decimal floating point format, wherein the combination field comprises a leftmost digit of the significand in the working format and the exponent of the working format; and providing an encoded trailing significand of the datum in decimal floating point format, wherein the encoded trailing significand comprises remaining digits of the significand in the working format.
31 . The system of claim 30 , wherein the converting further comprises providing a sign of the datum in decimal floating point format.
32 . The system of claim 30 , wherein the leftmost digit of the significand is ignored, in response to an indication that the datum is an infinity or NaN.
33 . The system of claim 23 , wherein the input exponent comprises a biased exponent.Join the waitlist — get patent alerts
Track US2008270495A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.