Some further examples using the latest pure-reduce checkout (for test
purposes).
-- The first part in cats1.pure is borrowed from the "Computer Algebra
Test Suite" (CATS), to find at the Axiom website
http://axiom.axiom-developer.org/axiom-website/CATS/index.html.
The list variable "Dx" should contain only zeroes after running the script.
-- the second part (r1-r54) are examples from the Reduce manual (with
some new operators, mainly for multivariate polynomials). Below is a
printout of "R" (the script gives no output) in order to see the very
few issues (_sq in lists).
-- The use of Pure's "e" and "i" as variables should be used with care
(use quote) as they evaluate to "Euler" and complex "i".
bottom line:
- there were no (math) errors in the output
- the interface is already very stable (even the error messages are
reasonable) and all fits well into Pure's syntax :)
- next are matrices, switches and packages to test. It's not yet clear
to me how to declare properties of operators (symmetric, odd, factor,
depend, ...).
Kurt
> using system;
let R = [val ("r"+str i) | i=1..54];
map puts $ map str $ map eval R;
> > 1002230017L
[__sq (2:((x:1):1):2) t,__sq (-2:((x:1):1):1) t,__sq
(2:((x:2):1):((x:1):2):1) t]
[x==2*val "\0x256c\(0x2592)5"*pi+asin (e^(2^(3/5)*cos
(2*pi/5))/e^(2^(3/5)*sin (2*pi/5)*i))+-3,x==2*val
"\0x256c\(0x2592)5"*pi+-asin (e^(2^(3/5)*cos (2*pi/5))/e^(2^(3/5)*sin
(2*pi/5)*i))+pi+-3,x==2*val "\0x256c\(0x2592)4"*pi+asin
(1/e^(2^(3/5)*cos (pi/5)+2^(3/5)*sin (pi/5)*i))+-3,x==2*val
"\0x256c\(0x2592)4"*pi+-asin (1/e^(2^(3/5)*cos (pi/5)+2^(3/5)*sin
(pi/5)*i))+pi+-3,x==2*val "\0x256c\(0x2592)3"*pi+asin (e^(2^(3/5)*sin
(pi/5)*i)/e^(2^(3/5)*cos (pi/5)))+-3,x==2*val
"\0x256c\(0x2592)3"*pi+-asin (e^(2^(3/5)*sin (pi/5)*i)/e^(2^(3/5)*cos
(pi/5)))+pi+-3,x==2*val "\0x256c\(0x2592)2"*pi+asin (e^(2^(3/5)*cos
(2*pi/5)+2^(3/5)*sin (2*pi/5)*i))+-3,x==2*val
"\0x256c\(0x2592)2"*pi+-asin (e^(2^(3/5)*cos (2*pi/5)+2^(3/5)*sin
(2*pi/5)*i))+pi+-3,x==2*val "\0x256c\(0x2592)1"*pi+asin
(e^2^(3/5))+-3,x==2*val "\0x256c\(0x2592)1"*pi+-asin (e^2^(3/5))+pi+-3]
[__sq ([(z:2):1]:1) t,0,__sq ([(z:1):3]:1) t,0,3,0,__sq (1 ((z:1):1)) t]
1/z
b
a
(+)
[[__sq
((((x:48):1):((x:47):1):((x:46):1):((x:43):-1):((x:42):-1):((x:41):-2):((x:40):-1):((x:39):-1):((x:36):1):((x:35):1):((x:34):1):((x:33):1):((x:32):1):((x:31):1):((x:28):-1):((x:26):-1):((x:24):-1):((x:22):-1):((x:20):-1):((x:17):1):((x:16):1):((x:15):1):((x:14):1):((x:13):1):((x:12):1):((x:9):-1):((x:8):-1):((x:7):-2):((x:6):-1):((x:5):-1):((x:2):1):((x:1):1):1):1)
t,1],[__sq
((((x:24):1):((x:23):-1):((x:19):1):((x:18):-1):((x:17):1):((x:16):-1):((x:14):1):((x:13):-1):((x:12):1):((x:11):-1):((x:10):1):((x:8):-1):((x:7):1):((x:6):-1):((x:5):1):((x:1):-1):1):1)
t,1],[__sq
((((x:12):1):((x:11):-1):((x:9):1):((x:8):-1):((x:6):1):((x:4):-1):((x:3):1):((x:1):-1):1):1)
t,1],[__sq
((((x:8):1):((x:7):-1):((x:5):1):((x:4):-1):((x:3):1):((x:1):-1):1):1)
t,1],[__sq
((((x:6):1):((x:5):1):((x:4):1):((x:3):1):((x:2):1):((x:1):1):1):1)
t,1],[__sq ((((x:4):1):((x:3):1):((x:2):1):((x:1):1):1):1) t,1],[__sq
((((x:2):1):((x:1):1):1):1) t,1],[__sq ((((x:1):1):-1):1) t,1]]
[[2,2],[3,1],[__sq ((((x:1):1):1):1) t,1],[__sq ((((x:1):1):-1):1) t,1]]
x+1
2*x+2*y
1
x^3+4*x^2+5*x+2
4*x^3+4*x^2*y+-4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