TComplex magnitudes

Is there an example for TComplex somewhere? When I run this code:

{
TComplex d1 = (1.,1.);
cout << “d1 = " << d1 << d1.Re() << d1.Im()<<endl;
TComplex d2 = sqrt(d1);
TComplex d3 = pow(d1,0.5);
Double_t mag = abs(d1);
cout <<” d2 = “<< d2<<” d3 = "<< d3<<
"mag = " <<mag<<endl;
cout << "real(d3) = " << d3.Re() << " Im(d3) = "<< d3.Im() <<endl;
}

I get the following

root [21] .x test.C
d1 = (1,0i)10
d2 = (12240.7,0i) d3 = (12240.7,0i)mag = 1.49836e+08
real(d3) = 12240.7 Im(d3) = 0

IThe results I get from the sqrt, power and abs call are all almost
(but not totally) independent of what d1 is. What am I missing?

This is ROOT 4.00/06, running on Redhat 9.0 Linux…

Thanks for any help

Spencer Klein
LBNL
srklein at LBNL dot GOV

see example in $ROOTSYS/test/ctorture.cxx

Rene