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
🌐
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.
Discussions

Floating-point numbers
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 ... More on discuss.python.org
🌐 discuss.python.org
4
0
December 17, 2022
types - Python: Float or Double - Stack Overflow
I need to pack numbers in Python using the struct module. I want to check if a number is float or double, when I pack it. How can I do that? Is there any built-in functions, or I need to write one?... More on stackoverflow.com
🌐 stackoverflow.com
Difference between Float and Double Data types? - Python - Digi Technical Support Forums
Apart from memory size of Float and Double data types, I want to know any other differences and also want to know when we use float and when we use double Data type? More on forums.digi.com
🌐 forums.digi.com
0
February 23, 2021
[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
🌐
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 -

New to programming and curious: what's the main difference between float and double? When should I use one over the other?

Thanks! 🙏😊

Top answer
1 of 5
19
It can depend on the language spec, but usually the amount of memory and therefore the precision allowed by the type. Usually: A double will use 8 bytes or 64 bits of memory while a float uses only 4 bytes or 32 bits. This means that a float is less precise since it can store fewer digits after the decimal place. The way it works is that some bits of the datatype are used for the whole number portion of the number and some for the decimal portion. So as you can see, double, using more memory can have more bits allocated to the decimal portion making it more precise. See balefrost's reply to my comment for a correct explanation of this. Using float means using less memory, having more efficient code (due to lower precision so saving on calculations) and handling a smaller range of numbers (floats handle a smaller range than double due to reduced memory usage). Hope this helps!
2 of 5
3
The difference is memory size. Floats in Java (which I assume is the language you’re talking about) take up 32 bits of memory, the same as an integer. Doubles, as you might guess from the name, take up double the space: 64 bits. Doubles use those extra bits to both store a wider range of numbers and add more precision to the numbers they can store as well. There’s really seldom any reason to use floats in modern Java applications since memory is no longer a limiting factor for most programs. However, back in the day memory used to be much more limited so you would stick to regular floats as long as they were good enough for what you’re doing and only use doubles when absolutely necessary. This was starting to change even as Java was first created, but a lot of things in Java were designed to make the transition easier for programmers who were used to using C, a popular language at the time.
🌐
Codefinity
codefinity.com › blog › Float-vs-Double
Float vs Double
my_float = 3.14 # Python uses 64-bit IEEE 754 double precision by default
🌐
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 ...
🌐
Python documentation
docs.python.org › 3 › tutorial › floatingpoint.html
15. Floating-Point Arithmetic: Issues and Limitations — Python 3.14.3 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.
Find elsewhere
🌐
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.
🌐
Educative
educative.io › answers › what-is-the-difference-between-float-and-double
What is the difference between float and double?
A float has 7 decimal digits of precision and occupies 32 bits. A double is a 64-bit IEEE 754 double-precision floating-point number. 1 bit for the sign, 11 bits for the exponent, and 52 bits for the value.
🌐
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.
🌐
Appdividend
appdividend.com › python-double
Double (Float) Data Type in Python
December 13, 2025 - In a general programming sense, A float (single precision) is 32 bits, and a double (double precision) is 64 bits.
🌐
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 ...
🌐
Google Groups
groups.google.com › g › cython-users › c › XEgZMHvYv8Q
float v. double
Judging from https://docs.python.org/2/c-api/float.html > there would indeed be very little advantage to statically type a PyFloat. Cython automatically coerces C floating point values back to Python "float" objects at need, and Python's "float" otherwise behaves exactly like C's "double", so there is really no advantage in typing anything as "Python float".
🌐
Unstop
unstop.com › home › blog › 10+ difference between float and double explained (+examples)
10+ Difference Between Float And Double Explained (+Examples)
December 3, 2024 - Mixing types may also introduce implicit type casting, potentially affecting performance and accuracy. No. Python’s float is equivalent to a double in C, offering double precision by default.
🌐
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 the above examples, the arithmetic operations are performed on double precision floating values, and the results are also double precision floating values. Python provides several ways to format double precision floating values for display. One common method is to use the format function or the f-string syntax introduced in Python 3.6.
🌐
Medium
learningdaily.dev › float-vs-double-whats-the-difference-1110a6bfac22
Float vs. double: What’s the difference? | by The Educative Team | Dev Learning Daily
June 7, 2023 - 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.
🌐
Digi
forums.digi.com › python
Difference between Float and Double Data types? - Python - Digi Technical Support Forums
February 23, 2021 - Apart from memory size of Float and Double data types, I want to know any other differences and also want to know when we use float and when we use double Data type?
🌐
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” ...
🌐
GeeksforGeeks
geeksforgeeks.org › python-float-type-and-its-methods
Float type and its methods in python - GeeksforGeeks
February 21, 2025 - a = 10.5 # Float declaration b = -3.14 # Negative float c = 2.0 # Even if it looks like an integer, it's a float d = 1.23e4 # Scientific notation (1.23 × 10⁴ = 12300.0) e = 5e-3 # Scientific notation (5 × 10⁻³ = 0.005) print(a,b,c,d,e) Python provides several built-in methods for float objects.