Python's built-in float type has double precision (it's a C double in CPython, a Java double in Jython). If you need more precision, get NumPy and use its numpy.float128.

Answer from Fred Foo on Stack Overflow
🌐
Appdividend
appdividend.com › python-double
Double (Float) Data Type in Python
December 13, 2025 - Python does not have a built-in double data type, but it does have a float type, which designates a floating-point number.
Discussions

float vs. double – What's the Key Difference?"
In languages that have both float and double, that's what they mean. But then you'll have languages like python, which only have a float type and no double type, and Python's floats are actually double-precision. More on reddit.com
🌐 r/learnprogramming
12
16
November 2, 2024
Double precision
There is no fixed number of digits in a "double float". 30 decimal digits of precision is definitely not realistic. ... Well, the equivalent of a quadruple precision floating point is 33 to 36 significant digits according to wikipedia · https://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format ... Like K900_ said, there are no fixed digits. Floats (Python... More on reddit.com
🌐 r/Python
16
1
October 17, 2019
[deleted by user]
Assuming you mean the c/c++ double type...? Any floating point number in python is stored as double. So 1.1 5.7 and -1453.653356 https://www.pythontutorial.net/advanced-python/python-float/ If not, please provide an example of the data type you mean. More on reddit.com
🌐 r/learnpython
7
1
May 2, 2022
Is floating point math deterministic?
Ok r/programming , it looks like we need to have a discussion on what it means to be "deterministic". Deterministic means that given some input, will a operation produce the same output every time. So, for example, lets say you have a function that says add(a, b); that function always returns 4 when a = 2 and b = 2, then that function is deterministic. If that function always returns 7 when given a = 2 and b = 2, that function is STILL deterministic. If that function always returns 3 when a = 2 and b = 2 and the micro architecture is a ARM version 7 processor, that function is STILL deterministic. The key is that the function ALWAYS returns the same result given a certain input regardless of if the result is correct or not. Deterministic means something behaves exactly the same way given the same input. It has nothing to do with compiler optimization, architecture differences, or data representation limitations. A piece of code that behaves differently across platforms is still deterministic, but inconsistent across platforms. In that light, it should be clear that floating point math IS deterministic. Processors don't randomly spit out numbers when you tell them to add two floating points, the answer is predictable. It may be different across platforms, but it is still consistent. When it is inconsistent, generally the processor has more issues and is due to cause the system to crash. If it was not deterministic, we would have a source for good solid random numbers on all platforms. We could do floating point math on a couple of static numbers, and then pull off the last bits of the results. Viola, real random numbers done quickly. Alas, floating point math is deterministic and that doesn't work (hence, nobody does it). More on reddit.com
🌐 r/programming
197
121
October 1, 2011
🌐
Python documentation
docs.python.org › 3 › tutorial › floatingpoint.html
15. Floating-Point Arithmetic: Issues and Limitations — Python 3.14.8 documentation
Why is that? 1/10 is not exactly representable as a binary fraction. Since at least 2000, almost all machines use IEEE 754 binary floating-point arithmetic, and almost all platforms map Python floats to IEEE 754 binary64 “double precision” values.
🌐
AskPython
askpython.com › python › examples › high-precision-numerical-calculations
Double precision floating values in Python - AskPython
January 27, 2024 - Python’s standard float type, based on double-precision IEEE 754 format, provides up to 15 decimal digits of precision. For tasks needing more precision, Python offers decimal. Decimal with configurable precision, fractions.Fraction for exact ...
🌐
Note.nkmk.me
note.nkmk.me › home › python
Maximum and Minimum float Values in Python | note.nkmk.me
August 11, 2023 - In Python, floating-point numbers are usually implemented using double in the C language, as described in the official documentation.
🌐
GeeksforGeeks
geeksforgeeks.org › dsa › difference-between-float-and-double
Difference between Float and Double - GeeksforGeeks
July 23, 2025 - The key difference is their precision and storage size. A float is typically a 32-bit number with a precision of about 7 decimal digits, while a double is a 64-bit number with a precision of about 15 decimal digits.
🌐
Reddit
reddit.com › r/learnprogramming › float vs. double – what's the key difference?"
r/learnprogramming on Reddit: float vs. double – What's the Key Difference?"
November 2, 2024 - In languages that have both float and double, that's what they mean. But then you'll have languages like python, which only have a float type and no double type, and Python's floats are actually double-precision.
Find elsewhere
🌐
FavTutor
favtutor.com › blogs › convert-string-to-double-python
Convert String to Double in Python (3 Easy Methods)
October 27, 2022 - You can convert a string to double in Python using the float() method. This method requires only one parameter and returns the input as float (here, double). This is also a common method to convert a string to float in Python.
🌐
Squash
squash.io › how-to-use-double-precision-floating-values-in-python
How to Use Double Precision Floating Values in Python
November 2, 2023 - In this example, we compare two double precision floating values, value1 and value2, using both math.isclose and a tolerance value. The rel_tol parameter in math.isclose specifies the relative tolerance, which is the maximum allowed difference between the two values. Related Article: How to Check If Something Is Not In A Python List
🌐
Reddit
reddit.com › r/learnpython › [deleted by user]
[deleted by user] : r/learnpython
May 2, 2022 - from google: Python does not have an inbuilt double data type, but it has a float type that designates a floating-point number. You can count double in Python as float values which are specified with a decimal point.
🌐
eSparkBiz
esparkinfo.com › double precision floating values
How to Use Double Precision Floating Values in Python
September 2, 2025 - Python’s float type stores values using 64 bits (double precision).
🌐
Hackr
hackr.io › home › articles › programming
Float vs Double Data Types: What's The Difference [Updated]
January 30, 2025 - Explanation: Python only has one floating-point type (float), which is actually a double-precision floating-point number.
🌐
Reddit
reddit.com › r/python › double precision
r/Python on Reddit: Double precision
October 17, 2019 - All Python floats are double precision by default.
🌐
Python Reference
python-reference.readthedocs.io › en › latest › docs › float
float — Python Reference (The Right Way) 0.1 documentation
These represent machine-level double precision floating point numbers. You are at the mercy of the underlying machine architecture (and C or Java implementation) for the accepted range and handling of overflow. Python does not support single-precision floating point numbers; the savings in processor and memory usage that are usually the reason for using these is dwarfed by the overhead of using objects in Python, so there is no reason to complicate the language with two kinds of floating point numbers.
🌐
Codefinity
codefinity.com › blog › Float-vs-Double
Float vs Double
my_float = 3.14 # Python uses 64-bit IEEE 754 double precision by default
🌐
Medium
learningdaily.dev › float-vs-double-whats-the-difference-1110a6bfac22
Float vs. double: What’s the difference? | by The Educative Team | Dev Learning Daily
May 21, 2026 - Java: We append an f or F at the end of the value to declare a float. Similarly, d or D is appended at the end of the value to declare a double. Python: There’s no need to declare the data type explicitly in Python.
🌐
Real Python
realpython.com › python-data-types
Basic Data Types in Python: A Quick Exploration – Real Python
16 hours ago - Almost all platforms represent Python float values as 64-bit (double-precision) values, according to the IEEE 754 standard. In that case, a floating-point number’s maximum value is approximately 1.8 ⨉ 10308.
🌐
Mathspp
mathspp.com › blog › til › precision-of-python-floats
TIL #053 – precision of Python floats | mathspp
Python floats are IEEE 754 double-precision binary floating-point numbers, commonly referred to as “doubles”, and take up 64 bits.
🌐
Python Tutorial
pythontutorial.net › home › advanced python › python float
An Essential Guide to Python float Type By Examples
September 10, 2022 - Python uses the float class to represent real numbers. CPython implements float using C double type.
🌐
Python
docs.python.org › 3 › c-api › float.html
Floating-Point Objects — Python 3.14.7 documentation
The pack and unpack functions provide an efficient platform-independent way to store floating-point values as byte strings. The Pack routines produce a bytes string from a C double, and the Unpack routines produce a C double from such a bytes string.