* functions. */
/*
- * GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2011 Johannes Gutenberg University Mainz, Germany
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <iostream>
#include "ginac.h"
-using namespace std;
using namespace GiNaC;
+#include <iostream>
+using namespace std;
+
/* Assorted tests on other transcendental functions. */
static unsigned inifcns_consist_trans()
{
using GiNaC::asin; using GiNaC::acos;
+ using GiNaC::asinh; using GiNaC::acosh; using GiNaC::atanh;
unsigned result = 0;
symbol x("x");
* exists in closed form and check if it's ok. */
static unsigned inifcns_consist_gamma()
{
+ using GiNaC::tgamma;
unsigned result = 0;
ex e;
static unsigned inifcns_consist_psi()
{
using GiNaC::log;
+ using GiNaC::tgamma;
unsigned result = 0;
symbol x;
return result;
}
+static unsigned inifcns_consist_various()
+{
+ unsigned result = 0;
+ symbol n;
+ ex e;
+
+ if ( binomial(n, 0) != 1 ) {
+ clog << "ERROR: binomial(n,0) != 1" << endl;
+ ++result;
+ }
+
+ return result;
+}
+
unsigned exam_inifcns()
{
unsigned result = 0;
result += inifcns_consist_gamma(); cout << '.' << flush;
result += inifcns_consist_psi(); cout << '.' << flush;
result += inifcns_consist_zeta(); cout << '.' << flush;
+ result += inifcns_consist_various(); cout << '.' << flush;
return result;
}