Author Topic: Kahan on the 8087 and designing Intel's floating point  (Read 449 times)

0 Members and 2 Guests are viewing this topic.

Online BrianHGTopic starter

  • Super Contributor
  • ***
  • Posts: 8647
  • Country: ca
    • LinkedIn
Kahan on the 8087 and designing Intel's floating point
« on: January 20, 2026, 04:50:06 am »
Kahan on the 8087 and designing Intel's floating point


Kahan on creating IEEE Standard Floating Point


Online billtodd

  • Contributor
  • Posts: 42
  • Country: gb
Re: Kahan on the 8087 and designing Intel's floating point
« Reply #1 on: January 20, 2026, 01:16:42 pm »
This little thing :-)
 
The following users thanked this post: BrianHG

Offline iMo

  • Super Contributor
  • ***
  • Posts: 6408
  • Country: sm
« Last Edit: January 20, 2026, 08:14:01 pm by iMo »
Readers discretion is advised..
 

Online BrianHGTopic starter

  • Super Contributor
  • ***
  • Posts: 8647
  • Country: ca
    • LinkedIn
Re: Kahan on the 8087 and designing Intel's floating point
« Reply #3 on: January 20, 2026, 09:18:39 pm »
Still shocks me that they got the thing working at the time, way back before modern development tools...

Offline iMo

  • Super Contributor
  • ***
  • Posts: 6408
  • Country: sm
Re: Kahan on the 8087 and designing Intel's floating point
« Reply #4 on: January 20, 2026, 10:13:51 pm »
I can remember the times we were staring at our motherboard, at that empty DIL40 socket, dreaming that one day we might finally get the 8087 and gently press it into place. The board lay there like a promise, silent and waiting, while our imagination filled in the future hum of calculations it would bring. It wasn’t just a chip we were longing for—it was the feeling of progress, of unlocking hidden power, of being one step closer to the machines we read about in magazines and manuals. In that quiet moment, with hope in our eyes, the future felt close enough to touch, resting in forty tiny holes..
 :D
Readers discretion is advised..
 

Online BrianHGTopic starter

  • Super Contributor
  • ***
  • Posts: 8647
  • Country: ca
    • LinkedIn
Re: Kahan on the 8087 and designing Intel's floating point
« Reply #5 on: January 20, 2026, 10:38:20 pm »
I had a similar vision on the Amiga, waiting for a 68881/2 math-co so I could run my Sculpt 3D to render scenes  4x faster, though, this was already 1987...

Offline iMo

  • Super Contributor
  • ***
  • Posts: 6408
  • Country: sm
Re: Kahan on the 8087 and designing Intel's floating point
« Reply #6 on: January 20, 2026, 10:53:33 pm »
 :palm: actually I have got a few ceramic 80287-10MHz in my collection..
Too many, too late  :-DD

