/usr/share/axiom-20170501/src/algebra/PADEPAC.spad is in axiom-source 20170501-3.
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 48 49 50 51 52 53 54 55 56 57 58 | )abbrev package PADEPAC PadeApproximantPackage
++ Authors: Trager,Burge, Hassner & Watt.
++ Date Created: April 1987
++ Date Last Updated: 12 April 1990
++ References:
++ George A. Baker and Peter Graves-Morris
++ ``Pade Approximants''
++ Cambridge University Press, March 1996 ISBN 9870521450072
++ Description:
++ This package computes reliable Pad&ea. approximants using
++ a generalized Viskovatov continued fraction algorithm.
PadeApproximantPackage(R,x,pt) : SIG == CODE where
R : Field
x:Symbol
pt : R
PS ==> UnivariateTaylorSeries(R,x,pt)
UP ==> UnivariatePolynomial(x,R)
QF ==> Fraction UP
CF ==> ContinuedFraction UP
NNI ==> NonNegativeInteger
SIG ==> with
pade : (NNI,NNI,PS,PS) -> Union(QF,"failed")
++ pade(nd,dd,ns,ds) computes the approximant as a quotient of polynomials
++ (if it exists) for arguments
++ nd (numerator degree of approximant),
++ dd (denominator degree of approximant),
++ ns (numerator series of function), and
++ ds (denominator series of function).
pade : (NNI,NNI,PS) -> Union(QF,"failed")
++ pade(nd,dd,s)
++ computes the quotient of polynomials
++ (if it exists) with numerator degree at
++ most nd and denominator degree at most dd
++ which matches the series s to order \spad{nd + dd}.
CODE ==> add
n,m : NNI
u,v : PS
pa := PadeApproximants(R,PS,UP)
pade(n,m,u,v) ==
ans:=pade(n,m,u,v)$pa
ans case "failed" => ans
pt = 0 => ans
num := numer(ans::QF)
den := denom(ans::QF)
xpt : UP := monomial(1,1)-monomial(pt,0)
num := num(xpt)
den := den(xpt)
num/den
pade(n,m,u) == pade(n,m,u,1)
|