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