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:

Status badges


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)

trac9915_nzmath-mpmath-fixes.patch (4.8 KB) - added by cwitty 12 years ago.

Download all attachments as: .zip

Change History (7)

Changed 12 years ago by cwitty

comment:1 Changed 12 years ago by cwitty

  • Status changed from new to needs_review

comment:2 Changed 12 years ago by leif

Any additional (--[only-]optional[=...]) tests to run with NZMATH installed?

comment:3 follow-up: Changed 12 years ago by leif

  • 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 leif

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 leif


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

That's of course not much of a test. ;-)

comment:6 Changed 12 years ago by mpatel

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