Interpolates the value of delta T (ΔΤ)

@return float|boolean Returns false on error.
486921
public function deltaT()
    {
        // Historic ΔT
        if ($this->jd < 2441714.5) {
            return $this->deltaT_historic();
        }

        // Predictive ΔT
        if ($this->jd > $this->deltaT_lastJD()) {
            return $this->deltaT_predict();
        }

        // Base ΔT data file
        return $this->deltaT_base();
    }
883766
def delta(self):
        """"""
        end_time = self.end_time if self.end_time else dt.datetime.now()
        return end_time - self.start_time
305688
function delta(wgLon, wgLat) {
  var dLat = transformLat(wgLon - 105.0, wgLat - 35.0);
  var dLon = transformLon(wgLon - 105.0, wgLat - 35.0);
  var radLat = wgLat / 180.0 * PI;
  var magic = Math.sin(radLat);
  magic = 1 - OFFSET * magic * magic;
  var sqrtMagic = Math.sqrt(magic);
  dLat = (dLat * 180.0) / ((AXIS * (1 - OFFSET)) / (magic * sqrtMagic) * PI);
  dLon = (dLon * 180.0) / (AXIS / sqrtMagic * Math.cos(radLat) * PI);
  return [dLon, dLat];
}
612303
def _make_interpolation(self):
        
        H0_range = np.linspace(10, 100, 90)
        omega_m_range = np.linspace(0.05, 1, 95)
        grid2d = np.dstack(np.meshgrid(H0_range, omega_m_range)).reshape(-1, 2)
        H0_grid = grid2d[:, 0]
        omega_m_grid = grid2d[:, 1]
        Dd_grid = np.zeros_like(H0_grid)
        Ds_Dds_grid = np.zeros_like(H0_grid)
        for i in range(len(H0_grid)):
            Dd, Ds_Dds = self.cosmo2Dd_Ds_Dds(H0_grid[i], omega_m_grid[i])
            Dd_grid[i] = Dd
            Ds_Dds_grid[i] = Ds_Dds
        self._f_H0 = interpolate.interp2d(Dd_grid, Ds_Dds_grid, H0_grid, kind='linear', copy=False, bounds_error=False, fill_value=-1)
        print("H0 interpolation done")
        self._f_omega_m = interpolate.interp2d(Dd_grid, Ds_Dds_grid, omega_m_grid, kind='linear', copy=False, bounds_error=False, fill_value=-1)
        print("omega_m interpolation done")
72690
function(delta, numPoints, firstTime) {
	let k = 0;
	delta = firstTime ? floor(delta / damp) : delta >> 1;
	delta += floor(delta / numPoints);
	for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
		delta = floor(delta / baseMinusTMin);
	}
	return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
}
1163565
def _estimate_delta(ntriangles, area):
    
    return np.sqrt(4./np.sqrt(3) * float(area) / float(ntriangles))
