Anything in the review queue?
bearophile
bearophileHUGS at lycos.com
Sun Mar 20 19:26:54 PDT 2011
dsimcha:
> On second thought, given the difficulty finding anything else, rational
> may be the thing that's most ready. I'll offer it up for review now
It's good to have rationals in Phobos, thank you.
Is this GCD? There is already a gcd in Phobos. Is this efficient when numbers gets very large?
CommonInteger!(I1,I2) gcf(I1, I2)(I1 num1, I2 num2);
An alternative is to give the number of binary digits of precision for the mantissa (see std.math.feqrel):
Rational!(Int) toRational(Int)(real floatNum, real epsilon = 1e-08);
Bye,
bearophile
More information about the Digitalmars-d
mailing list