axiom-developer
[Top][All Lists]
Advanced

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

[Axiom-developer] [RationalInterpolationAlgorithms] Add example, comment


From: wyscc
Subject: [Axiom-developer] [RationalInterpolationAlgorithms] Add example, comments; display problem
Date: Sat, 19 Mar 2005 03:58:45 -0600

Changes 
http://page.axiom-developer.org/zope/mathaction/RationalInterpolationAlgorithms/diff
--

++added:
Example (added by wyscc):

\begin{axiom}
f(x)== (x^3+5*x-3)/(x^2-3)
f(x)
xlist:List FRAC INT :=[1/2, 4, 1/6, 8, 1/10, 12]
ylist :=[f(x) for x in xlist]
RationalInterpolation(xlist, ylist, 3,2)$RINTERPA(FRAC INT,UP(x,FRAC INT))
\end{axiom}

A harder example:

\begin{axiom}
dom:=DMP([z],INT);
g:FRAC dom -> FRAC dom
g(x) == (x^3*z+5*z^2*x -3*z^3)/(z*x^2 - 3)
xxlist:List FRAC dom:=[1/(2*z), 4*z, 1/(6*z), 8*z, 1/(10*z), 12*z]
yylist:=[g(x) for x in xxlist]
RationalInterpolation(xxlist, yylist, 3::NNI, 2::NNI)$RINTERPA(FRAC dom, _
UP(x, FRAC dom))
\end{axiom}

Comments (from wyscc):

<OL>
<li>Abbreviations for a constructor should be limited to 7 letters (not 8). The 
system occasionally adds the 8th character to a package for internal use.
<li>Function names begin with a lower case, so 
<code>RationalInterpolation</code> should be 
<code>rationalInterpolation</code>, or better, <code>rationalInterpolate</code>.
<li>If we are doing a rational interpolation, presumably the values are 
rational, so it does not make sense to require the <code>y</code>-coordinates 
of inputs be integral. On the other hand, as in the above example, if one uses 
<code>FRAC INT</code>, problems can arise when this package is combined with 
other packages that constructs the quotient field of the parameter domain 
<code>F</code> because Axiom does not like constructing <code>FRAC FRAC 
INT</code> for example. 
<li>Since the variable is not specified by the package, but is required by the 
function call to <code>RationalInterpolation</code> (because of its signature), 
it seems more convenient to include the variable in the call to the package, to 
allow the Interpreter to locate the function more easily.
</OL>

Aside: Display problem:

\begin{itemize}
\item Can't use {\tt ABC} or <code>ABC</code> within LaTeX.
\end{itemize}


--
forwarded from http://page.axiom-developer.org/zope/mathaction/address@hidden




reply via email to

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