Re: Bad start on complex tests
  Home FAQ Contact Sign in
comp.lang.fortran only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: Bad start on complex tests         

Group: comp.lang.fortran · Group Profile
Author: Anony
Date: May 16, 2008 09:37

"FX" alussinan.org> wrote in message
news:g0k9et$1s2$1@nef.ens.fr...
> That will indeed help. James, can you also run the following modified
> program?
>
> #include
> #include
> #include
> int main(void)
> {
> long complex z;
> long double x;
> z = 1. + 2 * I;
> x = __builtin_cabsl(z);
> printf("cabsl(%%Le,%%Le) = %%Le\n", creall(z), cimagl(z), x);
> return 0;
> }
>
> --

The result on Win64 is as:

C:\temp\c>type fx.c
#include
#include
#include
int main(void)
{
long complex z;
long double x;
printf("I am at A.\n");
z = 1. + 2 * I;
printf("I am at B.\n");
x = __builtin_cabsl(z);
printf("I am at C.\n");
printf("cabsl(%%Le,%%Le) = %%Le\n", creall(z), cimagl(z), x);
return 0;
}

C:\temp\c>gcc -o fx.exe fx.c

C:\temp\c>fx
I am at A.
I am at B.
no comments
diggit! del.icio.us! reddit!