axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] 20080817.02.tpd.patch (recover function.input)


From: daly
Subject: [Axiom-developer] 20080817.02.tpd.patch (recover function.input)
Date: Sun, 17 Aug 2008 21:57:43 -0500

The input file function.input had several outstanding bugs.
These have been fixed. The file has been rewritten into
regression format and added to the test suite.

====================================================================
diff --git a/changelog b/changelog
index 7603cef..ea20f30 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,5 @@
+20080817 tpd src/input/Makefile add function.regress
+20080817 tpd src/input/function.input fix problems with input file
 20080817 tpd books/bookvol7.1 fix uncompress
 20080816 tpd src/input/Makefile add regression tests
 20080816 tpd src/input/test.input create regression
diff --git a/src/input/Makefile.pamphlet b/src/input/Makefile.pamphlet
index 5581e71..a4d2218 100644
--- a/src/input/Makefile.pamphlet
+++ b/src/input/Makefile.pamphlet
@@ -238,18 +238,11 @@ SKIP= as-eg1.output as-eg2.output    \
 # Error ASEC is invalid as a function.
 ASEC=errortrap.output 
 
-# Error: FLUSH is invalid as a function
-# Error signalled by newGoGet
-FLUSH=
-
 # Error: The function WRAPPED is undefined.
 WRAPPED=loop.output      
 
 # Error: Value stack overflow.
-VALUESTACK=tutchap67.output  test.output
-
-# Broken at |MODOP;ELT;$2M;6|.  Type :H for Help.
-MODOP=function.output  
+VALUESTACK=tutchap67.output
 
 # Broken at |MATCAT-;*;3S;29|.  Type :H for Help.
 MATCAT=linalg.output    
@@ -317,7 +310,7 @@ REGRES= algaggr.regress algbrbf.regress  algfacob.regress 
alist.regress  \
     float.regress     fname1.regress   fname.regress    fnla.regress \
     fns.regress       fparfrac.regress fparfrc.regress  fr1.regress \
     fr2.regress       frac.regress     fr.regress       free.regress \
-    galois.regress    gamma.regress \
+    function.regress  galois.regress    gamma.regress \
     gbf.regress       genups.regress   gonshor.regress  grpthry.regress \
     gstbl.regress     heap.regress     heat.regress     help.regress \
     herm.regress      heugcd.regress \
diff --git a/src/input/function.input.pamphlet 
b/src/input/function.input.pamphlet
index dc331f4..8e2c181 100644
--- a/src/input/function.input.pamphlet
+++ b/src/input/function.input.pamphlet
@@ -9,78 +9,356 @@
 \eject
 \tableofcontents
 \eject
+Input for page RationatFunctionPage
 <<*>>=
-
--- Input for page RationatFunctionPage
+)spool function.output
+)set message test on
+)set message auto off
 )clear all
 
+--S 1 of 33
 f := (x - y) / (x + y)
+--R
+--R        - y + x
+--R   (1)  -------
+--R         y + x
+--R                                            Type: Fraction Polynomial 
Integer
+--E 1
+
+--S 2 of 33
 numer f
+--R
+--R   (2)  - y + x
+--R                                                     Type: Polynomial 
Integer
+--E 2
+
+--S 3 of 33
 denom f
+--R
+--R   (3)  y + x
+--R                                                     Type: Polynomial 
Integer
+--E 3
+
+--S 4 of 33
 eval(f, x = 1/x)
+--R
+--R        - x y + 1
+--R   (4)  ---------
+--R         x y + 1
+--R                                            Type: Fraction Polynomial 
Integer
+--E 4
+
+--S 5 of 33
 eval(f, [x = y, y = x])
+--R
+--R        y - x
+--R   (5)  -----
+--R        y + x
+--R                                            Type: Fraction Polynomial 
Integer
+--E 5
 
--- Input for page AlgebraicFunctionPage
+@
+Input for page AlgebraicFunctionPage
+<<*>>=
 )clear all
 
+--S 6 of 33
 f := sqrt(1 + x ** (1/3))
+--R
+--R         +--------+
+--R         |3+-+
+--R   (1)  \|\|x  + 1
+--R                                                     Type: Expression 
Integer
+--E 6
+
+--S 7 of 33
 y := rootOf(y**3 + y**2 - x*y + x**3 - 1, y)
+--R
+--R   (2)  y
+--R                                                     Type: Expression 
Integer
+--E 7
+
+--S 8 of 33
 differentiate(y, x)
+--R
+--R                 2
+--R           y - 3x
+--R   (3)  ------------
+--R          2
+--R        3y  + 2y - x
+--R                                                     Type: Expression 
Integer
+--E 8
+
+--S 9 of 33
 (y + 1) ** 3
