03-11-2010 2:44 PM
Why is this not giving a dump?
i = 0.
j = 0.
num = i / j.
This doesnt dump too:
num = 0 / 0.
But this dumps:
i = 1.
j = 0.
num = i / j.
Is this some kind of weired short cut evaluation? Or is 0/0 now defined since i finished school?
Seems that the runtime assumes that everything after 0 / is always zero. Debugging case 1 and two shows that num contains zero.
Is this behaviour documented?
03-11-2010 2:48 PM
Hello
From SAP Help (help for key word DIVIDE 😞
Furthermore: Division by 0 is not allowed, except where 0 / 0 results in 0.
03-11-2010 2:48 PM
Hello
From SAP Help (help for key word DIVIDE 😞
Furthermore: Division by 0 is not allowed, except where 0 / 0 results in 0.
03-11-2010 2:53 PM
Dear Rainer ,,
Very good observation . Im doing math myself now..:)
http://www.newton.dep.anl.gov/askasci/math99/math99259.htm
//You have started with an inaccurate assumption, that is: 0/0 = infinity.
The ratio 0/0 is called "indeterminate" because it is defined in terms of
the limit (as x ---> 0) of the numerator N(x) divided by the limit
(as x --->0) of the denominator D(x). If N(x) approaches zero "faster" than
D(x) the ratio is zero. If D(x) approaches zero "faster" than N(x) the ratio
approaches infinity. They may approach zero at different, but finite, rates.
If they approach zero "at exactly the same rate" you have to apply the
test again.
Br,
Vijay.
03-11-2010 2:57 PM
03-11-2010 2:58 PM
Wikipedia gives a good example (I'm paraphrasing):
0 / 0 = X.
therefore:
X * 0 = 0
Any value of X will satisfy the equation.
Rob
03-12-2010 6:25 PM
I found this intriguing. Because any value of X will satisfy the equation:
X = 0 / 0
I would expect that if you assign the result of the division 0 / 0 to a variable, the value of the variable would remain unchanged. so if you write a program like:
REPORT ztest LINE-SIZE 80 MESSAGE-ID 00.
PARAMETERS: i TYPE i.
i = 0 / 0.
WRITE: /001 i.
I would retain its value; however, the result is always 0.
Seems like a bug to me.
Rob