Strange behaviour in case 0/0



In base 2, the numbers 1/100 and 1/10  have repeating binary
representations;
they are not base 2 floating point numbers.   Your  problem is not with
maxima, but with rounding errors.  Try

(C2)  f(1/100,1/10,1);
Division by 0
#0: f(a=1.1,b=1/10,c=1)
 -- an error.  Quitting.  To debug this try DEBUGMODE(TRUE);)
(C3)
Division by 0
#0: f(a=1/100,b=1/10,c=1)
 -- an error.  Quitting.  To debug this try DEBUGMODE(TRUE);)
(C4) f(0.01,0.1,1);
(D4)              0.07492989580642
(C5)





fedor@ms2.inr.ac.ru@www.ma.utexas.edu on 03/05/2002 08:53:12 AM

Sent by:  maxima-admin@www.ma.utexas.edu


To:   maxima@www.ma.utexas.edu
cc:

Subject:  [Maxima] Strange behaviour in case 0/0


Hello,

It is not yet a good bug report, because I've not yet got a simple
function to lead to such results.  For now I observe strange behaviour
of maxima in case of expression of the form 0/0.  Let us take the
following function:

f(a,b,c):= (((a^2-1)*b^4+(1-a^4)*b^2+a^4-a^2)*c^4*LOG(c)
       +((1-a^2)*b^4*LOG(b)+a^4*LOG(a)*b^2-a^4*LOG(a))*c^4
       +((a^4-1)*b^4*LOG(b)-a^4*LOG(a)*b^4+a^4*LOG(a))*c^2
       +(a^2-a^4)*b^4*LOG(b)+a^4*LOG(a)*b^4-a^4*LOG(a)*b^2)
       /((((a^2-1)*b^2-a^4+a^2)*c^2+(a^2-a^4)*b^2+a^6-a^4)
     *((b^2-1)*c^4+(1-b^4)*c^2+b^4-b^2));

It is easy to notice, that for c=1 it has the form of 0/0 (but the
limit c->1 is finit).  If I ask maxima to calculate, say:

(C30) f(0.01,0.1,1);

I get:

(D30)                      0.07492989580642

which is in no sence correct. (The correct limit for c->1 is
0.48137500492202).  And no words about division by zero!  Funny, for
other parameters I can get this message:

(C34) f(0.1,0.5,1);

Division by 0
#0: f(a=0.1,b=0.5,c=1)
 -- an error.  Quitting.  To debug this try DEBUGMODE(TRUE);)

Let me not again -- denomenator of this expression is exactly zero for
c=1.

Fedor

--
Fedor Bezrukov      http://www.inr.ac.ru/~fedor/
_______________________________________________
Maxima mailing list
Maxima@www.math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima