Division by 0.0 allowed

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Dr. Dri
Enthusiast
Enthusiast
Posts: 243
Joined: Sat Aug 23, 2003 6:45 pm

Post by Dr. Dri »

imho since a float division by 0.0 gives consistent results it shouldn't be forbidden

Dri
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

well, many languages display an error on such expression.

for example, here is the Python 2.5.1 output :
>> 25 / 0.0

>> ZeroDivisionError: float division.
>> 25 / 0

>> ZeroDivisionError: integer division or modulo by zero.

about mathematic expression, i can trust python which is very sure & stable.

when i have a doubt in purebasic, then i often test in python...
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
Dr. Dri
Enthusiast
Enthusiast
Posts: 243
Joined: Sat Aug 23, 2003 6:45 pm

Post by Dr. Dri »

if you want a comparison :
i remember of having got the "inf" value in script languages (java, ecmascript, ...) and from compiled languages (C)

Dri
Post Reply