ceil method

BigInt ceil()

Returns the smallest integer that is greater or equal to this Rat.

Implementation

BigInt ceil() {
  return isInteger
      ? truncate()
      : n.isNegative
          ? n ~/ d
          : n ~/ d + BigInt.one;
}