For float
have a look at sys.float_info
:
>>> import sys >>> sys.float_info sys.floatinfo(max=1.7976931348623157e+308, max_exp=1024, max_10_exp=308, min=2.2 250738585072014e-308, min_exp=-1021, min_10_exp=-307, dig=15, mant_dig=53, epsil on=2.2204460492503131e-16, radix=2, rounds=1)
Specifically, sys.float_info.max
:
>>> sys.float_info.max 1.7976931348623157e+308
If that’s not big enough, there’s always positive infinity:
>>> infinity = float("inf") >>> infinity inf >>> infinity / 10000 inf
The long
type has unlimited precision, so I think you’re only limited by available memory.
Related Posts:
- “OverflowError: Python int too large to convert to C long” on windows but not mac
- “OverflowError: Python int too large to convert to C long” on windows but not mac
- Understanding the main method of python [duplicate]
- TypeError: only integer scalar arrays can be converted to a scalar index with 1D numpy indices array
- TypeError: only integer scalar arrays can be converted to a scalar index with 1D numpy indices array
- Python Math – TypeError: ‘NoneType’ object is not subscriptable
- numpy max vs amax vs maximum
- PermissionError: [Errno 13] in Python
- “If not” condition statement in python
- Why the range of int is -32768 to 32767?
- syntaxerror: “unexpected character after line continuation character in python” math
- How can I sort a dictionary by key?
- max value of integer
- Python Logic of ListNode in Leetcode
- How can I write a `try`/`except` block that catches all exceptions?
- How can I prevent java.lang.NumberFormatException: For input string: “N/A”?
- Plot logarithmic axes with matplotlib in python
- Java JDK – possible lossy conversion from double to int
- Getting key with maximum value in dictionary?
- Error in Python script “Expected 2D array, got 1D array instead:”?
- Python Key Error=0 – Can’t find Dict error in code
- Getting key with maximum value in dictionary?
- Relative imports for the billionth time
- How do I use the yfinance API in Python to get today’s DJI open?
- what does the __file__ variable mean/do?
- Pythonic way to create a long multi-line string
- Proper shebang for Python script
- ‘str’ object has no attribute ‘decode’. Python 3 error?
- How do I correctly clean up a Python object?
- Log to the base 2 in python
- Implement touch using Python?
- Python setup.py develop vs install
- How to clamp an integer to some range?
- How to extract the substring between two markers?
- Convert bytes to int?
- Is there an operation for not less than or not greater than in python?
- Simple prime number generator in Python
- Background color for Tk in Python
- If Python is interpreted, what are .pyc files?
- How do I get monitor resolution in Python?
- What is runtime in context of Python? What does it consist of?
- Unable to convert 3d ply file image to 2d image
- Python High Pass Filter
- Where are the ampersand and vertical bar characters used in Python?
- Why is the sizeof(int) == sizeof(long)?
- Python: What OS am I running on?
- How to draw a line with matplotlib?
- Get all object attributes in Python?
- Normalizing a list of numbers in Python
- mport win32ui in python 3.6
- ValueError: Unknown label type: ‘continuous’
- Transpose/Unzip Function (inverse of zip)?
- TypeError: unhashable type: ‘numpy.ndarray’
- python base64 to hex
- Relative imports in Python 3
- ow can I find where Python is installed on Windows?
- Safest way to convert float to integer in python?
- filename.whl is not a supported wheel on this platform
- how to use proxy on youtube-dl?
- How to use torch.stack function
- (Help) TypeError: ‘str’ object cannot be interpreted as an integer
- ‘builtin_function_or_method’ object is not iterable
- Why KeyError: 0
- bash: pip: command not found
- How do I detect collision in pygame?
- Python AttributeError: ‘module’ object has no attribute ‘SSL_ST_INIT’
- What is the difference between application server and web server?
- Remove all occurrences of a value from a list?
- How to copy files?
- Code-first vs Model/Database-first
- How to resolve git’s “not something we can merge” error
- Insert some string into given string at given index in Python
- Dropping Multiple Columns from a data frame using Python
- What is the difference between ‘/’ and ‘//’ when used for division?
- How to convert an XML string to a dictionary?
- matplotlib does not show my drawings although I call pyplot.show()
- How to create temp table using Create statement in SQL Server?
- Error while trying to retrieve text for error ORA-01019
- What’s the u prefix in a Python string?
- What is meant by diameter of a network?
- How can I add the sqlite3 module to Python?
- Writing string to a file on a new line every time
- What does `Fatal Python error: PyThreadState_Get: no current thread` mean?
- Pandas – Drop function error (label not contained in axis)
- PIP (Python) : ImportError: cannot import name _remove_dead_weakref
- Python Requests – No connection adapters
- WindowsError: [Error 126] The specified module could not be found
- No module named ‘openpyxl’ – Python 3.4 – Ubuntu
- How to easily print ascii-art text?
- Using Tkinter in python to edit the title bar
- LaTeX table too wide. How to make it fit?
- LinAlgError: Last 2 dimensions of the array must be square
- pandas replace multiple values one column
- JSON.stringify (Javascript) and json.dumps (Python) not equivalent on a list?
- How to disable an Android button?
- Logical operators for Boolean indexing in Pandas
- Transposing a 1D NumPy array
- Explaining Python’s ‘__enter__’ and ‘__exit__’
- How to set initial value and auto increment in MySQL?
- How can I prevent the WordPress Importer from munging double-newline paragraph breaks to a single newline?