2011-05-23 Tom de Vries <tom@codesourcery.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / nint_1.f90
blobe487bec8ff6424989dab457fff2aad3762ded033
1 ! { dg-do run }
2 program nint_1
3 if (int(anint(8388609.0)) /= 8388609) call abort
4 if (int(anint(0.49999997)) /= 0) call abort
5 if (nint(8388609.0) /= 8388609) call abort
6 if (nint(0.49999997) /= 0) call abort
7 if (int(dnint(4503599627370497.0d0),8) /= 4503599627370497_8) call abort
8 if (int(dnint(0.49999999999999994d0)) /= 0) call abort
9 if (int(anint(-8388609.0)) /= -8388609) call abort
10 if (int(anint(-0.49999997)) /= 0) call abort
11 if (nint(-8388609.0) /= -8388609) call abort
12 if (nint(-0.49999997) /= 0) call abort
13 if (int(dnint(-4503599627370497.0d0),8) /= -4503599627370497_8) call abort
14 if (int(dnint(-0.49999999999999994d0)) /= 0) call abort
15 end program nint_1