diff options
Diffstat (limited to 'src/input/numbers.input.pamphlet')
-rw-r--r-- | src/input/numbers.input.pamphlet | 142 |
1 files changed, 142 insertions, 0 deletions
diff --git a/src/input/numbers.input.pamphlet b/src/input/numbers.input.pamphlet new file mode 100644 index 00000000..73188530 --- /dev/null +++ b/src/input/numbers.input.pamphlet @@ -0,0 +1,142 @@ +\documentclass{article} +\usepackage{axiom} +\begin{document} +\title{\$SPAD/src/input numbers.input} +\author{The Axiom Team} +\maketitle +\begin{abstract} +\end{abstract} +\eject +\tableofcontents +\eject +<<*>>= + +-- Input for page IntegerPage +)clear all + +x := factorial(200) +y := 2**90 - 1 +x + y +x - y +x * y +factor(x) +factor(y) + +-- Input for page FloatIntroductionPage +)clear all + +sqrt(2.0) +numeric %pi +exp(1.0) +exp(sqrt(163.0) * %pi) +sin(%pi/6.) + +-- Input for page FractionPage +)clear all + +1/4 - 1/5 +f := (x**2 + 1)/(x - 1) +g := (x**2 - 3*x + 2)/(x + 2) +f * g + +-- Input for page FloatPrecisionAnswerPage +)clear all + +numeric(%pi, 500) +digits 500 +numeric %pi + +-- Input for page FiniteFieldPage +)clear all + +F7 := PF 7 +F49 := FF(7,2) +definingPolynomial()$F49 +e := random()$F49 +norm e +trace e +order e +allElts := [index(i)$F49 for i in 1..48] +reduce(+,allElts) +[order e for e in allElts] +u:UP(x, F7) := x**2 + 1 +factor u +u2:UP(x, F49) := u +factor u2 + +-- Input for page IntegerProblemAnswerPage1 +)clear all + +f: NNI -> INT +f(n) == 2**n - 1 +factor f(7) +ints := [n for n in 1..] +primes := [x for x in ints | prime? x] +primes.25 +numbers := [f(n) for n in primes] +factors := [factor n for n in numbers] +nums := [x for x in numbers | not prime? x] + +-- Input for page IntegerProblemAnswerPage2 +)clear all + +numbers := [n**2 - n + 41 for n in 0..40] +[factor n for n in numbers] + +-- Input for page RomanNumeralPage +)clear all + +f := operator 'f +differentiate(f x,x,7) +a := roman(1978 - 1965) +x : UTS(ROMAN,'x,0) := x +recip(1 - x - x**2) +m : MATRIX FRAC ROMAN +m := matrix [[1/(i + j) for i in 1..3] for j in 1..3] +inverse m +y := factorial 20 +roman y + +-- Input for page IntegerExamplePage +)clear all + +f: NNI -> INT +f(n) == 2**(2**n) + 1 +factor f(1) +factor f(2) +for n in 1..6 repeat output factor f(n) + +-- Input for page FloatPrecisionPage +)clear all + +exp(%pi * sqrt(163.0)) +digits 40 +x := exp(%pi * sqrt(163.0)) +numeric(1/3, 5) +numeric(1/3, 60) +numeric(1/3) + +-- Input for page RationalNumberPage +)clear all + +61657 ** 10 / 999983 ** 12 +x := 104348/33215 +numeric x +numer(x) +denom(x) +factor(numer x) / factor(denom x) + +-- Input for page RepeatingDecimalPage +)clear all + +x := 2/7 :: DECIMAL +y := 13/17 :: DECIMAL +x - y +x + y +x * y +@ +\eject +\begin{thebibliography}{99} +\bibitem{1} nothing +\end{thebibliography} +\end{document} |