[Bug c/35523] Wrong result for constant float expression

martin dot apel at simpack dot de gcc-bugzilla@gcc.gnu.org
Mon Mar 10 16:33:00 GMT 2008



------- Comment #4 from martin dot apel at simpack dot de  2008-03-10 16:33 -------
(In reply to comment #3)
> gcc-4.3 -o t t.i
> ./t
> sin(cos(tan(PI/2))) = -0.280611
> 
> gcc-4.3 -o t t.i -fno-builtin -lm
> ./t
> sin(cos(tan(PI/2))) = -0.280611
> 
> works for me?
> 

It compiles and runs, but the result is wrong. Using a calculator or gcc-4.2
for the same programs yields a result of -0.8273508412530949929.

Martin


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35523



More information about the Gcc-bugs mailing list