From: SourceForge.net <noreply@so...>  20090524 22:09:41

Bugs item #2796205, was opened at 20090524 22:09 Message generated for change (Tracker Item Submitted) made by sm324 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2796205&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: Sanjoy Mahajan (sm324) Assigned to: Nobody/Anonymous (nobody) Summary: integral of positive function gives negative result Initial Comment: I just compiled 5.18.1 to test whether this bug (which I noticed in 5.17) was still there, and it is. The problem is that an integral of a particular positive function (in the integration range) gives a negative answer. Here is a log: $ bin/maxima Maxima 5.18.1 http://maxima.sourceforge.net Using Lisp CLISP 2.44.1 (20080223) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) integrate(p^53*(1p)^23,p,0.8,1); rat: replaced 0.2 by 1/5 = 0.2 rat: replaced 0.8 by 4/5 = 0.8 rat: replaced 0.2 by 1/5 = 0.2 rat: replaced 1.091410143508672E18 by 1/916245836588244736 = 1.091410143508672E18 837236758238284873 (%o1)   767650093485350803831906802535571200  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2796205&group_id=4933 
From: SourceForge.net <noreply@so...>  20090526 02:49:26

Bugs item #2796205, was opened at 20090524 18:09 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2796205&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  Floating point Group: None >Status: Pending >Resolution: Invalid Priority: 5 Private: No Submitted By: Sanjoy Mahajan (sm324) Assigned to: Nobody/Anonymous (nobody) Summary: integral of positive function gives negative result Initial Comment: I just compiled 5.18.1 to test whether this bug (which I noticed in 5.17) was still there, and it is. The problem is that an integral of a particular positive function (in the integration range) gives a negative answer. Here is a log: $ bin/maxima Maxima 5.18.1 http://maxima.sourceforge.net Using Lisp CLISP 2.44.1 (20080223) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) integrate(p^53*(1p)^23,p,0.8,1); rat: replaced 0.2 by 1/5 = 0.2 rat: replaced 0.8 by 4/5 = 0.8 rat: replaced 0.2 by 1/5 = 0.2 rat: replaced 1.091410143508672E18 by 1/916245836588244736 = 1.091410143508672E18 837236758238284873 (%o1)   767650093485350803831906802535571200  >Comment By: Raymond Toy (rtoy) Date: 20090525 22:49 Message: I don't think this is really an issue. First, if you replace the limit of integration 0.8 with 4/5, you get a positive value for the result. Second, as maxima warns, it has replaced 0.8 with a rational approximation. Since 0.8 does not have an exact floatingpoint representation, the rational approximation is exactly that. The value of the polynomial is the correct value for that approximation. Third, if you take the indefinite integral, a polynomial of degree 77, it's highly unlikely that you can accurately evaluate that at 0.8 with doublefloat numbers. If you use a bfloat value for 0.8 with 32 digits, maxima returns the expected positive result. (It's not exactly the same as the exact rational result.) Marking this as pending/invalid. Also changing category to lisp corefloating point If you disagree, please comment on this.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2796205&group_id=4933 
From: SourceForge.net <noreply@so...>  20090610 02:20:21

Bugs item #2796205, was opened at 20090524 22:09 Message generated for change (Comment added) made by sfrobot You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2796205&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  Floating point Group: None >Status: Closed Resolution: Invalid Priority: 5 Private: No Submitted By: Sanjoy Mahajan (sm324) Assigned to: Nobody/Anonymous (nobody) Summary: integral of positive function gives negative result Initial Comment: I just compiled 5.18.1 to test whether this bug (which I noticed in 5.17) was still there, and it is. The problem is that an integral of a particular positive function (in the integration range) gives a negative answer. Here is a log: $ bin/maxima Maxima 5.18.1 http://maxima.sourceforge.net Using Lisp CLISP 2.44.1 (20080223) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) integrate(p^53*(1p)^23,p,0.8,1); rat: replaced 0.2 by 1/5 = 0.2 rat: replaced 0.8 by 4/5 = 0.8 rat: replaced 0.2 by 1/5 = 0.2 rat: replaced 1.091410143508672E18 by 1/916245836588244736 = 1.091410143508672E18 837236758238284873 (%o1)   767650093485350803831906802535571200  >Comment By: SourceForge Robot (sfrobot) Date: 20090610 02:20 Message: This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker).  Comment By: Raymond Toy (rtoy) Date: 20090526 02:49 Message: I don't think this is really an issue. First, if you replace the limit of integration 0.8 with 4/5, you get a positive value for the result. Second, as maxima warns, it has replaced 0.8 with a rational approximation. Since 0.8 does not have an exact floatingpoint representation, the rational approximation is exactly that. The value of the polynomial is the correct value for that approximation. Third, if you take the indefinite integral, a polynomial of degree 77, it's highly unlikely that you can accurately evaluate that at 0.8 with doublefloat numbers. If you use a bfloat value for 0.8 with 32 digits, maxima returns the expected positive result. (It's not exactly the same as the exact rational result.) Marking this as pending/invalid. Also changing category to lisp corefloating point If you disagree, please comment on this.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2796205&group_id=4933 