use of ch.obermuhlner.math.big.BigFloat.Context in project big-math by eobermuhlner.
the class BigFloatStreamTest method testRangeParallel.
@Test
public void testRangeParallel() {
Context context = BigFloat.context(20);
List<BigFloat> list = BigFloatStream.range(context.valueOf(0), context.valueOf(10), context.valueOf(1)).parallel().collect(Collectors.toList());
assertList(list, 0, 10);
}
use of ch.obermuhlner.math.big.BigFloat.Context in project big-math by eobermuhlner.
the class BigFloatStreamTest method testRangeClosedStep1.
@Test
public void testRangeClosedStep1() {
Context context = BigFloat.context(20);
List<BigFloat> list = BigFloatStream.rangeClosed(context.valueOf(0), context.valueOf(10), context.valueOf(1)).collect(Collectors.toList());
assertListClosed(list, 0, 10);
}
use of ch.obermuhlner.math.big.BigFloat.Context in project big-math by eobermuhlner.
the class BigFloatStreamTest method testRangeClosedLongStep3.
@Test
public void testRangeClosedLongStep3() {
Context context = BigFloat.context(20);
List<BigFloat> list = BigFloatStream.rangeClosed(0, 12, 3, context).collect(Collectors.toList());
assertEquals(5, list.size());
assertEquals(true, list.contains(context.valueOf(0)));
assertEquals(true, list.contains(context.valueOf(3)));
assertEquals(true, list.contains(context.valueOf(6)));
assertEquals(true, list.contains(context.valueOf(9)));
assertEquals(true, list.contains(context.valueOf(12)));
}
Aggregations