Re: The smallest and largest values of numeric types
- From: Robert Kern <robert.kern@xxxxxxxxx>
- Date: Tue, 17 Apr 2007 10:12:59 -0500
Lou Pecora wrote:
In article <QA4Vh.122$Bz6.77@xxxxxxxxxxxxx>, tom@xxxxxxxxxxx wrote:
Hi!
How can I determine the smallest and largest values of numeric types
(for example int) possible in my system? I think there exists a function
for this task but I don't know it.
There is or was a module called "kinds" which was an implementation of
PEP 0242. I have it and it gives the values you are looking for (and
more). But I don't know where I got it. I think it was once
distributed with Macpython on MacPython.org, but I'm not sure. I've
searched for it, but nothing shows up except my own questions about it
from many years ago and they have no clues.
I'm surprised they also didn't turn up my replies to those questions.
Does anyone know where this package is? Or what might replace it. It
is very useful.
It used to be distributed with Numeric.
http://numpy.cvs.sourceforge.net/numpy/kinds/
numpy exposes the same information for floating point types with its finfo
class. Nothing particular for ints.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
.
- References:
- The smallest and largest values of numeric types
- From: tom
- Re: The smallest and largest values of numeric types
- From: Lou Pecora
- The smallest and largest values of numeric types
- Prev by Date: Re: strange behaviour with keyword arguments and inheritance
- Next by Date: Re: C++ extension problem
- Previous by thread: Re: The smallest and largest values of numeric types
- Next by thread: Re: The smallest and largest values of numeric types
- Index(es):
Relevant Pages
|