From: Raymond T. <toy...@gm...> - 2023-02-22 15:14:09
|
On Wed, Feb 22, 2023 at 6:44 AM Barton Willis via Maxima-discuss < max...@li...> wrote: > > > There are some (too many, I’d say) tests in our testsuite that set *numer* > to true and use* ev.* Here is one of them: > > > > ev(integrate(x^3/(exp(x)-1),x,0,inf),numer) > > > > First, given the unintended consequences of *ev*, I think it would be > better to write this test as > > > > block([numer : true], integrate(x^3/(exp(x)-1),x,0,inf)) > I think this makes sense, but it's so much easier to write it ev(foo,numer) or just foo,numer; Perhaps we should also update the manual examples not to do foo,numer or ev(foo,numer). For a couple of examples I saw, we could replace foo,numer with float(foo). Or maybe we could add a numer function that basically does what your block statement does. > > Second, I think getting limit and integrate (likely others) to work for > correctly when *numer* is true is more work than it’s worth. You can set * > numer *to false at the top level of these mostly symbolically-based > functions only to have it change later on. I have a few bits of code > that allow Maxima to symbolically compute this integral: > > > > (%i4) block([numer : false], integrate(x^3/(exp(x)-1),x,0,inf)); > > (%o4) %pi^4/15 > > > (Current Maxima gives a limit nounform for this definite integral.) > > > > But when numer is true, my code says the integral diverges—why? Well two > terms that should exactly cancel don't—look at first term with the > coefficient of 1.11...x10^-16. > > > > 3" Enter "limit" > "[1.110223024625157*10^-16*%pi^2*x^2+(-0.1166666666666667*%pi^4\-0.5*log(-1)^2*%pi^2-0.25*log(-1)^4),x,inf,think] > > > > I'll continue looking for the place where numer gets set to true (it is > set to false at the top of the my limit code. But I'm tempted to change the > test to > > > float(integrate(x^3/(exp(x)-1),x,0,inf)) > > > --Barton > > > > _______________________________________________ > Maxima-discuss mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > -- Ray |