This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/50216] Double computations yield incorrect results
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 27 Aug 2011 20:59:00 +0000
- Subject: [Bug c/50216] Double computations yield incorrect results
- Auto-submitted: auto-generated
- References: <bug-50216-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50216
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-08-27 20:59:00 UTC ---
The cast works as 0.4l is of type long double so you are calulating it in long
double really.
du * 0.4l / (log(zu / z0) - puz) is really:
((long double)du)* 0.4l / (long double)(log(zu / z0) - puz)