PS: arduino sketch for interfacing the 80287.. 27 wires needed..  :(

https://github.com/4sun5bu/287Hack

« Last Edit: January 20, 2026, 11:09:41 pm by iMo »
Readers discretion is advised..
 
The following users thanked this post: Circlotron

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 3513
  • Country: au
Re: Kahan on the 8087 and designing Intel's floating point
« Reply #7 on: January 20, 2026, 11:01:27 pm »
I put an 80287 in my 10 MHz 286 back in 1990. Was still learning BASIC at the time, and for a FOR NEXT loop I would use

FOR X=1 to 10
IF X =4 do something
NEXT X

instead of

FOR X%=1 to 10
IF X =4%  do something
NEXT X%

I was using a floating point value for X instead of an integer. Heaps more overhead while interpreting on the fly.
When I put the 80287 in it recognised the floating point X and made the FOR NEXT loop go SEVEN TIMES FASTER. I kid you not.

I can't remember how much faster it went using a proper integer value instead.
I finally discovered it was using floating point values because upon X reaching a specific value in the loop I wanted it to do some particular thing but it just refused. After many hours and days of trying all sorts of things I made it print the incrementing values of X and it produced the following:

1
2
3
3.9999999
5
6
7
etc

So.... a rounding error in GWBASIC.
Don't using floating point variables in for next loops. Lesson learned.
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 5852
  • Country: nz
Re: Kahan on the 8087 and designing Intel's floating point
« Reply #8 on: January 20, 2026, 11:07:50 pm »
I had a similar vision on the Amiga, waiting for a 68881/2 math-co so I could run my Sculpt 3D to render scenes  4x faster, though, this was already 1987...

In 1987, my Mac II came with the 68881, but the 68851 MMU was an empty socket (actually IIRC a dummy PLA).

The big step advance came with the Radius Rocket 68040 card for the Mac II ($3,495 in 1991!!), maybe a year before the Quadra came out -- suddenly a full screen Mandelbrot could be panned and zoomed like a video, not like a slide show.

The PPC601 was another big leap for floating point.
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 5852
  • Country: nz
Re: Kahan on the 8087 and designing Intel's floating point
« Reply #9 on: January 20, 2026, 11:14:13 pm »
1
2
3
3.9999999
5
6
7
etc

So.... a rounding error in GWBASIC.
Don't using floating point variables in for next loops. Lesson learned.

That can't happen.

Integer arithmetic in IEEE floating point is guaranteed exact to 2^23 (8 million) in single precision and 2^53 (8e15) in double precision -- for all +/-/* and also for all divisions that should give an integer result.

Things such as the above can only happen if you are stepping by a non-integer value, such as 0.1.
 

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 3513
  • Country: au
Re: Kahan on the 8087 and designing Intel's floating point
« Reply #10 on: January 20, 2026, 11:44:33 pm »

That can't happen.

Integer arithmetic in IEEE floating point is guaranteed exact to 2^23 (8 million) in single precision and 2^53 (8e15) in double precision -- for all +/-/* and also for all divisions that should give an integer result.

Things such as the above can only happen if you are stepping by a non-integer value, such as 0.1.
Well it certainly did happen with my setup.
No hope of demonstrating the problem now.
I forget if the error occurred once the '287 was fitted.

Philips P3230 PC
Philips BIOS
DOS 3.3
GWBASIC

Thinking a bit more about it, maybe I was stepping with non integer value. Really can't remember now. Main thing is, the '287 worked really well.
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 5852
  • Country: nz
Re: Kahan on the 8087 and designing Intel's floating point
« Reply #11 on: January 21, 2026, 12:32:35 am »
 

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 3513
  • Country: au
Re: Kahan on the 8087 and designing Intel's floating point
« Reply #12 on: January 21, 2026, 10:00:05 am »
Pretty sure it had a Harris CPU. Where they known to give odd floating point results?
Can't demonstrate it now because the machine is long gone, I'm thinking it was a hardware oddity. The motherboard was a Philips job. Rather annoying because the shape wasn't industry standard AFAICT so no generic MB upgrade possible. Pity because the case was absolutely rock solid. You could stand on it, no problem at all.
« Last Edit: January 21, 2026, 10:04:20 am by Circlotron »
 

Offline DiTBho

  • Super Contributor
  • ***
  • Posts: 4982
  • Country: gb
Re: Kahan on the 8087 and designing Intel's floating point
« Reply #13 on: January 21, 2026, 07:39:45 pm »
I had a similar vision on the Amiga, waiting for a 68881/2 math-co so I could run my Sculpt 3D to render scenes  4x faster, though, this was already 1987...

In 1987, my Mac II came with the 68881, but the 68851 MMU was an empty socket (actually IIRC a dummy PLA).

The big step advance came with the Radius Rocket 68040 card for the Mac II ($3,495 in 1991!!), maybe a year before the Quadra came out -- suddenly a full screen Mandelbrot could be panned and zoomed like a video, not like a slide show.

The PPC601 was another big leap for floating point.

I bought a 68k-cpu32 eval board.
It comes with a 68881/68882 in a socket.

At the moment myC support neither 68k nor floating point, but it's in my "Todo" list.
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf