public void testZero() {
   final PossibilityArithmetic arith = arithmetic();
   final double zero = arith.zero();
   assertEquals(0.0, arith.poss2Prob(zero));
   assertEquals(Double.NEGATIVE_INFINITY, arith.poss2Ln(zero));
   assertTrue(arith.isValidPoss(zero));
   assertEquals(zero, arith.prob2Poss(0.0));
   assertEquals(zero, arith.ln2Poss(Double.NEGATIVE_INFINITY));
 }
 public void testGt() {
   final PossibilityArithmetic arith = arithmetic();
   assertTrue(arith.gt(arith.one(), arith.zero()));
   assertFalse(arith.gt(arith.zero(), arith.one()));
   checkGt(arith, 0.4, 0.5);
   checkGt(arith, 0.50, 0.5142);
   checkGt(arith, 0.51, 0.5142);
   checkGt(arith, 0.514, 0.5142);
   checkGt(arith, 0.5142, 0.5142);
   checkGt(arith, 0.1, 0.0);
   checkGt(arith, 0.01, 0.0);
   checkGt(arith, 0.001, 0.0);
   checkGt(arith, 0.0001, 0.0);
   checkGt(arith, 0.00001, 0.0);
   checkGt(arith, 0.000001, 0.0);
   checkGt(arith, 1.0, 0.9);
   checkGt(arith, 1.0, 0.99);
   checkGt(arith, 1.0, 0.999);
   checkGt(arith, 1.0, 0.9999);
   checkGt(arith, 1.0, 0.99999);
 }
 public void testIsZero() {
   final PossibilityArithmetic arith = arithmetic();
   assertTrue(arith.isZero(arith.zero()));
   assertFalse(arith.isZero(arith.one()));
 }
 public void testUnderflow() {
   final PossibilityArithmetic arith = arithmetic();
   assertTrue(arith.underflow(arith.zero()));
   assertFalse(arith.underflow(arith.one()));
 }