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
🌐
AskPython
askpython.com › python › examples › high-precision-numerical-calculations
Double precision floating values in Python - AskPython
April 10, 2025 - Luckily, Python offers some great options for working with high-precision decimal values. Python’s standard float type, based on double-precision IEEE 754 format, provides up to 15 decimal digits of precision.
🌐
Python documentation
docs.python.org › 3 › tutorial › floatingpoint.html
15. Floating-Point Arithmetic: Issues and Limitations — Python 3.14.7 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.

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
🌐
Reddit
reddit.com › r/python › double precision
r/Python on Reddit: Double precision
October 17, 2019 - ... Well, the equivalent of a quadruple ... said, there are no fixed digits. Floats (Python's native floats are double precision, that's it) do not store digits - they store binary fractions....
🌐
Wikipedia
en.wikipedia.org › wiki › Double-precision_floating-point_format
Double-precision floating-point format - Wikipedia
January 9, 2026 - Double-precision floating-point format (sometimes called FP64 or float64) is a floating-point number format, usually occupying 64 bits in computer memory; it represents a wide range of numeric values by using a floating radix point.
Find elsewhere
🌐
NumPy
numpy.org › doc › 1.22 › user › basics.types.html
Data types — NumPy v1.22 Manual
Which is more efficient depends ... np.float96 and np.float128 provide only as much precision as np.longdouble, that is, 80 bits on most x86 machines and 64 bits in standard Windows builds....
🌐
GeeksforGeeks
geeksforgeeks.org › python › precision-handling-python
Precision Handling in Python - GeeksforGeeks
December 19, 2025 - Given a number, the task is to control its precision either by rounding it or formatting it to a specific number of decimal places. For Example: Input: x = 2.4 Output: Integral value = 2 Smallest integer greater than x = 3 Greatest integer smaller than x = 2 · Let's explore different ways to do this task in Python.
🌐
Codefinity
codefinity.com › blog › Float-vs-Double
Float vs Double
my_float = 3.14 # Python uses 64-bit IEEE 754 double precision by default
🌐
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.
🌐
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
🌐
eSparkBiz
esparkinfo.com › double precision floating values
How to Use Double Precision Floating Values in Python
June 4, 2026 - Below are practical methods from the default float to higher‑precision options each with short code examples. ... Python’s float type stores values using 64 bits (double precision).
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-float-type-and-its-methods
Float type and its methods in python - GeeksforGeeks
July 11, 2025 - The hexadecimal string represents a floating-point number in scientific notation. The p+1 denotes a power of two exponent. Converting from hexadecimal ensures precise representation of binary floating-point numbers.
🌐
LabEx
labex.io › tutorials › python-how-to-handle-python-float-precision-425669
How to handle Python float precision | LabEx
Unlike integers, floats can store fractional values and are crucial for scientific computing, financial calculations, and many other applications. In Python, floats are implemented using the IEEE 754 double-precision ...
🌐
Python
docs.python.org › 3 › library › decimal.html
decimal — Decimal fixed-point and floating-point arithmetic
Source code: Lib/decimal.py The decimal module provides support for fast correctly rounded decimal floating-point arithmetic. It offers several advantages over the float datatype: Decimal “is based...
🌐
Quora
quora.com › What-exactly-is-the-difference-between-decimals-floating-point-numbers-and-doubles-in-Python-programming-They-seem-to-get-addressed-interchangeably
What exactly is the difference between decimals, floating-point numbers and doubles in Python programming? They seem to get addressed interchangeably. - Quora
Answer (1 of 3): There is no such thing as doubles in Python itself, but Internally a floating point value is stored in a double precision C floating point value (as defined by IEEE 754 [1]) Floating point values are limited precision - they use a fixed number of bits to store a wide range of va...
🌐
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. It handles double precision by default, adhering to the IEEE 754 standard.
🌐
Bacancy Technology
bacancytechnology.com › qanda › python › double-precision-floating-values-in-python
How to Use Double Precision Floating Values in Python
June 24, 2025 - from decimal import Decimal, getcontext getcontext().prec = 30 # Set desired precision x = Decimal('0.123456789012345678901234567890') print(x) ... This retains mathematical accuracy without floating-point rounding errors. ... Work with our skilled Python developers to accelerate your project and boost its performance.
🌐
Python.org
discuss.python.org › python help
Floating-point numbers - Python Help - Discussions on Python.org
December 17, 2022 - The result of 12+12.23 is 35.120000000000005 The result of 23+12.23 is 35.230000000000004 And the result of 1.2-1 is 0.19999999999999996 But in C++ the results are true. Why?What is the difference between C++ and Python at floating-point numbers Note: The result of 0.1+0.1 is 0.2 It is true.But ...
🌐
Simplilearn
simplilearn.com › home › resources › software development › python float() function: key concepts [with examples]
Python float() Function: Key Concepts [With Examples]
November 27, 2024 - Learn how the float() function in Python converts a specified value into a floating point number. Syntax: float(value). A key function for numeric conversions.
Address: 5851 Legacy Circle, 6th Floor, Plano, TX 75024 United States
🌐
Note.nkmk.me
note.nkmk.me › home › python
Maximum and Minimum float Values in Python | note.nkmk.me
August 11, 2023 - In Python, the float type is a 64-bit double-precision floating-point number, equivalent to double in languages like C. This article explains how to get and check the range (maximum and minimum values ...