Bug?: (a^b).unit(a) -> SIGSEGV
    Pearu Peterson 
    pearu at cens.ioc.ee
       
    Sun Nov 25 13:21:44 CET 2001
    
    
  
Hi,
Notice that (a^b).unit(a) leads to Segmentation fault. I have failed to
track down the source of this fault in GiNaC --- I would expect that this
expression should throw an exception "invalid expression in unit()", but
something gets wrong elsewhere. Any ideas?
Pearu
For your convinience, here is a sample program:
#include <iostream>
#include <ginac/ginac.h>
using namespace std;
using namespace GiNaC;
int main()
{
    symbol a("a"),b("b");
    ex e = power(a,b);
    cout << "e="<<e<< endl;
    cout << "e.unit(a)="<<e.unit(a)<< endl;
    return 0;
}
    
    
More information about the GiNaC-devel
mailing list