|
From: Barton W. <wi...@un...> - 2017-06-24 18:27:27
|
> In some ways it would be better to use common lisp rationals.
Incidentally: there are several tests in the testsuite that pass CL rationals and complex numbers to simplifya; two that I know of are
is(part(?complex(1,2),0)="+")
?nformat(?/(1,2))
These might be good tests, but they are arguably bogus input--I know of no nonbogus test in the testsuite that passes a CL rational or complex number to simplifya.
More Maxima trivia: Expand has the feature:
(%i3) expand(exp(-x)/(1+x));
(%o3) 1/(x*%e^x+%e^x)
No (so-called) expansion (controlled by mminusp, I think)
(%i4) expand(exp(x)/(1+x));
(%o4) %e^x/(x+1)
I have evidence that eliminating this expansion rule allows integrate(x^4/(a*x^2+x+c)^(5/2),x) to evaluate correctly, but prevents specint(exp(-t)/(t+1)^2,t) from evaluating.
For evaluating integrate(x^4/(a*x^2+x+c)^(5/2),x), I'd guess that the expansion prevents Maxima from detecting a derivative divides opportunity.
I'd guess that if the rule x^(-y)/(a +b) --> 1/(a * x^y + b*x^y) only worked when x is %e, the testsuite would run OK and that the bug
integrate(x^4/(a*x^2+x+c)^(5/2),x) --> nounform
would be fixed.
--Barton
________________________________
From: Raymond Toy <toy...@gm...>
Sent: Friday, June 23, 2017 3:49:20 PM
To: max...@li...
Subject: Re: [Maxima-discuss] A question about 1//2
>>>>> "Andreas" == Andreas Eder <and...@gm...> writes:
Andreas> Hi,
Andreas> i found that in the file ellipt.lisp we define the variable 1//2 like:
Andreas> (defvar 1//2 '((rat simp) 1 2))
Andreas> and in mopers.lisp there is a macro definition like:
Andreas> (defmacro 1//2 () ''((rat simp) 1 2))
Andreas> Does anybody know the reason - apart from mere historical
Andreas> accident - for this situation. If there is one :-)
That was probably me and I didn't know about the other.
Andreas> Shouldn't we unify thes uses?
Yes, we should.
Andreas> The use of the macro definition looks clumsy to me, since it looks like
Andreas> a function call for what should simply be the use of a constant. In
Andreas> this
Andreas> respect the variable definitions looks better.
Andreas> Another approach would be to define a symbol macro.
Andreas> What is your opinion about that?
Andreas> I'm sure 1//2 is not the only case (there is also a definition of
Andreas> half).
Andreas> There a surely more such occurances.
Using a macro or symbol macro seems wasteful since there would be a
copy everywhere instead of just the one in the defvar.
--
Ray
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! https://urldefense.proofpoint.com/v2/url?u=http-3A__sdm.link_slashdot&d=DwICAg&c=9ZQuuHhOefNvAzlN-3viIA&r=Y-7rxY5GkJ0PrHulpV2qSA&m=IYliIrNDRq5fzDNWi0Z5Wz-zlA8lQKBB07l0Ff20Dsw&s=s0BORp22fbtp-SaxRfKnofwyAFEWk_QlKReXZY4hnd8&e=
_______________________________________________
Maxima-discuss mailing list
Max...@li...
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.sourceforge.net_lists_listinfo_maxima-2Ddiscuss&d=DwICAg&c=9ZQuuHhOefNvAzlN-3viIA&r=Y-7rxY5GkJ0PrHulpV2qSA&m=IYliIrNDRq5fzDNWi0Z5Wz-zlA8lQKBB07l0Ff20Dsw&s=QNH8AasymHJcfyuqBT5QtEF9YYwaytbsJO0wmfhSnO8&e=
|