^ --> * (any, kinda silly) ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 ^1.2.3 --> >=1.2.3 <2.0.0 ^1.2.0 --> >=1.2.0 <2.0.0
961845
function replaceCarets(comp, options) {
  return comp.trim().split(/\s+/).map(function(comp) {
    return replaceCaret(comp, options);
  }).join(' ');
}
221584
def _g_a (self, x, a, b, s):
        
        return 2*b/(1.0+np.exp(s*(x-a)))
1286929
double betaFunction(List<Double> x, int type) {
    double beta;
    beta = 0;
    int dim = x.size();

    if (dim == 0) {
      beta = 0;
    }

    if (type == 1) {
      beta = 0;
      for (int i = 0; i < dim; i++) {
        beta += x.get(i) * x.get(i);
      }
      beta = 2.0 * beta / dim;
    }

    if (type == 2) {
      beta = 0;
      for (int i = 0; i < dim; i++) {
        beta += Math.sqrt(i + 1) * x.get(i) * x.get(i);
      }
      beta = 2.0 * beta / dim;
    }

    if (type == 3) {
      double sum = 0, xx;
      for (int i = 0; i < dim; i++) {
        xx = 2 * x.get(i);
        sum += (xx * xx - Math.cos(4 * Math.PI * xx) + 1);
      }
      beta = 2.0 * sum / dim;
    }

    if (type == 4) {
      double sum = 0, prod = 1, xx;
      for (int i = 0; i < dim; i++) {
        xx = 2 * x.get(i);
        sum += xx * xx;
        prod *= Math.cos(10 * Math.PI * xx / Math.sqrt(i + 1));
      }
      beta = 2.0 * (sum - 2 * prod + 2) / dim;
    }

    return beta;
  }
499896
def remove_exponent(d):
    """"""
    return d.quantize(Decimal(1)) if d == d.to_integral() else d.normalize()
1290341
function roundRat (f) {
  var a = f[0]
  var b = f[1]
  if (a.cmpn(0) === 0) {
    return 0
  }
  var h = a.abs().divmod(b.abs())
  var iv = h.div
  var x = bn2num(iv)
  var ir = h.mod
  var sgn = (a.negative !== b.negative) ? -1 : 1
  if (ir.cmpn(0) === 0) {
    return sgn * x
  }
  if (x) {
    var s = ctz(x) + 4
    var y = bn2num(ir.ushln(s).divRound(b))
    return sgn * (x + y * Math.pow(2, -s))
  } else {
    var ybits = b.bitLength() - ir.bitLength() + 53
    var y = bn2num(ir.ushln(ybits).divRound(b))
    if (ybits < 1023) {
      return sgn * y * Math.pow(2, -ybits)
    }
    y *= Math.pow(2, -1023)
    return sgn * y * Math.pow(2, 1023 - ybits)
  }
}
298931
function (a, b) {
            if (!b.pos || !a.pos) {
                return (a.pos ? -Infinity : Infinity);
            }
            var result = b.pos.z - a.pos.z;
            return (result ? result : (b.pos.x - a.pos.x));
        }
532060
function cubicEaseInOut (p) {
    if(p < 0.5) {
        return 4 * p * p * p;
    } else {
        var f = ((2 * p) - 2);
        return 0.5 * f * f * f + 1;
    }
}
403526
def sqrt(x, context=None):
    
    return _apply_function_in_current_context(
        BigFloat,
        mpfr.mpfr_sqrt,
        (BigFloat._implicit_convert(x),),
        context,
    )
1189823
function inverse(out, a) {
  out[0] = 1.0 / a[0]
  out[1] = 1.0 / a[1]
  out[2] = 1.0 / a[2]
  return out
}
1052097
function p_t(df, t) {
        var c2, s, p, i;

        c2 = df / (df + t * t);
        s = Math.sqrt(1.0 - c2);

        if (t < 0.0) { s = -s; }

        p = 0.0;
        i = df % 2 + 2;
        while (i <= df) {
            p = p + s;
            s = s * ((i - 1) * c2 / i);
            i = i + 2;
        }

        if ((df & 1) !== 0) {
            return 0.5 + (p * Math.sqrt(c2) + Math.atan(t / Math.sqrt(df))) / Math.PI;
        }

        return (1.0 + p) / 2.0;
    }
902611
def dec2hms(x):
    
    if not np.isfinite(x):
        return 'XX:XX:XX.XX'
    # wrap negative RA's
    if x < 0:
        x += 360
    x /= 15.0
    h = int(x)
    x = (x - h) * 60
    m = int(x)
    s = (x - m) * 60
    return '{0:02d}:{1:02d}:{2:05.2f}'.format(h, m, s)
1366165
def exponential(x, y, xscale, yscale):
    
    if xscale==0.0 or yscale==0.0:
        return x*0.0

    with float_error_ignore():
        x_w = np.divide(x,xscale)
        y_h = np.divide(y,yscale)
        return np.exp(-np.sqrt(x_w*x_w+y_h*y_h))
850323
function elastic(t) {
  return Math.pow(2, -10 * t) * Math.sin((t - 0.075) * (2 * Math.PI) / 0.3) + 1;
}
223390
static public double myXRound(double x, double o) {
    return ((Math.abs(x - o) < 0.5) ? x : (myRound(2.0 * x) / 2.0));
  }
140321
function bounce(t) {
  const s = 7.5625;
  const p = 2.75;
  let l;
  if (t < (1 / p)) {
    l = s * t * t;
  } else {
    if (t < (2 / p)) {
      t -= (1.5 / p);
      l = s * t * t + 0.75;
    } else {
      if (t < (2.5 / p)) {
        t -= (2.25 / p);
        l = s * t * t + 0.9375;
      } else {
        t -= (2.625 / p);
        l = s * t * t + 0.984375;
      }
    }
  }
  return l;
}
1161757
def rec_sqrt(x, context=None):
    
    return _apply_function_in_current_context(
        BigFloat,
        mpfr.mpfr_rec_sqrt,
        (BigFloat._implicit_convert(x),),
        context,
    )
1202093
private double rdist(double[] x1, double[] x2) {
        double d = 0.0;
        for (int i = 0; i < x1.length; i++) {
            double t = x1[i] - x2[i];
            d += t * t;
        }
        return Math.sqrt(d);
    }