#20226: Implement conversion PARI <-> Python int/long without GMP/MPIR
-------------------------------------+-------------------------------------
       Reporter:  jdemeyer           |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-7.2
      Component:  interfaces         |   Resolution:
       Keywords:  days77             |    Merged in:
        Authors:  Jeroen Demeyer     |    Reviewers:  Luca De Feo
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/jdemeyer/ticket/20226            |  47df94cc7c5181f99717d164b1929c516d039ec1
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by vdelecroix):

 Would it be possible to test the subtle `LONG_MIN` case in
 `gen_to_integer`? Maybe along
 {{{
 sage: a = gen_to_integer(pari("2^63-1")); a; type(a)
 9223372036854775807
 <type 'int'>
 sage: a = gen_to_integer(pari("2^63")); a; type(a)
 9223372036854775808L
 <type 'long'>
 sage: a = gen_to_integer(pari("-2^63")); a; type(a)
 -9223372036854775808
 <type 'int'>
 sage: a = gen_to_integer(pari("-2^63-1")); a; type(a)
 -9223372036854775809L
 <type 'long'>
 }}}

 What do you think of moving `gtoi` into PARI (not necessarily for this
 ticket)? This function is only about PARI's internal.

--
Ticket URL: <http://trac.sagemath.org/ticket/20226#comment:17>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to