public void test_keyBuilder_successor_float_nearZero() throws NoSuccessorException {
  assertZeroUlps(4.2038954e-045f,SuccessorUtil.successor(2.8025969e-045f));
  assertZeroUlps(2.8025969e-045f,SuccessorUtil.successor(1.4012985e-045f));
  assertZeroUlps(1.4012985e-045f,SuccessorUtil.successor(+0.00000000f));
  assertTrue(-0.00000000f == Float.intBitsToFloat(0x80000000));
  assertEquals(Float.intBitsToFloat(0x00000000),SuccessorUtil.successor(Float.intBitsToFloat(0x80000000)));
  assertZeroUlps(+0.00000000f,SuccessorUtil.successor(-0.00000000f));
  assertZeroUlps(-0.00000000f,SuccessorUtil.successor(-1.4012985e-045f));
  assertZeroUlps(-0.00000000f,SuccessorUtil.successor(-1.4012985e-045f));
  assertZeroUlps(-1.4012985e-045f,SuccessorUtil.successor(-2.8025969e-045f));
}

public void test_keyBuilder_successor_float_nearZero ( ) throws NoSuccessorException { assertZeroUlps ( 4.2038954e-045f , SuccessorUtil . successor ( 2.8025969e-045f ) ) ; assertZeroUlps ( 2.8025969e-045f , SuccessorUtil . successor ( 1.4012985e-045f ) ) ; assertZeroUlps ( 1.4012985e-045f , SuccessorUtil . successor ( + 0.00000000f ) ) ; assertTrue ( - 0.00000000f == Float . intBitsToFloat ( 0x80000000 ) ) ; assertEquals ( Float . intBitsToFloat ( 0x00000000 ) , SuccessorUtil . successor ( Float . intBitsToFloat ( 0x80000000 ) ) ) ; assertZeroUlps ( + 0.00000000f , SuccessorUtil . successor ( - 0.00000000f ) ) ; assertZeroUlps ( - 0.00000000f , SuccessorUtil . successor ( - 1.4012985e-045f ) ) ; assertZeroUlps ( - 0.00000000f , SuccessorUtil . successor ( - 1.4012985e-045f ) ) ; assertZeroUlps ( - 1.4012985e-045f , SuccessorUtil . successor ( - 2.8025969e-045f ) ) ; }
verifies that the successor function imposes the correct ordering as we approach and cross zero from the positive region of the value space into the negative region of the value space . note that the value set includes not only the finite nonzero values , nan values , and positive infinity , and negative infinity , but also positive zero and negative zero , which java hides from you most of the time since positive zero and negative zero compare as equals ( for java ) . < p > note : the data points used in this test are verified by the previous test . < p >
