### Question:
OpBehaviorFloatDiv extends BinaryOpBehavior { @Override public long evaluateBinary(int sizeout, int sizein, long in1, long in2) { FloatFormat format = FloatFormatFactory.getFloatFormat(sizein); return format.opDiv(in1, in2); } OpBehaviorFloatDiv(); @Override long evaluateBinary(int sizeout, int sizein, long in1, long in2); @Override BigInteger evaluateBinary(int sizeout, int sizein, BigInteger in1, BigInteger in2);  }### Answer:
@Test public void testEvaluateBinaryLong() { OpBehaviorFloatDiv op = new OpBehaviorFloatDiv(); FloatFormat ff = FloatFormatFactory.getFloatFormat(8); long a = ff.getEncoding(3.75); long b = ff.getEncoding(1.5); long result = ff.opDiv(a, b); Assert.assertEquals(2.5, ff.getHostFloat(result), 0); b = ff.getEncoding(0); result = op.evaluateBinary(8, 8, a, b); Assert.assertEquals(Double.POSITIVE_INFINITY, ff.getHostFloat(result), 0); a = ff.getEncoding(-3.75); result = op.evaluateBinary(8, 8, a, b); Assert.assertEquals(Double.NEGATIVE_INFINITY, ff.getHostFloat(result), 0); b = ff.getEncoding(Double.NaN); result = op.evaluateBinary(8, 8, a, b); Assert.assertEquals(Double.NaN, ff.getHostFloat(result), 0); }
@Test public void testEvaluateBinaryBigInteger() { OpBehaviorFloatDiv op = new OpBehaviorFloatDiv(); FloatFormat ff = FloatFormatFactory.getFloatFormat(8); BigInteger a = ff.getEncoding(BigDecimal.valueOf(3.75d)); BigInteger b = ff.getEncoding(BigDecimal.valueOf(1.5d)); BigInteger result = op.evaluateBinary(8, 8, a, b); Assert.assertEquals(BigDecimal.valueOf(2.5d), ff.getHostFloat(result)); b = ff.getEncoding(BigDecimal.ZERO); result = op.evaluateBinary(8, 8, a, b); Assert.assertEquals(FloatFormat.BIG_POSITIVE_INFINITY, ff.getHostFloat(result)); a = ff.getEncoding(BigDecimal.valueOf(-3.75d)); result = op.evaluateBinary(8, 8, a, b); Assert.assertEquals(FloatFormat.BIG_NEGATIVE_INFINITY, ff.getHostFloat(result)); b = ff.getEncoding(FloatFormat.BIG_NaN); result = op.evaluateBinary(8, 8, a, b); Assert.assertEquals(FloatFormat.BIG_NaN, ff.getHostFloat(result)); }