def inverse_euclidian; left_inverse_euclidian; end
760271
def determinant_by_elimination_old
      m = dup
      inv, k = m.left_eliminate!
      s = ground.unity
      (0...size).each do |i|
        s *= m[i, i]
      end
      s / k
    end
196079
def evalop(op,left,right):
  ""
  if op in ('=','!=','>','<'): return threevl.ThreeVL.compare(op,left,right)
  elif op in ('+','-','*','/'): # todo: does arithmetic require threevl?
    if op=='/': raise NotImplementedError('todo: spec about int/float division')
    return (left + right) if op=='+' else (left - right) if op=='-' else (left * right) if op=='*' else (left/right)
  elif op=='in': return (tuple(left) in right) if isinstance(left,list) and isinstance(right[0],tuple) else (left in right)
  elif op in ('and','or'): return threevl.ThreeVL.andor(op,left,right)
  elif op in ('is not','is'):
    if right is not None: raise NotImplementedError('can null be on either side? what if neither value is null?')
    return (left is not None) if (op=='is not') else (left is None)
  elif op=='@>':
    # todo: support a TextSearchDoc that will overload a lot of these operators
    if not all(isinstance(x,list) for x in (left,right)): raise TypeError('non-array-args',op,left,right)
    return set(left)>=set(right)
  elif op=='||':
    if not all(isinstance(x,list) for x in (left,right)): raise TypeError('non-array-args',op,left,right)
    return left+right
  elif op=='@@':
    if not all(isinstance(x,set) for x in (left,right)): raise TypeError('non_set_args',op,type(left),type(right))
    return bool(left&right)
  else: raise NotImplementedError(op,left,right)
1329509
function ( axis, startX, startY, endX, endY ) {
        var result = 'none';

        if ( axis == 'horizontal' ) {
            if ( startX > endX ) {
                result = 'left';
            } else if ( startX < endX ) {
                result = 'right';
            }
        } else {
            if ( startY > endY ) {
                result = 'top';
            } else if ( startY < endY ) {
                result = 'bottom';
            }
        }

        return result;
    }
238618
function inverse$6(p) {
        p.x -= this.x0;
        p.y -= this.y0;
        var lon, lat, ts, ce, Chi;
        var rh = Math.sqrt(p.x * p.x + p.y * p.y);
        if (this.sphere) {
            var c = 2 * Math.atan(rh / (0.5 * this.a * this.k0));
            lon = this.long0;
            lat = this.lat0;
            if (rh <= EPSLN) {
                p.x = lon;
                p.y = lat;
                return p;
            }
            lat = Math.asin(Math.cos(c) * this.sinlat0 + p.y * Math.sin(c) * this.coslat0 / rh);
            if (Math.abs(this.coslat0) < EPSLN) {
                if (this.lat0 > 0) {
                    lon = adjust_lon(this.long0 + Math.atan2(p.x, - 1 * p.y));
                }
                else {
                    lon = adjust_lon(this.long0 + Math.atan2(p.x, p.y));
                }
            }
            else {
                lon = adjust_lon(this.long0 + Math.atan2(p.x * Math.sin(c), rh * this.coslat0 * Math.cos(c) - p.y * this.sinlat0 * Math.sin(c)));
            }
            p.x = lon;
            p.y = lat;
            return p;
        }
        else {
            if (Math.abs(this.coslat0) <= EPSLN) {
                if (rh <= EPSLN) {
                    lat = this.lat0;
                    lon = this.long0;
                    p.x = lon;
                    p.y = lat;
                    //trace(p.toString());
                    return p;
                }
                p.x *= this.con;
                p.y *= this.con;
                ts = rh * this.cons / (2 * this.a * this.k0);
                lat = this.con * phi2z(this.e, ts);
                lon = this.con * adjust_lon(this.con * this.long0 + Math.atan2(p.x, - 1 * p.y));
            }
            else {
                ce = 2 * Math.atan(rh * this.cosX0 / (2 * this.a * this.k0 * this.ms1));
                lon = this.long0;
                if (rh <= EPSLN) {
                    Chi = this.X0;
                }
                else {
                    Chi = Math.asin(Math.cos(ce) * this.sinX0 + p.y * Math.sin(ce) * this.cosX0 / rh);
                    lon = adjust_lon(this.long0 + Math.atan2(p.x * Math.sin(ce), rh * this.cosX0 * Math.cos(ce) - p.y * this.sinX0 * Math.sin(ce)));
                }
                lat = -1 * phi2z(this.e, Math.tan(0.5 * (HALF_PI + Chi)));
            }
        }
        p.x = lon;
        p.y = lat;

        //trace(p.toString());
        return p;

    }
1220842
static void reverse(double[] d, DenseMatrix V) {
        int m = V.nrows();
        int n = d.length;
        int half = n / 2;
        for (int i = 0; i < half; i++) {
            double tmp = d[i];
            d[i] = d[n - i - 1];
            d[n - i - 1] = tmp;
        }
        for (int j = 0; j < half; j++) {
            for (int i = 0; i < m; i++) {
                double tmp = V.get(i, j);
                V.set(i, j, V.get(i, n - j - 1));
                V.set(i, n - j - 1, tmp);
            }
        }
    }
228257
def inverse(self):
        
        csg = self.clone()
        map(lambda p: p.flip(), csg.polygons)
        return csg
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
}
455560
static boolean left(int[] verts, int a, int b, int c) {
        return area2(verts, a, b, c) < 0;
    }
