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 libquadmath/65757] gfortran gives incorrect result for anint with real*16 argument


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).


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