+--R
+--R          2               3
+--R   (4)  2y  + (x + 3)y - x  + 2
+--R                                                     Type: Expression 
Integer
+--E 9
+
+--S 10 of 33
 g := inv f
-ratForm g
+--R
+--R             1
+--R   (5)  -----------
+--R         +--------+
+--R         |3+-+
+--R        \|\|x  + 1
+--R                                                     Type: Expression 
Integer
+--E 10
 
--- Input for page OperatorPage
-)clear all
+--S 11 of 33
+ratPoly g
+--R
+--R                6     4     2
+--R   (6)  (x + 1)?  - 3?  + 3?  - 1
+--R                          Type: SparseUnivariatePolynomial Expression 
Integer
+--E 11
 
-R := SQMATRIX(2, INT)
-t := operator("tilde")::OP(R)
-evaluate(t, m +-> transpose m)
-s:R := matrix [[0, 1], [1, 0]]
-rho := t * s
-z := rho**4 - 1
-m:R := matrix [[1, 2], [3, 4]]
-z m
-rho m
-rho rho m
-(rho**3) m
-b := t * s - s * t
-b m
-)read opalg
-
--- Input for page ElementaryFunctionPage
+@
+Input for page ElementaryFunctionPage
+<<*>>=
 )clear all
 
+--S 12 of 33
 f := x * log y * sin(1/(x+y))
+--R
+--R                      1
+--R   (1)  x log(y)sin(-----)
+--R                    y + x
+--R                                                     Type: Expression 
Integer
+--E 12
+
+--S 13 of 33
 eval(f, [x = y, y = x])
+--R
+--R                      1
+--R   (2)  y log(x)sin(-----)
+--R                    y + x
+--R                                                     Type: Expression 
Integer
+--E 13
+
+--S 14 of 33
 eval(f, log y = acosh(x + sqrt y))
+--R
+--R                1          +-+
+--R   (3)  x sin(-----)acosh(\|y  + x)
+--R              y + x
+--R                                                     Type: Expression 
Integer
+--E 14
 
--- Input for page FunctionSimplificationPage
+@
+Input for page FunctionSimplificationPage
+<<*>>=
 )clear all
 
+--S 15 of 33
 f := cos(x)/sec(x) * log(sin(x)**2/(cos(x)**2+sin(x)**2))
+--R
+--R                             2
+--R                       sin(x)
+--R        cos(x)log(-----------------)
+--R                        2         2
+--R                  sin(x)  + cos(x)
+--R   (1)  ----------------------------
+--R                   sec(x)
+--R                                                     Type: Expression 
Integer
+--E 15
+
+--S 16 of 33
 g := simplify f
+--R
+--R              2            2
+--R   (2)  cos(x) log(- cos(x)  + 1)
+--R                                                     Type: Expression 
Integer
+--E 16
+
+--S 17 of 33
 h := sin2csc cos2sec g
+--R
+--R                  2
+--R            sec(x)  - 1
+--R        log(-----------)
+--R                    2
+--R              sec(x)
+--R   (3)  ----------------
+--R                   2
+--R             sec(x)
+--R                                                     Type: Expression 
Integer
+--E 17
+
+--S 18 of 33
 expandLog h
+--R
+--R                  2
+--R        log(sec(x)  - 1) - 2log(sec(x))
+--R   (4)  -------------------------------
+--R                          2
+--R                    sec(x)
+--R                                                     Type: Expression 
Integer
+--E 18
+
+--S 19 of 33
 f1 := sqrt((x+1)**3)
+--R
+--R         +-----------------+
+--R         | 3     2
+--R   (5)  \|x  + 3x  + 3x + 1
+--R                                                     Type: Expression 
Integer
+--E 19
+
+--S 20 of 33
 rootSimp f1
+--R
+--R                +-----+
+--R   (6)  (x + 1)\|x + 1
+--R                                                     Type: Expression 
Integer
+--E 20
+
+--S 21 of 33
 g1 := sin(x + cos x)
+--R
+--R   (7)  sin(cos(x) + x)
+--R                                                     Type: Expression 
Integer
+--E 21
+
+--S 22 of 33
 g2 := complexElementary g1
