## [Maxima-bugs] [ maxima-Bugs-2477795 ] "assume":problems with fractions or multiples of %pi and %e

 [Maxima-bugs] [ maxima-Bugs-2477795 ] "assume":problems with fractions or multiples of %pi and %e From: SourceForge.net - 2008-12-30 22:05:50 ```Bugs item #2477795, was opened at 2008-12-30 22:05 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=2477795&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 - Assume Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: "assume":problems with fractions or multiples of %pi and %e Initial Comment: I was trying to bound a variable within 0 and %pi/2, and I have notices that if the assumptions made with "assume" contain a fraction or a multiple of %pi or %e (I've tryed these for now) the results of a query made with "is" are wrong. Example (%i1) assume(a>0,a<%pi/2); %pi (%o1) [a > 0, --- > a] 2 does not give a correct result if a query with "is" is done. In fact: (%i2) is(a>%pi/2); (%o2) false (%i3) is(a>%pi); (%o3) unknown the %o3 "unknown" is wrong, it sholud be evaluated to false. The same problem if one, in example, defines a variable bounded within 0 and 2*%pi: (%i6) assume(b>0,b<2*%pi); (%o6) [b > 0, 2 %pi > b] (%i7) is(b>3*%pi); (%o7) unknown also this is wrong, it should be false. Nothing wrong happens if: (%i8) assume(c>0,c<%pi); (%o8) [c > 0, c < %pi] (%i9) is(c>2*%pi); (%o9) false There are the same problems with "assume" and fractions or multiples of %e. Please note the different output of Maxima for the above assumptions: (%i8) assume(c>0,c<%pi); (%o8) [c > 0, c < %pi] here is c that is defined as a function of %pi, but... (%i1) assume(a>0,a<%pi/2); %pi (%o1) [a > 0, --- > a] 2 %i6) assume(b>0,b<2*%pi); (%o6) [b > 0, 2 %pi > b] here are %pi/2 and 2*%pi that seems to be redefined in function of a and b. Could be here the problem? If this problem will be solved, could I hope one day to see this answer from "is": assume(a>0,a<%pi/2); is(sin(a)>0); true instead of the actual "unknown" :-)? It would be very useful if Maxima could understand the sign of trigonometric functions with the proper assumptions. Stefano f e r r i s t e a t g m a i l d o t c o m ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2477795&group_id=4933 ```

 [Maxima-bugs] [ maxima-Bugs-2477795 ] "assume":problems with fractions or multiples of %pi and %e From: SourceForge.net - 2008-12-30 22:05:50 ```Bugs item #2477795, was opened at 2008-12-30 22:05 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=2477795&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 - Assume Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: "assume":problems with fractions or multiples of %pi and %e Initial Comment: I was trying to bound a variable within 0 and %pi/2, and I have notices that if the assumptions made with "assume" contain a fraction or a multiple of %pi or %e (I've tryed these for now) the results of a query made with "is" are wrong. Example (%i1) assume(a>0,a<%pi/2); %pi (%o1) [a > 0, --- > a] 2 does not give a correct result if a query with "is" is done. In fact: (%i2) is(a>%pi/2); (%o2) false (%i3) is(a>%pi); (%o3) unknown the %o3 "unknown" is wrong, it sholud be evaluated to false. The same problem if one, in example, defines a variable bounded within 0 and 2*%pi: (%i6) assume(b>0,b<2*%pi); (%o6) [b > 0, 2 %pi > b] (%i7) is(b>3*%pi); (%o7) unknown also this is wrong, it should be false. Nothing wrong happens if: (%i8) assume(c>0,c<%pi); (%o8) [c > 0, c < %pi] (%i9) is(c>2*%pi); (%o9) false There are the same problems with "assume" and fractions or multiples of %e. Please note the different output of Maxima for the above assumptions: (%i8) assume(c>0,c<%pi); (%o8) [c > 0, c < %pi] here is c that is defined as a function of %pi, but... (%i1) assume(a>0,a<%pi/2); %pi (%o1) [a > 0, --- > a] 2 %i6) assume(b>0,b<2*%pi); (%o6) [b > 0, 2 %pi > b] here are %pi/2 and 2*%pi that seems to be redefined in function of a and b. Could be here the problem? If this problem will be solved, could I hope one day to see this answer from "is": assume(a>0,a<%pi/2); is(sin(a)>0); true instead of the actual "unknown" :-)? It would be very useful if Maxima could understand the sign of trigonometric functions with the proper assumptions. Stefano f e r r i s t e a t g m a i l d o t c o m ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2477795&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-2477795 ] "assume":problems with fractions or multiples of %pi and %e From: SourceForge.net - 2008-12-30 22:14:42 ```Bugs item #2477795, was opened at 2008-12-30 22:05 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2477795&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 - Assume Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: "assume":problems with fractions or multiples of %pi and %e Initial Comment: I was trying to bound a variable within 0 and %pi/2, and I have notices that if the assumptions made with "assume" contain a fraction or a multiple of %pi or %e (I've tryed these for now) the results of a query made with "is" are wrong. Example (%i1) assume(a>0,a<%pi/2); %pi (%o1) [a > 0, --- > a] 2 does not give a correct result if a query with "is" is done. In fact: (%i2) is(a>%pi/2); (%o2) false (%i3) is(a>%pi); (%o3) unknown the %o3 "unknown" is wrong, it sholud be evaluated to false. The same problem if one, in example, defines a variable bounded within 0 and 2*%pi: (%i6) assume(b>0,b<2*%pi); (%o6) [b > 0, 2 %pi > b] (%i7) is(b>3*%pi); (%o7) unknown also this is wrong, it should be false. Nothing wrong happens if: (%i8) assume(c>0,c<%pi); (%o8) [c > 0, c < %pi] (%i9) is(c>2*%pi); (%o9) false There are the same problems with "assume" and fractions or multiples of %e. Please note the different output of Maxima for the above assumptions: (%i8) assume(c>0,c<%pi); (%o8) [c > 0, c < %pi] here is c that is defined as a function of %pi, but... (%i1) assume(a>0,a<%pi/2); %pi (%o1) [a > 0, --- > a] 2 %i6) assume(b>0,b<2*%pi); (%o6) [b > 0, 2 %pi > b] here are %pi/2 and 2*%pi that seems to be redefined in function of a and b. Could be here the problem? If this problem will be solved, could I hope one day to see this answer from "is": assume(a>0,a<%pi/2); is(sin(a)>0); true instead of the actual "unknown" :-)? It would be very useful if Maxima could understand the sign of trigonometric functions with the proper assumptions. Stefano f e r r i s t e a t g m a i l d o t c o m ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2008-12-30 22:14 Message: I forgot to say that I am using Maxima 5.17.0, but on the Maxima mailing list Alexey Beshenov told me that also the CVS version has this problem. Sorry also for the bad formatting of %pi/2 in %o1 line, it is not very readable... I pasted a display2d enabled output, it should be read as (%o1) [a > 0, %pi/2 > a] ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2477795&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-2477795 ] "assume":problems with fractions or multiples of %pi and %e From: SourceForge.net - 2009-10-08 20:19:44 ```Bugs item #2477795, was opened at 2008-12-30 23:05 Message generated for change (Comment added) made by crategus You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2477795&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 - Assume Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: "assume":problems with fractions or multiples of %pi and %e Initial Comment: I was trying to bound a variable within 0 and %pi/2, and I have notices that if the assumptions made with "assume" contain a fraction or a multiple of %pi or %e (I've tryed these for now) the results of a query made with "is" are wrong. Example (%i1) assume(a>0,a<%pi/2); %pi (%o1) [a > 0, --- > a] 2 does not give a correct result if a query with "is" is done. In fact: (%i2) is(a>%pi/2); (%o2) false (%i3) is(a>%pi); (%o3) unknown the %o3 "unknown" is wrong, it sholud be evaluated to false. The same problem if one, in example, defines a variable bounded within 0 and 2*%pi: (%i6) assume(b>0,b<2*%pi); (%o6) [b > 0, 2 %pi > b] (%i7) is(b>3*%pi); (%o7) unknown also this is wrong, it should be false. Nothing wrong happens if: (%i8) assume(c>0,c<%pi); (%o8) [c > 0, c < %pi] (%i9) is(c>2*%pi); (%o9) false There are the same problems with "assume" and fractions or multiples of %e. Please note the different output of Maxima for the above assumptions: (%i8) assume(c>0,c<%pi); (%o8) [c > 0, c < %pi] here is c that is defined as a function of %pi, but... (%i1) assume(a>0,a<%pi/2); %pi (%o1) [a > 0, --- > a] 2 %i6) assume(b>0,b<2*%pi); (%o6) [b > 0, 2 %pi > b] here are %pi/2 and 2*%pi that seems to be redefined in function of a and b. Could be here the problem? If this problem will be solved, could I hope one day to see this answer from "is": assume(a>0,a<%pi/2); is(sin(a)>0); true instead of the actual "unknown" :-)? It would be very useful if Maxima could understand the sign of trigonometric functions with the proper assumptions. Stefano f e r r i s t e a t g m a i l d o t c o m ---------------------------------------------------------------------- >Comment By: Dieter Kaiser (crategus) Date: 2009-10-08 22:19 Message: A routine learn-numer has been added with revision 1.58 of compar.lisp. The examples of this bug report work as expected: (%i1) assume(a>0,a<%pi/2); (%o1) [a > 0,%pi/2 > a] (%i2) is(a>%pi/2); (%o2) false (%i3) is(a>%pi); (%o3) false (%i4) assume(b>0,b<2*%pi); (%o4) [b > 0,2*%pi > b] (%i5) is(b>3*%pi); (%o5) false (%i10) assume(abs(x) < sin(1)+%e/2); (%o10) [sin(1)+%e/2 > abs(x)] (%i11) is(x<2*%e); (%o11) true (%i12) is(x>-2*%e); (%o12) true Closing this bug report as fixed. Dieter Kaiser ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2008-12-30 23:14 Message: I forgot to say that I am using Maxima 5.17.0, but on the Maxima mailing list Alexey Beshenov told me that also the CVS version has this problem. Sorry also for the bad formatting of %pi/2 in %o1 line, it is not very readable... I pasted a display2d enabled output, it should be read as (%o1) [a > 0, %pi/2 > a] ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2477795&group_id=4933 ```