FLOAT
@param {Number} m
@param {Number} d
190738
function FLOAT(m, d) {
    m = m || 10
    d = d || 0;
    if (!(this instanceof FLOAT)) {
        return new FLOAT(m, d);
    }
    this.sql = "FLOAT(" + m + "," + d + ")";
}
535430
function(d) {
    return d.dc || (d.dc = Math.floor((later.D.val(d)-1)/7)+1);
  }
829043
function calcRdx(n, m) {
  var val = n > m ? n : m;
  return Math.pow(10,
                  17 - ~~(Math.log(((val > 0) ? val : -val)) * Math.LOG10E));
}
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;
    }
169362
private void rotatorPushRight( int m )
    {
        double b11 = off[m];
        double b21 = diag[m+1];

        computeRotator(b21,-b11);

        // apply rotator on the right
        off[m] = 0;
        diag[m+1] = b21*c-b11*s;

        if( m+2 < N) {
            double b22 = off[m+1];
            off[m+1] = b22*c;
            bulge =  b22*s;
        }  else {
            bulge = 0;
        }

//        SimpleMatrix Q = createQ(m,m+1, c, s, true);
//        B=Q.mult(B);
//
//        B.print();
//        printMatrix();
//        System.out.println("  bulge = "+bulge);
//        System.out.println();

        if( Ut != null ) {
            updateRotator(Ut,m,m+1,c,s);

//            SimpleMatrix.wrap(Ut).mult(B).mult(SimpleMatrix.wrap(Vt).transpose()).print();
//            printMatrix();
//            System.out.println("bulge = "+bulge);
//            System.out.println();
        }
    }
1140884
def dmtoind(dm, f_min, f_max, nchan0, inttime, it):
    

#    maxDT = dmtodt(dm) # need to write

    if it>0:
        correction = dF/2.
    else:
        correction = 0

    shift = []
    nchan = nchan0/2**(iteration_num)
    for i_F in range(nchan):
        f_start = (f_max - f_min)/float(nchan) * (i_F) + f_min
        f_end = (f_max - f_min)/float(nchan) *(i_F+1) + f_min
        f_middle = (f_end - f_start)/2. + f_start - correction
        f_middle_larger = (f_end - f_start)/2 + f_start + correction

        dT_middle = int(round(i_dT * (1./f_middle**2 - 1./f_start**2)/(1./f_end**2 - 1./f_start**2)))
        dT_middle_larger = int(round(i_dT * (1./f_middle_larger**2 - 1./f_start**2)/(1./f_end**2 - 1./f_start**2)))

        shift.append( (-dT_middle_larger, i_F) )
564150
function floatSafeRemainder(val, step) {
  const valDecCount = (val.toString().split('.')[1] || '').length;
  const stepDecCount = (step.toString().split('.')[1] || '').length;
  const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
  const valInt = parseInt(val.toFixed(decCount).replace('.', ''), 10);
  const stepInt = parseInt(step.toFixed(decCount).replace('.', ''), 10);
  return (valInt % stepInt) / Math.pow(10, decCount);
}
1298032
def _convert_to_degress(self, value):
        """"""
        d0 = value[0][0]
        d1 = value[0][1]
        d = float(d0) / float(d1)

        m0 = value[1][0]
        m1 = value[1][1]
        m = float(m0) / float(m1)

        s0 = value[2][0]
        s1 = value[2][1]
        s = float(s0) / float(s1)

        return d + (m / 60.0) + (s / 3600.0)
564499
public float linear(float[] x, int m) {
    float result = (float) 1.0;
    int M = x.length;

    for (int i = 1; i <= M - m; i++) {
      result *= x[i - 1];
    }

    if (m != 1) {
      result *= (1 - x[M - m]);
    }

    return result;
  }
1336325
def _mdens_deriv(self,m):
        """"""
        return -self.a3*(self.a+3.*m)/m**2/(self.a+m)**3
581447
def black(m):
    

    m = float(m)

    def f(x):
        if x <= m:
            return 0.0
        return (x - m) / (1.0 - m)
    return f
747546
function fixedFloat(l, r, sign) {
    const arrL = split(l)
    const arrR = split(r)
    let fLen = Math.max(arrL[1], arrR[1])

    if (fLen === 0) {
        return operate(Number(l), Number(r), sign, 1)
    }
    const f = Math.pow(10, fLen)
    if (arrL[1] !== arrR[1]) {
        if (arrL[1] > arrR[1]) {
            arrR[0] += padding0(arrL[1] - arrR[1])
        } else {
            arrL[0] += padding0(arrR[1] - arrL[1])
        }
    }
    return operate(Number(arrL[0]), Number(arrR[0]), sign, f)
}
189917
def dfromdm(dm):
    
    if np.size(dm)>1:
        dm = np.atleast_1d(dm)
    return 10**(1+dm/5)
808069
def imf(m):
    ''' 
     

    '''

    m1 = 0.08; m2 = 0.50
    a1 = 0.30; a2 = 1.30; a3 = 2.3
    const2 = m1**-a1 -m1**-a2 
    const3 = m2**-a2 -m2**-a3 

    if m < 0.08:
        alpha = 0.3
        const = -const2 -const3
    elif m < 0.50:
        alpha = 1.3
        const = -const3
    else:
        alpha = 2.3
        const = 0.0
    # print m,alpha, const, m**-alpha + const 
    return m**-alpha + const
780582
function valueF() {
		if (!isset($this->{__METHOD__})) {
			$this->{__METHOD__} = df_float($this->value());
		}
		return $this->{__METHOD__};
	}
425181
public static void doubleCenterSymmetric(double[][] m) {
    final int size = m.length;
    // Storage for mean values - initially all 0.
    double[] means = new double[size];
    for(int x = 0; x < m.length; x++) {
      final double[] rowx = m[x];
      // We already added "x" values in previous iterations.
      // Fake-add 0: mean + (0 - mean) / (x + 1)
      double rmean = means[x] - means[x] / (x + 1);
      for(int y = x + 1; y < rowx.length; y++) {
        final double nv = rowx[y];
        final double dx = nv - rmean, dy = nv - means[y];
        // For x < y, this is the yth entry.
        rmean += dx / (y + 1);
        // For y > x, this is the xth entry
        means[y] += dy / (x + 1);
      }
      means[x] = rmean;
    }
    // Compute total mean by averaging column means.
    double mean = means[0];
    for(int x = 1; x < size; x++) {
      double dm = means[x] - mean;
      mean += dm / (x + 1);
    }
    // Row and column center; also make symmetric.
    for(int x = 0; x < size; x++) {
      m[x][x] = -2. * means[x] + mean;
      for(int y = x + 1; y < size; y++) {
        final double nv = m[x][y] - means[x] - means[y] + mean;
        m[x][y] = nv;
        m[y][x] = nv;
      }
    }
  }
708602
function (m) {
        var v = this.array;
        m = m.array;

        // Perspective projection
        if (m[15] === 0) {
            var w = -1 / v[2];
            v[0] = m[0] * v[0] * w;
            v[1] = m[5] * v[1] * w;
            v[2] = (m[10] * v[2] + m[14]) * w;
        }
        else {
            v[0] = m[0] * v[0] + m[12];
            v[1] = m[5] * v[1] + m[13];
            v[2] = m[10] * v[2] + m[14];
        }
        this._dirty = true;

        return this;
    }