use of ch.obermuhlner.math.big.BigFloat.Context in project big-math by eobermuhlner.
the class BigFloatTest method testAcot.
@Test
public void testAcot() {
Context context = context(MathContext.DECIMAL32);
assertEquals(acot(context.valueOf(0)).toBigDecimal(), BigDecimalMath.acot(BigDecimal.valueOf(0), MathContext.DECIMAL32));
}
use of ch.obermuhlner.math.big.BigFloat.Context in project big-math by eobermuhlner.
the class BigFloatTest method testAbs.
@Test
public void testAbs() {
Context context = context(MathContext.DECIMAL32);
assertEquals(context.valueOf(3), abs(context.valueOf(3)));
assertEquals(context.valueOf(3), abs(context.valueOf(-3)));
}
use of ch.obermuhlner.math.big.BigFloat.Context in project big-math by eobermuhlner.
the class BigFloatTest method testAcosh.
@Test
public void testAcosh() {
Context context = context(MathContext.DECIMAL32);
assertEquals(acosh(context.valueOf(1.1)).toBigDecimal(), BigDecimalMath.acosh(BigDecimal.valueOf(1.1), MathContext.DECIMAL32));
}
use of ch.obermuhlner.math.big.BigFloat.Context in project big-math by eobermuhlner.
the class BigFloatTest method testIsLessThan.
@Test
public void testIsLessThan() {
Context context = context(MathContext.DECIMAL32);
assertEquals(true, context.valueOf(1).isLessThan(context.valueOf(5)));
assertEquals(false, context.valueOf(5).isLessThan(context.valueOf(1)));
assertEquals(false, context.valueOf(5).isLessThan(context.valueOf(5)));
}
use of ch.obermuhlner.math.big.BigFloat.Context in project big-math by eobermuhlner.
the class BigFloatTest method testIsIntValue.
@Test
public void testIsIntValue() {
Context context = context(MathContext.DECIMAL32);
assertEquals(true, context.valueOf(0).isIntValue());
assertEquals(true, context.valueOf(123).isIntValue());
assertEquals(false, context.valueOf(123E99).isIntValue());
assertEquals(false, context.valueOf(123.456).isIntValue());
assertEquals(false, context.valueOf(0.456).isIntValue());
}
Aggregations