Motherboard Forums


Reply
Thread Tools Display Modes

Re: Floating point format for Intel math coprocessors

 
 
Dave Hansen
Guest
Posts: n/a
 
      06-27-2003, 03:01 PM
On Fri, 27 Jun 2003 14:23:22 GMT, Jack Crenshaw <(E-Mail Removed)>
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Floating point format for Intel math coprocessors Jonathan Kirwan Intel 22 07-06-2003 03:34 PM
Re: Floating point format for Intel math coprocessors Jonathan Kirwan Intel 3 06-29-2003 04:24 AM
Re: Floating point format for Intel math coprocessors CBFalconer Intel 0 06-27-2003 05:28 PM
Re: Floating point format for Intel math coprocessors Grant Edwards Intel 0 06-27-2003 03:34 PM
Re: Floating point format for Intel math coprocessors Gary Kato Embedded 0 06-27-2003 02:40 PM


All times are GMT. The time now is 02:46 PM.


Welcome!
Welcome to Motherboard Point
 

Advertisment