fricas
R := Integer
Type: Type
fricas
Q := Fraction R
Type: Type
fricas
gcd(8,4) = retract gcd(8::Q, 4::Q)
Type: Equation(PositiveInteger
?)
fricas
a:=13/6
Type: Fraction(Integer)
fricas
b:=3/4
Type: Fraction(Integer)
fricas
g:=gcd(a,b)
Type: Fraction(Integer)
fricas
l:=lcm(a,b)
Type: Fraction(Integer)
fricas
g*l = a*b
Type: Equation(Fraction(Integer))
fricas
gcd2(x:Q,y:Q):Q == gcd(retract numerator x, retract numerator y)$R / lcm(retract denominator x, retract denominator y)$R
Function declaration gcd2 : (Fraction(Integer),Fraction(Integer))
-> Fraction(Integer) has been added to workspace.
Type: Void
fricas
lcm2(x:Q,y:Q):Q == lcm(retract numerator x, retract numerator y)$R / gcd(retract denominator x, retract denominator y)$R
Function declaration lcm2 : (Fraction(Integer),Fraction(Integer))
-> Fraction(Integer) has been added to workspace.
Type: Void
fricas
g:=gcd2(a,b)
fricas
Compiling function gcd2 with type (Fraction(Integer),Fraction(
Integer)) -> Fraction(Integer)
Type: Fraction(Integer)
fricas
l:=lcm2(a,b)
fricas
Compiling function lcm2 with type (Fraction(Integer),Fraction(
Integer)) -> Fraction(Integer)
Type: Fraction(Integer)
fricas
g*l = a*b
Type: Equation(Fraction(Integer))
fricas
gcd3(x:Q,y:Q):Q == gcd(retract numerator x * retract denominator y, retract numerator y * retract denominator x)$R / (retract denominator x * retract denominator y)$R
Function declaration gcd3 : (Fraction(Integer),Fraction(Integer))
-> Fraction(Integer) has been added to workspace.
Type: Void
fricas
lcm3(x:Q,y:Q):Q == lcm(retract numerator x * retract denominator y, retract numerator y * retract denominator x)$R / (retract denominator x * retract denominator y)$R
Function declaration lcm3 : (Fraction(Integer),Fraction(Integer))
-> Fraction(Integer) has been added to workspace.
Type: Void
fricas
g:=gcd3(a,b)
fricas
Compiling function gcd3 with type (Fraction(Integer),Fraction(
Integer)) -> Fraction(Integer)
Type: Fraction(Integer)
fricas
l:=lcm3(a,b)
fricas
Compiling function lcm3 with type (Fraction(Integer),Fraction(
Integer)) -> Fraction(Integer)
Type: Fraction(Integer)
fricas
g*l = a*b
Type: Equation(Fraction(Integer))