Invalid conversions and error messages.
Bob McElrath
mcelrath at draal.physics.wisc.edu
Fri Jan 18 23:11:39 CET 2002
I wrote a program that GiNaC doesn't like, and it told me so. (I'm becoming
somewhat of an expert at this) ;)
#include <ginac/ginac.h>
#include <iostream.h>
using namespace GiNaC;
using namespace std;
int main() {
symbol a("a");
ex blah = a;
numeric blahn = ex_to<numeric>(blah);
// The line below generates the error:
// Internal error: statement in file ./float/misc/cl_F_digits.cc, line 25 has been reached!!
// Please send the authors of the program a description how you produced this error!
cout << "blahn = " << blahn << endl;
// If the cout is commented out, the line below generates the error:
// Internal error: statement in file ./real/elem/cl_R_minusp.cc, line 30 has been reached!!
// Please send the authors of the program a description how you produced this error!
if(blahn.is_negative()) { cout << "blahn is negative." << endl; }
}
Looks to me like a cln error. But GiNaC should probably throw an exception for
the invalid conversion of "a" to a numeric.
Cheers,
-- Bob
Bob McElrath (rsmcelrath at students.wisc.edu)
Univ. of Wisconsin at Madison, Department of Physics
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
Url : http://www.cebix.net/pipermail/ginac-list/attachments/20020118/372661a3/attachment.pgp
More information about the GiNaC-list
mailing list