BigInteger rounded = aX.decimal.toBigInteger();
BigDecimal d = aX.decimal; if (aX.iTensExp != 0) { d = d.movePointRight(aX.iTensExp); } BigInteger rounded = d.toBigInteger();
  public void Floor( BigNumber aX)  {    if (aX.decimal != null)    {      BigInteger rounded = aX.decimal.toBigInteger();      if (aX.decimal.signum()<0)      {        BigDecimal back =  new BigDecimal(rounded);        BigDecimal difference = aX.decimal.subtract(back);        if (difference.signum() != 0)        {          rounded = rounded.add(new BigInteger("-1"));        }      }      integer = rounded;    }    else    {      integer = aX.integer;    }    decimal = null;  }