#13803: Python binding to limits.h
--------------------------------------+-------------------------------------
       Reporter:  vdelecroix          |         Owner:  jason         
           Type:  enhancement         |        Status:  needs_work    
       Priority:  major               |     Milestone:  sage-5.6      
      Component:  misc                |    Resolution:                
       Keywords:  limits, C datatype  |   Work issues:                
Report Upstream:  N/A                 |     Reviewers:  Leif Leonhardy
        Authors:  Vincent Delecroix   |     Merged in:                
   Dependencies:                      |      Stopgaps:                
--------------------------------------+-------------------------------------

Comment (by vdelecroix):

 Thanks very much (I am not at all a specialist but I need to call
 char_max() in some constructor).

 Is the following a safe test ?
 {{{
 sage: from sage.misc.limits import int_min
 sage: int_min() # random (architecture and platform dependence)
 -2147483648
 sage: import sysconfig
 sage: s = sysconfig.get_config_var('SIZEOF_INT')
 sage: int_min() == - 2**(s*8-1)
 True
 }}}

 Best,
 Vincent

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13803#comment:6>
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