NumPy (Home)
NumPy (Wikipedia)
NumPy (a tutorial)
NumPy (a tutorial)
SciPy (Home, includes NumPy)
SciPy (Wikipedia)
ScientificPython (not be confused with SciPy)
$ python3 >>>import sys >>>sys.float_info >>>import numpy as np >>>np.finfo(np.float128) >>>np.finfo(np.float64) >>> infinity = float('inf') >>> infinity >>> infinity / 10000 >>> sys.float_info.max >>> sys.maxsize <-- maximum number of objects in a collection >>> sys.maxint <-- ???
From: stackoverflow.com/questions/14221612/difference-between-long-double-and-double-in-c-and-c++
Double takes at least as much memory for its representation as float and long double at least as much as double. That extra memory is used for more precise representation of a number.
On x86 systems, float is typically 4 bytes long and can store numbers as large as about 3×1038 and about as small as 1.4×10-45. It is an IEEE 754 single-precision number that stores about 7 decimal digits of a fractional number.
Also on x86 systems, double is 8 bytes long and can store numbers in the IEEE 754 double-precision format, which has a much larger range and stores numbers with more precision, about 15 decimal digits. On some other platforms, double may not be 8 bytes long and may indeed be the same as a single-precision float.
The standard only requires that long double is at least as precise as double, so some compilers will simply treat long double as if it is the same as double. But, on most x86 chips, the 10-byte extended precision format 80-bit number is available through the CPU's floating-point unit, which provides even more precision than 64-bit double, with about 21 decimal digits of precision.
Some compilers instead support a 16-byte (128-bit) IEEE 754 quadruple precision number format with yet more precise representations and a larger range.