use of org.sosy_lab.common.rationals.ExtendedRational in project java-common-lib by sosy-lab.
the class ExtendedRationalTest method testOfStringNegInfty.
@Test
public void testOfStringNegInfty() {
ExtendedRational a = ExtendedRational.ofString("-Infinity");
assertThat(a).isEqualTo(ExtendedRational.NEG_INFTY);
}
use of org.sosy_lab.common.rationals.ExtendedRational in project java-common-lib by sosy-lab.
the class ExtendedRationalTest method testSubtraction.
@Test
public void testSubtraction() {
ExtendedRational a = ExtendedRational.ofString("5/2");
ExtendedRational b = ExtendedRational.ofString("3/2");
assertThat(a.minus(b)).isEqualTo(new ExtendedRational(Rational.ofLong(1)));
}
use of org.sosy_lab.common.rationals.ExtendedRational in project java-common-lib by sosy-lab.
the class ExtendedRationalTest method testAdditionInfinities.
@Test
public void testAdditionInfinities() {
ExtendedRational a = ExtendedRational.INFTY;
ExtendedRational b = ExtendedRational.NEG_INFTY;
assertThat(a.plus(b)).isEqualTo(ExtendedRational.NaN);
}
Aggregations