This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

Re: Inline round for IA64



On Apr 7, 2005, at 10:12, Steve Kargl wrote:


On Thu, Apr 07, 2005 at 08:08:15AM -0400, Geert Bosch wrote:
As far as I can seem from this patch, it rounds incorrectly.
This is a problem with the library version as well, I believe.


Which library?

libgfortran, or whatever is used to implement NINT and DNINT.


Here's an example:
      program main
      real x, y
      x = 8388609.0
      y = 0.4999999701976776123046875
      print *, 'nint (', x, ') =', nint (x)
      print *, 'nint ( y ) =', nint (y), ', where y < 0.5 = ', y < 0.5
      end

output is
 nint (   8388609.     ) =     8388610
 nint ( y ) =           1 , where y < 0.5 =  T


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