US8452825B2ExpiredUtilityPatentIndex 48
Sortable floating point numbers
Est. expiryApr 6, 2026(expired)· nominal 20-yr term from priority
G06F 2207/4911G06F 7/22H03M 7/08G06F 7/493G06F 7/38G06F 7/49H03M 7/24G06F 7/026
48
PatentIndex Score
0
Cited by
6
References
8
Claims
Abstract
The invention comprises methods for manipulating floating point numbers on a microprocessor where the numbers are sortable. That is, the numbers obey lexicographical ordering. Hence, the numbers may be quickly compared using bit-wise comparison functions such as memcmp( ). Conversion may result in a sortable floating point number in the form of a sign, leading bits of the exponent, and sets of digit triples in the form of declets (sets of 10 bits). In a variable-length version, numbers may be compressed by storing the number of trailing zero declets in lieu of storing the zero declets themselves.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. A method for decoding a sortable floating point number in a variable-length format into an output number on a processor comprising:
retrieving, by the processor, the number of trailing 0 declets from a Z field;
unbiasing, by the processor, declets, from the second most significant declet to the last declet that contains portions of the exponent-significand field;
retrieving, by the processor, a sign of the number from a sign field of the sortable floating point number; and
retrieving, by the processor, the exponent and a significand from an exponent-significand field by applying a value-to-BCD transformation on a exponent-significand field of the sortable floating point number.
2. A method for decoding a sortable floating point number into an output number on a processor comprising:
retrieving, by the processor, a sign of the number from a sign field of the sortable floating point number;
retrieving, by the processor, leading bits of an exponent from a leading exponent field;
retrieving, by the processor, the remaining digits of the exponent and a significand from an exponent-significand field by applying a value-to-BCD transformation on a exponent-significand field of the sortable floating point number;
combining, by the processor, the leading bits of the exponent and the remaining digits of the exponent to yield the exponent;
if the sign of the sortable floating point number is negative, shifting, by the processor, the exponent and significand;
assembling, by the processor, the output number from the sign, the exponent, and the significand;
compressing, by the processor, the output number.
3. The method of claim 2 , wherein the number had been encoded by:
decompressing an input number;
normalizing the input number;
if the input number is less than 0, shifting the exponent and significand fields;
converting the sign of the input number into a sortable representation to yield a sign field;
creating a leading exponent field;
organizing an exponent-significand field into triplets with triplet digits from the remaining exponent bits and the significand of the input number;
applying a bcd-to-value transformation on the triplets in the exponent-significand field to yield declets; and
assembling the sign, leading exponent field, and exponent-significand field into the number.
4. A method for decoding a sortable floating point number in a variable-length format into an output number on a processor comprising:
retrieving, by the processor, the number of trailing 0 declets from a Z field;
unbiasing, by the processor, declets, from the second most significant declet to the last declet that contains portions of the exponent-significand field;
retrieving, by the processor, a sign of the number from a sign field of the sortable floating point number;
retrieving, by the processor, leading bits of an exponent from a leading exponent field;
retrieving, by the processor, the remaining digits of the exponent and a significand from an exponent-significand field by applying a value-to-BCD transformation on a exponent-significand field of the sortable floating point number;
combining, by the processor, the leading bits of the exponent and the remaining digits of the exponent to yield the exponent;
if the sign of the sortable floating point number is negative, shifting, by the processor, the exponent and significand;
assembling the output number from the sign, the exponent, the significand, and the number of trailing zero declets;
compressing, by the processor, the output number.
5. The method of claim 4 , wherein the number had been encoded by:
decompressing an input number;
normalizing the input number;
if the input number is less than 0, shifting the exponent and significand fields;
converting the sign of the input number into a sortable representation to yield a sign field;
creating a leading exponent field;
organizing an exponent-significand field into triplets with triplet digits from the remaining exponent bits and the significand of the input number;
applying a BCD-to-value transformation on the triplets in the exponent-significand field to yield declets;
biasing the declets with an offset bias, from the second most significant declet to the last declet before the trailing 0 declets;
storing the number of trailing 0 declets in a Z field; and
assembling the sign field, leading exponent field, exponent-significand field, and the Z field into the number.
6. A computer-readable non-transitory medium stored thereon executable instructions that when executed by a processor perform a method for decoding a sortable floating point number in a variable-length format into an output number on a processor, the method comprising:
retrieving the number of trailing 0 declets from a Z field;
unbiasing declets, from the second most significant declet to the last declet that contains portions of the exponent-significand field;
retrieving a sign of the number from a sign field of the sortable floating point number; and
retrieving the exponent and a significand from an exponent-significand field by applying a value-to-BCD transformation on a exponent-significand field of the sortable floating point number.
7. A computer-readable non-transitory medium stored thereon executable instructions that when executed by a processor perform a method for decoding a sortable floating point number into an output number on a processor comprising:
retrieving a sign of the number from a sign field of the sortable floating point number;
retrieving leading bits of an exponent from a leading exponent field;
retrieving the remaining digits of the exponent and a significand from an exponent-significand field by applying a value-to-BCD transformation on a exponent-significand field of the sortable floating point number;
combining the leading bits of the exponent and the remaining digits of the exponent to yield the exponent;
if the sign of the sortable floating point number is negative, shifting the exponent and significand;
assembling the output number from the sign, the exponent, and the significand;
compressing the output number.
8. A computer-readable non-transitory medium stored thereon executable instructions that when executed by a processor perform a method for decoding a sortable floating point number into an output number on a processor, the method comprising:
retrieving the number of trailing 0 declets from a Z field;
unbiasing declets, from the second most significant declet to the last declet that contains portions of the exponent-significand field;
retrieving a sign of the number from a sign field of the sortable floating point number;
retrieving leading bits of an exponent from a leading exponent field;
retrieving the remaining digits of the exponent and a significand from an exponent-significand field by applying a value-to-BCD transformation on a exponent-significand field of the sortable floating point number;
combining the leading bits of the exponent and the remaining digits of the exponent to yield the exponent;
if the sign of the sortable floating point number is negative, shifting the exponent and significand;
assembling the output number from the sign, the exponent, the significand, and the number of trailing zero declets;
compressing the output number.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.