> 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 <***@gmail.com>

Sent: Friday, June 23, 2017 3:49:20 PM

To: maxima-***@lists.sourceforge.net

Subject: Re: [Maxima-discuss] A question about 1//2

>>>>> "Andreas" == Andreas Eder <***@gmx.net> 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