/usr/share/axiom-20170501/src/algebra/STTFNC.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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | )abbrev package STTFNC StreamTranscendentalFunctionsNonCommutative
++ Author: Clifton J. Williamson
++ Date Created: 26 May 1994
++ Date Last Updated: 26 May 1994
++ Description:
++ StreamTranscendentalFunctionsNonCommutative implements transcendental
++ functions on Taylor series over a non-commutative ring, where a Taylor
++ series is represented by a stream of its coefficients.
StreamTranscendentalFunctionsNonCommutative(Coef) : SIG == CODE where
Coef : Algebra Fraction Integer
I ==> Integer
SG ==> String
ST ==> Stream Coef
STTF ==> StreamTranscendentalFunctions Coef
SIG ==> with
--% Exponentials and Logarithms
exp : ST -> ST
++ exp(st) computes the exponential of a power series st.
log : ST -> ST
++ log(st) computes the log of a power series.
"**" : (ST,ST) -> ST
++ st1 ** st2 computes the power of a power series st1 by another
++ power series st2.
--% TrigonometricFunctionCategory
sin : ST -> ST
++ sin(st) computes sine of a power series st.
cos : ST -> ST
++ cos(st) computes cosine of a power series st.
tan : ST -> ST
++ tan(st) computes tangent of a power series st.
cot : ST -> ST
++ cot(st) computes cotangent of a power series st.
sec : ST -> ST
++ sec(st) computes secant of a power series st.
csc : ST -> ST
++ csc(st) computes cosecant of a power series st.
asin : ST -> ST
++ asin(st) computes arcsine of a power series st.
acos : ST -> ST
++ acos(st) computes arccosine of a power series st.
atan : ST -> ST
++ atan(st) computes arctangent of a power series st.
acot : ST -> ST
++ acot(st) computes arccotangent of a power series st.
asec : ST -> ST
++ asec(st) computes arcsecant of a power series st.
acsc : ST -> ST
++ acsc(st) computes arccosecant of a power series st.
--% HyperbloicTrigonometricFunctionCategory
sinh : ST -> ST
++ sinh(st) computes the hyperbolic sine of a power series st.
cosh : ST -> ST
++ cosh(st) computes the hyperbolic cosine of a power series st.
tanh : ST -> ST
++ tanh(st) computes the hyperbolic tangent of a power series st.
coth : ST -> ST
++ coth(st) computes the hyperbolic cotangent of a power series st.
sech : ST -> ST
++ sech(st) computes the hyperbolic secant of a power series st.
csch : ST -> ST
++ csch(st) computes the hyperbolic cosecant of a power series st.
asinh : ST -> ST
++ asinh(st) computes the inverse hyperbolic sine of a power series st.
acosh : ST -> ST
++ acosh(st) computes the inverse hyperbolic cosine
++ of a power series st.
atanh : ST -> ST
++ atanh(st) computes the inverse hyperbolic tangent
++ of a power series st.
acoth : ST -> ST
++ acoth(st) computes the inverse hyperbolic
++ cotangent of a power series st.
asech : ST -> ST
++ asech(st) computes the inverse hyperbolic secant of a
++ power series st.
acsch : ST -> ST
++ acsch(st) computes the inverse hyperbolic
++ cosecant of a power series st.
CODE ==> add
import StreamTaylorSeriesOperations(Coef)
--% Error Reporting
ZERO : SG := "series must have constant coefficient zero"
ONE : SG := "series must have constant coefficient one"
NPOWERS : SG := "series expansion has terms of negative degree"
--% Exponentials and Logarithms
exp z ==
empty? z => 1 :: ST
(frst z) = 0 =>
expx := exp(monom(1,1))$STTF
compose(expx,z)
error concat("exp: ",ZERO)
log z ==
empty? z => error concat("log: ",ONE)
(frst z) = 1 =>
log1PlusX := log(monom(1,0) + monom(1,1))$STTF
compose(log1PlusX,z - monom(1,0))
error concat("log: ",ONE)
(z1:ST) ** (z2:ST) == exp(log(z1) * z2)
--% Trigonometric Functions
sin z ==
empty? z => 0 :: ST
(frst z) = 0 =>
sinx := sin(monom(1,1))$STTF
compose(sinx,z)
error concat("sin: ",ZERO)
cos z ==
empty? z => 1 :: ST
(frst z) = 0 =>
cosx := cos(monom(1,1))$STTF
compose(cosx,z)
error concat("cos: ",ZERO)
tan z ==
empty? z => 0 :: ST
(frst z) = 0 =>
tanx := tan(monom(1,1))$STTF
compose(tanx,z)
error concat("tan: ",ZERO)
cot z ==
empty? z => error "cot: cot(0) is undefined"
(frst z) = 0 => error concat("cot: ",NPOWERS)
error concat("cot: ",ZERO)
sec z ==
empty? z => 1 :: ST
(frst z) = 0 =>
secx := sec(monom(1,1))$STTF
compose(secx,z)
error concat("sec: ",ZERO)
csc z ==
empty? z => error "csc: csc(0) is undefined"
(frst z) = 0 => error concat("csc: ",NPOWERS)
error concat("csc: ",ZERO)
asin z ==
empty? z => 0 :: ST
(frst z) = 0 =>
asinx := asin(monom(1,1))$STTF
compose(asinx,z)
error concat("asin: ",ZERO)
atan z ==
empty? z => 0 :: ST
(frst z) = 0 =>
atanx := atan(monom(1,1))$STTF
compose(atanx,z)
error concat("atan: ",ZERO)
acos z == error "acos: acos undefined on this coefficient domain"
acot z == error "acot: acot undefined on this coefficient domain"
asec z == error "asec: asec undefined on this coefficient domain"
acsc z == error "acsc: acsc undefined on this coefficient domain"
--% Hyperbolic Trigonometric Functions
sinh z ==
empty? z => 0 :: ST
(frst z) = 0 =>
sinhx := sinh(monom(1,1))$STTF
compose(sinhx,z)
error concat("sinh: ",ZERO)
cosh z ==
empty? z => 1 :: ST
(frst z) = 0 =>
coshx := cosh(monom(1,1))$STTF
compose(coshx,z)
error concat("cosh: ",ZERO)
tanh z ==
empty? z => 0 :: ST
(frst z) = 0 =>
tanhx := tanh(monom(1,1))$STTF
compose(tanhx,z)
error concat("tanh: ",ZERO)
coth z ==
empty? z => error "coth: coth(0) is undefined"
(frst z) = 0 => error concat("coth: ",NPOWERS)
error concat("coth: ",ZERO)
sech z ==
empty? z => 1 :: ST
(frst z) = 0 =>
sechx := sech(monom(1,1))$STTF
compose(sechx,z)
error concat("sech: ",ZERO)
csch z ==
empty? z => error "csch: csch(0) is undefined"
(frst z) = 0 => error concat("csch: ",NPOWERS)
error concat("csch: ",ZERO)
asinh z ==
empty? z => 0 :: ST
(frst z) = 0 =>
asinhx := asinh(monom(1,1))$STTF
compose(asinhx,z)
error concat("asinh: ",ZERO)
atanh z ==
empty? z => 0 :: ST
(frst z) = 0 =>
atanhx := atanh(monom(1,1))$STTF
compose(atanhx,z)
error concat("atanh: ",ZERO)
acosh z == error "acosh: acosh undefined on this coefficient domain"
acoth z == error "acoth: acoth undefined on this coefficient domain"
asech z == error "asech: asech undefined on this coefficient domain"
acsch z == error "acsch: acsch undefined on this coefficient domain"
|