This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libquadmath/65757] gfortran gives incorrect result for anint with real*16 argument
- From: "bugs at dhbailey dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 23 Apr 2015 19:53:57 +0000
- Subject: [Bug libquadmath/65757] gfortran gives incorrect result for anint with real*16 argument
- Auto-submitted: auto-generated
- References: <bug-65757-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65757
--- Comment #8 from dhbbugs <bugs at dhbailey dot com> ---
Jerry DeLisl'e output is certainly not correct -- anint should invariably
return the nearest whole number. It should be the equivalent of this code:
if (x >= 0.0) then
anint = aint (x + 0.5)
else
anint = aint (x - 0.5)
endif
Here aint is the truncated whole number function (a Fortran intrinsic).