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