Arc Forumnew | comments | leaders | submitlogin
5 points by stefano 6042 days ago | link | parent

In floating point arithmetic 0.0 isn't zero: it represent a range of numbers around zero, so it makes a little sense for 0/0.0 to return 0.0. I still think that raising an exception would be preferable.


6 points by cchooper 6041 days ago | link

To be pedantic, it doesn't make any sense to return 0.0, but it does make some sense to return 0. I'm sure that's what you meant though.

It's 0.0/0.0 that gets my head spinning. If only 'Whatever' were a valid number.

-----