[GiNaC-list] Crash with zeta({7, 3}), and performance difference with G(...)

Vitaly Magerya vmagerya at gmail.com
Wed May 22 14:43:01 CEST 2019


Hi, folks. I've run into a crash; here it is:

     (gdb) run
     Starting program: .../ginac/build/ginsh/ginsh
     ginsh - GiNaC Interactive Shell (GiNaC V1.7.6)
       __,  _______  Copyright (C) 1999-2019 Johannes Gutenberg University Mainz,
      (__) *       | Germany.  This is free software with ABSOLUTELY NO WARRANTY.
       ._) i N a C | You are welcome to redistribute it under certain conditions.
     <-------------' For details type `warranty;'.

     Type ?? for a list of help topics.
     > evalf(zeta({7,3}));
     0.008419668503096332361
     > Digits=2000;
     2000
     > evalf(zeta({7,3}));

     Program received signal SIGSEGV, Segmentation fault.
     0x00007ffff786c3ca in cln::operator*(cln::cl_N const&, cln::cl_N const&) () from /usr/lib/libcln.so.6
     (gdb) bt
     #0  0x00007ffff786c3ca in cln::operator*(cln::cl_N const&, cln::cl_N const&) () from /usr/lib/libcln.so.6
     #1  0x00005555556402c1 in GiNaC::(anonymous namespace)::crandall_Y_loop(cln::cl_N const&, std::vector<cln::cl_N, std::allocator<cln::cl_N> > const&) ()
     #2  0x0000555555658ab9 in GiNaC::zeta1_evalf(GiNaC::ex const&) ()
     #3  0x00005555555f5697 in GiNaC::function::evalf() const ()
     #4  0x0000555555586023 in f_evalf(GiNaC::container<std::vector> const&) ()
     #5  0x000055555558d7c7 in yyparse() ()
     #6  0x0000555555577087 in main ()
     (gdb)

Interestingly evaluating the same zeta with G works fine:

     > Digits=2000;
     2000
     > evalf(G({0,0,0,0,0,0,1,0,0,1},1));
     0.00841966850309633242396857971467065063691...

Also with Digits=500, evaluating zeta({7,3}) takes ~10 seconds,
while it's only 0.6 seconds for G({0,0,0,0,0,0,1,0,0,1},1). Anyone
has ideas as to why is there such difference in performance, and
is there an even faster way?


More information about the GiNaC-list mailing list