Opened 9 years ago

Closed 9 years ago

#13000 closed defect (fixed)

Creating integers with very large base

Reported by: roed Owned by: AlexGhitza
Priority: major Milestone: sage-5.1
Component: basic arithmetic Keywords:
Cc: Merged in: sage-5.1.beta3
Authors: David Roe Reviewers: Keshav Kini
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by kini)

sage: a=ZZ(randint(0,2^128-1)).digits(2^64)
sage: a
[1154963902035838039, 8176620537326016718]
sage: ZZ(a,2^64)
---------------------------------------------------------------------------
OverflowError                             Traceback (most recent call last)

/opt/sage-5.1.beta0/devel/sage-main/<ipython console> in <module>()

/opt/sage-5.1.beta0/local/lib/python2.7/site-packages/sage/structure/parent.so in sage.structure.parent.Parent.__call__ (sage/structure/parent.c:8027)()

/opt/sage-5.1.beta0/local/lib/python2.7/site-packages/sage/structure/coerce_maps.so in sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args (sage/structure/coerce_maps.c:3796)()

/opt/sage-5.1.beta0/local/lib/python2.7/site-packages/sage/structure/coerce_maps.so in sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args (sage/structure/coerce_maps.c:3665)()

/opt/sage-5.1.beta0/local/lib/python2.7/site-packages/sage/rings/integer.so in sage.rings.integer.Integer.__init__ (sage/rings/integer.c:6304)()

OverflowError: Python int too large to convert to C long

---

Apply 13000.2.patch.

Attachments (1)

13000.2.patch (2.4 KB) - added by kini 9 years ago.
apply to $SAGE_ROOT/devel/sage

Download all attachments as: .zip

Change History (7)

comment:1 Changed 9 years ago by roed

  • Status changed from new to needs_review

comment:2 Changed 9 years ago by kini

Cool, I'll review this after dinner :)

comment:3 Changed 9 years ago by kini

Fix the commit message! :)

comment:4 Changed 9 years ago by kini

  • Description modified (diff)
  • Reviewers set to Keshav Kini

The error message in the description was miscopied by David, apparently

Changed 9 years ago by kini

apply to $SAGE_ROOT/devel/sage

comment:5 Changed 9 years ago by kini

  • Description modified (diff)
  • Status changed from needs_review to positive_review

I added a commit message.

comment:6 Changed 9 years ago by jdemeyer

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