]> www.ginac.de Git - ginac.git/blobdiff - check/exam_inifcns_nstdsums.cpp
Happy New Year!
[ginac.git] / check / exam_inifcns_nstdsums.cpp
index 0fbfaec6bbf7ba397753bb5088107a6541af18b2..86c6416bb97c4b7bd3b74eee80095fe5fc40ebf7 100644 (file)
@@ -4,7 +4,7 @@
  *  functions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2015 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2019 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
@@ -55,15 +55,15 @@ using namespace std;
  *          Write[st,Chop[N[PolyLog[i,j,-x[[k]]+I*y[[l]]],25]]],{i,3},{j,3}], {k,4}], {l,3}]
  *    Close[st]
  *
- *    
+ *
  * and postprocessed by the following shell script
  *
  *
  *    #/bin/sh
  *    IFS=$'\n'
  *    cat exam_inifcns_nstdsums_data.raw | sed -e 's/\*\^/E/g' > exam_inifcns_nstdsums_data.raw2
- *    echo 'const char *data[] = {' > exam_inifcns_nstdsums_data.raw3
- *    for i in `cat exam_inifcns_nstdsums_data.raw2`; do echo \"$i\",; done >> exam_inifcns_nstdsums_data.raw3
+ *    echo 'constexpr string polylogdata[] = {' > exam_inifcns_nstdsums.h
+ *    for i in `cat exam_inifcns_nstdsums_data.raw2`; do echo \"$i\",; done >> exam_inifcns_nstdsums.h
  *    echo '"-999"};' >> exam_inifcns_nstdsums.h
  *
  *
@@ -86,13 +86,13 @@ static unsigned inifcns_test_S()
        
        int i = 0;
        while (true) {
-               ex n(data[i++],symbol());
+               ex n(polylogdata[i++],symbol());
                if (n == ENDMARK) {
                        break;
                }
-               ex p(data[i++],symbol());
-               ex x(data[i++],symbol());
-               ex res(data[i++],symbol());
+               ex p(polylogdata[i++],symbol());
+               ex x(polylogdata[i++],symbol());
+               ex res(polylogdata[i++],symbol());
                ex res2 = S(n, p, x).evalf();
                if (abs(res-res2) > prec) {
                        clog << "S(" << n << "," << p << "," << x << ") seems to be wrong:" << endl;
@@ -146,7 +146,7 @@ static unsigned inifcns_test_HLi()
        res.append(H(lst{-2,1,3},numeric(1)/3).hold() - -Li(lst{2,1,3},lst{-numeric(1)/3,-1,1}).hold());
        res.append(H(lst{-2,1,3},numeric(98)/100).hold() - -Li(lst{2,1,3},lst{-numeric(98)/100,-1,1}).hold());
        res.append(H(lst{-2,1,3},numeric(245)/100).hold() - -Li(lst{2,1,3},lst{-numeric(245)/100,-1,1}).hold());
-       res.append(H(lst{-3,1,-2,0,0},numeric(3)/10).hold() - convert_H_to_Li(lst{-3,1,-2,0,0},numeric(3)/10).eval());
+       res.append(H(lst{-3,1,-2,0,0},numeric(3)/10).hold() - convert_H_to_Li(lst{-3,1,-2,0,0},numeric(3)/10));
        
        for (lst::const_iterator it = res.begin(); it != res.end(); it++) {
                ex diff = abs((*it).evalf());