#895 limit x->inf sin(100/x)*x very slow

open
nobody
3
2006-04-09
2006-04-03
No

limit(sin(a/x)*x,x,inf),a=100 takes about 90 seconds on
a 1Ghz machine, whereas for a=5 it takes 0.1 seconds,
and for unbound a, it takes 0.4 sec.

I am guessing that limit calls trigexpand or some such,
leading to completely unnecessary blowup in the
intermediate results.

Discussion

  • Barton Willis

    Barton Willis - 2006-04-06

    Logged In: YES
    user_id=895922

    Yes, it seems that limit calls trigexpand (I traced
    trigexpand).

    One observation: tlimit is very fast on this problem.
    Is tlimit often better (faster, fewer bugs, ...)
    than limit? I didn't know about tlimit for years
    and I still forget about it.

    Barton

     
  • Raymond Toy

    Raymond Toy - 2006-04-06

    Logged In: YES
    user_id=28849

    One workaround is to set trigexpandtimes:false. Then it's
    very fast.

     
  • Robert Dodier

    Robert Dodier - 2006-04-09
    • labels: 460522 --> Lisp Core - Limit
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks