Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: SourceForge.net <noreply@so...>  20071229 17:43:04

Bugs item #1860487, was opened at 20071229 10:43 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1860487&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  Integration Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Robert Dodier (robert_dodier) Assigned to: Nobody/Anonymous (nobody) Summary: MONSTERTRIG endless recursion Initial Comment: MONSTERTRIG tries to reduce some trig expressions and start over. However I've encountered an expression for which the attempted reduction has no effect, so it loops endlessly. e.g. trace (integrate, ?monstertrig); integrate (x*(cos(2*x) + sin(x)), x); => 1 Enter integrate [x*(cos(2*x)+sin(x)),x] 1 Enter ?monstertrig [x*(cos(2*x)+sin(x)),x,x] 1 Exit ?monstertrig false 1 Enter ?monstertrig [x*(cos(2*x)+sin(x)),x,2*x] 2 Enter integrate [?new\var\15974*(cos(?new\var\15974) +sin(?new\var\15974/2)) /2,?new\var\15974] 2 Enter ?monstertrig [?new\var\15974*(cos(?new\var\15974) +sin(?new\var\15974/2)),?new\var\15974, ?new\var\15974/2] 3 Enter integrate [2*?new\var\15975 *(cos(2*?new\var\15975)+sin(?new\var\15975)), ?new\var\15975] 3 Enter ?monstertrig [?new\var\15975*(cos(2*?new\var\15975) +sin(?new\var\15975)),?new\var\15975, ?new\var\15975] 3 Exit ?monstertrig false ... etc etc. Here's the relevant code from MONSTERTRIG (src/sin.lisp). ;; We have trig(c*x+b). Use the substitution y=c*x+b to ;; try to compute the integral. Why? Because x*sin(n*x) ;; takes longer and longer as n gets larger and larger. ;; This is caused by the Risch integrator. This is a ;; workaround for this issue. (let ((c (cdras 'c arg)) (b (cdras 'b arg)) (newvar (gensym "NEWVAR"))) (let ((newint (div ($integrate (maximasubstitute (div (sub newvar b) c) var exp) newvar) c))) (returnfrom monstertrig (maximasubstitute *trigarg* newvar newint))))) risch has no trouble with the example shown above, although the comments in MONSTERTRIG suggest risch has trouble in some cases.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1860487&group_id=4933 
From: SourceForge.net <noreply@so...>  20080102 18:33:25

Bugs item #1860487, was opened at 20071229 12:43 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1860487&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  Integration Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Robert Dodier (robert_dodier) Assigned to: Nobody/Anonymous (nobody) Summary: MONSTERTRIG endless recursion Initial Comment: MONSTERTRIG tries to reduce some trig expressions and start over. However I've encountered an expression for which the attempted reduction has no effect, so it loops endlessly. e.g. trace (integrate, ?monstertrig); integrate (x*(cos(2*x) + sin(x)), x); => 1 Enter integrate [x*(cos(2*x)+sin(x)),x] 1 Enter ?monstertrig [x*(cos(2*x)+sin(x)),x,x] 1 Exit ?monstertrig false 1 Enter ?monstertrig [x*(cos(2*x)+sin(x)),x,2*x] 2 Enter integrate [?new\var\15974*(cos(?new\var\15974) +sin(?new\var\15974/2)) /2,?new\var\15974] 2 Enter ?monstertrig [?new\var\15974*(cos(?new\var\15974) +sin(?new\var\15974/2)),?new\var\15974, ?new\var\15974/2] 3 Enter integrate [2*?new\var\15975 *(cos(2*?new\var\15975)+sin(?new\var\15975)), ?new\var\15975] 3 Enter ?monstertrig [?new\var\15975*(cos(2*?new\var\15975) +sin(?new\var\15975)),?new\var\15975, ?new\var\15975] 3 Exit ?monstertrig false ... etc etc. Here's the relevant code from MONSTERTRIG (src/sin.lisp). ;; We have trig(c*x+b). Use the substitution y=c*x+b to ;; try to compute the integral. Why? Because x*sin(n*x) ;; takes longer and longer as n gets larger and larger. ;; This is caused by the Risch integrator. This is a ;; workaround for this issue. (let ((c (cdras 'c arg)) (b (cdras 'b arg)) (newvar (gensym "NEWVAR"))) (let ((newint (div ($integrate (maximasubstitute (div (sub newvar b) c) var exp) newvar) c))) (returnfrom monstertrig (maximasubstitute *trigarg* newvar newint))))) risch has no trouble with the example shown above, although the comments in MONSTERTRIG suggest risch has trouble in some cases.  >Comment By: Raymond Toy (rtoy) Date: 20080102 13:33 Message: Logged In: YES user_id=28849 Originator: NO The comment refers to some other bug (reported by Stavros some time ago). I guess the test for trig(c*x+b) could be made stricter so that only that particular case is handled. Or we can just take out the special case all together and live with the slowness.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1860487&group_id=4933 
From: SourceForge.net <noreply@so...>  20080103 05:13:52

