Lines Matching refs:round
814 Math.round(2.1d);
815 Assert.assertEquals(Math.round(+0.0d), (long)+0.0);
816 Assert.assertEquals(Math.round(-0.0d), (long)+0.0);
817 Assert.assertEquals(Math.round(2.0d), 2l);
818 Assert.assertEquals(Math.round(2.1d), 2l);
819 Assert.assertEquals(Math.round(2.5d), 3l);
820 Assert.assertEquals(Math.round(2.9d), 3l);
821 Assert.assertEquals(Math.round(3.0d), 3l);
822 Assert.assertEquals(Math.round(-2.0d), -2l);
823 Assert.assertEquals(Math.round(-2.1d), -2l);
824 Assert.assertEquals(Math.round(-2.5d), -2l);
825 Assert.assertEquals(Math.round(-2.9d), -3l);
826 Assert.assertEquals(Math.round(-3.0d), -3l);
827 Assert.assertEquals(Math.round(0.49999999999999994d), 0l);
828 Assert.assertEquals(Math.round(4503599627370495.0d), 4503599627370495l); // 2^52 - 1
829 Assert.assertEquals(Math.round(4503599627370495.5d), 4503599627370496l); // 2^52 - 0.5
830 Assert.assertEquals(Math.round(4503599627370496.0d), 4503599627370496l); // 2^52
831 Assert.assertEquals(Math.round(-4503599627370495.0d), -4503599627370495l); // -(2^52 - 1)
832 Assert.assertEquals(Math.round(-4503599627370495.5d), -4503599627370495l); // -(2^52 - 0.5)
833 Assert.assertEquals(Math.round(-4503599627370496.0d), -4503599627370496l); // -2^52
834 Assert.assertEquals(Math.round(9007199254740991.0d), 9007199254740991l); // 2^53 - 1
835 Assert.assertEquals(Math.round(-9007199254740991.0d), -9007199254740991l); // -(2^53 - 1)
836 Assert.assertEquals(Math.round(Double.NaN), (long)+0.0d);
837 Assert.assertEquals(Math.round(Long.MAX_VALUE + 1.0d), Long.MAX_VALUE);
838 Assert.assertEquals(Math.round(Long.MIN_VALUE - 1.0d), Long.MIN_VALUE);
839 Assert.assertEquals(Math.round(Double.longBitsToDouble(0x43F0000000000000l)),
841 Assert.assertEquals(Math.round(Double.longBitsToDouble(0xC3F0000000000000l)),
843 Assert.assertEquals(Math.round(Double.POSITIVE_INFINITY), Long.MAX_VALUE);
844 Assert.assertEquals(Math.round(Double.NEGATIVE_INFINITY), Long.MIN_VALUE);
848 Math.round(2.1f);
849 Assert.assertEquals(Math.round(+0.0f), (int)+0.0);
850 Assert.assertEquals(Math.round(-0.0f), (int)+0.0);
851 Assert.assertEquals(Math.round(2.0f), 2);
852 Assert.assertEquals(Math.round(2.1f), 2);
853 Assert.assertEquals(Math.round(2.5f), 3);
854 Assert.assertEquals(Math.round(2.9f), 3);
855 Assert.assertEquals(Math.round(3.0f), 3);
856 Assert.assertEquals(Math.round(-2.0f), -2);
857 Assert.assertEquals(Math.round(-2.1f), -2);
858 Assert.assertEquals(Math.round(-2.5f), -2);
859 Assert.assertEquals(Math.round(-2.9f), -3);
860 Assert.assertEquals(Math.round(-3.0f), -3);
862 Assert.assertEquals(Math.round(Float.intBitsToFloat(0x3EFFFFFF)), (int)+0.0f);
863 Assert.assertEquals(Math.round(8388607.0f), 8388607); // 2^23 - 1
864 Assert.assertEquals(Math.round(8388607.5f), 8388608); // 2^23 - 0.5
865 Assert.assertEquals(Math.round(8388608.0f), 8388608); // 2^23
866 Assert.assertEquals(Math.round(-8388607.0f), -8388607); // -(2^23 - 1)
867 Assert.assertEquals(Math.round(-8388607.5f), -8388607); // -(2^23 - 0.5)
868 Assert.assertEquals(Math.round(-8388608.0f), -8388608); // -2^23
869 Assert.assertEquals(Math.round(16777215.0f), 16777215); // 2^24 - 1
870 Assert.assertEquals(Math.round(16777216.0f), 16777216); // 2^24
871 Assert.assertEquals(Math.round(-16777215.0f), -16777215); // -(2^24 - 1)
872 Assert.assertEquals(Math.round(-16777216.0f), -16777216); // -2^24
873 Assert.assertEquals(Math.round(Float.NaN), (int)+0.0f);
874 Assert.assertEquals(Math.round(Integer.MAX_VALUE + 1.0f), Integer.MAX_VALUE);
875 Assert.assertEquals(Math.round(Integer.MIN_VALUE - 1.0f), Integer.MIN_VALUE);
876 Assert.assertEquals(Math.round(Float.intBitsToFloat(0x4F800000)),
878 Assert.assertEquals(Math.round(Float.intBitsToFloat(0xCF800000)),
880 Assert.assertEquals(Math.round(Float.POSITIVE_INFINITY), Integer.MAX_VALUE);
881 Assert.assertEquals(Math.round(Float.NEGATIVE_INFINITY), Integer.MIN_VALUE);
1197 StrictMath.round(2.1d);
1198 Assert.assertEquals(StrictMath.round(+0.0d), (long)+0.0);
1199 Assert.assertEquals(StrictMath.round(-0.0d), (long)+0.0);
1200 Assert.assertEquals(StrictMath.round(2.0d), 2l);
1201 Assert.assertEquals(StrictMath.round(2.1d), 2l);
1202 Assert.assertEquals(StrictMath.round(2.5d), 3l);
1203 Assert.assertEquals(StrictMath.round(2.9d), 3l);
1204 Assert.assertEquals(StrictMath.round(3.0d), 3l);
1205 Assert.assertEquals(StrictMath.round(-2.0d), -2l);
1206 Assert.assertEquals(StrictMath.round(-2.1d), -2l);
1207 Assert.assertEquals(StrictMath.round(-2.5d), -2l);
1208 Assert.assertEquals(StrictMath.round(-2.9d), -3l);
1209 Assert.assertEquals(StrictMath.round(-3.0d), -3l);
1210 Assert.assertEquals(StrictMath.round(0.49999999999999994d), 0l);
1211 Assert.assertEquals(StrictMath.round(4503599627370495.0d), 4503599627370495l); // 2^52 - 1
1212 Assert.assertEquals(StrictMath.round(4503599627370495.5d), 4503599627370496l); // 2^52 - 0.5
1213 Assert.assertEquals(StrictMath.round(4503599627370496.0d), 4503599627370496l); // 2^52
1214 Assert.assertEquals(StrictMath.round(-4503599627370495.0d), -4503599627370495l); // -(2^52 - 1)
1215 … Assert.assertEquals(StrictMath.round(-4503599627370495.5d), -4503599627370495l); // -(2^52 - 0.5)
1216 Assert.assertEquals(StrictMath.round(-4503599627370496.0d), -4503599627370496l); // -2^52
1217 Assert.assertEquals(StrictMath.round(9007199254740991.0d), 9007199254740991l); // 2^53 - 1
1218 Assert.assertEquals(StrictMath.round(-9007199254740991.0d), -9007199254740991l); // -(2^53 - 1)
1219 Assert.assertEquals(StrictMath.round(Double.NaN), (long)+0.0d);
1220 Assert.assertEquals(StrictMath.round(Long.MAX_VALUE + 1.0d), Long.MAX_VALUE);
1221 Assert.assertEquals(StrictMath.round(Long.MIN_VALUE - 1.0d), Long.MIN_VALUE);
1222 Assert.assertEquals(StrictMath.round(Double.longBitsToDouble(0x43F0000000000000l)),
1224 Assert.assertEquals(StrictMath.round(Double.longBitsToDouble(0xC3F0000000000000l)),
1226 Assert.assertEquals(StrictMath.round(Double.POSITIVE_INFINITY), Long.MAX_VALUE);
1227 Assert.assertEquals(StrictMath.round(Double.NEGATIVE_INFINITY), Long.MIN_VALUE);
1231 StrictMath.round(2.1f);
1232 Assert.assertEquals(StrictMath.round(+0.0f), (int)+0.0);
1233 Assert.assertEquals(StrictMath.round(-0.0f), (int)+0.0);
1234 Assert.assertEquals(StrictMath.round(2.0f), 2);
1235 Assert.assertEquals(StrictMath.round(2.1f), 2);
1236 Assert.assertEquals(StrictMath.round(2.5f), 3);
1237 Assert.assertEquals(StrictMath.round(2.9f), 3);
1238 Assert.assertEquals(StrictMath.round(3.0f), 3);
1239 Assert.assertEquals(StrictMath.round(-2.0f), -2);
1240 Assert.assertEquals(StrictMath.round(-2.1f), -2);
1241 Assert.assertEquals(StrictMath.round(-2.5f), -2);
1242 Assert.assertEquals(StrictMath.round(-2.9f), -3);
1243 Assert.assertEquals(StrictMath.round(-3.0f), -3);
1245 Assert.assertEquals(StrictMath.round(Float.intBitsToFloat(0x3EFFFFFF)), (int)+0.0f);
1246 Assert.assertEquals(StrictMath.round(8388607.0f), 8388607); // 2^23 - 1
1247 Assert.assertEquals(StrictMath.round(8388607.5f), 8388608); // 2^23 - 0.5
1248 Assert.assertEquals(StrictMath.round(8388608.0f), 8388608); // 2^23
1249 Assert.assertEquals(StrictMath.round(-8388607.0f), -8388607); // -(2^23 - 1)
1250 Assert.assertEquals(StrictMath.round(-8388607.5f), -8388607); // -(2^23 - 0.5)
1251 Assert.assertEquals(StrictMath.round(-8388608.0f), -8388608); // -2^23
1252 Assert.assertEquals(StrictMath.round(16777215.0f), 16777215); // 2^24 - 1
1253 Assert.assertEquals(StrictMath.round(16777216.0f), 16777216); // 2^24
1254 Assert.assertEquals(StrictMath.round(-16777215.0f), -16777215); // -(2^24 - 1)
1255 Assert.assertEquals(StrictMath.round(-16777216.0f), -16777216); // -2^24
1256 Assert.assertEquals(StrictMath.round(Float.NaN), (int)+0.0f);
1257 Assert.assertEquals(StrictMath.round(Integer.MAX_VALUE + 1.0f), Integer.MAX_VALUE);
1258 Assert.assertEquals(StrictMath.round(Integer.MIN_VALUE - 1.0f), Integer.MIN_VALUE);
1259 Assert.assertEquals(StrictMath.round(Float.intBitsToFloat(0x4F800000)),
1261 Assert.assertEquals(StrictMath.round(Float.intBitsToFloat(0xCF800000)),
1263 Assert.assertEquals(StrictMath.round(Float.POSITIVE_INFINITY), Integer.MAX_VALUE);
1264 Assert.assertEquals(StrictMath.round(Float.NEGATIVE_INFINITY), Integer.MIN_VALUE);