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
๐ŸŒ
Flexiple
flexiple.com โ€บ python โ€บ convert-string-double-python
Converting String to Double in Python - Flexiple
March 22, 2024 - Python provides a convenient built-in method called the float() function to convert strings to doubles. This function takes a string as input and returns the corresponding floating-point number.
๐ŸŒ
Reddit
reddit.com โ€บ r/python โ€บ double precision
r/Python on Reddit: Double precision
October 17, 2019 -

Hi everyone!

I recently started a project with Python and after long weeks of writing code, I saw that Python's default float precision is just not enough for my needs.

Is there a simple way to change the default Python precision without having to rewrite all my code?

Thank you all in advance!

๐ŸŒ
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.
๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ [deleted by user]
What is a double? (Data type) : 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. All platforms represent Python float values as 64-bit โ€œdouble-precisionโ€ ...
๐ŸŒ
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.
๐ŸŒ
Squash
squash.io โ€บ how-to-use-double-precision-floating-values-in-python
How to Use Double Precision Floating Values in Python
November 2, 2023 - Double precision floating-point numbers, also known as doubles, are a common data type used in Python to represent decimal numbers with a high degree of precision.
๐ŸŒ
Quora
quora.com โ€บ How-do-you-import-a-double-in-Python
How to import a double in Python - Quora
Answer: there is no such thing as a double in Python. A float in Python always uses the available double floating point data type, which means that a float in Python is actually a โ€˜doubleโ€™ if you wrote the same software in C - in a 64 bit ...
Find elsewhere
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ convert-string-to-double-in-python3
Convert String to Double in Python3 - GeeksforGeeks
October 8, 2021 - from decimal import Decimal str1 = "9.02" print("This is the initial string: " + str1) # Converting to double str2 = Decimal(str1) print("The conversion of string to double is", str2) str2 = str2+1 print("The converted string to double is incremented by 1:", str2)
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ what-does-the-double-star-operator-mean-in-python
What does the Double Star operator mean in Python? - GeeksforGeeks
July 23, 2025 - The ** (double star)operator in Python is used for exponentiation. It raises the number on the left to the power of the number on the right.
๐ŸŒ
eSparkBiz
esparkinfo.com โ€บ double precision floating values
How to Use Double Precision Floating Values in Python
January 21, 2026 - Pythonโ€™s float type stores values using 64 bits (double precision).
Price ย  $12
Call ย  +91 9974759287
Address ย  1001 - 1009 10th floor City Center 2, Sukan Mall Cross Road, Science City Rd, 380060, Ahmedabad
๐ŸŒ
Codingzap
codingzap.com โ€บ home โ€บ blog โ€“ programming & coding articles โ€บ convert string to double in python| 3 methods explained
Convert String to Double in Python| 3 Methods Explained
December 9, 2025 - Learn how to convert a string to double in Python using float(), the Decimal module, and NumPy. Includes working code examples, validation techniques, and float precision limitations.
๐ŸŒ
Real Python
realpython.com โ€บ python-double-underscore
Single and Double Underscores in Python Names โ€“ Real Python
August 18, 2025 - Underscores in Python names indicate intent: a single leading underscore signals a non-public name, a single trailing underscore helps avoid naming conflicts, and a double leading underscore triggers name mangling for class attributes and methods.
๐ŸŒ
Python
docs.python.org โ€บ 3 โ€บ c-api โ€บ float.html
Floating-Point Objects โ€” Python 3.14.3 documentation
Return a C double representation of the contents of pyfloat. If pyfloat is not a Python floating-point object but has a __float__() method, this method will first be called to convert pyfloat into a float. If __float__() is not defined then it falls back to __index__().
๐ŸŒ
Quora
quora.com โ€บ Does-Python-have-no-double-data-type
Does Python have no double data type? - Quora
Answer: Python has five standard data types. * Number * String * List * Tuple * Dictionary The number data type can be divided in four further types as, * int * long * float * complex Python interpreter by default interpretes the float data type with the precision of double which is us...
๐ŸŒ
Replit
replit.com โ€บ home โ€บ discover โ€บ how to declare a double in python
How to declare a double in Python | Replit
6 days ago - # Declare a floating-point number (equivalent to double in other languages) my_float = 3.14159 print(type(my_float), my_float)--OUTPUT--<class 'float'> 3.14159 ยท This example highlights Python's dynamic typing.
๐ŸŒ
AskPython
askpython.com โ€บ home โ€บ double precision floating values in python
Double precision floating values in Python - AskPython
April 10, 2025 - 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 irreducible fractions, and numpy.float128 for up to 113 bits of precision.
๐ŸŒ
Bacancy Technology
bacancytechnology.com โ€บ qanda โ€บ python โ€บ double-precision-floating-values-in-python
How to Use Double Precision Floating Values in Python
June 24, 2025 - Pythonโ€™s built-in float type actually uses double-precision floating point representation under the hood, adhering to the IEEE 754 standard.