aboutsummaryrefslogtreecommitdiff
path: root/src/input/arith.input.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2007-08-14 05:14:52 +0000
committerdos-reis <gdr@axiomatics.org>2007-08-14 05:14:52 +0000
commitab8cc85adde879fb963c94d15675783f2cf4b183 (patch)
treec202482327f474583b750b2c45dedfc4e4312b1d /src/input/arith.input.pamphlet
downloadopen-axiom-ab8cc85adde879fb963c94d15675783f2cf4b183.tar.gz
Initial population.
Diffstat (limited to 'src/input/arith.input.pamphlet')
-rw-r--r--src/input/arith.input.pamphlet104
1 files changed, 104 insertions, 0 deletions
diff --git a/src/input/arith.input.pamphlet b/src/input/arith.input.pamphlet
new file mode 100644
index 00000000..d3f88c30
--- /dev/null
+++ b/src/input/arith.input.pamphlet
@@ -0,0 +1,104 @@
+\documentclass{article}
+\usepackage{axiom}
+\begin{document}
+\title{\$SPAD/src/input arith.input}
+\author{The Axiom Team}
+\maketitle
+\begin{abstract}
+\end{abstract}
+\eject
+\tableofcontents
+\eject
+\section{bugs}
+\subsection{bug1}
+Cannot find a definition or applicable library operation named
+reduce with argument type(s)
+ Variable *
+ List Segment PositiveInteger
+<<bug1>>=
+fac3 10
+@
+<<bugs>>=
+)clear all
+234+108
+234*108
+234**108
+factor %
+z := 1/2
+v := (z + 1) ** 10
+1024 * %
+u := (x+1)**6
+differentiate(u,x)
+-- factor %
+)clear all
+-- compute Fibonacci numbers
+fib(n | n = 0) == 1
+fib(n | n = 1) == 1
+fib(n | n > 1) == fib(n-1) + fib(n-2)
+fib 5
+fib 20
+)clear all
+-- compute Legendre polynomials
+leg(n | n = 0) == 1
+leg(n | n = 1) == x
+leg(n | n > 1) == ((2*n-1)*x*leg(n-1)-(n-1)*leg(n-2))/n
+leg 3
+leg 14
+-- look at it as a polynomial with rational number coefficients
+--% :: POLY FRAC INT
+)clear all
+-- several flavors of computing factorial
+fac1(n | n=1) == 1
+fac1(n | n > 1) == n*fac1(n-1)
+--
+fac2 n == if n = 1 then 1 else n*fac2(n-1)
+--
+fac3 n == reduce(*,[1..n])
+fac1 10
+fac2 10
+<<bug1>>
+@
+<<*>>=
+)clear all
+234+108
+234*108
+234**108
+factor %
+z := 1/2
+v := (z + 1) ** 10
+1024 * %
+u := (x+1)**6
+differentiate(u,x)
+-- factor %
+)clear all
+-- compute Fibonacci numbers
+fib(n | n = 0) == 1
+fib(n | n = 1) == 1
+fib(n | n > 1) == fib(n-1) + fib(n-2)
+fib 5
+fib 20
+)clear all
+-- compute Legendre polynomials
+leg(n | n = 0) == 1
+leg(n | n = 1) == x
+leg(n | n > 1) == ((2*n-1)*x*leg(n-1)-(n-1)*leg(n-2))/n
+leg 3
+leg 14
+-- look at it as a polynomial with rational number coefficients
+--% :: POLY FRAC INT
+)clear all
+-- several flavors of computing factorial
+fac1(n | n=1) == 1
+fac1(n | n > 1) == n*fac1(n-1)
+--
+fac2 n == if n = 1 then 1 else n*fac2(n-1)
+--
+fac3 n == reduce(*,[1..n])
+fac1 10
+fac2 10
+@
+\eject
+\begin{thebibliography}{99}
+\bibitem{1} nothing
+\end{thebibliography}
+\end{document}