std.rational?

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Mon Sep 30 10:39:02 PDT 2013


On 28/09/13 15:56, MrSmith wrote:
> This code fails:
>
> rational(0, 1) * rational(1, 1);
>
> It seems to me like gcf is not properly implemented. Also why its name is gcf
> (greatest common factor) and not gcd (greatest common divisor)?

I've fixed this with the following commit:
https://github.com/WebDrake/Rational/commit/6667c835af896325ccd588c3f87f9c188f359b2e

... although the new gcf will fail if passed immutable/const BigInts.


More information about the Digitalmars-d mailing list