On 04/02/2012 10:20, James Courtier-Dutton wrote: >> #include <stdio.h> >> #include <math.h> >> >> int main (void) >> { >> double x, c, s; >> volatile double v; >> >> x = 1.0e22; >> s = sin (x); >> printf ("sin(%.17g) = %.17g\n", x, s); >> >> v = x; >> x = v; >> c = cos (x); >> s = sin (x); >> printf ("sin(%.17g) = %.17g\n", x, s); >> >> return c == 0; >> }
> If you convert all the doubles into long doubles. > You get: ... invalid code unless you remembered to add 'L' before the 'g' format specifier as well. Did you? (Just checking.) cheers, DaveK