3 * Interface to GiNaC's initially known functions. */
6 * GiNaC Copyright (C) 1999 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__
26 #include <ginac/function.h>
29 #ifndef NO_GINAC_NAMESPACE
31 #endif // ndef NO_GINAC_NAMESPACE
34 DECLARE_FUNCTION_1P(sin)
37 DECLARE_FUNCTION_1P(cos)
40 DECLARE_FUNCTION_1P(tan)
42 /** Exponential function. */
43 DECLARE_FUNCTION_1P(exp)
45 /** Natural logarithm. */
46 DECLARE_FUNCTION_1P(log)
48 /** Inverse sine (arc sine). */
49 DECLARE_FUNCTION_1P(asin)
51 /** Inverse cosine (arc cosine). */
52 DECLARE_FUNCTION_1P(acos)
54 /** Inverse tangent (arc tangent). */
55 DECLARE_FUNCTION_1P(atan)
57 /** Inverse tangent with two arguments. */
58 DECLARE_FUNCTION_2P(atan2)
60 /** Hyperbolic Sine. */
61 DECLARE_FUNCTION_1P(sinh)
63 /** Hyperbolic Cosine. */
64 DECLARE_FUNCTION_1P(cosh)
66 /** Hyperbolic Tangent. */
67 DECLARE_FUNCTION_1P(tanh)
69 /** Inverse hyperbolic Sine (area hyperbolic sine). */
70 DECLARE_FUNCTION_1P(asinh)
72 /** Inverse hyperbolic Cosine (area hyperbolic cosine). */
73 DECLARE_FUNCTION_1P(acosh)
75 /** Inverse hyperbolic Tangent (area hyperbolic tangent). */
76 DECLARE_FUNCTION_1P(atanh)
79 DECLARE_FUNCTION_1P(Li2)
82 DECLARE_FUNCTION_1P(Li3)
84 // overloading at work: we cannot use the macros
85 /** Riemann's Zeta-function. */
86 extern const unsigned function_index_zeta1;
87 inline function zeta(ex const & p1) {
88 return function(function_index_zeta1, p1);
90 /** Derivatives of Riemann's Zeta-function. */
91 extern const unsigned function_index_zeta2;
92 inline function zeta(ex const & p1, ex const & p2) {
93 return function(function_index_zeta2, p1, p2);
96 /** Gamma-function. */
97 DECLARE_FUNCTION_1P(gamma)
100 DECLARE_FUNCTION_2P(beta)
102 // overloading at work: we cannot use the macros
103 /** Psi-function (aka polygamma-function). */
104 extern const unsigned function_index_psi1;
105 inline function psi(ex const & p1) {
106 return function(function_index_psi1, p1);
108 /** Derivatives of Psi-function (aka polygamma-functions). */
109 extern const unsigned function_index_psi2;
110 inline function psi(ex const & p1, ex const & p2) {
111 return function(function_index_psi2, p1, p2);
114 /** Factorial function. */
115 DECLARE_FUNCTION_1P(factorial)
117 /** Binomial function. */
118 DECLARE_FUNCTION_2P(binomial)
120 /** Order term function (for truncated power series). */
121 DECLARE_FUNCTION_1P(Order)
123 ex lsolve(ex const &eqns, ex const &symbols);
125 ex ncpower(ex const &basis, unsigned exponent);
127 inline bool is_order_function(ex const & e)
129 return is_ex_the_function(e, Order);
132 #ifndef NO_GINAC_NAMESPACE
134 #endif // ndef NO_GINAC_NAMESPACE
136 #endif // ndef __GINAC_INIFCNS_H__