Calculates the ceil of a rational number

Ex: new Fraction('4.(3)').ceil() => (5 / 1)
496534
function(places) {

      places = Math.pow(10, places || 0);

      if (isNaN(this["n"]) || isNaN(this["d"])) {
        return new Fraction(NaN);
      }
      return new Fraction(Math.ceil(places * this["s"] * this["n"] / this["d"]), places);
    }
1198789
function() {

      var a = this['re'];
      var b = this['im'];
      var r = this['abs']();

      var re, im;

      if (a >= 0) {

        if (b === 0) {
          return new Complex(Math.sqrt(a), 0);
        }

        re = 0.5 * Math.sqrt(2.0 * (r + a));
      } else {
        re = Math.abs(b) / Math.sqrt(2 * (r - a));
      }

      if (a <= 0) {
        im = 0.5 * Math.sqrt(2.0 * (r - a));
      } else {
        im = Math.abs(b) / Math.sqrt(2 * (r + a));
      }

      return new Complex(re, b < 0 ? -im : im);
    }
1074378
def chk_fraction_digits_arg(s):
    """"""
    try:
        v = int(s)
        if v >= 1 and v <= 18:
            return True
        else:
            return False
    except ValueError:
        return False
619068
def ceil_nearest(x, dx=1):
    
    precision = get_sig_digits(dx)
    return round(math.ceil(float(x) / dx) * dx, precision)
853737
public static long ceil(SoyValue arg) {
    if (arg instanceof IntegerData) {
      return ((IntegerData) arg).longValue();
    } else {
      return (long) Math.ceil(arg.floatValue());
    }
  }
548278
static long calcInterval(int segments, int start, int limit) {

        long range = limit - start;

        if (range < 0) {
            return 0;
        }

        int partSegment = (range % segments) == 0 ? 0
                                                  : 1;

        return (range / segments) + partSegment;
    }
254957
def toOrdinal(n):
    
    if n == -1:
        retval = _("last")
    elif n == -2:
        retval = _("penultimate")
    elif 1 <= n <= 5:
        retval = _n2w(n, to="ordinal")
    else:
        retval = _n2w(n, to="ordinal_num")
    return retval
1095687
function ceilPoint(p) {
            var t = p.x;

            // 处理形如 4.99999 = 5, 5.00001 = 5的情况
            if (Math.abs(Math.round(t) - t) < 0.00002) {
                p.x = Math.round(t);
            }
            else {
                p.x = Math.round(p.x * 100000) / 100000;
            }

            t = p.y;
            if (Math.abs(Math.round(t) - t) < 0.00005) {
                p.y = Math.round(t);
            }
            else {
                p.y = Math.round(p.y * 100000) / 100000;
            }

            return p;
        }
246907
function() {

      // 1 / 0 = Infinity and 1 / Infinity = 0
      if (this['isZero']()) {
        return Complex['INFINITY'];
      }

      if (this['isInfinite']()) {
        return Complex['ZERO'];
      }

      var a = this['re'];
      var b = this['im'];

      var d = a * a + b * b;

      return new Complex(a / d, -b / d);
    }
1077915
def exp4(x, c, a, b, alpha):
    
    return c - np.exp(-a*(x**alpha)+b)
394231
def integer_ceil(a, b):
    ''''''
    quanta, mod = divmod(a, b)
    if mod:
        quanta += 1
    return quanta
464718
def _itodq(self, n):
        """"""
        if self.v == 4:
            return '.'.join(map(str, [
                (n >> 24) & 0xff,
                (n >> 16) & 0xff,
                (n >> 8) & 0xff,
                n & 0xff,
            ]))
        else:
            n = '%032x' % n
            return ':'.join(n[4 * x:4 * x + 4] for x in range(0, 8))
109273
function() {

      // atanh(c) = log((1+c) / (1-c)) / 2

      var a = this['re'];
      var b = this['im'];

      var noIM = a > 1 && b === 0;
      var oneMinus = 1 - a;
      var onePlus = 1 + a;
      var d = oneMinus * oneMinus + b * b;

      var x = (d !== 0)
              ? new Complex(
                      (onePlus * oneMinus - b * b) / d,
                      (b * oneMinus + onePlus * b) / d)
              : new Complex(
                      (a !== -1) ? (a / 0) : 0,
                      (b !== 0) ? (b / 0) : 0);

      var temp = x['re'];
      x['re'] = logHypot(x['re'], x['im']) / 2;
      x['im'] = Math.atan2(x['im'], temp) / 2;
      if (noIM) {
        x['im'] = -x['im'];
      }
      return x;
    }
614276
def _divide_and_round(a, b):
    
    # Based on the reference implementation for divmod_near
    # in Objects/longobject.c.
    q, r = divmod(a, b)
    # round up if either r / b > 0.5, or r / b == 0.5 and q is odd.
    # The expression r / b > 0.5 is equivalent to 2 * r > b if b is
    # positive, 2 * r < b if b negative.
    r *= 2
    greater_than_half = r > b if b > 0 else r < b
    if greater_than_half or r == b and q % 2 == 1:
        q += 1

    return q
873484
public Num ceil() {
		Num ceil = new Num();
		BigDecimal c = this.toBigDecimal();
		ceil.setValue(c.setScale(0, BigDecimal.ROUND_CEILING), null, null);
		return ceil;
	}
1141942
public float multipliedBy (Fraction fraction)
  {
    int newNumerator = numerator * fraction.getNumerator();
    int newDenominator = denominator * fraction.getDenominator();
    return (newNumerator/newDenominator);
  }
1143157
function(places) {

      places = 10 ** Number(places || 0);

      return new Fraction(Math.round(places * Number(this["s"] * this["n"]) / Number(this["d"])), places);
    }