+--R
+--R                              +---+ 2               +---+          2
+--R                    +---+   x\|- 1         +---+  x\|- 1     +---+
+--R                   \|- 1 (%e       )  + 2x\|- 1 %e        + \|- 1
+--R                   -----------------------------------------------
+--R                                           +---+
+--R                                         x\|- 1
+--R           +---+                      2%e                               
+---+
+--R        - \|- 1 (%e                                               )  + \|- 1
+--R   (8)  
---------------------------------------------------------------------
+--R                                +---+ 2               +---+
+--R                      +---+   x\|- 1         +---+  x\|- 1     +---+
+--R                     \|- 1 (%e       )  + 2x\|- 1 %e        + \|- 1
+--R                     -----------------------------------------------
+--R                                             +---+
+--R                                           x\|- 1
+--R                                        2%e
+--R                  2%e
+--R                                                     Type: Expression 
Integer
+--E 22
+
+--S 23 of 33
 trigs g2
+--R
+--R   (9)  sin(cos(x) + x)
+--R                                                     Type: Expression 
Integer
+--E 23
+
+--S 24 of 33
 h1 := sinh(x + cosh x)
+--R
+--R   (10)  sinh(cosh(x) + x)
+--R                                                     Type: Expression 
Integer
+--E 24
+
+--S 25 of 33
 h2 := realElementary h1
+--R
+--R               x 2        x     2
+--R            (%e )  + 2x %e  + 1
+--R            -------------------
+--R                       x
+--R                    2%e
+--R         (%e                   )  - 1
+--R   (11)  ----------------------------
+--R                  x 2        x
+--R               (%e )  + 2x %e  + 1
+--R               -------------------
+--R                          x
+--R                       2%e
+--R            2%e
+--R                                                     Type: Expression 
Integer
+--E 25
+
+--S 26 of 33
 htrigs h2
+--R
+--R   (12)  sinh(cosh(x) + x)
+--R                                                     Type: Expression 
Integer
+--E 26
 
--- Input for page PatternMatchingPage
+@
+Input for page PatternMatchingPage
+<<*>>=
 )clear all
 
+--S 27 of 33
 groupSqrt := _rule(sqrt(a) * sqrt(b), sqrt(a*b))
+--R
+--R           +-+ +-+       +---+
+--I   (1)  %B\|a \|b  == %B\|a b
+--R                        Type: RewriteRule(Integer,Integer,Expression 
Integer)
+--E 27
+
+--S 28 of 33
 a := sqrt(2) * sqrt(3)
+--R
+--R         +-+ +-+
+--R   (2)  \|2 \|3
+--R                                                        Type: 
AlgebraicNumber
+--E 28
+
+--S 29 of 33
 groupSqrt a
+--R
+--R         +-+
+--R   (3)  \|6
+--R                                                     Type: Expression 
Integer
+--E 29
+
+--S 30 of 33
 a := (sqrt(x) + sqrt(y))**4
+--R
+--R                  +-+ +-+    2           2
+--R   (4)  (4y + 4x)\|x \|y  + y  + 6x y + x
+--R                                                     Type: Expression 
Integer
+--E 30
+
+--S 31 of 33
 groupSqrt a
-)read sincosex
+--R
+--R                  +---+    2           2
+--R   (5)  (4y + 4x)\|x y  + y  + 6x y + x
+--R                                                     Type: Expression 
Integer
+--E 31
+
+--S 32 of 33
+sinCosExpand := rule
+  sin(-x)    == - sin(x)
+  cos(-x)    == cos(x)
+  sin(x + y) == sin(x) * cos(y) + sin(y) * cos(x)
+  cos(x + y) == cos(x) * cos(y) - sin(x) * sin(y)
+  sin((n | integer? n and n > 1) * x) ==_
+       sin(x) * cos((n-1)*x) + sin((n-1)*x) * cos(x)
+  cos((n | integer? n and n > 1) * x) ==_
+       cos(x) * cos((n-1)*x) - sin(x) * sin((n-1)*x)
+--R 
+--R
+--R   (6)
+--I   {- %BC sin(x) == - %BC sin(x), cos(x) == cos(x),
+--R    sin(y + x) == cos(x)sin(y) + cos(y)sin(x),
+--R    cos(y + x) == - sin(x)sin(y) + cos(x)cos(y),
+--R    sin(n x) == cos(x)sin((n - 1)x) + cos((n - 1)x)sin(x),
+--R    cos(n x) == - sin(x)sin((n - 1)x) + cos(x)cos((n - 1)x)}
+--R                            Type: Ruleset(Integer,Integer,Expression 
Integer)
+--E 32
+
+--S 33 of 33
 sinCosExpand(sin(x+y-2*z) * cos y)
+--R
+--R   (7)  - cos(y)sin(2z - y - x)
+--R                                                     Type: Expression 
Integer
+--E 33
+
 @
 \eject
 \begin{thebibliography}{99}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]