Function mul [src]
rma = a * b.
rma, a and b may be aliases. However, it is more efficient if rma does not alias a or b.
Returns an error if memory could not be allocated.
Prototype
pub fn mul(r: *Rational, a: Rational, b: Rational) !void
Parameters
r: *Rational
a: Rational
b: Rational
Source
pub fn mul(r: *Rational, a: Rational, b: Rational) !void {
try r.p.mul(&a.p, &b.p);
try r.q.mul(&a.q, &b.q);
try r.reduce();
}