MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / as_integer_ratio

Method as_integer_ratio

tools/python-3.11.9-amd64/Lib/fractions.py:194–200  ·  view source on GitHub ↗

Return the integer ratio as a tuple. Return a tuple of two integers, whose ratio is equal to the Fraction and with a positive denominator.

(self)

Source from the content-addressed store, hash-verified

192 return cls(*dec.as_integer_ratio())
193
194 def as_integer_ratio(self):
195 """Return the integer ratio as a tuple.
196
197 Return a tuple of two integers, whose ratio is equal to the
198 Fraction and with a positive denominator.
199 """
200 return (self._numerator, self._denominator)
201
202 def limit_denominator(self, max_denominator=1000000):
203 """Closest Fraction to self with denominator at most max_denominator.

Callers 6

_exact_ratioFunction · 0.45
_decimal_sqrt_of_fracFunction · 0.45
__mul__Method · 0.45
__truediv__Method · 0.45
__new__Method · 0.45
from_floatMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected