/usr/lib/open-axiom/input/exprpoly.input is in open-axiom-test 1.4.1+svn~2626-2ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | --Copyright The Numerical Algorithms Group Limited 1994.
-- This file test coercing objects of type Expression to various
-- polynomial types and back.
)clear all
-- Start with a simple expression involving variables
a := sin(i)*x**2 - y*x*sin(j)
-- Coerce it to various multivariate polynomial types
a :: DMP([x,y], EXPR INT)
leadingCoefficient %
a :: HDMP([x,y], EXPR INT)
a :: MPOLY([x,y], EXPR INT)
a :: MPOLY([y,x], EXPR INT)
-- Coerce it back to type Expression
% :: EXPR INT
a - %
-- Coerce the expression to various univariate polynomial types
a :: UP(x, EXPR INT)
a :: UP(y, EXPR INT)
a :: UP(y, UP(x, EXPR INT))
-- Coerce it back to type Expression
% :: EXPR INT
a - %
-- We needn't have had such a complicated expression. The following is
-- really just a multivariate polynomial.
b : EXPR INT := (x - 2*y + 3*z)**3
b :: DMP([x,y,z], Integer)
b :: HDMP([y,x,z], Integer)
b - (% :: EXPR INT)
b :: MPOLY([z,y,x], Integer)
b :: UP(y, HDMP([x,z], Integer))
b - (% :: EXPR INT)
|