Opened 12 years ago

Last modified 5 years ago

#8157 closed defect

why the bit limit of 2^24 in RealField? — at Version 2

Reported by: zimmerma Owned by: AlexGhitza
Priority: major Milestone: sage-4.3.4
Component: basic arithmetic Keywords:
Cc: Merged in:
Authors: Francois Maltey and Paul Zimmermann Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by AlexGhitza)

sage: R = RealField(16777217)
ValueError                                Traceback (most recent call last)

/users/caramel/zimmerma/.sage/temp/\ in <module>()

 in sage.rings.real_mpfr.RealField_constructor (sage/rings/real_mpfr.c:3723)()

 in sage.rings.real_mpfr.RealField.__init__ (sage/rings/real_mpfr.c:3945)()

ValueError: prec (=16777217) must be >= 2 and <= 16777216.

Note that 2^24 bits is only slightly above 5M digits, which is quite small (Fabrice Bellard recently computed 2700 billions of digits of Pi on a personal desktop, i.e., about 500,000 times more).

Change History (3)

Changed 12 years ago by zimmerma

comment:1 Changed 12 years ago by zimmerma

  • Authors set to Francois Maltey and Paul Zimmermann
  • Status changed from new to needs_review

The attached patch solves this problem, for example:

sage: time a=n(pi,digits=10^7)
CPU times: user 113.52 s, sys: 0.22 s, total: 113.73 s
Wall time: 114.21 s

comment:2 Changed 12 years ago by AlexGhitza

  • Description modified (diff)
Note: See TracTickets for help on using tickets.