Bug #535363 again



I think I've found a way to do everything I was trying for:

- There are now two "max # of iterations" numbers: $lhospitallim and
$lhospitalpolylim.
- The defaults are 4 and 10 respectively.
- The former is used in general and the latter if we've noticed that
the denominator is a polynomial so we're being more optimistic!

I ended up writing my own polynomial test using rat which came to about
3 lines. It's considerably simpler than those from RJF because the only
question is "Can this expression be written in powers of <var>" and (I
think) you can check this by just calling rat() on the expression with
var as the variable and then checking the resulting header.

Warts:

- Firstly, throughout this part of limit.lisp, the functions have the
arguments "n" and "d". Strangely, "n" corresponds to the denominator
and "d" is the numerator. Everything works, but this really threw me!

- rtest16 now fails. This is because calling:
numer:true;
limit( sin(x)/x, x, 0 )
optionally with plus/minus as well gives 1.0 not 1. I'm not sure how
the changes I made caused this. Is the correct answer 1 or 1.0 ?!

I'm attaching a cvs diff so that people can take a look, but I realise
that

a) If this patch is worth having, the test script needs changing.
b) Or maybe the patch needs changing.
c) Or maybe I'm wasting everyone's time :P

I hope this makes sense!

Rupert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 535363.diff
Type: text/x-patch
Size: 6220 bytes
Desc: not available
Url : http://www.math.utexas.edu/pipermail/maxima/attachments/20070922/764ae478/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 307 bytes
Desc: not available
Url : http://www.math.utexas.edu/pipermail/maxima/attachments/20070922/764ae478/attachment.pgp