1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

Re: Floating point format for Intel math coprocessors

Discussion in 'Intel' started by Dave Hansen, Jun 27, 2003.

  1. Dave Hansen

    Dave Hansen Guest

    On Fri, 27 Jun 2003 14:23:22 GMT, Jack Crenshaw <>
    wrote:

    >I've run across a peculiarity concerning the format used inside the
    >Intel math coprocessor. I have always
    >thought that the format used was in accordance with the IEEE 794


    Unless IEEE 794 is something new, I think you mean IEEE 754.

    >standard, and every reference I've seen
    >on the web seems to imply that. But, as nearly as I can tell, it's not
    >the same.
    >
    >The IEEE standard for 32-bit floats says the format should be
    >
    > sign -- 1 bit
    > exponent -- 8 bits, power of 2, split on 127


    With the proviso that the values of 0 and 255 for the exponent are
    special cases reserved for 0, Inf, denormals, and NaN.

    > mantissa -- 23 bits + phantom bit in bit 24.
    >
    >The Intel processor seems to use the following:
    >
    > sign -- 1 bit
    > exponent -- _SEVEN_ bits, power of _FOUR_
    > mantissa -- sometimes 23 bits, sometimes 24. Sometimes phantom bit,
    >sometimes not.
    > When it's there, it's in bit _TWENTY_THREE_ <!>


    I don't think so. Are you mistaking the lsb of the exponent for the
    "visible" phantom bit?

    [...]
    >
    >You'll see that 1 --> 3f800000 (high bit is visible)


    seee eeee emmm mmmm mmmm mmmm mmmm mmmm
    0011 1111 1000 0000 0000 0000 0000 0000

    s = 0, e = 127, m = 0

    (-1)^s * 2^(e-127) * (1+m/(2^23)) = 1*1*1 = 1.0

    >but 2 --> 40000000 (high bit is not)


    seee eeee emmm mmmm mmmm mmmm mmmm mmmm
    0100 0000 0000 0000 0000 0000 0000 0000

    s = 0, e = 128, m = 0

    (-1)^s * 2^(e-127) * (1+m/(2^23)) = 1*2*1 = 2.0


    >
    >Try a few others and see what you get. Some will surprise you.


    I'm not finding any surprises.

    1.5 -> 3fc00000
    seee eeee emmm mmmm mmmm mmmm mmmm mmmm
    0011 1111 1100 0000 0000 0000 0000 0000
    s = 0, e = 127, m = 0x400000
    (-1)^s * 2^(e-127) * (1+m/(2^23)) = 1*1*1.5 = 1.5


    2.5 -> 40200000
    seee eeee emmm mmmm mmmm mmmm mmmm mmmm
    0100 0000 0020 0000 0000 0000 0000 0000
    s = 0, e = 128, m = 0x400000
    (-1)^s * 2^(e-127) * (1+m/(2^23)) = 1*2*1.25 = 2.5

    Perhaps I'm misunderstanding your point?

    Regards,

    -=Dave
    --
    Change is inevitable, progress is not.
    Dave Hansen, Jun 27, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Grant Edwards
    Replies:
    0
    Views:
    345
    Grant Edwards
    Jun 27, 2003
  2. CBFalconer
    Replies:
    0
    Views:
    318
    CBFalconer
    Jun 27, 2003
  3. Jonathan Kirwan
    Replies:
    22
    Views:
    933
    Jonathan Kirwan
    Jul 6, 2003
  4. Jonathan Kirwan
    Replies:
    3
    Views:
    1,834
    Grant Edwards
    Jun 29, 2003
  5. Gary Kato
    Replies:
    0
    Views:
    414
    Gary Kato
    Jun 27, 2003
Loading...

Share This Page