[testsuite gfortran] partial fix for secnds*.f
Dominique Dhumieres
dominiq@lps.ens.fr
Sat May 12 09:54:00 GMT 2007
The problem is deeper than just a rouinding problem:
#include <math.h>
#include <stdio.h>
int main()
{
double time1;
float time2;
time1 = 3600.0*23.0f+60.0*59.0f+59.0f+0.001*999.0f;
printf("%g \n", time2);
}
#include <math.h>
#include <stdio.h>
int main()
{
float time1;
float time2;
time1 = 3600.0f*23.0f+60.0f*59.0f+59.0f+0.001f*999.0f;
time2 = time1;
printf("%g \n", time2);
}
print *, 3600.0*23.0+60.0*59.0+59.0+0.001*999.0
end
all return 86400*
Dominique
More information about the Fortran
mailing list