@Test public void testRangeLongStep3() { Context context = BigFloat.context(20); List<BigFloat> list = BigFloatStream.range(0, 10, 3, context) .collect(Collectors.toList()); assertEquals(4, 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))); }
public static Stream<BigFloat> range(BigFloat startInclusive, BigFloat endExclusive, BigFloat step) { if (step.isZero()) { throw new IllegalArgumentException("invalid step: 0"); } if (endExclusive.subtract(startInclusive).signum() != step.signum()) { return Stream.empty(); } return StreamSupport.stream(new BigFloatSpliterator(startInclusive, endExclusive, false, step), false); }
BigFloatStream { public static Stream<BigFloat> range(BigFloat startInclusive, BigFloat endExclusive, BigFloat step) { if (step.isZero()) { throw new IllegalArgumentException("invalid step: 0"); } if (endExclusive.subtract(startInclusive).signum() != step.signum()) { return Stream.empty(); } return StreamSupport.stream(new BigFloatSpliterator(startInclusive, endExclusive, false, step), false); } }
BigFloatStream { public static Stream<BigFloat> range(BigFloat startInclusive, BigFloat endExclusive, BigFloat step) { if (step.isZero()) { throw new IllegalArgumentException("invalid step: 0"); } if (endExclusive.subtract(startInclusive).signum() != step.signum()) { return Stream.empty(); } return StreamSupport.stream(new BigFloatSpliterator(startInclusive, endExclusive, false, step), false); }  }
BigFloatStream { public static Stream<BigFloat> range(BigFloat startInclusive, BigFloat endExclusive, BigFloat step) { if (step.isZero()) { throw new IllegalArgumentException("invalid step: 0"); } if (endExclusive.subtract(startInclusive).signum() != step.signum()) { return Stream.empty(); } return StreamSupport.stream(new BigFloatSpliterator(startInclusive, endExclusive, false, step), false); }  static Stream<BigFloat> range(BigFloat startInclusive, BigFloat endExclusive, BigFloat step); static Stream<BigFloat> range(long startInclusive, long endExclusive, long step, Context context); static Stream<BigFloat> range(double startInclusive, double endExclusive, double step, Context context); static Stream<BigFloat> rangeClosed(BigFloat startInclusive, BigFloat endInclusive, BigFloat step); static Stream<BigFloat> rangeClosed(long startInclusive, long endInclusive, long step, Context context); static Stream<BigFloat> rangeClosed(double startInclusive, double endInclusive, double step, Context context); }
BigFloatStream { public static Stream<BigFloat> range(BigFloat startInclusive, BigFloat endExclusive, BigFloat step) { if (step.isZero()) { throw new IllegalArgumentException("invalid step: 0"); } if (endExclusive.subtract(startInclusive).signum() != step.signum()) { return Stream.empty(); } return StreamSupport.stream(new BigFloatSpliterator(startInclusive, endExclusive, false, step), false); }  static Stream<BigFloat> range(BigFloat startInclusive, BigFloat endExclusive, BigFloat step); static Stream<BigFloat> range(long startInclusive, long endExclusive, long step, Context context); static Stream<BigFloat> range(double startInclusive, double endExclusive, double step, Context context); static Stream<BigFloat> rangeClosed(BigFloat startInclusive, BigFloat endInclusive, BigFloat step); static Stream<BigFloat> rangeClosed(long startInclusive, long endInclusive, long step, Context context); static Stream<BigFloat> rangeClosed(double startInclusive, double endInclusive, double step, Context context);  }