Bugs item #1860487, was opened at 20071229 10:43 Message generated for change (Comment added) made by robert_dodier You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1860487&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  Integration Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Robert Dodier (robert_dodier) Assigned to: Nobody/Anonymous (nobody) Summary: MONSTERTRIG endless recursion Initial Comment: MONSTERTRIG tries to reduce some trig expressions and start over. However I've encountered an expression for which the attempted reduction has no effect, so it loops endlessly. e.g. trace (integrate, ?monstertrig); integrate (x*(cos(2*x) + sin(x)), x); => 1 Enter integrate [x*(cos(2*x)+sin(x)),x] 1 Enter ?monstertrig [x*(cos(2*x)+sin(x)),x,x] 1 Exit ?monstertrig false 1 Enter ?monstertrig [x*(cos(2*x)+sin(x)),x,2*x] 2 Enter integrate [?new\var\15974*(cos(?new\var\15974) +sin(?new\var\15974/2)) /2,?new\var\15974] 2 Enter ?monstertrig [?new\var\15974*(cos(?new\var\15974) +sin(?new\var\15974/2)),?new\var\15974, ?new\var\15974/2] 3 Enter integrate [2*?new\var\15975 *(cos(2*?new\var\15975)+sin(?new\var\15975)), ?new\var\15975] 3 Enter ?monstertrig [?new\var\15975*(cos(2*?new\var\15975) +sin(?new\var\15975)),?new\var\15975, ?new\var\15975] 3 Exit ?monstertrig false ... etc etc. Here's the relevant code from MONSTERTRIG (src/sin.lisp). ;; We have trig(c*x+b). Use the substitution y=c*x+b to ;; try to compute the integral. Why? Because x*sin(n*x) ;; takes longer and longer as n gets larger and larger. ;; This is caused by the Risch integrator. This is a ;; workaround for this issue. (let ((c (cdras 'c arg)) (b (cdras 'b arg)) (newvar (gensym "NEWVAR"))) (let ((newint (div ($integrate (maximasubstitute (div (sub newvar b) c) var exp) newvar) c))) (returnfrom monstertrig (maximasubstitute *trigarg* newvar newint))))) risch has no trouble with the example shown above, although the comments in MONSTERTRIG suggest risch has trouble in some cases.  >Comment By: Robert Dodier (robert_dodier) Date: 20080102 22:13 Message: Logged In: YES user_id=501686 Originator: YES > I guess the test for trig(c*x+b) could be made stricter > so that only that particular case is handled. Narrowing the test makes sense to me. > Or we can just take out the special case all > together and live with the slowness. Oh, I think we don't need to be so drastic.  Comment By: Raymond Toy (rtoy) Date: 20080102 11:33 Message: Logged In: YES user_id=28849 Originator: NO The comment refers to some other bug (reported by Stavros some time ago). I guess the test for trig(c*x+b) could be made stricter so that only that particular case is handled. Or we can just take out the special case all together and live with the slowness.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1860487&group_id=4933 
From: SourceForge.net <noreply@so...>  20080107 18:43:33

Bugs item #1860487, was opened at 20071229 12:43 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1860487&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  Integration Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Robert Dodier (robert_dodier) Assigned to: Nobody/Anonymous (nobody) Summary: MONSTERTRIG endless recursion Initial Comment: MONSTERTRIG tries to reduce some trig expressions and start over. However I've encountered an expression for which the attempted reduction has no effect, so it loops endlessly. e.g. trace (integrate, ?monstertrig); integrate (x*(cos(2*x) + sin(x)), x); => 1 Enter integrate [x*(cos(2*x)+sin(x)),x] 1 Enter ?monstertrig [x*(cos(2*x)+sin(x)),x,x] 1 Exit ?monstertrig false 1 Enter ?monstertrig [x*(cos(2*x)+sin(x)),x,2*x] 2 Enter integrate [?new\var\15974*(cos(?new\var\15974) +sin(?new\var\15974/2)) /2,?new\var\15974] 2 Enter ?monstertrig [?new\var\15974*(cos(?new\var\15974) +sin(?new\var\15974/2)),?new\var\15974, ?new\var\15974/2] 3 Enter integrate [2*?new\var\15975 *(cos(2*?new\var\15975)+sin(?new\var\15975)), ?new\var\15975] 3 Enter ?monstertrig [?new\var\15975*(cos(2*?new\var\15975) +sin(?new\var\15975)),?new\var\15975, ?new\var\15975] 3 Exit ?monstertrig false ... etc etc. Here's the relevant code from MONSTERTRIG (src/sin.lisp). ;; We have trig(c*x+b). Use the substitution y=c*x+b to ;; try to compute the integral. Why? Because x*sin(n*x) ;; takes longer and longer as n gets larger and larger. ;; This is caused by the Risch integrator. This is a ;; workaround for this issue. (let ((c (cdras 'c arg)) (b (cdras 'b arg)) (newvar (gensym "NEWVAR"))) (let ((newint (div ($integrate (maximasubstitute (div (sub newvar b) c) var exp) newvar) c))) (returnfrom monstertrig (maximasubstitute *trigarg* newvar newint))))) risch has no trouble with the example shown above, although the comments in MONSTERTRIG suggest risch has trouble in some cases.  >Comment By: Raymond Toy (rtoy) Date: 20080107 13:42 Message: Logged In: YES user_id=28849 Originator: NO Fixed in sin.lisp, 1.29. Changed the test match only if the coefficient is a number >= 1. All tests pass, and x*sin(n*x) is still fast, and we don't get the infinite recursion. BTW, the original bug report doesn't actually give an infinite recursion. It eventually stopped with a message about too many contexts. But if I tried to do the integral again, it failed instantly with too many contexts. See bug 1866077.  Comment By: Robert Dodier (robert_dodier) Date: 20080103 00:13 Message: Logged In: YES user_id=501686 Originator: YES > I guess the test for trig(c*x+b) could be made stricter > so that only that particular case is handled. Narrowing the test makes sense to me. > Or we can just take out the special case all > together and live with the slowness. Oh, I think we don't need to be so drastic.  Comment By: Raymond Toy (rtoy) Date: 20080102 13:33 Message: Logged In: YES user_id=28849 Originator: NO The comment refers to some other bug (reported by Stavros some time ago). I guess the test for trig(c*x+b) could be made stricter so that only that particular case is handled. Or we can just take out the special case all together and live with the slowness.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1860487&group_id=4933 
From: SourceForge.net <noreply@so...>  20080107 18:46:23

