| Re: Bad start on complex tests |
|
 |
|
 |
|
 |
|
 |
Group: comp.lang.fortran · Group Profile
Author: James Van BuskirkJames Van Buskirk Date: May 16, 2008 09:59
"FX" alussinan.org> wrote in message
news:g0k9et$1s2$1@nef.ens.fr...
>> So mingw-w64 or win64 don't supply a funtion cabsl() funtion?
> win64 doesn't, but mingw does. The problem has to be there. (If there
> simply weren't any cabsl function available, the program wouldn't link.)
>> Try the following.
> That will indeed help. James, can you also run the following modified
> program?
C:\gfortran\james\intrinsics\func1>type cabs.c
#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;
}
C:\gfortran\james\intrinsics\func1>gcc cabs.c -ocabs
C:\gfortran\james\intrinsics\func1>cabs
C:\gfortran\james\intrinsics\func1>
Another test (but I don't know whether it helps)
C:\gfortran\james\intrinsics\func1>type frexp.c
#include
#include
#include
int main(void)
{
int i;
long double x;
long double y;
x = 1.;
i = 2;
y = __builtin_scalbnl(x, i);
printf("scalbnl(%%Le,%%d) = %%Le\n", x, i, y);
return 0;
}
C:\gfortran\james\intrinsics\func1>gcc frexp.c -ofrexp
C:\gfortran\james\intrinsics\func1>frexp
C:\gfortran\james\intrinsics\func1>
Thank you for your attention to this matter.
--
write(*,*) transfer((/17.392111325966148d0,6.5794487871554595D-85, &
6.0134700243160014d-154/),(/'x'/)); end
|