possible bug(non-compliance)
Ramzi Maalouf/ADLittle
maalouf@pyxsys.net
Thu Sep 14 10:23:00 GMT 2000
Hello -
This code segment generates an error. modf only works if doubles
are passed. Even though the C++ standard says that modf should work with
either doubles or floats.
I was running a linux intel box, gcc version 2.91.66 (provided by red hat)
#include <stdio.h>
#include <cmath>
void main (void)
{
float fred = 0.0;
float herman = 0.0;
float georges = 0.0;
fred = 1.5;
georges = modf (fred, & herman);
printf ("%g %g %g\n", georges,herman, fred);
}
-ramzi
More information about the Gcc-bugs
mailing list