Roots of unity

Hans Peter Würmli wurmli at freesurf.ch
Fri Jan 18 20:48:54 CET 2002



Why don't you define a simple function like:

 numeric qrt(numeric n){
    if (n>=0) return pow(n,numeric(1)/numeric(3)); 
    else return -pow(-n,numeric(1)/numeric(3)); 
 }

and use that in your particular problem.

Cheers, H.P.



More information about the GiNaC-list mailing list