How to use sqrt for input expression?

Hidehiro FUJIO fujio at ccm.cl.nec.co.jp
Thu Dec 13 09:57:39 CET 2001


Dear GiNaC developers,

I'm using GiNaC for making numerical simulation tools.

My problem with GiNaC is how to handle 'sqrt' function in
expression input.  The simplest example is,

=======================================
#include <ginac/ginac.h>

using namespace GiNaC;
#include <iostream.h>
int main()
{
  symbol x("x");
  ex e("sqrt(x)",lst(x));
  cout << e <<endl;
}
=======================================

When it runs, it makes core dump.
When I use 'sin' instead of 'sqrt', the result is what
I expected with GiNaC library.

Is it a bug or normal?  If normal, how to input expression
that contains 'sqrt' function?

Best regards,

Hidehiro Fujio

NEC Corporation, Internet System Laboratory
Kawasaki, Japan 216-8555
E-mail: fujio at ccm.cl.nec.co.jp






More information about the GiNaC-devel mailing list