[GiNaC-list] crash in cln when converting numeric to double

Sebastian Luther SebastianLuther at gmx.de
Tue Nov 2 08:12:44 CET 2010


Hi,

below you'll find a small test program that crashes for me.

--------------------------------------------
#include <ginac/ginac.h>
#include <iostream>

int main(int argc, char* argv[])
{
	GiNaC::parser p;
	GiNaC::ex e = p("941480149401/1250000000000000*2^(5/91)");
	GiNaC::numeric n = GiNaC::ex_to<GiNaC::numeric>(e);
	double x = n.to_double(); //throws the exception below
	return 0;
}

/*
  terminate called after throwing an instance of 'cln::notreached_exception'
  what():  Internal error: statement in file real/conv/cl_R_to_double.cc, line 55 has been reached!!
*/
--------------------------------------------
g++ test.cpp -o test -lginac
--------------------------------------------
./test
--------------------------------------------

Looks like the real problem lays in cln, but I'm not sure how to reproduce it there.

I tested on three systems all with cln 1.3.1.
Ubutnu 10.4 (64bit) with ginac 1.5.5, gcc 4.4
Gentoo (64bit) with ginac 1.5.8, gcc-4.5
Gentoo (32bit) with ginac 1.5.5, gcc-4.4

Let me know if you need something else.

Sebastian


-- 
GMX DSL Doppel-Flat ab 19,99 &euro;/mtl.! Jetzt auch mit 
gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl


More information about the GiNaC-list mailing list