This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
possible bug(non-compliance)
- To: gcc-bugs at gcc dot gnu dot org
- Subject: possible bug(non-compliance)
- From: Ramzi Maalouf/ADLittle<maalouf at pyxsys dot net>
- Date: Thu, 14 Sep 2000 13:23:20 -0400
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