Discussion:
Divide by zero
(too old to reply)
T. Lam
2004-07-11 19:05:47 UTC
Permalink
Is there/should there be a way for us to check for divide by zero? Is that
something we should have to look out for?

Thanks
Jaewook Chung
2004-07-11 20:27:16 UTC
Permalink
It is impossible to detect divide by zero during compile time. For example,

n<-in();
a=a/n;

In this SL code, the compiler does not know what the value of n will be.
Divide by zero is usually handled by operating systems. Detecting divide by
zero is not required in A5.
Post by T. Lam
Is there/should there be a way for us to check for divide by zero? Is that
something we should have to look out for?
Thanks
Loading...