Greedy algorithm for Egyptian fractions: Difference between revisions

Updated D entry
(→‎{{header|J}}: ugh, something's going wrong with editing)
(Updated D entry)
Line 33:
arithmetic_rational: Rat = Rational;
 
Rat[] egyptian(Rat r) pure /*nothrow*/ {
typeof(return) result;
 
Line 43:
}
 
static enum mod = (in BigInt m, in BigInt n) pure /*nothrow*/ =>
((m % n) + n) % n;