def Rational.div
import bend-kit-bignum@0.1.0.0/rational.bend as Rationalimport Base
import bend-kit-bignum@0.1.0.0/bigint.bend as Big
70# a / b, or None when b is zero.
71def Rational.div(a: Rational, b: Rational) -> Maybe<&2, Rational>:
72 match a b:
73 case Rational{an, ad} Rational{bn, bd}:
74 Rational.make(Big.BigInt.mul(an, bd), Big.BigInt.mul(ad, bn))
Uses (4)
Used by (0)
No other definition uses this definition.