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.
Top answer 1 of 5
198
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.
2 of 5
75
Decimal datatype
- Unlike hardware based binary floating point, the decimal module has a user alterable precision (defaulting to 28 places) which can be as large as needed for a given problem.
If you are pressed by performance issuses, have a look at GMPY
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.
03:29
python double variable - YouTube
03:14
define double in python - YouTube
01:11
PYTHON : Double precision floating values in Python? - YouTube
17:00
Python's decimals SOLVE the floating point problem! - YouTube
Calculate the Precision and Accuracy of a Double in Python ...
03:44
how to declare double in python - YouTube
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.
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.
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.
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.
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 ...
Address: 5851 Legacy Circle, 6th Floor, Plano, TX 75024 United States