A named tuple holding information about the float type. It contains low level information about the precision and internal representation. The values correspond to the various floating-point constants defined in the standard header file float.h for the ‘C’ programming language; see section 5.2.4.2.2 of the 1999 ISO/IEC C standard [C99], ‘Characteristics of floating types’, for details.
sys.float_info
>>> import sys
>>> sys.float_info.dig
15
>>> s = '3.14159265358979' decimal string with 15 significant digits
>>> format(float(s), '.15g') convert to float and back -> same value
'3.14159265358979'
>>> s = '9876543211234567' 16 significant digits is too many!
>>> format(float(s), '.16g') conversion changes value
'9876543211234568'