For float have a look at sys.float_info:

>>> import sys
>>> sys.float_info
sys.float_info(max=1.7976931348623157e+308, max_exp=1024, max_10_exp=308, 
min=2.2250738585072014e-308, min_exp=-1021, min_10_exp=-307, dig=15, mant_dig=53, 
epsilon=2.220446049250313e-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

int has unlimited precision, so it's only limited by available memory.

Answer from David Webb on Stack Overflow
🌐
Note.nkmk.me
note.nkmk.me › home › python
Maximum and Minimum float Values in Python | note.nkmk.me
August 11, 2023 - Note that in NumPy, you can explicitly specify the type with the number of bits, such as float32 or float64. NumPy: Cast ndarray to a specific dtype with astype() Use sys.float_info to get detailed information about float. sys.float_info — System-specific parameters and functions — Python 3.11.4 documentation · The sys module is included in the standard library, so no additional installation is required. import sys print(sys.float_info) # sys.float_info(max=1.7976931348623157e+308, max_exp=1024, max_10_exp=308, min=2.2250738585072014e-308, min_exp=-1021, min_10_exp=-307, dig=15, mant_dig=53, epsilon=2.220446049250313e-16, radix=2, rounds=1) print(type(sys.float_info)) # <class 'sys.float_info'> source: sys_float_info.py ·
Discussions

Finding max value in a series of floats
I am trying to write code that takes a row of floats from a csv file, representing the average temperature in a given month over the course of 70 years, and returns the highest float value of them all. When I print the variable holding the float values, in this case val, I get something similar ... More on discuss.python.org
🌐 discuss.python.org
11
0
April 15, 2024
python - How to get the range of valid Numpy data types? - Stack Overflow
You can use numpy.iinfo(arg).max to find the max value for integer types of arg, and numpy.finfo(arg).max to find the max value for float types of arg. >>> numpy.iinfo(numpy.uint64).min 0 >>> numpy.iinfo(numpy.uint64).max 18446744073709551615L >>> numpy.finfo(numpy.float64).max 1.797693134... More on stackoverflow.com
🌐 stackoverflow.com
How do I get max value of np.float32?
The maximum value of a float32 is infinity. More on reddit.com
🌐 r/learnpython
5
1
March 31, 2021
floating point - What is the range of values a float can have in Python? - Stack Overflow
What are its smallest and biggest values in python? More on stackoverflow.com
🌐 stackoverflow.com
🌐
Spark By {Examples}
sparkbyexamples.com › home › python › find maximum float value in python
Find Maximum Float Value in Python - Spark By {Examples}
May 31, 2024 - How to find the maximum float value in Python? You can find the maximum value of the float data type using the sys.float_info module or the finfo()
🌐
Python.org
discuss.python.org › python help
Finding max value in a series of floats - Python Help - Discussions on Python.org
April 15, 2024 - I am trying to write code that takes a row of floats from a csv file, representing the average temperature in a given month over the course of 70 years, and returns the highest float value of them all. When I print the variable holding the float values, in this case val, I get something similar to: 10.56 12.35 11.35 etc.
🌐
TutorialsPoint
tutorialspoint.com › What-is-the-maximum-value-of-float-in-Python
What is the maximum value of float in Python?
In Python, floating-point numbers can be implemented using double-precision, i.e., 64-bit format, as per the IEEE 754 standard. These floats have a finite range and precision. The maximum value that a float can represent depends on the platform that we are using, but can be accessed using the sys.float_info attribute.
🌐
DEV Community
dev.to › frankkk › python-tips-floatinf-269h
Python Tips- Maximum Value float('inf') - DEV Community
February 3, 2024 - But sys.maxsize is not the max ... True >>> b > float('inf') False · So, if you want to know why the Integer (int) has no max limit in Python, you need read the source code, the int object is with variable size...
🌐
Delft Stack
delftstack.com › home › howto › python › find max float value
How to Find Maximum Float Value in Python | Delft Stack
February 12, 2024 - However, the above function gives the minimum machine limit for the float data type. You can use np.finfo(np.float64).max for just printing the maximum value of the float data type in Python.
Find elsewhere
🌐
Reddit
reddit.com › r/learnpython › how do i get max value of np.float32?
How do I get max value of np.float32? : r/learnpython - Reddit
March 31, 2021 - Not in theory, there is a literal value of infinity that can be encoded as a float. ... You're not wrong Walter. You're just an asshole. ... Subreddit for posting questions and asking for general advice about all topics related to learning python. ... Subreddit for posting questions and asking for general advice about all topics related to learning python. ... Zero programming knowledge, but I want to learn Python.
🌐
Finxter
blog.finxter.com › home › learn python blog › integer and float maximums in python’s max() function
Integer and Float Maximums in Python's Max() Function - Be on the Right Side of Change
September 15, 2019 - print(max([5, 10, 10.0])) # 10 print(max([5, 10.0, 10])) # 10.0 · It simply returns the highest value in an iterable. Note that many advanced coders worry that we cannot compare an int with a float because of limited floating point precision because they know the following example: print(0.3+0.3+0.3 == 0.9) # False print(0.3+0.3+0.3) # 0.8999999999999999 · This is not an issue when comparing integers with “integer-like” floats. Python floats can represent integers perfectly fine.
🌐
GeeksforGeeks
geeksforgeeks.org › python-min-max-value-in-float-string-list
Python | Min/Max value in float string list - GeeksforGeeks
April 8, 2023 - The minimum value and maximum value are printed using the variables min_val and max_val respectively. ... # Python3 code to demonstrate working of # Min / Max value in float string list # using numpy import numpy as np # initialize list test_list = ['4.5', '7.8', '9.8', '10.3'] # convert the list of string elements to a numpy array of float elements float_arr = np.array(test_list, dtype=float) # get the minimum and maximum values from the array min_val = np.min(float_arr) max_val = np.max(float_arr) # printing result print("The min value of list : " + str(min_val)) print("The max value of list : " + str(max_val))
🌐
TutorialsPoint
tutorialspoint.com › article › get-the-machine-limits-information-for-float-types-in-python
Get the Machine limits information for float types in Python
March 26, 2026 - Float64 machine limits: Minimum value: -1.7976931348623157e+308 Maximum value: 1.7976931348623157e+308 Machine epsilon: 2.220446049250313e-16 Precision: 15 Smallest positive number: 2.2250738585072014e-308 · Use numpy.finfo() to get machine ...
🌐
Python⇒Speed
pythonspeed.com › articles › float64-float32-precision
The problem with float32: you only get 16 million values
February 1, 2023 - You pick your level of precision ... and that gives you the maximum value you can accurately express. In contrast, 64-bit floats give you 253 = ~9,000,000,000,000,000 values. This is a much larger number than 16 million. So how do you fit float64s ...
🌐
Wikipedia
en.wikipedia.org › wiki › Single-precision_floating-point_format
Single-precision floating-point format - Wikipedia
2 days ago - Single precision is termed SINGLE-FLOAT in Common Lisp; float binary(p) with p≤21, float decimal(p) with the maximum value of p depending on whether the DFP (IEEE 754 DFP) attribute applies, in PL/I; float in C with IEEE 754 support, C++ (if it is in C), C# and Java; Float in Haskell and Swift; and Single in Object Pascal (Delphi), Visual Basic, and MATLAB. However, float in Python, Ruby, PHP, and OCaml and single in versions of Octave before 3.2 refer to double-precision numbers.
🌐
NumPy
numpy.org › doc › stable › reference › generated › numpy.finfo.html
numpy.finfo — NumPy v2.4 Manual
January 31, 2021 - The smallest positive power of the base (2) that causes overflow. Corresponds to the C standard MAX_EXP.
🌐
W3Resource
w3resource.com › python-interview › what-is-the-maximum-and-minimum-value-for-an-int-float-and-string-data-type-in-python.php
Exploring data type limits in Python
August 12, 2023 - Maximum and minimum values for integer and float data types: Max Int: 9223372036854775807 Min Int: -9223372036854775808 Max Float: 1.7976931348623157e+308 Min Float: 2.2250738585072014e-308 Note: The values provided by sys.maxsize and sys.float_info ...
🌐
NumPy
numpy.org › doc › 2.2 › reference › generated › numpy.max.html
numpy.max — NumPy v2.2 Manual
>>> import numpy as np >>> a = ... np.float64(nan) >>> np.max(b, where=~np.isnan(b), initial=-1) 4.0 >>> np.nanmax(b) 4.0 · You can use an initial value to compute the maximum of an empty slice, or to initialize it to a different value: >>> np.max([[-50], [10]], axis=-1, initial=0) array([ 0, 10]) Notice that the initial value is used as one of the elements for which the maximum is determined, unlike for the default argument Python’s max function, ...