Opened 10 years ago

Closed 10 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:

Status badges

Description (last modified by jdemeyer)

The following doctest fails:

File "/home/jpuydt/sage-5.0.beta5/devel/sage/sage/interfaces/", line 1595:
sage: float(maxima("1.7e+17"))
Expected: 1.7e+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)

ticket_12586_fix_doctest-v2.patch (789 bytes) - added by jdemeyer 10 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 10 years ago by Snark

  • Status changed from new to needs_info

The problem was in ECL and is fixed upstream (thanks Juan Jose Garcia-Ripoll).

A package containing the patch is available here :

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!

comment:2 Changed 10 years ago by Snark

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
    (0.504792217873184, 5.604319429344075e-15, 21, 0)
    (0.504792217873184, 5.6043194293440744e-15, 21, 0)

So I guess it's a good package :-)

comment:3 Changed 10 years ago by Snark

Here is 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 10 years ago by Snark

  • Status changed from needs_info to needs_review

The package passes the integration.pyx tests on ARM... but without the patch!

So here is ; 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 10 years ago by jdemeyer

Please fill in your real name as Author.

comment:6 Changed 10 years ago by Snark

  • Authors set to Julien Puydt

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 10 years ago by dimpase

  • 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 10 years ago by jdemeyer

  • Milestone changed from sage-5.4 to sage-5.5
  • Reviewers set to Dmitrii Pasechnik

Changed 10 years ago by jdemeyer

comment:9 Changed 10 years ago by jdemeyer

  • Description modified (diff)

comment:10 Changed 10 years ago by jdemeyer

  • Merged in set to sage-5.5.beta1
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.