]> www.ginac.de Git - ginac.git/commitdiff
Rename array of precomputed data in test suite.
authorRichard Kreckel <kreckel@ginac.de>
Sun, 29 Nov 2015 11:33:59 +0000 (12:33 +0100)
committerRichard Kreckel <kreckel@ginac.de>
Sun, 29 Nov 2015 11:40:46 +0000 (12:40 +0100)
Reason: C++17 may introduce a std::data<> template. Right now, the GCC 6.0
prerelease bails out at this code, when compiler with -std=c++17.
<http://en.cppreference.com/w/cpp/iterator/data>

check/exam_inifcns_nstdsums.cpp
check/exam_inifcns_nstdsums.h

index 0fbfaec6bbf7ba397753bb5088107a6541af18b2..6e4d846a1277bb31ab760da2d055691a68b6a36f 100644 (file)
@@ -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;
index 48c0a8ed8148a4121aed8f4d84c4857adc99c8e8..fcd73cba6bb9807f939225855925edbc14c65504 100644 (file)
@@ -20,7 +20,7 @@
  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-string data[] = {
+string polylogdata[] = {
 "1",
 "1",
 "1/5",