Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
float.as_integer_ratio() -> (int, int)

Returns a pair of integers, whose ratio is exactly equal to the original
float and with a positive denominator.
Raises OverflowError on infinities and a ValueError on NaNs.

>>> (10.0).as_integer_ratio()
(10, 1)
>>> (0.0).as_integer_ratio()
(0, 1)(more...)

src/w/a/wasp-HEAD/sw/groundstation/wasp/settings.py   wasp(Download)
    xp,xq = float.as_integer_ratio(xi)
    p, q = 0, 0