From: SourceForge.net <no...@so...> - 2006-05-08 14:47:16
|
Bugs item #1480338, was opened at 2006-05-02 07:59 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1480338&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core Group: None Status: Open Resolution: None Priority: 5 Submitted By: Barton Willis (willisbl) Assigned to: Nobody/Anonymous (nobody) Summary: ratsimp(exp(constant)) very slow Initial Comment: ratsimp, when applied to %e^((sqrt(852469675641479773175661572149741) -15762598695796738)/2251799813685248); is very slow. But can ratsimp simplify the argument to exp quickly. This expression happended towards the end of a matrixexp calculation. I've tried variations of this expression (delete hunks of various numbers) -- sometimes ratsimp is very fast, other times it seems to hang. (%i18) build_info(); Maxima version: 5.9.3 Maxima build date: 0:52 3/20/2006 host type: i686-pc-mingw32 lisp-implementation-type: GNU Common Lisp (GCL) lisp-implementation-version: GCL 2.6.7 Barton ---------------------------------------------------------------------- >Comment By: Raymond Toy (rtoy) Date: 2006-05-08 10:47 Message: Logged In: YES user_id=28849 Interesting. Barton's simplified ratsimp example causes 2 errors with CMUCL because pcetimes1 does f+ with a bignum and palgsimp does f< with a bignum. Replacing these with + and < fixes the issue. However, the ratsimp example causes a warning from cmucl because it wants to compute 1^1932473987149817. This is a cmucl problem, but depending on how smart the Lisp is, it might actually try to compute that power. Finally, for the complicated ratsimp(exp((sqrt ...))) example, I think the real issue is that maxima is trying to simplify the sqrt. If you just enter sqrt(852469675641479773175661572149741); there's a delay before maxima prints out the warning about not finding the factors. Also, factor(852469675641479773175661572149741) spends some time and returns 2 factors: 34130646845983 24976663333933005427. Not sure why there's a warning at all. So I think it used to be fast because sqrt(852...) factor or somebody gave up early and returned sqrt(852...). ifactor works harder before giving up. ---------------------------------------------------------------------- Comment By: Robert Dodier (robert_dodier) Date: 2006-05-06 23:03 Message: Logged In: YES user_id=501686 Not sure what's going on here, but maybe the problem is in the factoring code. Maxima 5.9.3 / clisp 2.34: ratsimp (%e^((sqrt(852469675641479773175661572149741) -15762598695796738)/2251799813685248)); => fast Maxima 5.9.3 / clisp 2.38 (after factor code was revised): => slow, and it complains "WARNING: could not find factors of composite: 852469675641479773175661572149741" ---------------------------------------------------------------------- Comment By: Barton Willis (willisbl) Date: 2006-05-06 07:40 Message: Logged In: YES user_id=895922 A simpler example: ratsimp(exp((1932473987149817)/589347638476187146)) Barton ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1480338&group_id=4933 |