678862
def render_delta(d):
    """"""
    s = '' if d >= 0 else '-'
    d = abs(d)

    for unit in _SORTED_UNITS:
        span = __timedelta_millis(unit[1])
        if d >= span:
            count = int(d // span)
            s += '{0}{1}'.format(count, unit[0])
            d -= count * span

    if d or not s:
        s += str(d)

    return s
585419
def interp(x, xp, *args, **kwargs):
    """"""
    return interpolate_1d(x, xp, *args, **kwargs)
44716
def deltas(errors, epsilon, mean, std):
    
    below = errors[errors <= epsilon]
    if not len(below):
        return 0, 0

    return mean - below.mean(), std - below.std()
1344690
private function deltaT_base()
    {
        // Get Julian day count
        static::iauJd2cal(2400000.5, $this->mjd, $iy, $im, $id, $fd);

        // Determine pointer, return false if out of range
        $p = ($iy - 1973) * 12 + $im - 2;
        if ($p < 0) {
            return false;
        }

        // Load file, and get max line count
        $file  = new \SplFileObject($this->storage('deltat.data'));
        $mLine = count(file($file->getRealPath())) - 1;

        // Reset pointer if within INTERP_COUNT on lower bound
        if ($p < static::INTERP_C) {
            $p = static::INTERP_C;
        }

        // Reset pointer if within INTERP_COUNT on upper bound
        if ($p + static::INTERP_C > $mLine) {
            $p = $mLine - static::INTERP_C;
        }

        // Compile dataset
        $ds = [];
        for ($i = $p - static::INTERP_C; $i < $p + static::INTERP_C; $i++) {
            // Seek pointer and get line
            $file->seek($i);
            $line = $file->getCurrentLine();

            // YMD -> JD
            $y = (int)substr($line, 1, 4);
            $m = (int)substr($line, 6, 2);
            $d = (int)substr($line, 9, 2);
            static::iauCal2jd($y, $m, $d, $djm0, $djm);

            // Parse value of ΔT
            $dT = (float)substr($line, 13, 7);

            // Insert data
            $ds[$i - $p + static::INTERP_C]['x'] = $djm0 + $djm;
            $ds[$i - $p + static::INTERP_C]['y'] = $dT;
        }

        // Interpolate value of ΔT
        return $this->lagrangeInterp($this->jd, $ds);
    }
1004731
public boolean eq(IntFloatSortedVector other, float delta) {
        // This is slow, but correct.
        IntFloatSortedVector v1 = IntFloatSortedVector.getWithNoZeroValues(this, delta);
        IntFloatSortedVector v2 = IntFloatSortedVector.getWithNoZeroValues(other, delta);
                
        if (v2.size() != v1.size()) {
            return false;
        }

        for (IntFloatEntry ve : v1) {
            if (!Primitives.equals(ve.get(), v2.get(ve.index()), delta)) {
                return false;
            }
        }
        for (IntFloatEntry ve : v2) {
            if (!Primitives.equals(ve.get(), v1.get(ve.index()), delta)) {
                return false;
            }
        }
        return true;
    }
872978
public function mean(): float
    {
        $a = $this->a;
        $b = $this->b;

        return ($a + $b) / 2;
    }
395899
function deltaNone(arg, increment) {
  let newIdx = arg.idx + increment;

  if (newIdx >= arg.values.length) {
    newIdx = arg.values.length - 1;
  }

  if (newIdx < 0) {
    newIdx = 0;
  }

  if (arg.idx !== newIdx) {
    arg.idx = newIdx;
    return true;
  }

  return false;
}
297963
def get_and_subtract(self, delta):
        '''
        
        '''
        with self._reference.get_lock():
            oldval = self._reference.value
            self._reference.value -= delta
            return oldval
349567
def delta(self):
        
        number      = self._numberSpinner.value()
        unit        = self._unitCombo.currentText()
        direction   = self._directionCombo.currentText()
        
        # use past tense
        if direction == 'ago':
            number = -number
        
        if unit == 'year(s)':
            return datetime.timedelta(number * 365)
        elif unit == 'month(s)':
            return datetime.timedelta(number * 30)
        elif unit == 'week(s)':
            return datetime.timedelta(number * 7)
        elif unit == 'day(s)':
            return datetime.timedelta(number)
        elif unit == 'hour(s)':
            return datetime.timedelta(0, number * 3600)
        elif unit == 'minute(s)':
            return datetime.timedelta(0, number * 60)
        else:
            return datetime.timedelta(0, number)
538753
public double getAndAdd(int i, double delta)
    {
        while(true)
        {
            double orig = get(i);
            double newVal = orig + delta;
            if(compareAndSet(i, orig, newVal))
                return orig;
        }
    }
1079238
function interpolateY (x, x0, y0, x1, y1) {
  return (y0 + (((x - x0) * (y1 - y0)) / (x1 - x0))) || 0; // avoid NaN
}