Class RoundTest
java.lang.Object
com.singularsys.jeptests.unit.functions.RoundTest
Test rounding using various functions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidproblemsTest(Round roundPFMC) Test for the problematic value 265.335.voidroundingTest(Round roundPFMC) Tests using the Math.round convention tie-breaks round to +ve infinity Since Jep 4.1 includes test forround(100000,-5)which used to give99999.99999999999.voidroundingTestHalfEven(Round roundPFMC) tie-breaks round to even valuevoidvoidtestRint()voidvoidvoid
-
Constructor Details
-
RoundTest
public RoundTest()
-
-
Method Details
-
roundingTest
Tests using the Math.round convention tie-breaks round to +ve infinity Since Jep 4.1 includes test forround(100000,-5)which used to give99999.99999999999.- Parameters:
roundPFMC-
-
roundingTestHalfEven
tie-breaks round to even value- Parameters:
roundPFMC-
-
problemsTest
Test for the problematic value 265.335. Multiplying by 100 gives 26533.499999999996 which rounds down.- Parameters:
roundPFMC-
-
testRounding
@Test public void testRounding() -
testRoundBD
@Test public void testRoundBD() -
testBDRound
@Test public void testBDRound() -
testRoundBDhalfEven
@Test public void testRoundBDhalfEven() -
testRint
@Test public void testRint()
-