I never knew this until today

BlitzMax Forums/BlitzMax Programming/I never knew this until today

a# = 1.0/0
Print a


floating point numbers allow divide by zero!

Welcome to Infinity...

lol, I know what infinity is. It's just that nomally an Int/0 = Divide by Zero error but floats allow it which is fine. I was passing infinity in as a volume value to a channel. I wonder how the channel code treats infinity, as 1 (full volum) I hope.

http://en.wikipedia.org/wiki/Floating_point
http://en.wikipedia.org/wiki/IEEE_Floating_Point_Standard

here exist negative and positive infinity value
here exist also negative and positive zero

Dividing by zero uses to crash B+ on win98se! Only chance to run even compiled B+ things is by rebooting the system!

It also recognizes indeterminations, instead of crashing, as instance:

Print (10/0.0)+(0-(10/0.0))