Opened 9 years ago
Closed 8 years ago
#12586 closed defect (fixed)
[ARM] Maxima has a strange numerical precision issue
Reported by: | Snark | Owned by: | drkirkby |
---|---|---|---|
Priority: | major | Milestone: | sage-5.5 |
Component: | porting | Keywords: | |
Cc: | Merged in: | sage-5.5.beta1 | |
Authors: | Julien Puydt | Reviewers: | Dmitrii Pasechnik |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
The following doctest fails:
File "/home/jpuydt/sage-5.0.beta5/devel/sage/sage/interfaces/maxima_abstract.py", line 1595: sage: float(maxima("1.7e+17")) Expected: 1.7e+17 Got: 1.6999999999999997e+17
I checked the problem is present in "./sage -maxima", and reported upstream.
Install updated (with the upstream fix) ecl spkg and apply ticket_12586_fix_doctest-v2.patch
Attachments (1)
Change History (11)
comment:1 Changed 9 years ago by
- Status changed from new to needs_info
comment:2 Changed 9 years ago by
On sage.math, this new package makes a single test fail:
sage -t --long -force_lib "devel/sage/sage/gsl/integration.pyx" ********************************************************************** File "/home/jpuydt/sage-5.0/devel/sage/sage/gsl/integration.pyx", line 172: sage: exp(-1/x).nintegral(x, 1, 2) # via maxima Expected: (0.504792217873184, 5.604319429344075e-15, 21, 0) Got: (0.504792217873184, 5.6043194293440744e-15, 21, 0) **********************************************************************
So I guess it's a good package :-)
comment:3 Changed 9 years ago by
Here is http://sage.math.washington.edu/home/jpuydt/ticket_12586_fix_doctest.patch a patch to fix the doctest. Notice that both the package and the patch have only been tested on sage.math only for now -- the poor ARM box is still busy.
comment:4 Changed 9 years ago by
- Status changed from needs_info to needs_review
The package passes the integration.pyx tests on ARM... but without the patch!
So here is http://sage.math.washington.edu/home/jpuydt/ticket_12586_fix_doctest-v2.patch ; with this patch and my ecl package, everything is ok on X86_64 (all tests pass) and on ARM (all tests pass except the ones about the gamma function, which aren't supposed to pass anyway).
Marking as needs_review, as perhaps it would be nice to check on other architectures.
comment:5 Changed 9 years ago by
Please fill in your real name as Author.
comment:6 Changed 9 years ago by
Uh... the patch is under my real name! Or do you mean for the trac report itself? I'm only modifying that one and wait for your reply before I touch the other places where you ask the same.
comment:7 Changed 8 years ago by
- Description modified (diff)
- Status changed from needs_review to positive_review
tested on ARM and on OSX 10.6.8. Looks good.
comment:8 Changed 8 years ago by
- Milestone changed from sage-5.4 to sage-5.5
- Reviewers set to Dmitrii Pasechnik
Changed 8 years ago by
comment:9 Changed 8 years ago by
- Description modified (diff)
comment:10 Changed 8 years ago by
- Merged in set to sage-5.5.beta1
- Resolution set to fixed
- Status changed from positive_review to closed
The problem was in ECL and is fixed upstream (thanks Juan Jose Garcia-Ripoll).
A package containing the patch is available here : http://sage.math.washington.edu/home/jpuydt/ecl-11.1.2.cvs20111120.p2.spkg
This package is mostly known to fix the problem on ARM ; I'm running 'make ptestlong' on ARM, and will report the results.
I'll also check X86_64 as soon as I'll have re-compiled 5.0 on sage.math, but if someone can beat me to it, the better!