3 * Interface to GiNaC's initially known functions. */
6 * GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #ifndef __GINAC_INIFCNS_H__
24 #define __GINAC_INIFCNS_H__
29 #ifndef NO_NAMESPACE_GINAC
31 #endif // ndef NO_NAMESPACE_GINAC
33 /** Absolute value. */
34 DECLARE_FUNCTION_1P(abs)
37 DECLARE_FUNCTION_1P(csgn)
40 DECLARE_FUNCTION_1P(sin)
43 DECLARE_FUNCTION_1P(cos)
46 DECLARE_FUNCTION_1P(tan)
48 /** Exponential function. */
49 DECLARE_FUNCTION_1P(exp)
51 /** Natural logarithm. */
52 DECLARE_FUNCTION_1P(log)
54 /** Inverse sine (arc sine). */
55 DECLARE_FUNCTION_1P(asin)
57 /** Inverse cosine (arc cosine). */
58 DECLARE_FUNCTION_1P(acos)
60 /** Inverse tangent (arc tangent). */
61 DECLARE_FUNCTION_1P(atan)
63 /** Inverse tangent with two arguments. */
64 DECLARE_FUNCTION_2P(atan2)
66 /** Hyperbolic Sine. */
67 DECLARE_FUNCTION_1P(sinh)
69 /** Hyperbolic Cosine. */
70 DECLARE_FUNCTION_1P(cosh)
72 /** Hyperbolic Tangent. */
73 DECLARE_FUNCTION_1P(tanh)
75 /** Inverse hyperbolic Sine (area hyperbolic sine). */
76 DECLARE_FUNCTION_1P(asinh)
78 /** Inverse hyperbolic Cosine (area hyperbolic cosine). */
79 DECLARE_FUNCTION_1P(acosh)
81 /** Inverse hyperbolic Tangent (area hyperbolic tangent). */
82 DECLARE_FUNCTION_1P(atanh)
85 DECLARE_FUNCTION_1P(Li2)
88 DECLARE_FUNCTION_1P(Li3)
90 // overloading at work: we cannot use the macros
91 /** Riemann's Zeta-function. */
92 extern const unsigned function_index_zeta1;
93 inline function zeta(const ex & p1) {
94 return function(function_index_zeta1, p1);
96 /** Derivatives of Riemann's Zeta-function. */
97 extern const unsigned function_index_zeta2;
98 inline function zeta(const ex & p1, const ex & p2) {
99 return function(function_index_zeta2, p1, p2);
102 /** Gamma-function. */
103 DECLARE_FUNCTION_1P(lgamma)
104 DECLARE_FUNCTION_1P(tgamma)
106 /** Beta-function. */
107 DECLARE_FUNCTION_2P(beta)
109 // overloading at work: we cannot use the macros
110 /** Psi-function (aka digamma-function). */
111 extern const unsigned function_index_psi1;
112 inline function psi(const ex & p1) {
113 return function(function_index_psi1, p1);
115 /** Derivatives of Psi-function (aka polygamma-functions). */
116 extern const unsigned function_index_psi2;
117 inline function psi(const ex & p1, const ex & p2) {
118 return function(function_index_psi2, p1, p2);
121 /** Factorial function. */
122 DECLARE_FUNCTION_1P(factorial)
124 /** Binomial function. */
125 DECLARE_FUNCTION_2P(binomial)
127 /** Order term function (for truncated power series). */
128 DECLARE_FUNCTION_1P(Order)
130 /** Inert partial differentiation operator. */
131 DECLARE_FUNCTION_2P(Derivative)
133 ex lsolve(const ex &eqns, const ex &symbols);
135 ex ncpower(const ex &basis, unsigned exponent);
137 inline bool is_order_function(const ex & e)
139 return is_ex_the_function(e, Order);
142 #ifndef NO_NAMESPACE_GINAC
144 #endif // ndef NO_NAMESPACE_GINAC
146 #endif // ndef __GINAC_INIFCNS_H__