(12) United States Patent (10) Patent No.: US 8,051,118 B2 Lundvall Et Al
Total Page:16
File Type:pdf, Size:1020Kb
USOO8051 118B2 (12) United States Patent (10) Patent No.: US 8,051,118 B2 Lundvall et al. (45) Date of Patent: *Nov. 1, 2011 (54) COMPOSITION OF DECIMAL FLOATING 23.8% A l 3. E",rOne et al. PONT DATA 5,220,523 A 6/1993 Yoshida et al. 5,268,855 A 12, 1993 M tal. (75) Inventors: Shawn D. Lundvall, Midlothian, VA 5,384,723 A 1/1995 R. (US); Eric M. Schwarz, Gardiner, NY 5,481,489 A 1/1996 Yanagida et al. 5,696,709 A 12/1997 Smith, Sr. ..................... 364,745 W.Roaldappingers Falls, M. SythsNY (US); Phil C. YehYeh, 5,729,2285,696,711 A 12/19973/1998 MakineniFranaszek et al. Poughkeepsie, NY (US) 5,825,678 A 10/1998 Smith ........................... 364,748 5,982,307 A 11/1999 Adachi (73) Assignee: International Business Machines 6,098,192 A 8, 2000 Glover Corporation, Armonk, NY (US) 6,369,725 B1 4/2002 Busaba s s 6,437,715 B1 8/2002 Cowlishaw (*) Notice: Subject to any disclaimer, the term of this 6,525,679 B1 2, 2003 Cowlishaw patent is extended or adjusted under 35 (Continued) U.S.C. 154(b)(b) bybV 1069 days.yS FOREIGN PATENT DOCUMENTS This patent is Subject to a terminal dis- JP 9062863. A 3, 1997 Ca10. (Continued) (21) Appl. No.: 11/740,711 OTHER PUBLICATIONS (22) Filed: Apr. 26, 2007 “Intel(R) 64 and IA-32 Architectures Software Developer's Manual.” vol. 1: Basic Architecture, 253665-022US, Nov. 2006. (65) Prior Publication Data (Continued) US 2008/O270496 A1 Oct. 30, 2008 Primary Examiner — Tan V Mai (51) Int. Cl. (74) Attorney, Agent, or Firm — Dennis Jung G06F 5/00 (2006.01) (52) U.S. Cl. ....................................................... 708/204 (57) ABSTRACT (58) Field of Classification Search ............... ... 708/204 A decimal floating point finite number in a decimal floating See application file for complete search history. point format is composed from the number in a different (56) Ref Cited format. A decimal floating pointformat includes fields to hold eerees e information relating to the sign, exponent and significand of the decimal floating point finite number. Other decimal float U.S. PATENT DOCUMENTS ing point data, including infinities and NaNs (not a number), 3,934,462 A 1/1976 Rende 4,075,679 A 2/1978 Christopher et al. are also composed. Decimal floating point data are also 4.429,370 A 1, 1984 Blau et al. decomposed from the decimal floating point format to a dif 4,442.498 A 4, 1984 Rosen ferent format. 4,589,087 A 5/1986 Auslander et al. 4,799,181 A 1/1989 Tague et al. 28 Claims, 14 Drawing Sheets DFPDATA IMPORT OVERWEW 700 OBTANDATA INHUMAN READABEFORMAT 702 SIGNEDPACKEDCONVERT HUMAN DECIMAL READABLE FOR FORMATSNS T AND SIGN, AND TO SIGNED BINARY INTEGER FOR exPONENT - rs w - - - - - - - - - - - - - - - - - - s 706 COMBINE ExpoNENTTHESIGNIFICAND TO CREATE WITH THE BASEDBA THE DECIMAL FLOATING PON DATM r - a - - r s - w w - - - - - - - - - - s - r a my w w . US 8,051,118 B2 Page 2 U.S. PATENT DOCUMENTS “DRAFT Standard for Floating-Point Arithmetic P754,” Draft 1.3.0, 6,681.237 B1 1/2004 Fossum et al. Feb. 23, 2007. 6,745,220 B1 6, 2004 Hars “z/Architecture—Principles of Operation.” Sixth Edition, SA22 6,842,124 B2 1/2005 Penna 7832-05, Apr. 2007. 6,898,615 B2 5/2005 Miyasaka et al. “z/Architecture—Preliminary Decimal-Floating-Point Architec 7,389,499 B2 * 6/2008 Donovan et al. .............. T17,143 ture.” SA23-2232-00, Nov. 2006. 7.467,174 B2 12/2008 Wang et al. “IEEE Standard for Binary Floating-Point Arithmetic.” IEEE Std 7,698.352 B2 * 4/2010 Carlough et al. ............. TO8.204 T54-1985. 7,707,233 B2 * 4/2010 Cornea-Hasegan .......... TO8.204 “IEEE Standard for Radix-Independent Floating-Point Arithmetic.” 2002fO184282 A1 12/2002 Yuval et al. IEEE Std 854-1987. 2003,0005189 A1 1/2003 Wilson et al. “Densely Packed Decimal Encoding.” Mike Cowlishaw, IEEE Pro 2006/0047739 A1 3, 2006 Schulte et al. ceedings—Computers and Digital Techniques, ISSN 1350-2387. 2006/0265443 A1 11/2006 Cornea-Hasegan vol. 149, No. 3, pp. 102-104, IEEE, May 2002 (Abstract Only). 2007/0050436 A1* 3/2007 Chen et al. .................... TO8.204 "A Summary of Densely Packed Decimal Encoding.” www.2. 2007/0061388 A1* 3/2007 Carlough et al. ............. TO8.204 hursley.ibm.com/decimal/DPDecimal.html. 4 pages. 2008/0270495 A1 10/2008 Lundvallet al. Office Action for U.S. Appl. No. 1 1/840,345 dated Dec. 3, 2010. 2008/0270497 A1 10/2008 Lundvallet al. Office Action for U.S. Appl. No. 1 1/840,323 dated Nov. 4, 2010. 2008/0270498 A1 10/2008 Lundvallet al. Office Action for U.S. Appl. No. 1 1/840,359 dated Dec. 2, 2010. 2008/0270499 A1 10/2008 Lundvallet al. Office Action for U.S. Appl. No. 1 1/740,701 dated Oct. 21, 2010. 2008/02705OO A1 10/2008 Lundvallet al. Notice of Allowance for U.S. Appl. No. 1 1/740,683 dated Oct. 4. 2008/0270506 A1 10/2008 Lundvallet al. 2010. 2008/0270.507 A1 10/2008 Lundvallet al. 2008/0270.509 A1 10/2008 Lundvallet al. Cowlishaw, Mike, "A Summary of Densely Packed Decimal Encod 2008/0270756 A1 10/2008 Lundvallet al. ing.” IEE Proceedings—Computers and Digital Techniques, ISSN 1350-2387, Vo. 149, No. 3, pp. 102-104, May 2002, revised Feb. 13, FOREIGN PATENT DOCUMENTS 2007. JP 9069781 A 3, 1997 Carter, et al., “Efficient Floating Point to Clipped Integer Conver WO WO 01 08001 A1 2, 2001 sion.” IBM Technical Disclosure, May 1992, pp. 364-365. Office Action for U.S. Appl. No. 1 1/227,515 (U.S. Patent No. 7,698.352 B2) dated May 28, 2009. OTHER PUBLICATIONS U.S. Appl. No. 1 1/227,481. Non Final Office Action Mailed Jun. 26, “Intel(R) 64 and IA-32 Architectures Software Developer's Manual.” 2009. vol. 2A: Instruction Set Reference, A-M, 253666-022US, Nov. 2006. U.S. Appl. No. 1 1/227,481 Final Office Action mailed Jan. 25, 2010. U.S. Appl. No. 1 1/227,481 Non Final Office Action mailed Apr. 5, “Intel(R) Itanium(R Architecture Software Developer's Manual.” vol. 2010. 1: Application Architecture, Revision 2.2, Jan. 2006, Document No. U.S. Appl. No. 1 1/227,481 Final Office Action mailed Jul 22, 2010. 245317-005. U.S. Appl. No. 1 1/227,515 Non Final Office Action mailed May 28, “Intel(R) Itanium(R Architecture Software Developer's Manual.” vol. 2009. 2: System Architecture, Revision 2.2, Jan. 2006, Document No. U.S. Appl. No. 1 1/227,515 Notice of Allowance mailed Nov. 25, 245318-005. 2010. Intel(R) Itanium(R Architecture Software Developer's Manual, vol. 3: U.S. Appl. No. 1 1/225,515 Issue Notification mailed Mar. 24, 2010. Instruction Set Reference, Revision 2.2, Jan. 2006, Document No. 245,319-005. * cited by examiner U.S. Patent Nov. 1, 2011 Sheet 1 of 14 US 8,051,118 B2 106 108 110 100 S COMBINATION TENCODED TRALING SIGNIFICAND O 1 12 31 fig. 1A 106 108 110 102 S COMBINATION ENCODED TRALING SIGNIFICAND O 1 14 63 fig. 1B 106 108 f10 104 s COMBINATION ENCODED TRALING SIGNIFICAND O 1 18 127 fig. 1C 150 106 108 (7110 (% (% ENCODED TRAILNG SIGN COMBINATION FIELD SIGNIFICAND SIGN MDSN of TWOEFMOSTBS QF : REMAININGBITS OF REMAININGDIGITS OF BIASED EXP. BIASED EXP. SIGNIFICAND fig. 1D U.S. Patent Nov. 1, 2011 Sheet 2 of 14 US 8,051,118 B2 BITS B T BIASED 12345 TYPE EXPONENT LMD OOOOO FINITE NUMBER OO RBE OOOO1 FINITE NUMBER OO RBE OOOO FINITE NUMBER OO RBE FINITE NUMBER OO RBE OO1 OO FINITE NUMBER OO RBE FINITE NUMBER OO RBE FINITE NUMBER OO RBE FINITE NUMBER OO RBE O 1 OOO FINITE NUMBER O1 RBE FINITE NUMBER O1 RBE FINITE NUMBER 1 RBE o1011 m FINITE NUMBERO1 RBE 3 of 100 m FINITE NUMBERO1 RBE 4 01101 m FINITE NUMBERo1 IRBE 5 O1110 m FINITE NUMBERO1 RBE 6 O1111 m FINITE NUMBERO1 RBE 7 10000 m FINITE NUMBER 10 RBE 1000 m FINITE NUMBER 10 RBE 1 O1 O1 O RBE O RBE 1 1 0 1 O 1 IRBE 1 RBE O RBE 11 1 01 r INFINTY T - QNoN? - SNaN? T - fig. 2A U.S. Patent Nov. 1, 2011 Sheet 3 of 14 US 8,051,118 B2 EXPLANATION: NOT APPLICABLE CONCATENATION ALL BITS IN THE COMBINATION FIELD TO THE RIGHT OF BIT 5 OF THE FORMAT CONSTITUTE THE RESERVED FELD FOR INFINITY. ALL BITS IN THE COMBINATION FIELD TO THE RIGHT OF BIT 6 OF THE FORMAT CONSTITUTE THE RESERVED FIELD FOR NoN. LEFTMOST DIGIT OF THE SIGNIFICAND. BIT 6 S A PART OF THE REMAINING BIASED EXPONENT. REMAINING BIASED EXPONENT. T. INCLUDES ALL BITS IN THE COMBINATION FIELD TO THE RIGHT OF BIT 5 OF THE FORMAT. BIT 6 S A RESERVED BIT FOR INFINITY. fig. 2B U.S. Patent Nov. 1, 2011 Sheet 6 of 14 US 8,051,118 B2 500 502 504 data class MAGNITUDE SUBNORMAL O < x < N min EXPLANATION: 510 THE COEFFIECINT IS ZERO AND THE 5:59ENT IS ANY REPRESENTABLE LU fig. 5 600 6O2 604 6O6 610 DATA CLASS ES5 612 INFINITY + 11110 xxx... xxx QUIET NaN + m oxx. xxx 614 fig. 6 U.S. Patent Nov. 1, 2011 Sheet 7 of 14 US 8,051,118 B2 DFP DATA IMPORT OVERVIEW 700 OBTAN DATA IN HUMAN READABLE FORMAT 702 CONVERT HUMAN READABLE FORMAT TO SIGNED PACKED DECIMAL FOR SIGNIFICAND AND SIGN, AND TO SIGNED BINARY INTEGER FOR EXPONENT -------------------------------------- n 704 convert PACKED DECIMAll To A DECIMAL FLOATING POINT INTEGER 705 CONVERT SIGNED BINARY INTEGER TO UNISIGNED BINARY INTEGER FOR BIASED EXPONENT s 706 : COMBINE THE SIGNIFICAND WITH THE BIASED EXPONENT TO CREATE THE DECIMAL FLOATING POINT DATUM v up wa w MP as to tag up up a s to s up a n us a y nu i s m is as a - U.S.