]> www.ginac.de Git - ginac.git/blob - ginac/inifcns.h
- changed all instances of "foo const &/*" to "const foo &/*"
[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-2000 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 <ginac/function.h>
27 #include <ginac/ex.h>
28
29 #ifndef NO_GINAC_NAMESPACE
30 namespace GiNaC {
31 #endif // ndef NO_GINAC_NAMESPACE
32
33 /** Absolute value. */
34 DECLARE_FUNCTION_1P(abs)
35
36 /** Sine. */
37 DECLARE_FUNCTION_1P(sin)
38
39 /** Cosine. */
40 DECLARE_FUNCTION_1P(cos)
41
42 /** Tangent. */
43 DECLARE_FUNCTION_1P(tan)
44
45 /** Exponential function. */
46 DECLARE_FUNCTION_1P(exp)
47
48 /** Natural logarithm. */
49 DECLARE_FUNCTION_1P(log)
50
51 /** Inverse sine (arc sine). */
52 DECLARE_FUNCTION_1P(asin)
53
54 /** Inverse cosine (arc cosine). */
55 DECLARE_FUNCTION_1P(acos)
56
57 /** Inverse tangent (arc tangent). */
58 DECLARE_FUNCTION_1P(atan)
59
60 /** Inverse tangent with two arguments. */
61 DECLARE_FUNCTION_2P(atan2)
62
63 /** Hyperbolic Sine. */
64 DECLARE_FUNCTION_1P(sinh)
65
66 /** Hyperbolic Cosine. */
67 DECLARE_FUNCTION_1P(cosh)
68
69 /** Hyperbolic Tangent. */
70 DECLARE_FUNCTION_1P(tanh)
71
72 /** Inverse hyperbolic Sine (area hyperbolic sine). */
73 DECLARE_FUNCTION_1P(asinh)
74
75 /** Inverse hyperbolic Cosine (area hyperbolic cosine). */
76 DECLARE_FUNCTION_1P(acosh)
77
78 /** Inverse hyperbolic Tangent (area hyperbolic tangent). */
79 DECLARE_FUNCTION_1P(atanh)
80
81 /** Dilogarithm. */
82 DECLARE_FUNCTION_1P(Li2)
83
84 /** Trilogarithm. */
85 DECLARE_FUNCTION_1P(Li3)
86
87 // overloading at work: we cannot use the macros
88 /** Riemann's Zeta-function. */
89 extern const unsigned function_index_zeta1;
90 inline function zeta(const ex & p1) {
91     return function(function_index_zeta1, p1);
92 }
93 /** Derivatives of Riemann's Zeta-function. */
94 extern const unsigned function_index_zeta2;
95 inline function zeta(const ex & p1, const ex & p2) {
96     return function(function_index_zeta2, p1, p2);
97 }
98
99 /** Gamma-function. */
100 DECLARE_FUNCTION_1P(gamma)
101
102 /** Beta-function. */
103 DECLARE_FUNCTION_2P(beta)
104
105 // overloading at work: we cannot use the macros
106 /** Psi-function (aka digamma-function). */
107 extern const unsigned function_index_psi1;
108 inline function psi(const ex & p1) {
109     return function(function_index_psi1, p1);
110 }
111 /** Derivatives of Psi-function (aka polygamma-functions). */
112 extern const unsigned function_index_psi2;
113 inline function psi(const ex & p1, const ex & p2) {
114     return function(function_index_psi2, p1, p2);
115 }
116     
117 /** Factorial function. */
118 DECLARE_FUNCTION_1P(factorial)
119
120 /** Binomial function. */
121 DECLARE_FUNCTION_2P(binomial)
122
123 /** Order term function (for truncated power series). */
124 DECLARE_FUNCTION_1P(Order)
125
126 ex lsolve(const ex &eqns, const ex &symbols);
127
128 ex ncpower(const ex &basis, unsigned exponent);
129
130 inline bool is_order_function(const ex & e)
131 {
132     return is_ex_the_function(e, Order);
133 }
134
135 #ifndef NO_GINAC_NAMESPACE
136 } // namespace GiNaC
137 #endif // ndef NO_GINAC_NAMESPACE
138
139 #endif // ndef __GINAC_INIFCNS_H__