Consider fricas (1) -> d := continuedFraction(0,
Type: ContinuedFraction?(Integer)
fricas 2*d
Type: ContinuedFraction?(Integer)
so far, so good. But changing the domain to The problem appears to be, that
eucWhole(a: Q): R == numer a quo denom a
eucWhole0(a: Q): R ==
isOrdered =>
n := numer a
d := denom a
q := n quo d
r := n - q*d
if r < 0 then q := q - 1
q
eucWhole a
If Martin |