Lines Matching refs:round
809 Math.round(2.1d);
810 Assert.assertEquals(Math.round(+0.0d), (long)+0.0);
811 Assert.assertEquals(Math.round(-0.0d), (long)+0.0);
812 Assert.assertEquals(Math.round(2.0d), 2l);
813 Assert.assertEquals(Math.round(2.1d), 2l);
814 Assert.assertEquals(Math.round(2.5d), 3l);
815 Assert.assertEquals(Math.round(2.9d), 3l);
816 Assert.assertEquals(Math.round(3.0d), 3l);
817 Assert.assertEquals(Math.round(-2.0d), -2l);
818 Assert.assertEquals(Math.round(-2.1d), -2l);
819 Assert.assertEquals(Math.round(-2.5d), -2l);
820 Assert.assertEquals(Math.round(-2.9d), -3l);
821 Assert.assertEquals(Math.round(-3.0d), -3l);
822 Assert.assertEquals(Math.round(0.49999999999999994d), 0l);
823 Assert.assertEquals(Math.round(4503599627370495.0d), 4503599627370495l); // 2^52 - 1
824 Assert.assertEquals(Math.round(4503599627370495.5d), 4503599627370496l); // 2^52 - 0.5
825 Assert.assertEquals(Math.round(4503599627370496.0d), 4503599627370496l); // 2^52
826 Assert.assertEquals(Math.round(-4503599627370495.0d), -4503599627370495l); // -(2^52 - 1)
827 Assert.assertEquals(Math.round(-4503599627370495.5d), -4503599627370495l); // -(2^52 - 0.5)
828 Assert.assertEquals(Math.round(-4503599627370496.0d), -4503599627370496l); // -2^52
829 Assert.assertEquals(Math.round(9007199254740991.0d), 9007199254740991l); // 2^53 - 1
830 Assert.assertEquals(Math.round(-9007199254740991.0d), -9007199254740991l); // -(2^53 - 1)
831 Assert.assertEquals(Math.round(Double.NaN), (long)+0.0d);
832 Assert.assertEquals(Math.round(Long.MAX_VALUE + 1.0d), Long.MAX_VALUE);
833 Assert.assertEquals(Math.round(Long.MIN_VALUE - 1.0d), Long.MIN_VALUE);
834 Assert.assertEquals(Math.round(Double.longBitsToDouble(0x43F0000000000000l)),
836 Assert.assertEquals(Math.round(Double.longBitsToDouble(0xC3F0000000000000l)),
838 Assert.assertEquals(Math.round(Double.POSITIVE_INFINITY), Long.MAX_VALUE);
839 Assert.assertEquals(Math.round(Double.NEGATIVE_INFINITY), Long.MIN_VALUE);
843 Math.round(2.1f);
844 Assert.assertEquals(Math.round(+0.0f), (int)+0.0);
845 Assert.assertEquals(Math.round(-0.0f), (int)+0.0);
846 Assert.assertEquals(Math.round(2.0f), 2);
847 Assert.assertEquals(Math.round(2.1f), 2);
848 Assert.assertEquals(Math.round(2.5f), 3);
849 Assert.assertEquals(Math.round(2.9f), 3);
850 Assert.assertEquals(Math.round(3.0f), 3);
851 Assert.assertEquals(Math.round(-2.0f), -2);
852 Assert.assertEquals(Math.round(-2.1f), -2);
853 Assert.assertEquals(Math.round(-2.5f), -2);
854 Assert.assertEquals(Math.round(-2.9f), -3);
855 Assert.assertEquals(Math.round(-3.0f), -3);
857 Assert.assertEquals(Math.round(Float.intBitsToFloat(0x3EFFFFFF)), (int)+0.0f);
858 Assert.assertEquals(Math.round(8388607.0f), 8388607); // 2^23 - 1
859 Assert.assertEquals(Math.round(8388607.5f), 8388608); // 2^23 - 0.5
860 Assert.assertEquals(Math.round(8388608.0f), 8388608); // 2^23
861 Assert.assertEquals(Math.round(-8388607.0f), -8388607); // -(2^23 - 1)
862 Assert.assertEquals(Math.round(-8388607.5f), -8388607); // -(2^23 - 0.5)
863 Assert.assertEquals(Math.round(-8388608.0f), -8388608); // -2^23
864 Assert.assertEquals(Math.round(16777215.0f), 16777215); // 2^24 - 1
865 Assert.assertEquals(Math.round(16777216.0f), 16777216); // 2^24
866 Assert.assertEquals(Math.round(-16777215.0f), -16777215); // -(2^24 - 1)
867 Assert.assertEquals(Math.round(-16777216.0f), -16777216); // -2^24
868 Assert.assertEquals(Math.round(Float.NaN), (int)+0.0f);
869 Assert.assertEquals(Math.round(Integer.MAX_VALUE + 1.0f), Integer.MAX_VALUE);
870 Assert.assertEquals(Math.round(Integer.MIN_VALUE - 1.0f), Integer.MIN_VALUE);
871 Assert.assertEquals(Math.round(Float.intBitsToFloat(0x4F800000)),
873 Assert.assertEquals(Math.round(Float.intBitsToFloat(0xCF800000)),
875 Assert.assertEquals(Math.round(Float.POSITIVE_INFINITY), Integer.MAX_VALUE);
876 Assert.assertEquals(Math.round(Float.NEGATIVE_INFINITY), Integer.MIN_VALUE);
1168 StrictMath.round(2.1d);
1169 Assert.assertEquals(StrictMath.round(+0.0d), (long)+0.0);
1170 Assert.assertEquals(StrictMath.round(-0.0d), (long)+0.0);
1171 Assert.assertEquals(StrictMath.round(2.0d), 2l);
1172 Assert.assertEquals(StrictMath.round(2.1d), 2l);
1173 Assert.assertEquals(StrictMath.round(2.5d), 3l);
1174 Assert.assertEquals(StrictMath.round(2.9d), 3l);
1175 Assert.assertEquals(StrictMath.round(3.0d), 3l);
1176 Assert.assertEquals(StrictMath.round(-2.0d), -2l);
1177 Assert.assertEquals(StrictMath.round(-2.1d), -2l);
1178 Assert.assertEquals(StrictMath.round(-2.5d), -2l);
1179 Assert.assertEquals(StrictMath.round(-2.9d), -3l);
1180 Assert.assertEquals(StrictMath.round(-3.0d), -3l);
1181 Assert.assertEquals(StrictMath.round(0.49999999999999994d), 0l);
1182 Assert.assertEquals(StrictMath.round(4503599627370495.0d), 4503599627370495l); // 2^52 - 1
1183 Assert.assertEquals(StrictMath.round(4503599627370495.5d), 4503599627370496l); // 2^52 - 0.5
1184 Assert.assertEquals(StrictMath.round(4503599627370496.0d), 4503599627370496l); // 2^52
1185 Assert.assertEquals(StrictMath.round(-4503599627370495.0d), -4503599627370495l); // -(2^52 - 1)
1186 … Assert.assertEquals(StrictMath.round(-4503599627370495.5d), -4503599627370495l); // -(2^52 - 0.5)
1187 Assert.assertEquals(StrictMath.round(-4503599627370496.0d), -4503599627370496l); // -2^52
1188 Assert.assertEquals(StrictMath.round(9007199254740991.0d), 9007199254740991l); // 2^53 - 1
1189 Assert.assertEquals(StrictMath.round(-9007199254740991.0d), -9007199254740991l); // -(2^53 - 1)
1190 Assert.assertEquals(StrictMath.round(Double.NaN), (long)+0.0d);
1191 Assert.assertEquals(StrictMath.round(Long.MAX_VALUE + 1.0d), Long.MAX_VALUE);
1192 Assert.assertEquals(StrictMath.round(Long.MIN_VALUE - 1.0d), Long.MIN_VALUE);
1193 Assert.assertEquals(StrictMath.round(Double.longBitsToDouble(0x43F0000000000000l)),
1195 Assert.assertEquals(StrictMath.round(Double.longBitsToDouble(0xC3F0000000000000l)),
1197 Assert.assertEquals(StrictMath.round(Double.POSITIVE_INFINITY), Long.MAX_VALUE);
1198 Assert.assertEquals(StrictMath.round(Double.NEGATIVE_INFINITY), Long.MIN_VALUE);
1202 StrictMath.round(2.1f);
1203 Assert.assertEquals(StrictMath.round(+0.0f), (int)+0.0);
1204 Assert.assertEquals(StrictMath.round(-0.0f), (int)+0.0);
1205 Assert.assertEquals(StrictMath.round(2.0f), 2);
1206 Assert.assertEquals(StrictMath.round(2.1f), 2);
1207 Assert.assertEquals(StrictMath.round(2.5f), 3);
1208 Assert.assertEquals(StrictMath.round(2.9f), 3);
1209 Assert.assertEquals(StrictMath.round(3.0f), 3);
1210 Assert.assertEquals(StrictMath.round(-2.0f), -2);
1211 Assert.assertEquals(StrictMath.round(-2.1f), -2);
1212 Assert.assertEquals(StrictMath.round(-2.5f), -2);
1213 Assert.assertEquals(StrictMath.round(-2.9f), -3);
1214 Assert.assertEquals(StrictMath.round(-3.0f), -3);
1216 Assert.assertEquals(StrictMath.round(Float.intBitsToFloat(0x3EFFFFFF)), (int)+0.0f);
1217 Assert.assertEquals(StrictMath.round(8388607.0f), 8388607); // 2^23 - 1
1218 Assert.assertEquals(StrictMath.round(8388607.5f), 8388608); // 2^23 - 0.5
1219 Assert.assertEquals(StrictMath.round(8388608.0f), 8388608); // 2^23
1220 Assert.assertEquals(StrictMath.round(-8388607.0f), -8388607); // -(2^23 - 1)
1221 Assert.assertEquals(StrictMath.round(-8388607.5f), -8388607); // -(2^23 - 0.5)
1222 Assert.assertEquals(StrictMath.round(-8388608.0f), -8388608); // -2^23
1223 Assert.assertEquals(StrictMath.round(16777215.0f), 16777215); // 2^24 - 1
1224 Assert.assertEquals(StrictMath.round(16777216.0f), 16777216); // 2^24
1225 Assert.assertEquals(StrictMath.round(-16777215.0f), -16777215); // -(2^24 - 1)
1226 Assert.assertEquals(StrictMath.round(-16777216.0f), -16777216); // -2^24
1227 Assert.assertEquals(StrictMath.round(Float.NaN), (int)+0.0f);
1228 Assert.assertEquals(StrictMath.round(Integer.MAX_VALUE + 1.0f), Integer.MAX_VALUE);
1229 Assert.assertEquals(StrictMath.round(Integer.MIN_VALUE - 1.0f), Integer.MIN_VALUE);
1230 Assert.assertEquals(StrictMath.round(Float.intBitsToFloat(0x4F800000)),
1232 Assert.assertEquals(StrictMath.round(Float.intBitsToFloat(0xCF800000)),
1234 Assert.assertEquals(StrictMath.round(Float.POSITIVE_INFINITY), Integer.MAX_VALUE);
1235 Assert.assertEquals(StrictMath.round(Float.NEGATIVE_INFINITY), Integer.MIN_VALUE);