I never knew this until today

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

Grey Alien(Posted 2006) [#1]
a# = 1.0/0
Print a


floating point numbers allow divide by zero!


Byteemoz(Posted 2006) [#2]
Welcome to Infinity...


Grey Alien(Posted 2006) [#3]
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.


MrCredo(Posted 2006) [#4]
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


CS_TBL(Posted 2006) [#5]
Dividing by zero uses to crash B+ on win98se! Only chance to run even compiled B+ things is by rebooting the system!


ziggy(Posted 2006) [#6]
It also recognizes indeterminations, instead of crashing, as instance:

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