Re: FastCode RoundToEx
- From: "John Herbster" <herb-sci1_AT_sbcglobal.net>
- Date: Sat, 29 Dec 2007 10:45:34 -0600
"Rudy Velthuis [TeamB]" <newsgroups@xxxxxxxxxxxx> wrote
What is actually stored for the Extended type?
Extended: Sign (1 bit), Exponent (15 bits), Mantissa (64 bits)
Double: Sign (1 bit), Exponent (11 bits), Mantissa (52 bits)
Single: Sign (1 bit), Exponent ( 8 bits), Mantissa (23 bits)
All stored on Intel machines in little endian format.
The most significant bit (MSB) of what we are calling the "mantissa" is not stored in the single and double types (because it is assumed to be set true for normal numbers), but it is stored in the extended type (because, I presume, the designers were not concerned about saving space in the extended type). For the very small, so called denormalized, values, the MSB is stored for all three number types.
From Stephen P Morse's "The 80386/387 Architecture" book:As an example, the single-precision number that is represented by:
1 01111110 11000000000000000000000
has s = 1, E = 126, f1 = 1, and f2 = 1. Thus the value is
(-1)^1 * (1.11(base 2)) * 2^(126-127) = -1 * 1.75 * 2^1 = -8.75
--JohnH
.
- References:
- FastCode RoundToEx
- From: Dennis
- Re: FastCode RoundToEx
- From: Dennis
- Re: FastCode RoundToEx
- From: Uffe Kousgaard
- Re: FastCode RoundToEx
- From: Dennis
- Re: FastCode RoundToEx
- From: Uffe Kousgaard
- Re: FastCode RoundToEx
- From: Rudy Velthuis [TeamB]
- Re: FastCode RoundToEx
- From: Dennis
- Re: FastCode RoundToEx
- From: Rudy Velthuis [TeamB]
- FastCode RoundToEx
- Prev by Date: Re: FastCode RoundToEx
- Next by Date: Re: FastCode RoundToEx
- Previous by thread: Re: FastCode RoundToEx
- Next by thread: Re: FastCode RoundToEx
- Index(es):
Relevant Pages
|