Search notes:

Python: float

Members

as_integer_ratio() Returns a tuple with two elements: numerator and denominator
conjugate()
fromhex() An instance method that creates a float from a hexadecimal representation as returned by hex()
hex()
imag Always evaluates to 0.0 (See CPython source code for floats, float_getimag). This member seems to be present so that both, floats and complex objects can be passed to a function that evaluates .imag.
is_integer() True if the instance is finite and has an integral value.
real See imag

Misc

>>> x = 3.141
>>> x.hex()
'0x1.920c49ba5e354p+1'

>>> y = float.fromhex('0x1.920c49ba5e354p+1')
>>> y
3.141
not_a_number = float('NaN')
infinite     = float('inf')

See also

sys.float_info and sys.float_repr_style.
Other Built-in types, such as int
The ptyhon module Python library: mpmath provides aribtrary precision real and compleas floating-point arithmetics.
The fractions module.
IEEE-754 (Floating Point Arithmetic - float/double etc)

Index