login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for SandBoxFractionGCD revision 1 of 5

1 2 3 4 5
Editor: Bill Page
Time: 2017/05/14 17:36:08 GMT+0
Note:

changed:
-
\begin{axiom}
Q := Fraction Integer
gcd(8,4) = retract gcd(8::Q, 4::Q)
\end{axiom}

\begin{axiom}
a:=13/6
b:=3/4
\end{axiom}

\begin{axiom}
g:=gcd(a,b)
l:=lcm(a,b)
g*l = a*b
\end{axiom}

\begin{axiom}
gcd2(x,y) == gcd(numerator x, numerator y) / lcm(denominator x, denominator y)
lcm2(x,y) == lcm(numerator x, numerator y) / gcd(denominator x, denominator y)
\end{axiom}

\begin{axiom}
g:=gcd2(a,b)
l:=lcm2(a,b)
g*l = a*b
\end{axiom}

\begin{axiom}
gcd3(x,y) == gcd(numerator x * denominator y, numerator y * denominator x) / (denominator x * denominator y)
lcm3(x,y) == lcm(numerator x * denominator y, numerator y * denominator x) / (denominator x * denominator y)
\end{axiom}

\begin{axiom}
g:=gcd3(a,b)
l:=lcm3(a,b)
g*l = a*b
\end{axiom}


fricas
Q := Fraction Integer

\label{eq1}\hbox{\axiomType{Fraction}\ } (\hbox{\axiomType{Integer}\ })(1)
Type: Type
fricas
gcd(8,4) = retract gcd(8::Q, 4::Q)

\label{eq2}4 = 1(2)
Type: Equation(PositiveInteger?)

fricas
a:=13/6

\label{eq3}{13}\over 6(3)
Type: Fraction(Integer)
fricas
b:=3/4

\label{eq4}3 \over 4(4)
Type: Fraction(Integer)

fricas
g:=gcd(a,b)

\label{eq5}1(5)
Type: Fraction(Integer)
fricas
l:=lcm(a,b)

\label{eq6}{13}\over 8(6)
Type: Fraction(Integer)
fricas
g*l = a*b

\label{eq7}{{13}\over 8}={{13}\over 8}(7)
Type: Equation(Fraction(Integer))

fricas
gcd2(x,y) == gcd(numerator x, numerator y) / lcm(denominator x, denominator y)
Type: Void
fricas
lcm2(x,y) == lcm(numerator x, numerator y) / gcd(denominator x, denominator y)
Type: Void

fricas
g:=gcd2(a,b)
fricas
Compiling function gcd2 with type (Fraction(Integer),Fraction(
      Integer)) -> Fraction(Integer)

\label{eq8}1 \over{24}(8)
Type: Fraction(Integer)
fricas
l:=lcm2(a,b)
fricas
Compiling function lcm2 with type (Fraction(Integer),Fraction(
      Integer)) -> Fraction(Integer)

\label{eq9}39(9)
Type: Fraction(Integer)
fricas
g*l = a*b

\label{eq10}{{13}\over 8}={{13}\over 8}(10)
Type: Equation(Fraction(Integer))

fricas
gcd3(x,y) == gcd(numerator x * denominator y, numerator y * denominator x) / (denominator x * denominator y)
Type: Void
fricas
lcm3(x,y) == lcm(numerator x * denominator y, numerator y * denominator x) / (denominator x * denominator y)
Type: Void

fricas
g:=gcd3(a,b)
fricas
Compiling function gcd3 with type (Fraction(Integer),Fraction(
      Integer)) -> Fraction(Integer)

\label{eq11}1 \over{24}(11)
Type: Fraction(Integer)
fricas
l:=lcm3(a,b)
fricas
Compiling function lcm3 with type (Fraction(Integer),Fraction(
      Integer)) -> Fraction(Integer)

\label{eq12}39(12)
Type: Fraction(Integer)
fricas
g*l = a*b

\label{eq13}{{13}\over 8}={{13}\over 8}(13)
Type: Equation(Fraction(Integer))