822930
def extendedEuclid(a, b):
    """"""
    if a == 0:
        return b, 0, 1
    else:
        g, y, x = extendedEuclid(b % a, a)
        return g, x - (b // a) * y, y
51827
public String asymmetric(int leftPos, int rightPos) {
		boolean lm = false, rm = false, isSameLAR = isEqual(this.region.get()[0], this.region.get()[1]);
		int l = 0, r = 0, lr = 0, lp = 0, rp = 0;

		for (Pair<Integer, Integer> kv : indexes.get()) {
			if (isSameLAR) {
				++lr;
				if (lr == leftPos) { lp = kv.getR(); lm = true; }
				if (lr == rightPos) { rp = kv.getR(); rm = true; }
			} else {
				switch (kv.getL().intValue()) {
				case 0: ++l; if (l == leftPos) { lp = kv.getR(); lm = true; } break;
				case 1: ++r; if (r == rightPos) { rp = kv.getR(); rm = true; } break;
				}
			}
			
			if (lm && rm) { break; }
		}

		if (!(lm && rm)) {
			return EMPTY;
		}
		
		return this.doSubstring(Pair.of(lp, rp));
	}
1128632
function (el) {
		var offsets = el.getPosition(); // #1496
		return {
			left: offsets.x,
			top: offsets.y
		};
	}
343787
def inverse(self):
        
        invr = np.linalg.inv(self.affine_matrix)
        return SymmOp(invr)
1362932
MutableBigInteger euclidModInverse(int k) {
        MutableBigInteger b = new MutableBigInteger(1);
        b.leftShift(k);
        MutableBigInteger mod = new MutableBigInteger(b);

        MutableBigInteger a = new MutableBigInteger(this);
        MutableBigInteger q = new MutableBigInteger();
        MutableBigInteger r = b.divide(a, q);

        MutableBigInteger swapper = b;
        // swap b & r
        b = r;
        r = swapper;

        MutableBigInteger t1 = new MutableBigInteger(q);
        MutableBigInteger t0 = new MutableBigInteger(1);
        MutableBigInteger temp = new MutableBigInteger();

        while (!b.isOne()) {
            r = a.divide(b, q);

            if (r.intLen == 0)
                throw new ArithmeticException("BigInteger not invertible.");

            swapper = r;
            a = swapper;

            if (q.intLen == 1)
                t1.mul(q.value[q.offset], temp);
            else
                q.multiply(t1, temp);
            swapper = q;
            q = temp;
            temp = swapper;
            t0.add(q);

            if (a.isOne())
                return t0;

            r = b.divide(a, q);

            if (r.intLen == 0)
                throw new ArithmeticException("BigInteger not invertible.");

            swapper = b;
            b =  r;

            if (q.intLen == 1)
                t0.mul(q.value[q.offset], temp);
            else
                q.multiply(t0, temp);
            swapper = q; q = temp; temp = swapper;

            t1.add(q);
        }
        mod.subtract(t1);
        return mod;
    }
1331765
public void inverse(float data[], int rowspan) {
    backtransform(data, rowspan); 
    float norm = normalization();
    for(int i=0; i<nrows; i++){
      for(int j=0; j<ncols; j++){
	data[i*rowspan + 2*j]   *= norm; 
	data[i*rowspan + 2*j+1] *= norm; }}}
1243387
function inverse$11(p) {
        p.x -= this.x0;
        p.y -= this.y0;
        var x = p.x / this.a;
        var y = p.y / this.a;
        var phi, lam;

        if (this.sphere) {
            var dd = y + this.lat0;
            phi = Math.asin(Math.sin(dd) * Math.cos(x));
            lam = Math.atan2(Math.tan(x), Math.cos(dd));
        }
        else {
            /* ellipsoid */
            var ml1 = this.ml0 / this.a + y;
            var phi1 = imlfn(ml1, this.e0, this.e1, this.e2, this.e3);
            if (Math.abs(Math.abs(phi1) - HALF_PI) <= EPSLN) {
                p.x = this.long0;
                p.y = HALF_PI;
                if (y < 0) {
                    p.y *= -1;
                }
                return p;
            }
            var nl1 = gN(this.a, this.e, Math.sin(phi1));

            var rl1 = nl1 * nl1 * nl1 / this.a / this.a * (1 - this.es);
            var tl1 = Math.pow(Math.tan(phi1), 2);
            var dl = x * this.a / nl1;
            var dsq = dl * dl;
            phi = phi1 - nl1 * Math.tan(phi1) / rl1 * dl * dl * (0.5 - (1 + 3 * tl1) * dl * dl / 24);
            lam = dl * (1 - dsq * (tl1 / 3 + (1 + 3 * tl1) * tl1 * dsq / 15)) / Math.cos(phi1);

        }

        p.x = adjust_lon(lam + this.long0);
        p.y = adjust_lat(phi);
        return p;

    }
1018201
def inverse(self):
        """"""
        sign = '+' if self.sign == '-' else '-'
        return DiscreteFourierTransformInverse(
            domain=self.range, range=self.domain, axes=self.axes,
            halfcomplex=self.halfcomplex, sign=sign)
685954
function squaredDifference(left, right) {
              return left.reduce((result, val, index, arr) => { 
                result.push(Math.pow((right[index]-val), 2));
                return result;
              }, []);
            }