2 A collection of tests to stress $limit and friends
8 Tests to check how limit deals with weird combinations of
9 infinitesimals and infinities. See bug 2563
18 /* Tests from Bug 1036900 */
19 /* These bugs were fixed in limit.lisp rev 1.7, 2004/10/04 */
22 limit(7^(n^2)/8^n,n,inf);
24 limit((10^n+9^n+8^n)^(1/n),n,inf);
26 limit(4^n/2^(2*n),n,inf);
29 /* Test from Bug 1052308 */
30 /* Fixed in limit.lisp rev 1.11 */
33 limit(erf(nn*zz), nn, inf);
35 limit(tanh(nn*zz), nn, inf);
40 /* Bug 1281737, fixed in limit.lisp rev 1.15 */
41 limit(atan(x)/(1/exp(1)-exp(-(1+x)^2)),x,inf,plus);
45 limit(atan2(y,x),y,minf);
49 limit(abs(sqrt(1-1/x)-1),x,0);
53 limit(x*atan(x)/(x+1),x,inf);
55 limit(x*atan(x)-log(x),x,inf);
63 limit(sin(x)/x,x,0,plus);
65 limit(sin(x)/x,x,0,minus);
70 /* #2504 wrong answer for simple limit, limit(sin(x)+1/x, x, inf)=0 */
71 limit(1/x + sin(x), x, inf);
79 limit(t^2*exp(-4*t/3-8*exp(-t)),t,inf);
83 * From bug 535363, but this isn't really fixed. The fix for 1469411
84 * broke this test, so we're adding it to make sure we don't break it.
88 limit(exp(-1/x)/x^4,x,0,'plus);
92 limit(x*(atan(x)-%pi/2),x,inf);
95 limit((atan(x)-(%pi/2))/(sin(10/x)),x,inf);
98 /* [ 1498047 ] limit(a/n,n,inf); */
103 * [ 1646761 ] limit atanh @ -1 / 1 all wrong...
105 /* Limit at 1 is (complex) infinity). But one-sided limit can be inf (real infinity). */
108 limit(atanh(x),x,1,'minus);
110 limit(atanh(x),x,-1);
112 limit(atanh(x),x,-1,'plus);
115 /* There shouldn't be an error message printed out here. Need to look at output to see. */
116 limit(2*atanh(x),x,1);
118 limit(2*atanh(x),x,1,'minus);
121 limit(atanh(a-1)-log(a)/2,a,0,'plus),logarc:true;
124 /* [ 1606731 ] limit of algebraic when algebraic : true */
125 limit(x*(sqrt(1+x^2)-x),x,inf), algebraic : true, gcd : subres;
128 /* [ 1097982 ] limit(x/(x^(log(x)))); returns wrong answer */
129 limit(x/(x^log(x)), x, inf);
132 /* [ 1039965 ] limit(4^n/2^(2*n),n,inf) is wrong */
133 limit(4^n/2^(2*n),n,inf);
136 /* [ 1731127 ] limit((1 + 1/x)*(sqrt(x + 1) + 1), x, inf) => 0 (not inf) */
137 limit((1 + 1/x)*(sqrt(x + 1) + 1), x, inf);
140 /* [ 1593083 ] tlimit(t^2*exp(-4*t/3-8*exp(-t)),t,inf) gives error */
141 tlimit(t^2*exp(-4*t/3-8*exp(-t)),t,inf);
144 /* [ 1786774 ] tlimit((5^x + 3^x)^(1/x), x, inf) => Error */
145 tlimit((5^x + 3^x)^(1/x), x, inf);
148 /* [ 1603900 ] taylor/tlimit (4^n+1)/2^(2*n) internal error */
149 tlimit((4^n+1)/2^(2*n),n,inf);
152 /* [ 1281736 ] limit((x/log(x))*(x^(1/x)-1),x,inf) - wrong result */
153 limit((x/log(x))*(x^(1/x)-1),x,inf);
156 /* [ 1036901 ] tlimit(7^(n^2)/8^n,n,inf); wrong result */
157 tlimit(7^(n^2)/8^n, n, inf);
160 /* [ 1665657 ] limit fails to find easy limit */
161 limit(x/(x-1)-1/log(x),x,1,plus);
164 /* [ 611411 ] limit asks sign of IND */
165 limit(abs(sin(x)),x,inf);
168 /* [ 1629723 ] bug in limit, asks sign of IND, encountered in integrator */
169 limit(abs(sin(x))/x, x, inf);
172 /* [ 782099 ] limit returns expression in IND */
173 limit(sinh(exp(%i*x)),x,inf);
176 /* [ 1528607 ] limit(a^x,x,inf) can't solve for a : abs(a) < 1 */
177 limit((-2/3)^x,x,inf);
180 limit(signum(x), x, 0, plus);
183 limit(signum(x), x, 0, minus);
186 limit((-1/%pi)^x,x,inf);
189 tlimit(exp(%i*t), t, inf);
192 tlimit(exp(-t+%i*t),t,inf);
195 /* [ 1811503 ] computing a wrong result */
196 limit((((1+1/x)^(x^2))+1)^(1/x),x,inf);
199 /* [ 1760232 ] limit(1/n * n!^(1/n), n, inf); */
200 limit(1/n * n!^(1/n), n, inf);
203 /* Apparently wrong limit with factorial - ID: 3198530 */
204 limit(1/(2+1/factorial(n)),n,inf);
207 limit(t*(erf((t))-1),t,inf);
210 /* #3153 Limits of erfc */
211 limit(erfc(x*(1 + %i)), x, inf);
214 limit(erfc(x*(1 + %i)), x, minf);
217 limit(exp(x)*(sin(1/x+exp(-x))-sin(1/x+exp(-x^2))), x, inf);
220 /* it would be nice to handle this someday
221 limit(n - exp(psi[0](n)), n, inf);
225 limit(x*gamma(x), x, 0);
228 /* [ 744679 ] limit overflows memory? */
229 (assume(a>1), limit((a^(1/n)+1)^n/2^n, n, inf));
232 /* [ 702512 ] limit(1/(1/a*2^(%i*a)+1),a,inf) => UND */
233 limit(1/(1/a*2^(%i*a)+1),a,inf);
236 /* [ 923407 ] limit(atan(sqrt(x))/sqrt(x),x,0) wrong */
237 limit(atan(sqrt(x))/sqrt(x),x,0);
240 /* [ 1102908 ] limit/atan/exp returns complex expr with wrong principal val */
241 limit(atan(x)/(1/exp(1)-exp(-(1+x)^2)),x,inf,plus);
244 limit( (3^(1/x) + 5^(1/x))^x, x, 0, minus);
247 limit( (3^(1/x) + 5^(1/x))^x, x, 0, plus);
250 limit( (3^(1/x) + 5^(1/x))^x, x, 0);
253 /* [ 1852415 ] limit(sqrt(1-%e^(-x^2)), x, inf) = 0 */
254 limit(sqrt(1-%e^(-x^2)), x, inf);
257 /* [ 1515712 ] tlimit (x*atan(x)/(x+1),x,inf) => 3 %pi/2, etc */
258 tlimit(x*atan(x)/(x+1),x,inf);
261 tlimit(x*(atan(x)-%pi/2),x,inf);
264 tlimit(atan(x^-1), x, 0, minus);
267 /* [ 1973399 ] F(x) := 1/%pi*(atan(x) + %pi/2) */
268 (assume(c>0), limit(((1/%pi)*(atan(n/%pi) + %pi/2))^n, n, inf));
271 /* [ 1103515 ] limit(atan2(x,-1),x,0) wrong */
272 limit(atan2(x,-1), x, 0, minus);
275 limit(atan2(x,-1), x, 0, plus);
278 limit(atan2(x,-1), x, 0);
280 /* ideally should be ind */
282 /* limit of atan2 - ID: 3539699 */
283 limit(atan2(x^2-2,x^3-3*x), x, sqrt(2), minus);
286 limit(atan2(x^2-2,x^3-3*x), x, sqrt(2), plus);
289 limit(atan2((x^2-2), x^3-2*x), x, sqrt(2), minus);
292 limit(atan2((x^2-2), x^3-2*x), x, sqrt(2), plus);
295 limit(atan2(-(x^2-2), x^3-2*x), x, sqrt(2), minus);
298 limit(atan2(-(x^2-2), x^3-2*x), x, sqrt(2), plus);
301 limit(floor(x), x, 5, minus);
304 limit(floor(x), x, 5, plus);
307 limit(ceiling(x), x, 5, minus);
310 limit(ceiling(x), x, 5, plus);
313 limit(round(x), x, 5/2, minus);
316 limit(round(x), x, 5/2, plus);
319 limit(floor(sin(x)), x, 0, minus);
322 /* [ 1587235 ] limit(floor(x),x,1) wrong */
326 /* [ 1885377 ] wrong limit evaluation in 5.14.0 */
327 limit((3/4)^(5*n+1), n, inf);
330 limit(-%e^x/x, x, inf);
333 /* [ 2083561 ] Limit of the Wallis product */
334 limit((%pi*4^N*N!^2)/(2*2^(2*N)*gamma(N+1/2)*gamma(N+3/2)), N, inf);
337 /* wrong limit(log(gamma(x+1))/x,x,0) - ID: 2727078 */
338 limit(log(gamma(x+1))/x, x, 0);
341 /* log has a branch cut on negative real axis */
342 limit(log(-1+x*%i), x, 0, plus);
345 limit(log(-1+x*%i), x, 0, minus);
348 limit((log(y+h)-log(y))/h,h,0,plus);
351 /* limit of incomplete gamma */
352 /* function simplim%gamma_incomplete in gamma.lisp */
354 /* sin(x^2)/(x^2) improper integral incorrect? - ID: 3397562 */
355 limit( gamma_incomplete(-1/2, -%i*x^2), x, inf);
358 /* should be complex infinity */
359 limit( gamma_incomplete(2, -%i*x), x, inf);
360 'limit(gamma_incomplete(2,-%i*x),x,inf);
362 /* Error integrating exp(-x)*sinh(sqrt(x)) with domain: complex - ID: 3529144 */
363 /* need taylor expansion of gamma_incomplete(1/2, x) at x=0 */
364 limit(gamma_incomplete(1/2,(1-2*sqrt(x))^2/4)*(1-2*sqrt(x))
365 /(sqrt((1-2*sqrt(x))^2)), x, 1/4, minus),domain:complex;
368 limit(gamma_incomplete(1/2,(1-2*sqrt(x))^2/4)*(1-2*sqrt(x))
369 /(sqrt((1-2*sqrt(x))^2)), x, 1/4, plus),domain:complex;
372 /* [ 635606 ] limit(abs(log(x))) internal error, UND */
373 limit(abs(log(x)), x, 0);
376 limit(exp(-x)*(x*sin(x)+cos(x)), x, inf);
379 /* tex(t[1]) shouldn't change t to true */
382 "; /* tex output contains embedded newline */
384 /* tex(x[1]^2) shouldn't get confused by debug info in expression CAR */
385 (foo : x[1]^2, tex (foo, false));
387 "; /* tex output contains embedded newline */
389 /* [ 2084910 ] limit bugs */
390 limit((%pi*N^(2*N+1)*2^(2*N))/((2*N-1)^(2*N)*(2*%e*N+%e)), N, inf);
393 /* [ 1977992 ] no limit calculation */
394 limit(abs(sin(x))/sqrt(1-cos(x)), x, 0);
397 /* [ 1973399 ] F(x) := 1/%pi*(atan(x) + %pi/2) */
398 /* only works with taylor_logexpand:true */
399 limit( ((1/%pi)*(atan(n/%pi) + %pi/2))^n, n, inf);
402 /* limit(x*expintegral_ei(x),x,0) --> Error - ID: 2801821 */
403 limit(x*expintegral_ei(x), x, 0);
406 /* Limit of the factorial function - 4 problems - ID: 2841504 */
407 limit(factorial(x),x,-2,plus);
410 /* Calculus mistake: wrong answer: limit - ID: 3534858 */
411 limit((sin(x)-tan(x))/(x*(cos(x)-1)),x,0);
414 /* #2639 limit asks about internal variable */
415 limit(tan(x)/sqrt(tan(x)^2+1),x,%pi/2,plus);
418 limit(1/psi[1](x), x, inf);
421 /* limit of psi[i] - ID: 2843705 */
422 limit(psi[i](x),x,inf);
423 'limit(psi[i](x),x,inf);
425 /* tests for gruntz limit algorithm */
426 gruntz(exp(x), x, inf);
429 gruntz(exp(-x), x, inf);
432 gruntz( (x + 2^x) / 3^x, x, inf);
435 gruntz( x^2/(x + 2*x^2), x, inf);
438 gruntz( x/x^log(x), x, inf);
441 gruntz( (2^x)/(x + exp(x)) , x, 0, plus);
444 gruntz( (erf(x))/sqrt(1-cos(x)) , x, 0, minus);
445 -2*sqrt(2)/sqrt(%pi);
447 gruntz( (erf(x))/sqrt(1-cos(x)) , x, 0, plus);
450 gruntz( x*(x^(1/x)-1)/log(x), x, inf);
453 gruntz( (x*x^(1/x)-x)/log(x), x, inf);
456 gruntz(exp(-1/x)/x^6,x,0,plus);
459 /* limit gives the wrong answer - ID: 3410704 */
460 limit(sqrt(t^2+4)*(((t+2/t^2)^2+4)^(3/2)-(t+2/t^2)^3-4*(t+2/t^2))
461 /(sqrt((t+2/t^2)^2+4)*((t^2+4)^(3/2)-t^3-4*t)), t, inf);
464 /* Inaccurate Limit Evaluation - ID: 3276461 */
465 radcan(limit((-4*x^2-10*x+24)/((4*x+8)^(1/3)+2), x, -4));
468 limit(-(3*n^2 + 1)*(-1)^n/sqrt(n^5 + 8*n^3 + 8),n,inf);
472 * Bug ID: 1315837 limit(?foo)
473 * Bug ID: 1119228 limit(1/zeraoa)
488 * Bug ID: 1797296 - Crazy results when doing limit of 'diff
490 limit('diff(x+1,x),x,2);
491 'limit('diff(x+1,x),x,2);
493 limit('integrate(x+1,x),x,2);
494 'limit('integrate(x+1,x),x,2);
496 limit(integrate(f(t),t,0,x),x,0,plus);
497 'limit(integrate(f(t),t,0,x),x,0,plus);
499 limit(integrate(t,t,0,x)/x,x,inf);
502 (assume(a>2), limit(integrate(t/log(t),t,2,a)/a,a,inf));
505 /* limit(1/inf-1/minf) => 0+0 - ID: 903074 */
510 1-arg limit: limit(a*inf-inf) => minf - ID: 1385306
512 The original fix for this bug sent it to inf, assuming that the two
513 different "inf" occurrences were the same. I disagree: inf - inf
514 probably shouldn't ever be simplified to zero, but we can avoid it
520 /* limit(1 - (-1/2)^inf) --> inf - ID: 2853506 */
521 limit(1 - (-1/2)^inf);
523 /* ideally should be 1 */
525 /* definition of derivative in terms of limit */
526 limit((sin(3*(x+h)) - sin(3*(x)))/h, h, 0, plus);
529 /* limit incorrect for -x/sqrt(1-x^2) - ID: 2869955 */
530 limit(-x/sqrt(1-x^2), x, 1, minus);
533 /* limit(%i*log(a),a,0) nounform (%i*und problem) - ID: 816797 */
534 limit(%i*log(x),x,0);
537 /* limit(sqrt(x),x,minf) not fully evaluated - ID: 2901855 */
538 limit(sqrt(x), x, minf);
541 /* #2847 limits of powers of constants */
542 limit((5+%i)^n,n,inf);
545 /* limit bug - ID: 3101075 */
546 limit((2+cos(x))/(x^3*sin(x))-3/x^4,x,0,plus);
549 /* #2527 exponent too big in limit */
550 limit ((cosh(sqrt(x+1))-cosh(sqrt(x)))^(1/sqrt(x)),x,inf );
553 /* #2561 limit(log(x^2),x,-20) gives 2*log(-20) */
554 limit(log(x^2),x,-20),logexpand:false;
557 /* #2412 Problems with integral (x/(exp(x)+1),x,0,inf) */
558 limit(-x*log(%e^x+1)-li[2](-%e^x)+x^2/2, x, inf);
561 /* The initial problem which triggers this bug */
564 limit ((sin(n*x) - n*x*cos(n*x))/n^2, x, %pi);
567 /* #2503 Declaring x as an integer changes result of limit from 3 to inf */
568 limit((2^n+3^n)^(1/n), n,inf);
571 /* #2624 Erroneous limit result */
572 (assume(n>2), limit(x-x*(1-1/x)^n, x, inf));
578 /* Bug ID: 593351 - limit/sin(inf)etc. should give 0, not IND
580 limit(cos(1/x)*sin(x)-sin(x),x,inf);
582 limit(cos(1/x)*sin(x)-sin(x)+a,x,inf);
585 /* Bug ID: 1376392 - limit(x/(2+sin(1/x)), x, 0); wrong result
587 limit(x/(2+sin(1/x)),x,0);
590 /* Bug ID: 1106912 - limit(x/sin(x)^2,x,inf)
591 I think the limit is not defined because the func is not defined
592 for all x > any constant.
594 limit(x/sin(x)^2,x,inf);
597 /* Bug ID: 811522 - redundant question in limit
598 * b is assumed to be zero. Maxima now can deduce from the database
599 * that b-2 is an even number.
603 limit(r^(b-2)*(x-r)^2,r,0);
604 'limit(r^(b-2)*(x-r)^2,r,0);
608 /* Bug ID: 221642 limit needs %piargs to be true
609 * The implementation of simp-%atan and simpatan2 has been revised.
610 * We get more limits independent of the value of %piargs.
614 limit(atan2(0,y),y,0,plus);
616 limit(atan2(0,y),y,0,minus);
618 limit(atan2(x,0),x,0,plus);
620 limit(atan2(x,0),x,0,minus);
625 /* Bug ID: 3002971 - limit fails where rat+subst works
627 limit(min(x,x+2,sin(x)/x),x,0);
629 limit(max(x,x+2,sin(x)/x),x,0);
632 /* Bug ID: 1969790 - limits and subscripts
634 limit(mu[inf],x,inf);
638 * Bug 3509430: limit of tanh(x) at 0 makes no sense
640 limit(tanh(x), x, 0);
643 /* bug 2535: stack exhausted when computing limit(log(..)) */
645 limit(log(-1/3125*((-1/2*sqrt(5) + 1/2)^n - (1/2*sqrt(5) +
646 1/2)^n)^9*sqrt(5))/log(-1/5*((-1/2*sqrt(5) + 1/2)^(8*n) - (1/2*sqrt(5) +
647 1/2)^(8*n))*((-1/2*sqrt(5) + 1/2)^n - (1/2*sqrt(5) + 1/2)^n) -
648 1/5*((-1/2*sqrt(5) + 1/2)^(9*n) - (1/2*sqrt(5) +
649 1/2)^(9*n))*sqrt(5)),n,inf);
652 /* #2675 maxima will not do the simplest of definite integrals
653 and will not factor otherwise */
654 limit(x^2*exp(-%i*x - x), x, inf);
657 /* bug #2621 gamma limit error */
659 limit(gamma(x+1/2)/(sqrt(x)*gamma(x)), x, inf);
662 /* Triggered by #2849. This result isn't great, but it's better than
663 an error. A more useful result would be und. */
667 limit((a*exp(a*x)*sin(b*x))/(b^2+a^2)-(b*exp(a*x)*cos(b*x))/(b^2+a^2), x, 0, plus);
670 /* Bug #2898: limit of continuous --> und */
672 limit(log(x)^2+2*log(x)+q/2+1,x,1);
675 limit(log(x)^2+2*%gamma*log(x)-%pi^2/6+%gamma^2,x,1);
676 -((%pi^2-6*%gamma^2)/6)$
678 /* #2972 Wrong limits involving logs */
679 limit( 27^(log(n)/log(3))/n^3, n, inf);
682 limit( 27^(log(n)/log(3)+1)/n^3, n, inf);
685 limit( ((27^(log(n)/log(3)+1)-1)/26+n-log(n)/log(3)-1)/n^3,n,inf);
688 /* examples from mailing list 2014-10-10: "Re: bug in limit code" */
691 kill (beta, hbar, omega, delta, n),
692 assume (beta > 0, hbar > 0, omega > 0, delta > 0, 2*n - 1 > 0),
696 limit (%e^(beta*hbar*omega-beta*(hbar*(2*n+1)*omega+delta))
697 /(1/(1-%e^-(beta*hbar*omega))^2
698 +(%e^-(beta*delta)-1)/(1-%e^-(2*beta*hbar*omega))), beta, inf);
702 assume (h > 0, d > 0, z > 0, 2*h*z > d),
706 limit ((%e^-(b*d)-1)/(1-%e^-(2*b*h*z)), b, inf);
709 (kill (a), assume (a < 0), 0);
712 limit (exp (b*a), b, inf);
715 limit((exp(a*x)-1)/(exp(a*x)+1),x,inf) ;
718 (forget (a < 0), assume (a > 0), 0);
721 limit((exp(a*x)-1)/(exp(a*x)+1),x,inf) ;
724 (forget (a > 0), assume (equal (a, 0)), 0);
727 limit((exp(a*x)-1)/(exp(a*x)+1),x,inf) ;
730 (forget (equal (a, 0)), assume (a > 0), 0);
733 integrate(%e^(-a*r)*sin(k*r),r,0,inf);
739 (forget (a > 0), assume (a < 0), limit (a*x, x, inf));
742 (forget (a < 0), assume (equal (a, 0)), limit (a*x, x, inf));
745 killcontext (context);
748 /* SF bug #3104: "limit(log(1 - exp(x)), x, 0, plus), numer => stack overflow" */
750 limit(log(1 - exp(x)), x, 0, plus);
753 limit(log(1 - exp(x)), x, 0, plus), numer;
756 limit(log(1 + exp(x)), x, 0, plus);
759 limit(log(1 + exp(x)), x, 0, plus), numer;
762 /* inspired by this example from #3103; for the present purpose,
763 * it's not too important to get these specific results,
764 * only that numer doesn't cause an error here.
767 integrate(x^3/(exp(x)-1),x,0,inf);
768 'limit(6*li[4](%e^x)-6*x*li[3](%e^x)+3*x^2*li[2](%e^x)+x^3*log(1-%e^x)-x^4/4,
769 x,inf,minus) -%pi^4/15$
771 integrate(x^3/(exp(x)-1),x,0,inf), numer;
772 'limit(6.0*li[4](%e^x)-6.0*x*li[3](%e^x)+3.0*x^2*li[2](%e^x)
773 +1.0*x^3*log(1-%e^x)-0.25*x^4,x,inf,minus)
776 /* #3142 limit((x^(1/x) - 1)*sqrt(x), x, inf) => inf */
777 limit((x^(1/x) - 1)*sqrt(x), x, inf);
780 /* #3143 limit((x^(1/x) - 1)*sqrt(x), x, 0, minus) => inf */
781 /* should really be '$infinity */
782 limit((x^(1/x) - 1)*sqrt(x), x, 0, minus);
783 'limit((x^(1/x) - 1)*sqrt(x), x, 0, minus);
785 /* SF bug #3185: "Error in sum with non-false modulus" */
787 block([modulus:7], sum(i^-2,i,1,inf));
790 block([modulus:7], limit(inf));
793 /* SF bug #3235: "ECL lisp arithmetic error in definite integration with large limits"
794 * the bug is actually in ECL (https://gitlab.com/embeddable-common-lisp/ecl/issues/299);
795 * here we'll test a work around.
798 block ([actual, expected],
799 actual : limit(x*exp(x)*log(exp(x)+1),x,-1000,plus),
800 expected : -1000*%e^-1000*log(%e^-1000*(%e^1000+1)),
801 if ev (equal (actual, expected), logexpand='super) then true else [actual, expected]);
804 /* accommodate different equivalent forms via 'equal' */
805 block ([actual, expected],
806 actual : integrate((x^2)*exp(x) / (1 + exp(x))^2,x,-1000,1000),
807 expected : (-(2000*%e^1000*log(%e^-1000*(%e^1000+1)))/(%e^1000+1))
808 -(2000*log(%e^-1000*(%e^1000+1)))/(%e^1000+1)
809 -((2000*%e^1000+2000)*log(%e^1000+1)
810 +(2*%e^1000+2)*li[2](-%e^1000)-1000000*%e^1000)
811 /(%e^1000+1)+(2*%e^1000*li[2](-%e^-1000))/(%e^1000+1)
812 +(2*li[2](-%e^-1000))/(%e^1000+1)-1000000/(%e^1000+1),
813 if ev (equal (actual, expected), logexpand='super) then true else [actual, expected]);
816 /* SF bug #3244: "error trying to promote float infinity to bigfloat in sign comparison"
817 * same as test under #3235 but ensure that bigfloat assume is present to trigger bug
820 block ([actual, expected, ctxt:newcontext()],
821 assume (xfoo > 200b0),
822 actual : limit(xfoo*exp(xfoo)*log(exp(xfoo)+1),xfoo,-1000,plus),
823 expected : -1000*%e^-1000*log(%e^-1000*(%e^1000+1)),
825 if ev (equal (actual, expected), logexpand='super) then true else [actual, expected]);