Double precision floating values in Python?

kravemir picture kravemir · Jul 12, 2011 · Viewed 271.5k times · Source

Are there data types with better precision than float?

Answer

Fred Foo picture Fred Foo · Jul 12, 2011

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.