installation problem and/or internal error of GiNaC 1.1.3

Richard B. Kreckel kreckel at thep.physik.uni-mainz.de
Mon Sep 29 23:28:16 CEST 2003


Hi,

> examining series expansion.........../run_exams: line 3: 12967 segment fault

Sorry, I cannot reproduce this.  I believe it is a compiler bug.  Which
version do you have?  gcc 3.3.1 (Debian prerelease) had some serious
issues which could lead to exactly such faulty behavior.  If that is your
compiler, upgrade.  As a general suggestion: dump your vendor's compiler.
Roll your own one from the released tarballs.  That procedure has always
been the less troublesome.

On Fri, 26 Sep 2003 anaximander at gmx.de wrote:
> symbol x("x");
> ex f = cos( pow(x, 2) ) - x/3;   // Funktion
>
> cout << "1. symbolische Ableitung"  << endl;
> ex fx = f.diff(x,1);
> cout << fx << endl;
>
> // Nun: Versuch, den numerischen Wert an der Stelle 1 auszugeben:
> // vgl. tutorial.ps S. 41
> cout << "1. Ableitung an der Stelle 1" << endl;
> ex hilf1 = fx.subs( x == 1 );
> numeric fx_n = ex_to<numeric>(hilf1);// numerischer Wert, vgl. tutorial.ps S. 38

Either use evalf() as on p. 38, upper half or check whether you really got
a numeric object, as on p. 38, lower half.

> /* the following command breaks the program and gives the output:
>   "Internal error: statement in file float/misc/cl_F_digits.cc, line 30 has been reached!!
>    Please send the authors of the program a description how you produced this error!"  */
> cout << fx_n << endl; // comment out to see the second error
>
> /* the following command breaks the program and gives another output:
>    Internal error: statement in file real/elem/cl_R_mul.cc, line 93 has been reached!!
>    Please send the authors of the program a description how you produced this error!  */
> cout << evalf(fx_n) << endl;

Too late.  Calling evalf on something that is already ill-defined.
(Hint: sin(1) is an exact symbolic expression a pseudo function.)

Regards
   -richy.
-- 
Richard B. Kreckel
<Richard.Kreckel at GiNaC.DE>
<http://www.ginac.de/~kreckel/>




More information about the GiNaC-devel mailing list