Work on bug limit/sin(inf)etc. should give 0, not IND



I have worked on the bug report 593351 "limit/sin(inf)etc. should give
0, not IND". 

This is a piece of code in the routine simplimplus1 to get the correct
limit:

 ...
(cond (infl (cond ((null minfl) (return '$inf))
                   (t (go oon))))
      (minfl (return '$minf))
      (indl
       ;; At this point we have a sum of '$ind. We factor 
       ;; the sum and try again. This way we get the limit 
       ;; of expressions like (a-b)*ind, where (a-b)--> 0.
       (cond ((not (alike1 (setq y ($factorsum exp)) exp))
              (return (limit y var val 'think)))
             (t
              (return '$ind))))
      (t (return '$ind))))
 ...

The idea is to do a $factorsum, if we get a sum of '$ind and to try
again to get the limit. This way we get the limit of expressions like
(a-b)*ind, where (a-b) -> 0 in the limit. For the reported example we
get:

(%i1) limit(sin(x)*cos(1/x)-sin(x),x,inf);
(%o1) 0
(%i2) limit(sin(x)*(cos(1/x)-1),x,inf);
(%o2) 0

Because we do a $factorsum, we can add further terms to the expression:

(%i3) limit(sin(x)*(cos(1/x)-1)+1,x,inf);
(%o3) 1

Should I commit this patch at this time or is it better to wait until
the next version has been released?

I have suggested two further corrections on the mailing list

Bug ID: 893633 "depends(a,[b,b,b])"
Bug ID: 767556 "Distributing operations over ="

Should we include the suggested corrections to the next release too?

Dieter Kaiser