Alle 15:12, marted� 01 marzo 2005, Anders Misfeldt ha scritto:
> Hi,
>
> I have a program where I calculate an ugle integral. In the integral I'm
> having
>
> (1/(x^2-1))^{3/2}
>
> and my x is lower than 1! But since it's taking to the power of 3/2 I
> should still get a real number. 

Hm, last time I checked i� = -i. So you should indeed get an imaginary number 
as long as x� < 1. Unless I'm missing something or my coffee was not strong 
enough.

> GSL_SET_COMPLEX(&ztest, 3, 4);
> GSL_REAL(ztest);
> printf("%g",ztest);
>
> but I get the following error:
>
> error: request for member `dat' in something not a structure or union
>
> What am I doing wrong?

Well, I suppose you did:

        gsl_complex ztest ;

Other than that, you must consider that GSL_REAL (and GSL_IMAG too) is a macro 
that _returns_ a value, not one that messes up its argument. So, to sum it 
up,

        gsl_complex ztest ;
        GSL_SET_COMPLEX( &ztest, 3, 4 ) ;
        printf( "%g", GSL_REAL(ztest) ) ;

Cheers,
-Federico

Attachment: pgp04OhfEea9n.pgp
Description: PGP signature

_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl

Reply via email to