home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / programm / 5826 < prev    next >
Encoding:
Text File  |  1993-01-05  |  1.8 KB  |  52 lines

  1. Newsgroups: comp.unix.programmer
  2. Path: sparky!uunet!math.fu-berlin.de!Harpo.Chemie.FU-Berlin.DE!melchers
  3. From: melchers@Harpo.Chemie.FU-Berlin.DE (Bernd Melchers)
  4. Subject: format of floating points?
  5. Message-ID: <YQH0P2M@math.fu-berlin.de>
  6. Sender: news@math.fu-berlin.de (Math Department)
  7. Organization: Free University of Berlin, Germany
  8. Date: Tue, 5 Jan 1993 10:45:32 GMT
  9. Lines: 41
  10.  
  11. How are doubles coded by the ieee standard?
  12.  
  13. Cray has its own standard, i.e.:
  14. 0.44658343480 is coded as 3f d0 e5 a4 70 a9 b3 85, i.e.
  15. 0011 1111 1111 1111 1110 0100 1010 0110
  16. ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^
  17.   037777              mantissa: 1/2 + 1/4 +1/8 + 1/64 +
  18.  -040000
  19.  -------
  20.  -077777(oct) = -1(dec)
  21.  exponent
  22.  
  23. 1001 0101 0111 1110 1100 1101 0111 1110
  24. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  25. +1/512+1/2048 +1/32768 +... = 0.893096(dec)
  26.  
  27. --> 0.893096(dec) * 2^-1 = 0.446548
  28.                            ========
  29.  
  30.  
  31. On a iris4d (big endian), the same double gives (ieee standard)
  32. 3f dc 94 d2 af d9 af b1, i.e.
  33. 0011 1111 1101 1100 1001 0100 1101 0010 1010 1111
  34. 1101 1001 1010 1111 1011 0001
  35. where is mantissa and exponent and how are they coded?
  36.  
  37. thanks for helping
  38.     Bernd
  39.  
  40. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  41. Bernd Melchers                   | melchers@chico.chemie.fu-berlin.de
  42. Freie Universitaet Berlin        | Lieblingsessen: Pizza, aber nur
  43. Institut fuer Kristallographie   |              selbstgemachte...
  44. Takustr. 6                       |              und ohne Tierkadaver
  45. D 1000 Berlin 33                 |
  46. Earth                            |
  47. Tel.: 0049-30-8383612            |
  48.                                  |
  49. Please replace battery pack, attach external power,
  50. or system will be shutdown in 10 seconds.
  51. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  52.