Bugs item #1860487, was opened at 20071229 12:43 Message generated for change (Settings changed) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1860487&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  Integration Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Robert Dodier (robert_dodier) Assigned to: Nobody/Anonymous (nobody) Summary: MONSTERTRIG endless recursion Initial Comment: MONSTERTRIG tries to reduce some trig expressions and start over. However I've encountered an expression for which the attempted reduction has no effect, so it loops endlessly. e.g. trace (integrate, ?monstertrig); integrate (x*(cos(2*x) + sin(x)), x); => 1 Enter integrate [x*(cos(2*x)+sin(x)),x] 1 Enter ?monstertrig [x*(cos(2*x)+sin(x)),x,x] 1 Exit ?monstertrig false 1 Enter ?monstertrig [x*(cos(2*x)+sin(x)),x,2*x] 2 Enter integrate [?new\var\15974*(cos(?new\var\15974) +sin(?new\var\15974/2)) /2,?new\var\15974] 2 Enter ?monstertrig [?new\var\15974*(cos(?new\var\15974) +sin(?new\var\15974/2)),?new\var\15974, ?new\var\15974/2] 3 Enter integrate [2*?new\var\15975 *(cos(2*?new\var\15975)+sin(?new\var\15975)), ?new\var\15975] 3 Enter ?monstertrig [?new\var\15975*(cos(2*?new\var\15975) +sin(?new\var\15975)),?new\var\15975, ?new\var\15975] 3 Exit ?monstertrig false ... etc etc. Here's the relevant code from MONSTERTRIG (src/sin.lisp). ;; We have trig(c*x+b). Use the substitution y=c*x+b to ;; try to compute the integral. Why? Because x*sin(n*x) ;; takes longer and longer as n gets larger and larger. ;; This is caused by the Risch integrator. This is a ;; workaround for this issue. (let ((c (cdras 'c arg)) (b (cdras 'b arg)) (newvar (gensym "NEWVAR"))) (let ((newint (div ($integrate (maximasubstitute (div (sub newvar b) c) var exp) newvar) c))) (returnfrom monstertrig (maximasubstitute *trigarg* newvar newint))))) risch has no trouble with the example shown above, although the comments in MONSTERTRIG suggest risch has trouble in some cases.  Comment By: Raymond Toy (rtoy) Date: 20080107 13:42 Message: Logged In: YES user_id=28849 Originator: NO Fixed in sin.lisp, 1.29. Changed the test match only if the coefficient is a number >= 1. All tests pass, and x*sin(n*x) is still fast, and we don't get the infinite recursion. BTW, the original bug report doesn't actually give an infinite recursion. It eventually stopped with a message about too many contexts. But if I tried to do the integral again, it failed instantly with too many contexts. See bug 1866077.  Comment By: Robert Dodier (robert_dodier) Date: 20080103 00:13 Message: Logged In: YES user_id=501686 Originator: YES > I guess the test for trig(c*x+b) could be made stricter > so that only that particular case is handled. Narrowing the test makes sense to me. > Or we can just take out the special case all > together and live with the slowness. Oh, I think we don't need to be so drastic.  Comment By: Raymond Toy (rtoy) Date: 20080102 13:33 Message: Logged In: YES user_id=28849 Originator: NO The comment refers to some other bug (reported by Stavros some time ago). I guess the test for trig(c*x+b) could be made stricter so that only that particular case is handled. Or we can just take out the special case all together and live with the slowness.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1860487&group_id=4933 
Sign up for the SourceForge newsletter:
No, thanks