#2567: import MPFR_PREC_MAX from mpfr.h instead of hard coding it to the 32 bit
limit
--------------------------------+-------------------------------------------
   Reporter:  was               |          Owner:  somebody   
       Type:  defect            |         Status:  needs_work 
   Priority:  major             |      Milestone:  sage-4.8   
  Component:  basic arithmetic  |       Keywords:             
Work_issues:                    |       Upstream:  N/A        
   Reviewer:  Paul Zimmermann   |         Author:  Mike Hansen
     Merged:                    |   Dependencies:             
--------------------------------+-------------------------------------------
Changes (by zimmerma):

  * status:  needs_review => needs_work


Comment:

 one item fails on a 32-bit machine (with Sage 4.7.2):
 {{{
 sage -t  "devel/sage/sage/rings/real_mpfr.pyx"
 **********************************************************************
 File "/localdisk/tmp/sage-4.7.2/devel/sage/sage/rings/real_mpfr.pyx", line
 196:
     sage: R = RealField(2^31); R
 Expected:
     Traceback (most recent call last):
     ...
     OverflowError: ... too large to convert to int
 Got:
     Traceback (most recent call last):
       File "/localdisk/tmp/sage-4.7.2/local/bin/ncadoctest.py", line 1231,
 in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File "/localdisk/tmp/sage-4.7.2/local/bin/sagedoctest.py", line 38,
 in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File "/localdisk/tmp/sage-4.7.2/local/bin/ncadoctest.py", line 1172,
 in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_2[4]>", line 1, in <module>
         R = RealField(Integer(2)**Integer(31)); R###line 196:
     sage: R = RealField(2^31); R
       File "real_mpfr.pyx", line 280, in sage.rings.real_mpfr.RealField
 (sage/rings/real_mpfr.c:3802)
       File "real_mpfr.pyx", line 299, in
 sage.rings.real_mpfr.RealField_class.__init__
 (sage/rings/real_mpfr.c:4025)
     ValueError: prec (=2147483648) must be >= 2 and <= 2147483647.
 **********************************************************************
 1 items had failures:
    1 of   7 in __main__.example_2
 ***Test Failed*** 1 failures.
 For whitespace errors, see the file
 /users/caramel/zimmerma/.sage//tmp/real_mpfr_5754.py
          [14.2 s]

 ----------------------------------------------------------------------
 The following tests failed:


         sage -t  "devel/sage/sage/rings/real_mpfr.pyx"
 }}}
 Paul

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/2567#comment:28>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to