home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: sparky!uunet!math.fu-berlin.de!Harpo.Chemie.FU-Berlin.DE!melchers
- From: melchers@Harpo.Chemie.FU-Berlin.DE (Bernd Melchers)
- Subject: format of floating points?
- Message-ID: <YQH0P2M@math.fu-berlin.de>
- Sender: news@math.fu-berlin.de (Math Department)
- Organization: Free University of Berlin, Germany
- Date: Tue, 5 Jan 1993 10:45:32 GMT
- Lines: 41
-
- How are doubles coded by the ieee standard?
-
- Cray has its own standard, i.e.:
- 0.44658343480 is coded as 3f d0 e5 a4 70 a9 b3 85, i.e.
- 0011 1111 1111 1111 1110 0100 1010 0110
- ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^
- 037777 mantissa: 1/2 + 1/4 +1/8 + 1/64 +
- -040000
- -------
- -077777(oct) = -1(dec)
- exponent
-
- 1001 0101 0111 1110 1100 1101 0111 1110
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- +1/512+1/2048 +1/32768 +... = 0.893096(dec)
-
- --> 0.893096(dec) * 2^-1 = 0.446548
- ========
-
-
- On a iris4d (big endian), the same double gives (ieee standard)
- 3f dc 94 d2 af d9 af b1, i.e.
- 0011 1111 1101 1100 1001 0100 1101 0010 1010 1111
- 1101 1001 1010 1111 1011 0001
- where is mantissa and exponent and how are they coded?
-
- thanks for helping
- Bernd
-
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- Bernd Melchers | melchers@chico.chemie.fu-berlin.de
- Freie Universitaet Berlin | Lieblingsessen: Pizza, aber nur
- Institut fuer Kristallographie | selbstgemachte...
- Takustr. 6 | und ohne Tierkadaver
- D 1000 Berlin 33 |
- Earth |
- Tel.: 0049-30-8383612 |
- |
- Please replace battery pack, attach external power,
- or system will be shutdown in 10 seconds.
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-