X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=check%2Fexam_inifcns.cpp;h=0b3c61451ee66095254ac7fd6ecb59d18eaa034a;hp=3242f879cf944a1686f6a6e11397d45728d7b463;hb=3cb110c5ca2330a0a155660f32d42e3d0ebc0db1;hpb=e7cc6a764ff67b5885d6633385fac23ccc1dc9a7 diff --git a/check/exam_inifcns.cpp b/check/exam_inifcns.cpp index 3242f879..0b3c6145 100644 --- a/check/exam_inifcns.cpp +++ b/check/exam_inifcns.cpp @@ -4,7 +4,7 @@ * functions. */ /* - * GiNaC Copyright (C) 1999-2002 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2007 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 @@ -18,14 +18,19 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "exams.h" +#include +#include "ginac.h" +using namespace std; +using namespace GiNaC; /* Assorted tests on other transcendental functions. */ -static unsigned inifcns_consist_trans(void) +static unsigned inifcns_consist_trans() { + using GiNaC::asin; using GiNaC::acos; + unsigned result = 0; symbol x("x"); ex chk; @@ -116,7 +121,7 @@ static unsigned inifcns_consist_trans(void) /* Simple tests on the tgamma function. We stuff in arguments where the results * exists in closed form and check if it's ok. */ -static unsigned inifcns_consist_gamma(void) +static unsigned inifcns_consist_gamma() { unsigned result = 0; ex e; @@ -161,8 +166,10 @@ static unsigned inifcns_consist_gamma(void) /* Simple tests on the Psi-function (aka polygamma-function). We stuff in arguments where the result exists in closed form and check if it's ok. */ -static unsigned inifcns_consist_psi(void) +static unsigned inifcns_consist_psi() { + using GiNaC::log; + unsigned result = 0; symbol x; ex e, f; @@ -183,7 +190,7 @@ static unsigned inifcns_consist_psi(void) /* Simple tests on the Riemann Zeta function. We stuff in arguments where the * result exists in closed form and check if it's ok. Of course, this checks * the Bernoulli numbers as a side effect. */ -static unsigned inifcns_consist_zeta(void) +static unsigned inifcns_consist_zeta() { unsigned result = 0; ex e; @@ -208,24 +215,21 @@ static unsigned inifcns_consist_zeta(void) return result; } -unsigned exam_inifcns(void) +unsigned exam_inifcns() { unsigned result = 0; cout << "examining consistency of symbolic functions" << flush; - clog << "----------consistency of symbolic functions:" << endl; result += inifcns_consist_trans(); cout << '.' << flush; result += inifcns_consist_gamma(); cout << '.' << flush; result += inifcns_consist_psi(); cout << '.' << flush; result += inifcns_consist_zeta(); cout << '.' << flush; - if (!result) { - cout << " passed " << endl; - clog << "(no output)" << endl; - } else { - cout << " failed " << endl; - } - return result; } + +int main(int argc, char** argv) +{ + return exam_inifcns(); +}