mntmn / interim

The Interim Operating System
1.24k stars 56 forks source link

Divide by zero crashes #9

Open mathias opened 8 years ago

mathias commented 8 years ago

Hello!

I haven't yet gotten this booting on a RaspPi 2 (waiting for it to arrive) but I am having fun running it on my Mac.

I did notice that divide by 0 crashes sledge, and currently only integers are supported.

What kind of numeric support are you planning? Is there a particular place where I could start looking at expanding it?

Thanks in advance!

mntmn commented 8 years ago

Thanks for your feedback, mathias. I'm planning to include double-precision 64-bit IEEE 754 floating point numbers. This opens many questions of how and when to convert between fp and integers (probably always explicitly).

To implement a new type like TAG_FLOAT, you need to:

I think that should be about it! :)

About division by zero: I'll look into this, it is platform specific, and there are 4 more exceptions on floating point hardware.

Cheers Lukas