]> www.ginac.de Git - ginac.git/blob - ginac/inifcns.h
building in separate directory didn't work
[ginac.git] / ginac / inifcns.h
1 /** @file inifcns.h
2  *
3  *  Interface to GiNaC's initially known functions. */
4
5 /*
6  *  GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany
7  *
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.
12  *
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.
17  *
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
21  */
22
23 #ifndef __GINAC_INIFCNS_H__
24 #define __GINAC_INIFCNS_H__
25
26 #include "function.h"
27 #include "ex.h"
28
29 #ifndef NO_NAMESPACE_GINAC
30 namespace GiNaC {
31 #endif // ndef NO_NAMESPACE_GINAC
32
33 /** Absolute value. */
34 DECLARE_FUNCTION_1P(abs)
35         
36 /** Complex sign. */
37 DECLARE_FUNCTION_1P(csgn)
38
39 /** Eta function: log(a*b) == log(a) + log(b) + eta(a, b). */
40 DECLARE_FUNCTION_2P(eta)
41
42 /** Sine. */
43 DECLARE_FUNCTION_1P(sin)
44
45 /** Cosine. */
46 DECLARE_FUNCTION_1P(cos)
47
48 /** Tangent. */
49 DECLARE_FUNCTION_1P(tan)
50
51 /** Exponential function. */
52 DECLARE_FUNCTION_1P(exp)
53
54 /** Natural logarithm. */
55 DECLARE_FUNCTION_1P(log)
56
57 /** Inverse sine (arc sine). */
58 DECLARE_FUNCTION_1P(asin)
59
60 /** Inverse cosine (arc cosine). */
61 DECLARE_FUNCTION_1P(acos)
62
63 /** Inverse tangent (arc tangent). */
64 DECLARE_FUNCTION_1P(atan)
65
66 /** Inverse tangent with two arguments. */
67 DECLARE_FUNCTION_2P(atan2)
68
69 /** Hyperbolic Sine. */
70 DECLARE_FUNCTION_1P(sinh)
71
72 /** Hyperbolic Cosine. */
73 DECLARE_FUNCTION_1P(cosh)
74
75 /** Hyperbolic Tangent. */
76 DECLARE_FUNCTION_1P(tanh)
77
78 /** Inverse hyperbolic Sine (area hyperbolic sine). */
79 DECLARE_FUNCTION_1P(asinh)
80
81 /** Inverse hyperbolic Cosine (area hyperbolic cosine). */
82 DECLARE_FUNCTION_1P(acosh)
83
84 /** Inverse hyperbolic Tangent (area hyperbolic tangent). */
85 DECLARE_FUNCTION_1P(atanh)
86
87 /** Dilogarithm. */
88 DECLARE_FUNCTION_1P(Li2)
89
90 /** Trilogarithm. */
91 DECLARE_FUNCTION_1P(Li3)
92
93 // overloading at work: we cannot use the macros here
94 /** Riemann's Zeta-function. */
95 extern const unsigned function_index_zeta1;
96 inline function zeta(const ex & p1) {
97         return function(function_index_zeta1, p1);
98 }
99 /** Derivatives of Riemann's Zeta-function. */
100 extern const unsigned function_index_zeta2;
101 inline function zeta(const ex & p1, const ex & p2) {
102         return function(function_index_zeta2, p1, p2);
103 }
104
105 /** Gamma-function. */
106 DECLARE_FUNCTION_1P(lgamma)
107 DECLARE_FUNCTION_1P(tgamma)
108
109 /** Beta-function. */
110 DECLARE_FUNCTION_2P(beta)
111
112 // overloading at work: we cannot use the macros here
113 /** Psi-function (aka digamma-function). */
114 extern const unsigned function_index_psi1;
115 inline function psi(const ex & p1) {
116         return function(function_index_psi1, p1);
117 }
118 /** Derivatives of Psi-function (aka polygamma-functions). */
119 extern const unsigned function_index_psi2;
120 inline function psi(const ex & p1, const ex & p2) {
121         return function(function_index_psi2, p1, p2);
122 }
123         
124 /** Factorial function. */
125 DECLARE_FUNCTION_1P(factorial)
126
127 /** Binomial function. */
128 DECLARE_FUNCTION_2P(binomial)
129
130 /** Order term function (for truncated power series). */
131 DECLARE_FUNCTION_1P(Order)
132
133 /** Inert partial differentiation operator. */
134 DECLARE_FUNCTION_2P(Derivative)
135
136 ex lsolve(const ex &eqns, const ex &symbols);
137
138 ex ncpower(const ex &basis, unsigned exponent);
139
140 inline bool is_order_function(const ex & e)
141 {
142         return is_ex_the_function(e, Order);
143 }
144
145 #ifndef NO_NAMESPACE_GINAC
146 } // namespace GiNaC
147 #endif // ndef NO_NAMESPACE_GINAC
148
149 #endif // ndef __GINAC_INIFCNS_H__