Opened 12 years ago
Closed 12 years ago
#9915 closed defect (fixed)
fixes for NZMATH/Sage interoperation
Reported by: | cwitty | Owned by: | AlexGhitza |
---|---|---|---|
Priority: | major | Milestone: | sage-4.6 |
Component: | basic arithmetic | Keywords: | NZMATH |
Cc: | Merged in: | sage-4.6.alpha2 | |
Authors: | Carl Witty | Reviewers: | Leif Leonhardy |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
NZMATH uses a subtype of Python's "long" for its bignum type. This works fine with plain mpmath, but when mpmath runs under Sage it uses Cython code that's incompatible with NZMATH. This patch fixes mpmath-under-sage to fix some incompatibilities with NZMATH. (It also modifies ZZ to allow initialization from a subclass of int/long/float.)
Attachments (1)
Change History (7)
Changed 12 years ago by
comment:1 Changed 12 years ago by
- Status changed from new to needs_review
comment:2 Changed 12 years ago by
comment:3 follow-up: ↓ 4 Changed 12 years ago by
- Reviewers set to Leif Leonhardy
- Status changed from needs_review to positive_review
Patch looks reasonable, and doesn't cause additional doctest failures when running ptestlong
on (not yet released) Sage 4.6.alpha1 (with NZMATH 1.0.0 installed; Ubuntu 10.04 x86_64).
Positive review so far, still looking for optional NZMATH doctests... ;-)
comment:4 in reply to: ↑ 3 Changed 12 years ago by
Replying to leif:
... still looking for optional NZMATH doctests... ;-)
Couldn't find any; also, NZMATH doesn't have an spkg-check
file.
comment:5 Changed 12 years ago by
Is
sage: from nzmath import *
supposed to work? (Gives deprecation warnings and an attribute error.)
But the following works:
sage: import nzmath.rational sage: r = nzmath.rational.Rational(113r, 355r) sage: print r 113/355 sage:
That's of course not much of a test. ;-)
comment:6 Changed 12 years ago by
- Merged in set to sage-4.6.alpha2
- Resolution set to fixed
- Status changed from positive_review to closed
Any additional (
--[only-]optional[=...]
) tests to run with NZMATH installed?