This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/50216] Double computations yield incorrect results


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]