F64.as_integer_ratio: def of bend-collections-laws-math@1.0.0.0 Import: import bend-collections-laws-math@1.0.0.0/src/math/f64.bend as F64 Lines 1249-1253 of bend-collections-laws-math@1.0.0.0/src/math/f64.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-math@1.0.0.0/src/math/f64.bend&start_line=1249&end_line=1253 import Base import bend-collections-laws-math@1.0.0.0/src/math/num.bend as N # x = +-num / 2^den exactly, in lowest terms (Python's as_integer_ratio with # the denominator's exponent); NaN is a domain error, infinities and integers # of 2^64 or more overflow def as_integer_ratio(+x: F64) -> Result<&2, &2, N.NumError, Ratio>: ar_cls(x, Nat.is_eq(exp_field(x), 2047n)) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/f64.bend&name=F64 https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/f64.bend&name=Ratio https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/f64.bend&name=ar_cls https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/f64.bend&name=exp_field https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/num.bend&name=NumError