public static double round( double f, int places ) {
    return round( f, places, java.math.BigDecimal.ROUND_HALF_EVEN );
  }
@Test
  public void testRound() {
    assertEquals( 1.0, Const.round( 1.0, 0, BigDecimal.ROUND_UP ) );
    assertEquals( 1.0, Const.round( 1.0, 0, BigDecimal.ROUND_DOWN ) );
    assertEquals( 1.0, Const.round( 1.0, 0, BigDecimal.ROUND_CEILING ) );
    assertEquals( 1.0, Const.round( 1.0, 0, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 1.0, Const.round( 1.0, 0, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 1.0, Const.round( 1.0, 0, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 1.0, Const.round( 1.0, 0, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 1.0, Const.round( 1.0, 0, Const.ROUND_HALF_CEILING ) );

    assertEquals( 2.0, Const.round( 1.2, 0, BigDecimal.ROUND_UP ) );
    assertEquals( 1.0, Const.round( 1.2, 0, BigDecimal.ROUND_DOWN ) );
    assertEquals( 2.0, Const.round( 1.2, 0, BigDecimal.ROUND_CEILING ) );
    assertEquals( 1.0, Const.round( 1.2, 0, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 1.0, Const.round( 1.2, 0, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 1.0, Const.round( 1.2, 0, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 1.0, Const.round( 1.2, 0, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 1.0, Const.round( 1.2, 0, Const.ROUND_HALF_CEILING ) );

    assertEquals( 2.0, Const.round( 1.5, 0, BigDecimal.ROUND_UP ) );
    assertEquals( 1.0, Const.round( 1.5, 0, BigDecimal.ROUND_DOWN ) );
    assertEquals( 2.0, Const.round( 1.5, 0, BigDecimal.ROUND_CEILING ) );
    assertEquals( 1.0, Const.round( 1.5, 0, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 2.0, Const.round( 1.5, 0, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 1.0, Const.round( 1.5, 0, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 2.0, Const.round( 1.5, 0, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 2.0, Const.round( 1.5, 0, Const.ROUND_HALF_CEILING ) );

    assertEquals( 2.0, Const.round( 1.7, 0, BigDecimal.ROUND_UP ) );
    assertEquals( 1.0, Const.round( 1.7, 0, BigDecimal.ROUND_DOWN ) );
    assertEquals( 2.0, Const.round( 1.7, 0, BigDecimal.ROUND_CEILING ) );
    assertEquals( 1.0, Const.round( 1.7, 0, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 2.0, Const.round( 1.7, 0, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 2.0, Const.round( 1.7, 0, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 2.0, Const.round( 1.7, 0, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 2.0, Const.round( 1.7, 0, Const.ROUND_HALF_CEILING ) );

    assertEquals( 2.0, Const.round( 2.0, 0, BigDecimal.ROUND_UP ) );
    assertEquals( 2.0, Const.round( 2.0, 0, BigDecimal.ROUND_DOWN ) );
    assertEquals( 2.0, Const.round( 2.0, 0, BigDecimal.ROUND_CEILING ) );
    assertEquals( 2.0, Const.round( 2.0, 0, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 2.0, Const.round( 2.0, 0, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 2.0, Const.round( 2.0, 0, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 2.0, Const.round( 2.0, 0, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 2.0, Const.round( 2.0, 0, Const.ROUND_HALF_CEILING ) );

    assertEquals( 3.0, Const.round( 2.2, 0, BigDecimal.ROUND_UP ) );
    assertEquals( 2.0, Const.round( 2.2, 0, BigDecimal.ROUND_DOWN ) );
    assertEquals( 3.0, Const.round( 2.2, 0, BigDecimal.ROUND_CEILING ) );
    assertEquals( 2.0, Const.round( 2.2, 0, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 2.0, Const.round( 2.2, 0, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 2.0, Const.round( 2.2, 0, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 2.0, Const.round( 2.2, 0, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 2.0, Const.round( 2.2, 0, Const.ROUND_HALF_CEILING ) );

    assertEquals( 3.0, Const.round( 2.5, 0, BigDecimal.ROUND_UP ) );
    assertEquals( 2.0, Const.round( 2.5, 0, BigDecimal.ROUND_DOWN ) );
    assertEquals( 3.0, Const.round( 2.5, 0, BigDecimal.ROUND_CEILING ) );
    assertEquals( 2.0, Const.round( 2.5, 0, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 3.0, Const.round( 2.5, 0, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 2.0, Const.round( 2.5, 0, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 2.0, Const.round( 2.5, 0, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 3.0, Const.round( 2.5, 0, Const.ROUND_HALF_CEILING ) );

    assertEquals( 3.0, Const.round( 2.7, 0, BigDecimal.ROUND_UP ) );
    assertEquals( 2.0, Const.round( 2.7, 0, BigDecimal.ROUND_DOWN ) );
    assertEquals( 3.0, Const.round( 2.7, 0, BigDecimal.ROUND_CEILING ) );
    assertEquals( 2.0, Const.round( 2.7, 0, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 3.0, Const.round( 2.7, 0, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 3.0, Const.round( 2.7, 0, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 3.0, Const.round( 2.7, 0, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 3.0, Const.round( 2.7, 0, Const.ROUND_HALF_CEILING ) );

    assertEquals( -1.0, Const.round( -1.0, 0, BigDecimal.ROUND_UP ) );
    assertEquals( -1.0, Const.round( -1.0, 0, BigDecimal.ROUND_DOWN ) );
    assertEquals( -1.0, Const.round( -1.0, 0, BigDecimal.ROUND_CEILING ) );
    assertEquals( -1.0, Const.round( -1.0, 0, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -1.0, Const.round( -1.0, 0, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -1.0, Const.round( -1.0, 0, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -1.0, Const.round( -1.0, 0, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -1.0, Const.round( -1.0, 0, Const.ROUND_HALF_CEILING ) );

    assertEquals( -2.0, Const.round( -1.2, 0, BigDecimal.ROUND_UP ) );
    assertEquals( -1.0, Const.round( -1.2, 0, BigDecimal.ROUND_DOWN ) );
    assertEquals( -1.0, Const.round( -1.2, 0, BigDecimal.ROUND_CEILING ) );
    assertEquals( -2.0, Const.round( -1.2, 0, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -1.0, Const.round( -1.2, 0, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -1.0, Const.round( -1.2, 0, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -1.0, Const.round( -1.2, 0, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -1.0, Const.round( -1.2, 0, Const.ROUND_HALF_CEILING ) );

    assertEquals( -2.0, Const.round( -1.5, 0, BigDecimal.ROUND_UP ) );
    assertEquals( -1.0, Const.round( -1.5, 0, BigDecimal.ROUND_DOWN ) );
    assertEquals( -1.0, Const.round( -1.5, 0, BigDecimal.ROUND_CEILING ) );
    assertEquals( -2.0, Const.round( -1.5, 0, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -2.0, Const.round( -1.5, 0, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -1.0, Const.round( -1.5, 0, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -2.0, Const.round( -1.5, 0, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -1.0, Const.round( -1.5, 0, Const.ROUND_HALF_CEILING ) );

    assertEquals( -2.0, Const.round( -1.7, 0, BigDecimal.ROUND_UP ) );
    assertEquals( -1.0, Const.round( -1.7, 0, BigDecimal.ROUND_DOWN ) );
    assertEquals( -1.0, Const.round( -1.7, 0, BigDecimal.ROUND_CEILING ) );
    assertEquals( -2.0, Const.round( -1.7, 0, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -2.0, Const.round( -1.7, 0, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -2.0, Const.round( -1.7, 0, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -2.0, Const.round( -1.7, 0, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -2.0, Const.round( -1.7, 0, Const.ROUND_HALF_CEILING ) );

    assertEquals( -2.0, Const.round( -2.0, 0, BigDecimal.ROUND_UP ) );
    assertEquals( -2.0, Const.round( -2.0, 0, BigDecimal.ROUND_DOWN ) );
    assertEquals( -2.0, Const.round( -2.0, 0, BigDecimal.ROUND_CEILING ) );
    assertEquals( -2.0, Const.round( -2.0, 0, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -2.0, Const.round( -2.0, 0, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -2.0, Const.round( -2.0, 0, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -2.0, Const.round( -2.0, 0, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -2.0, Const.round( -2.0, 0, Const.ROUND_HALF_CEILING ) );

    assertEquals( -3.0, Const.round( -2.2, 0, BigDecimal.ROUND_UP ) );
    assertEquals( -2.0, Const.round( -2.2, 0, BigDecimal.ROUND_DOWN ) );
    assertEquals( -2.0, Const.round( -2.2, 0, BigDecimal.ROUND_CEILING ) );
    assertEquals( -3.0, Const.round( -2.2, 0, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -2.0, Const.round( -2.2, 0, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -2.0, Const.round( -2.2, 0, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -2.0, Const.round( -2.2, 0, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -2.0, Const.round( -2.2, 0, Const.ROUND_HALF_CEILING ) );

    assertEquals( -3.0, Const.round( -2.5, 0, BigDecimal.ROUND_UP ) );
    assertEquals( -2.0, Const.round( -2.5, 0, BigDecimal.ROUND_DOWN ) );
    assertEquals( -2.0, Const.round( -2.5, 0, BigDecimal.ROUND_CEILING ) );
    assertEquals( -3.0, Const.round( -2.5, 0, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -3.0, Const.round( -2.5, 0, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -2.0, Const.round( -2.5, 0, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -2.0, Const.round( -2.5, 0, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -2.0, Const.round( -2.5, 0, Const.ROUND_HALF_CEILING ) );

    assertEquals( -3.0, Const.round( -2.7, 0, BigDecimal.ROUND_UP ) );
    assertEquals( -2.0, Const.round( -2.7, 0, BigDecimal.ROUND_DOWN ) );
    assertEquals( -2.0, Const.round( -2.7, 0, BigDecimal.ROUND_CEILING ) );
    assertEquals( -3.0, Const.round( -2.7, 0, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -3.0, Const.round( -2.7, 0, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -3.0, Const.round( -2.7, 0, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -3.0, Const.round( -2.7, 0, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -3.0, Const.round( -2.7, 0, Const.ROUND_HALF_CEILING ) );

    assertEquals( 0.010, Const.round( 0.010, 2, BigDecimal.ROUND_UP ) );
    assertEquals( 0.010, Const.round( 0.010, 2, BigDecimal.ROUND_DOWN ) );
    assertEquals( 0.010, Const.round( 0.010, 2, BigDecimal.ROUND_CEILING ) );
    assertEquals( 0.010, Const.round( 0.010, 2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 0.010, Const.round( 0.010, 2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 0.010, Const.round( 0.010, 2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 0.010, Const.round( 0.010, 2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 0.010, Const.round( 0.010, 2, Const.ROUND_HALF_CEILING ) );

    assertEquals( 0.020, Const.round( 0.012, 2, BigDecimal.ROUND_UP ) );
    assertEquals( 0.010, Const.round( 0.012, 2, BigDecimal.ROUND_DOWN ) );
    assertEquals( 0.020, Const.round( 0.012, 2, BigDecimal.ROUND_CEILING ) );
    assertEquals( 0.010, Const.round( 0.012, 2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 0.010, Const.round( 0.012, 2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 0.010, Const.round( 0.012, 2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 0.010, Const.round( 0.012, 2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 0.010, Const.round( 0.012, 2, Const.ROUND_HALF_CEILING ) );

    assertEquals( 0.020, Const.round( 0.015, 2, BigDecimal.ROUND_UP ) );
    assertEquals( 0.010, Const.round( 0.015, 2, BigDecimal.ROUND_DOWN ) );
    assertEquals( 0.020, Const.round( 0.015, 2, BigDecimal.ROUND_CEILING ) );
    assertEquals( 0.010, Const.round( 0.015, 2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 0.020, Const.round( 0.015, 2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 0.010, Const.round( 0.015, 2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 0.020, Const.round( 0.015, 2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 0.020, Const.round( 0.015, 2, Const.ROUND_HALF_CEILING ) );

    assertEquals( 0.020, Const.round( 0.017, 2, BigDecimal.ROUND_UP ) );
    assertEquals( 0.010, Const.round( 0.017, 2, BigDecimal.ROUND_DOWN ) );
    assertEquals( 0.020, Const.round( 0.017, 2, BigDecimal.ROUND_CEILING ) );
    assertEquals( 0.010, Const.round( 0.017, 2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 0.020, Const.round( 0.017, 2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 0.020, Const.round( 0.017, 2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 0.020, Const.round( 0.017, 2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 0.020, Const.round( 0.017, 2, Const.ROUND_HALF_CEILING ) );

    assertEquals( 0.020, Const.round( 0.020, 2, BigDecimal.ROUND_UP ) );
    assertEquals( 0.020, Const.round( 0.020, 2, BigDecimal.ROUND_DOWN ) );
    assertEquals( 0.020, Const.round( 0.020, 2, BigDecimal.ROUND_CEILING ) );
    assertEquals( 0.020, Const.round( 0.020, 2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 0.020, Const.round( 0.020, 2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 0.020, Const.round( 0.020, 2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 0.020, Const.round( 0.020, 2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 0.020, Const.round( 0.020, 2, Const.ROUND_HALF_CEILING ) );

    assertEquals( 0.030, Const.round( 0.022, 2, BigDecimal.ROUND_UP ) );
    assertEquals( 0.020, Const.round( 0.022, 2, BigDecimal.ROUND_DOWN ) );
    assertEquals( 0.030, Const.round( 0.022, 2, BigDecimal.ROUND_CEILING ) );
    assertEquals( 0.020, Const.round( 0.022, 2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 0.020, Const.round( 0.022, 2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 0.020, Const.round( 0.022, 2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 0.020, Const.round( 0.022, 2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 0.020, Const.round( 0.022, 2, Const.ROUND_HALF_CEILING ) );

    assertEquals( 0.030, Const.round( 0.025, 2, BigDecimal.ROUND_UP ) );
    assertEquals( 0.020, Const.round( 0.025, 2, BigDecimal.ROUND_DOWN ) );
    assertEquals( 0.030, Const.round( 0.025, 2, BigDecimal.ROUND_CEILING ) );
    assertEquals( 0.020, Const.round( 0.025, 2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 0.030, Const.round( 0.025, 2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 0.020, Const.round( 0.025, 2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 0.020, Const.round( 0.025, 2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 0.030, Const.round( 0.025, 2, Const.ROUND_HALF_CEILING ) );

    assertEquals( 0.030, Const.round( 0.027, 2, BigDecimal.ROUND_UP ) );
    assertEquals( 0.020, Const.round( 0.027, 2, BigDecimal.ROUND_DOWN ) );
    assertEquals( 0.030, Const.round( 0.027, 2, BigDecimal.ROUND_CEILING ) );
    assertEquals( 0.020, Const.round( 0.027, 2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 0.030, Const.round( 0.027, 2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 0.030, Const.round( 0.027, 2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 0.030, Const.round( 0.027, 2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 0.030, Const.round( 0.027, 2, Const.ROUND_HALF_CEILING ) );

    assertEquals( -0.010, Const.round( -0.010, 2, BigDecimal.ROUND_UP ) );
    assertEquals( -0.010, Const.round( -0.010, 2, BigDecimal.ROUND_DOWN ) );
    assertEquals( -0.010, Const.round( -0.010, 2, BigDecimal.ROUND_CEILING ) );
    assertEquals( -0.010, Const.round( -0.010, 2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -0.010, Const.round( -0.010, 2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -0.010, Const.round( -0.010, 2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -0.010, Const.round( -0.010, 2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -0.010, Const.round( -0.010, 2, Const.ROUND_HALF_CEILING ) );

    assertEquals( -0.020, Const.round( -0.012, 2, BigDecimal.ROUND_UP ) );
    assertEquals( -0.010, Const.round( -0.012, 2, BigDecimal.ROUND_DOWN ) );
    assertEquals( -0.010, Const.round( -0.012, 2, BigDecimal.ROUND_CEILING ) );
    assertEquals( -0.020, Const.round( -0.012, 2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -0.010, Const.round( -0.012, 2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -0.010, Const.round( -0.012, 2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -0.010, Const.round( -0.012, 2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -0.010, Const.round( -0.012, 2, Const.ROUND_HALF_CEILING ) );

    assertEquals( -0.020, Const.round( -0.015, 2, BigDecimal.ROUND_UP ) );
    assertEquals( -0.010, Const.round( -0.015, 2, BigDecimal.ROUND_DOWN ) );
    assertEquals( -0.010, Const.round( -0.015, 2, BigDecimal.ROUND_CEILING ) );
    assertEquals( -0.020, Const.round( -0.015, 2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -0.020, Const.round( -0.015, 2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -0.010, Const.round( -0.015, 2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -0.020, Const.round( -0.015, 2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -0.010, Const.round( -0.015, 2, Const.ROUND_HALF_CEILING ) );

    assertEquals( -0.020, Const.round( -0.017, 2, BigDecimal.ROUND_UP ) );
    assertEquals( -0.010, Const.round( -0.017, 2, BigDecimal.ROUND_DOWN ) );
    assertEquals( -0.010, Const.round( -0.017, 2, BigDecimal.ROUND_CEILING ) );
    assertEquals( -0.020, Const.round( -0.017, 2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -0.020, Const.round( -0.017, 2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -0.020, Const.round( -0.017, 2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -0.020, Const.round( -0.017, 2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -0.020, Const.round( -0.017, 2, Const.ROUND_HALF_CEILING ) );

    assertEquals( -0.020, Const.round( -0.020, 2, BigDecimal.ROUND_UP ) );
    assertEquals( -0.020, Const.round( -0.020, 2, BigDecimal.ROUND_DOWN ) );
    assertEquals( -0.020, Const.round( -0.020, 2, BigDecimal.ROUND_CEILING ) );
    assertEquals( -0.020, Const.round( -0.020, 2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -0.020, Const.round( -0.020, 2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -0.020, Const.round( -0.020, 2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -0.020, Const.round( -0.020, 2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -0.020, Const.round( -0.020, 2, Const.ROUND_HALF_CEILING ) );

    assertEquals( -0.030, Const.round( -0.022, 2, BigDecimal.ROUND_UP ) );
    assertEquals( -0.020, Const.round( -0.022, 2, BigDecimal.ROUND_DOWN ) );
    assertEquals( -0.020, Const.round( -0.022, 2, BigDecimal.ROUND_CEILING ) );
    assertEquals( -0.030, Const.round( -0.022, 2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -0.020, Const.round( -0.022, 2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -0.020, Const.round( -0.022, 2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -0.020, Const.round( -0.022, 2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -0.020, Const.round( -0.022, 2, Const.ROUND_HALF_CEILING ) );

    assertEquals( -0.030, Const.round( -0.025, 2, BigDecimal.ROUND_UP ) );
    assertEquals( -0.020, Const.round( -0.025, 2, BigDecimal.ROUND_DOWN ) );
    assertEquals( -0.020, Const.round( -0.025, 2, BigDecimal.ROUND_CEILING ) );
    assertEquals( -0.030, Const.round( -0.025, 2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -0.030, Const.round( -0.025, 2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -0.020, Const.round( -0.025, 2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -0.020, Const.round( -0.025, 2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -0.020, Const.round( -0.025, 2, Const.ROUND_HALF_CEILING ) );

    assertEquals( -0.030, Const.round( -0.027, 2, BigDecimal.ROUND_UP ) );
    assertEquals( -0.020, Const.round( -0.027, 2, BigDecimal.ROUND_DOWN ) );
    assertEquals( -0.020, Const.round( -0.027, 2, BigDecimal.ROUND_CEILING ) );
    assertEquals( -0.030, Const.round( -0.027, 2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -0.030, Const.round( -0.027, 2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -0.030, Const.round( -0.027, 2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -0.030, Const.round( -0.027, 2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -0.030, Const.round( -0.027, 2, Const.ROUND_HALF_CEILING ) );

    assertEquals( 100.0, Const.round( 100.0, -2, BigDecimal.ROUND_UP ) );
    assertEquals( 100.0, Const.round( 100.0, -2, BigDecimal.ROUND_DOWN ) );
    assertEquals( 100.0, Const.round( 100.0, -2, BigDecimal.ROUND_CEILING ) );
    assertEquals( 100.0, Const.round( 100.0, -2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 100.0, Const.round( 100.0, -2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 100.0, Const.round( 100.0, -2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 100.0, Const.round( 100.0, -2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 100.0, Const.round( 100.0, -2, Const.ROUND_HALF_CEILING ) );

    assertEquals( 200.0, Const.round( 120.0, -2, BigDecimal.ROUND_UP ) );
    assertEquals( 100.0, Const.round( 120.0, -2, BigDecimal.ROUND_DOWN ) );
    assertEquals( 200.0, Const.round( 120.0, -2, BigDecimal.ROUND_CEILING ) );
    assertEquals( 100.0, Const.round( 120.0, -2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 100.0, Const.round( 120.0, -2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 100.0, Const.round( 120.0, -2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 100.0, Const.round( 120.0, -2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 100.0, Const.round( 120.0, -2, Const.ROUND_HALF_CEILING ) );

    assertEquals( 200.0, Const.round( 150.0, -2, BigDecimal.ROUND_UP ) );
    assertEquals( 100.0, Const.round( 150.0, -2, BigDecimal.ROUND_DOWN ) );
    assertEquals( 200.0, Const.round( 150.0, -2, BigDecimal.ROUND_CEILING ) );
    assertEquals( 100.0, Const.round( 150.0, -2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 200.0, Const.round( 150.0, -2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 100.0, Const.round( 150.0, -2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 200.0, Const.round( 150.0, -2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 200.0, Const.round( 150.0, -2, Const.ROUND_HALF_CEILING ) );

    assertEquals( 200.0, Const.round( 170.0, -2, BigDecimal.ROUND_UP ) );
    assertEquals( 100.0, Const.round( 170.0, -2, BigDecimal.ROUND_DOWN ) );
    assertEquals( 200.0, Const.round( 170.0, -2, BigDecimal.ROUND_CEILING ) );
    assertEquals( 100.0, Const.round( 170.0, -2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 200.0, Const.round( 170.0, -2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 200.0, Const.round( 170.0, -2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 200.0, Const.round( 170.0, -2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 200.0, Const.round( 170.0, -2, Const.ROUND_HALF_CEILING ) );

    assertEquals( 200.0, Const.round( 200.0, -2, BigDecimal.ROUND_UP ) );
    assertEquals( 200.0, Const.round( 200.0, -2, BigDecimal.ROUND_DOWN ) );
    assertEquals( 200.0, Const.round( 200.0, -2, BigDecimal.ROUND_CEILING ) );
    assertEquals( 200.0, Const.round( 200.0, -2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 200.0, Const.round( 200.0, -2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 200.0, Const.round( 200.0, -2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 200.0, Const.round( 200.0, -2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 200.0, Const.round( 200.0, -2, Const.ROUND_HALF_CEILING ) );

    assertEquals( 300.0, Const.round( 220.0, -2, BigDecimal.ROUND_UP ) );
    assertEquals( 200.0, Const.round( 220.0, -2, BigDecimal.ROUND_DOWN ) );
    assertEquals( 300.0, Const.round( 220.0, -2, BigDecimal.ROUND_CEILING ) );
    assertEquals( 200.0, Const.round( 220.0, -2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 200.0, Const.round( 220.0, -2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 200.0, Const.round( 220.0, -2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 200.0, Const.round( 220.0, -2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 200.0, Const.round( 220.0, -2, Const.ROUND_HALF_CEILING ) );

    assertEquals( 300.0, Const.round( 250.0, -2, BigDecimal.ROUND_UP ) );
    assertEquals( 200.0, Const.round( 250.0, -2, BigDecimal.ROUND_DOWN ) );
    assertEquals( 300.0, Const.round( 250.0, -2, BigDecimal.ROUND_CEILING ) );
    assertEquals( 200.0, Const.round( 250.0, -2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 300.0, Const.round( 250.0, -2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 200.0, Const.round( 250.0, -2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 200.0, Const.round( 250.0, -2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 300.0, Const.round( 250.0, -2, Const.ROUND_HALF_CEILING ) );

    assertEquals( 300.0, Const.round( 270.0, -2, BigDecimal.ROUND_UP ) );
    assertEquals( 200.0, Const.round( 270.0, -2, BigDecimal.ROUND_DOWN ) );
    assertEquals( 300.0, Const.round( 270.0, -2, BigDecimal.ROUND_CEILING ) );
    assertEquals( 200.0, Const.round( 270.0, -2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( 300.0, Const.round( 270.0, -2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( 300.0, Const.round( 270.0, -2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( 300.0, Const.round( 270.0, -2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( 300.0, Const.round( 270.0, -2, Const.ROUND_HALF_CEILING ) );

    assertEquals( -100.0, Const.round( -100.0, -2, BigDecimal.ROUND_UP ) );
    assertEquals( -100.0, Const.round( -100.0, -2, BigDecimal.ROUND_DOWN ) );
    assertEquals( -100.0, Const.round( -100.0, -2, BigDecimal.ROUND_CEILING ) );
    assertEquals( -100.0, Const.round( -100.0, -2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -100.0, Const.round( -100.0, -2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -100.0, Const.round( -100.0, -2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -100.0, Const.round( -100.0, -2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -100.0, Const.round( -100.0, -2, Const.ROUND_HALF_CEILING ) );

    assertEquals( -200.0, Const.round( -120.0, -2, BigDecimal.ROUND_UP ) );
    assertEquals( -100.0, Const.round( -120.0, -2, BigDecimal.ROUND_DOWN ) );
    assertEquals( -100.0, Const.round( -120.0, -2, BigDecimal.ROUND_CEILING ) );
    assertEquals( -200.0, Const.round( -120.0, -2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -100.0, Const.round( -120.0, -2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -100.0, Const.round( -120.0, -2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -100.0, Const.round( -120.0, -2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -100.0, Const.round( -120.0, -2, Const.ROUND_HALF_CEILING ) );

    assertEquals( -200.0, Const.round( -150.0, -2, BigDecimal.ROUND_UP ) );
    assertEquals( -100.0, Const.round( -150.0, -2, BigDecimal.ROUND_DOWN ) );
    assertEquals( -100.0, Const.round( -150.0, -2, BigDecimal.ROUND_CEILING ) );
    assertEquals( -200.0, Const.round( -150.0, -2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -200.0, Const.round( -150.0, -2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -100.0, Const.round( -150.0, -2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -200.0, Const.round( -150.0, -2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -100.0, Const.round( -150.0, -2, Const.ROUND_HALF_CEILING ) );

    assertEquals( -200.0, Const.round( -170.0, -2, BigDecimal.ROUND_UP ) );
    assertEquals( -100.0, Const.round( -170.0, -2, BigDecimal.ROUND_DOWN ) );
    assertEquals( -100.0, Const.round( -170.0, -2, BigDecimal.ROUND_CEILING ) );
    assertEquals( -200.0, Const.round( -170.0, -2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -200.0, Const.round( -170.0, -2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -200.0, Const.round( -170.0, -2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -200.0, Const.round( -170.0, -2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -200.0, Const.round( -170.0, -2, Const.ROUND_HALF_CEILING ) );

    assertEquals( -200.0, Const.round( -200.0, -2, BigDecimal.ROUND_UP ) );
    assertEquals( -200.0, Const.round( -200.0, -2, BigDecimal.ROUND_DOWN ) );
    assertEquals( -200.0, Const.round( -200.0, -2, BigDecimal.ROUND_CEILING ) );
    assertEquals( -200.0, Const.round( -200.0, -2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -200.0, Const.round( -200.0, -2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -200.0, Const.round( -200.0, -2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -200.0, Const.round( -200.0, -2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -200.0, Const.round( -200.0, -2, Const.ROUND_HALF_CEILING ) );

    assertEquals( -300.0, Const.round( -220.0, -2, BigDecimal.ROUND_UP ) );
    assertEquals( -200.0, Const.round( -220.0, -2, BigDecimal.ROUND_DOWN ) );
    assertEquals( -200.0, Const.round( -220.0, -2, BigDecimal.ROUND_CEILING ) );
    assertEquals( -300.0, Const.round( -220.0, -2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -200.0, Const.round( -220.0, -2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -200.0, Const.round( -220.0, -2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -200.0, Const.round( -220.0, -2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -200.0, Const.round( -220.0, -2, Const.ROUND_HALF_CEILING ) );

    assertEquals( -300.0, Const.round( -250.0, -2, BigDecimal.ROUND_UP ) );
    assertEquals( -200.0, Const.round( -250.0, -2, BigDecimal.ROUND_DOWN ) );
    assertEquals( -200.0, Const.round( -250.0, -2, BigDecimal.ROUND_CEILING ) );
    assertEquals( -300.0, Const.round( -250.0, -2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -300.0, Const.round( -250.0, -2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -200.0, Const.round( -250.0, -2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -200.0, Const.round( -250.0, -2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -200.0, Const.round( -250.0, -2, Const.ROUND_HALF_CEILING ) );

    assertEquals( -300.0, Const.round( -270.0, -2, BigDecimal.ROUND_UP ) );
    assertEquals( -200.0, Const.round( -270.0, -2, BigDecimal.ROUND_DOWN ) );
    assertEquals( -200.0, Const.round( -270.0, -2, BigDecimal.ROUND_CEILING ) );
    assertEquals( -300.0, Const.round( -270.0, -2, BigDecimal.ROUND_FLOOR ) );
    assertEquals( -300.0, Const.round( -270.0, -2, BigDecimal.ROUND_HALF_UP ) );
    assertEquals( -300.0, Const.round( -270.0, -2, BigDecimal.ROUND_HALF_DOWN ) );
    assertEquals( -300.0, Const.round( -270.0, -2, BigDecimal.ROUND_HALF_EVEN ) );
    assertEquals( -300.0, Const.round( -270.0, -2, Const.ROUND_HALF_CEILING ) );

    assertEquals( Double.NaN, Const.round( Double.NaN, 0, BigDecimal.ROUND_UP ) );
    assertEquals( Double.NEGATIVE_INFINITY, Const.round( Double.NEGATIVE_INFINITY, 0, BigDecimal.ROUND_UP ) );
    assertEquals( Double.POSITIVE_INFINITY, Const.round( Double.POSITIVE_INFINITY, 0, BigDecimal.ROUND_UP ) );
  }