/external/apache-commons-math/src/main/java/org/apache/commons/math/analysis/integration/ |
D | LegendreGaussIntegrator.java | 25 import org.apache.commons.math.util.FastMath; 58 -1.0 / FastMath.sqrt(3.0), 59 1.0 / FastMath.sqrt(3.0) 70 -FastMath.sqrt(0.6), 72 FastMath.sqrt(0.6) 84 -FastMath.sqrt((15.0 + 2.0 * FastMath.sqrt(30.0)) / 35.0), 85 -FastMath.sqrt((15.0 - 2.0 * FastMath.sqrt(30.0)) / 35.0), 86 FastMath.sqrt((15.0 - 2.0 * FastMath.sqrt(30.0)) / 35.0), 87 FastMath.sqrt((15.0 + 2.0 * FastMath.sqrt(30.0)) / 35.0) 92 (90.0 - 5.0 * FastMath.sqrt(30.0)) / 180.0, [all …]
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/ode/nonstiff/ |
D | DormandPrince853Integrator.java | 20 import org.apache.commons.math.util.FastMath; 64 …(12.0 - 2.0 * FastMath.sqrt(6.0)) / 135.0, (6.0 - FastMath.sqrt(6.0)) / 45.0, (6.0 - FastMath.sqrt… 65 (6.0 + FastMath.sqrt(6.0)) / 30.0, 1.0/3.0, 1.0/4.0, 4.0/13.0, 127.0/195.0, 3.0/5.0, 73 {(12.0 - 2.0 * FastMath.sqrt(6.0)) / 135.0}, 76 {(6.0 - FastMath.sqrt(6.0)) / 180.0, (6.0 - FastMath.sqrt(6.0)) / 60.0}, 79 {(6.0 - FastMath.sqrt(6.0)) / 120.0, 0.0, (6.0 - FastMath.sqrt(6.0)) / 40.0}, 82 {(462.0 + 107.0 * FastMath.sqrt(6.0)) / 3000.0, 0.0, 83 (-402.0 - 197.0 * FastMath.sqrt(6.0)) / 1000.0, (168.0 + 73.0 * FastMath.sqrt(6.0)) / 375.0}, 86 … {1.0 / 27.0, 0.0, 0.0, (16.0 + FastMath.sqrt(6.0)) / 108.0, (16.0 - FastMath.sqrt(6.0)) / 108.0}, 89 {19.0 / 512.0, 0.0, 0.0, (118.0 + 23.0 * FastMath.sqrt(6.0)) / 1024.0, [all …]
|
D | AdaptiveStepsizeIntegrator.java | 26 import org.apache.commons.math.util.FastMath; 109 this.minStep = FastMath.abs(minStep); in AdaptiveStepsizeIntegrator() 110 this.maxStep = FastMath.abs(maxStep); in AdaptiveStepsizeIntegrator() 243 1.0e-6 : (0.01 * FastMath.sqrt(yOnScale2 / yDotOnScale2)); in initializeStep() 260 yDDotOnScale = FastMath.sqrt(yDDotOnScale) / h; in initializeStep() 264 final double maxInv2 = FastMath.max(FastMath.sqrt(yDotOnScale2), yDDotOnScale); in initializeStep() 266 FastMath.max(1.0e-6, 0.001 * FastMath.abs(h)) : in initializeStep() 267 FastMath.pow(0.01 / maxInv2, 1.0 / order); in initializeStep() 268 h = FastMath.min(100.0 * FastMath.abs(h), h1); in initializeStep() 269 h = FastMath.max(h, 1.0e-12 * FastMath.abs(t0)); // avoids cancellation when computing t1 - t0 in initializeStep() [all …]
|
D | GillIntegrator.java | 20 import org.apache.commons.math.util.FastMath; 57 { (FastMath.sqrt(2.0) - 1.0) / 2.0, (2.0 - FastMath.sqrt(2.0)) / 2.0 }, 58 { 0.0, -FastMath.sqrt(2.0) / 2.0, (2.0 + FastMath.sqrt(2.0)) / 2.0 } 63 1.0 / 6.0, (2.0 - FastMath.sqrt(2.0)) / 6.0, (2.0 + FastMath.sqrt(2.0)) / 6.0, 1.0 / 6.0
|
D | GraggBulirschStoerIntegrator.java | 27 import org.apache.commons.math.util.FastMath; 431 final double yi = FastMath.max(FastMath.abs(y1[i]), FastMath.abs(y2[i])); in rescale() 436 final double yi = FastMath.max(FastMath.abs(y1[i]), FastMath.abs(y2[i])); in rescale() 506 if (deltaNorm > 4 * FastMath.max(1.0e-15, initialNorm)) { in tryStep() 610 final double log10R = FastMath.log10(FastMath.max(1.0e-10, tol)); in integrate() 611 int targetIter = FastMath.max(1, in integrate() 612 FastMath.min(sequence.length - 2, in integrate() 613 (int) FastMath.floor(0.5 - 0.6 * log10R))); in integrate() 685 hNew = FastMath.abs(filterStep(stepSize * stabilityReduction, forward, false)); in integrate() 702 final double e = FastMath.abs(y1[j] - y1Diag[0][j]) / scale[j]; in integrate() [all …]
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/complex/ |
D | Complex.java | 28 import org.apache.commons.math.util.FastMath; 117 if (FastMath.abs(real) < FastMath.abs(imaginary)) { in abs() 119 return FastMath.abs(real); in abs() 122 return FastMath.abs(imaginary) * FastMath.sqrt(1 + q * q); in abs() 125 return FastMath.abs(imaginary); in abs() 128 return FastMath.abs(real) * FastMath.sqrt(1 + q * q); in abs() 225 if (FastMath.abs(c) < FastMath.abs(d)) { in divide() 551 return createComplex(FastMath.cos(real) * MathUtils.cosh(imaginary), in cos() 552 -FastMath.sin(real) * MathUtils.sinh(imaginary)); in cos() 585 return createComplex(MathUtils.cosh(real) * FastMath.cos(imaginary), in cosh() [all …]
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/analysis/ |
D | ComposableFunction.java | 21 import org.apache.commons.math.util.FastMath; 64 return FastMath.abs(d); 91 return FastMath.sin(d); 100 return FastMath.sqrt(d); 109 return FastMath.sinh(d); 118 return FastMath.exp(d); 127 return FastMath.expm1(d); 136 return FastMath.asin(d); 145 return FastMath.atan(d); 154 return FastMath.tan(d); [all …]
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/geometry/ |
D | Vector3D.java | 25 import org.apache.commons.math.util.FastMath; 111 double cosDelta = FastMath.cos(delta); in Vector3D() 112 this.x = FastMath.cos(alpha) * cosDelta; in Vector3D() 113 this.y = FastMath.sin(alpha) * cosDelta; in Vector3D() 114 this.z = FastMath.sin(delta); in Vector3D() 207 return FastMath.abs(x) + FastMath.abs(y) + FastMath.abs(z); in getNorm1() 214 return FastMath.sqrt (x * x + y * y + z * z); in getNorm() 228 return FastMath.max(FastMath.max(FastMath.abs(x), FastMath.abs(y)), FastMath.abs(z)); in getNormInf() 236 return FastMath.atan2(y, x); in getAlpha() 244 return FastMath.asin(z / getNorm()); in getDelta() [all …]
|
D | Rotation.java | 24 import org.apache.commons.math.util.FastMath; 138 double inv = 1.0 / FastMath.sqrt(q0 * q0 + q1 * q1 + q2 * q2 + q3 * q3); in Rotation() 181 double coeff = FastMath.sin(halfAngle) / norm; in Rotation() 183 q0 = FastMath.cos (halfAngle); in Rotation() 258 q0 = 0.5 * FastMath.sqrt(s + 1.0); in Rotation() 267 q1 = 0.5 * FastMath.sqrt(s + 1.0); in Rotation() 276 q2 = 0.5 * FastMath.sqrt(s + 1.0); in Rotation() 284 q3 = 0.5 * FastMath.sqrt(s + 1.0); in Rotation() 333 double coeff = FastMath.sqrt (u1u1 / v1v1); in Rotation() 344 double beta = FastMath.sqrt((u2u2 - u1u2 * coeffU) / (v2v2 - v1v2 * coeffV)); in Rotation() [all …]
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/util/ |
D | MathUtils.java | 48 public static final double TWO_PI = 2 * FastMath.PI; 293 return FastMath.floor(result + 0.5); in binomialCoefficientDouble() 320 return FastMath.log(n); in binomialCoefficientLog() 328 return FastMath.log(binomialCoefficient(n,k)); in binomialCoefficientLog() 336 return FastMath.log(binomialCoefficientDouble(n, k)); in binomialCoefficientLog() 350 logSum += FastMath.log(i); in binomialCoefficientLog() 355 logSum -= FastMath.log(i); in binomialCoefficientLog() 408 return (FastMath.exp(x) + FastMath.exp(-x)) / 2.0; in cosh() 453 return equals(x, y, 1) || FastMath.abs(y - x) <= eps; in equals() 468 return equalsIncludingNaN(x, y) || (FastMath.abs(y - x) <= eps); in equalsIncludingNaN() [all …]
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/analysis/solvers/ |
D | BrentSolver.java | 25 import org.apache.commons.math.util.FastMath; 142 if (FastMath.abs(yInitial) <= functionValueAccuracy) { in solve() 149 if (FastMath.abs(yMin) <= functionValueAccuracy) { in solve() 161 if (FastMath.abs(yMax) <= functionValueAccuracy) { in solve() 237 if (FastMath.abs(yMin) <= functionValueAccuracy) { in solve() 240 } else if (FastMath.abs(yMax) <= functionValueAccuracy) { in solve() 314 if (FastMath.abs(y2) < FastMath.abs(y1)) { in solve() 323 if (FastMath.abs(y1) <= functionValueAccuracy) { in solve() 332 FastMath.max(relativeAccuracy * FastMath.abs(x1), absoluteAccuracy); in solve() 333 if (FastMath.abs(dx) <= tolerance) { in solve() [all …]
|
D | MullerSolver.java | 23 import org.apache.commons.math.util.FastMath; 232 final double xplus = x1 + (-2.0 * y1) / (c1 + FastMath.sqrt(delta)); in solve() 233 final double xminus = x1 + (-2.0 * y1) / (c1 - FastMath.sqrt(delta)); in solve() 240 … final double tolerance = FastMath.max(relativeAccuracy * FastMath.abs(x), absoluteAccuracy); in solve() 241 if (FastMath.abs(x - oldx) <= tolerance) { in solve() 245 if (FastMath.abs(y) <= functionValueAccuracy) { in solve() 372 double dplus = b + FastMath.sqrt(delta); in solve2() 373 double dminus = b - FastMath.sqrt(delta); in solve2() 374 denominator = FastMath.abs(dplus) > FastMath.abs(dminus) ? dplus : dminus; in solve2() 377 denominator = FastMath.sqrt(b * b - delta); in solve2() [all …]
|
D | SecantSolver.java | 25 import org.apache.commons.math.util.FastMath; 186 if (FastMath.abs(y2) < FastMath.abs(y1)) { in solve() 194 if (FastMath.abs(y1) <= functionValueAccuracy) { in solve() 198 if (FastMath.abs(oldDelta) < in solve() 199 FastMath.max(relativeAccuracy * FastMath.abs(x1), absoluteAccuracy)) { in solve() 204 if (FastMath.abs(y1) > FastMath.abs(y0)) { in solve()
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/estimation/ |
D | LevenbergMarquardtEstimator.java | 23 import org.apache.commons.math.util.FastMath; 254 solvedCols = FastMath.min(rows, cols); in estimate() 307 xNorm = FastMath.sqrt(xNorm); in estimate() 327 maxCosine = FastMath.max(maxCosine, FastMath.abs(sum) / (s * cost)); in estimate() 337 diag[j] = FastMath.max(diag[j], jacNorm[j]); in estimate() 365 lmNorm = FastMath.sqrt(lmNorm); in estimate() 369 delta = FastMath.min(delta, lmNorm); in estimate() 414 delta = tmp * FastMath.min(delta, 10.0 * lmNorm); in estimate() 430 xNorm = FastMath.sqrt(xNorm); in estimate() 444 if (((FastMath.abs(actRed) <= costRelativeTolerance) && in estimate() [all …]
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/distribution/ |
D | WeibullDistributionImpl.java | 25 import org.apache.commons.math.util.FastMath; 103 ret = 1.0 - FastMath.exp(-FastMath.pow(x / scale, shape)); in cumulativeProbability() 138 final double xscalepow = FastMath.pow(xscale, shape - 1); in density() 147 return (shape / scale) * xscalepow * FastMath.exp(-xscalepowshape); in density() 173 ret = scale * FastMath.pow(-FastMath.log(1.0 - p), 1.0 / shape); in inverseCumulativeProbability() 263 return FastMath.pow(scale * FastMath.log(2.0), 1.0 / shape); in getInitialDomain() 316 return sc * FastMath.exp(Gamma.logGamma(1 + (1 / sh))); in calculateNumericalMean() 335 FastMath.exp(Gamma.logGamma(1 + (2 / sh))) - in calculateNumericalVariance()
|
D | SaddlePointExpansion.java | 20 import org.apache.commons.math.util.FastMath; 49 private static final double HALF_LOG_2_PI = 0.5 * FastMath.log(MathUtils.TWO_PI); 111 if (FastMath.floor(z2) == z2) { in getStirlingError() 114 ret = Gamma.logGamma(z + 1.0) - (z + 0.5) * FastMath.log(z) + in getStirlingError() 147 if (FastMath.abs(x - mu) < 0.1 * (x + mu)) { in getDeviancePart() 163 ret = x * FastMath.log(x / mu) + mu - x; in getDeviancePart() 184 ret = n * FastMath.log(q); in logBinomialProbability() 190 ret = n * FastMath.log(p); in logBinomialProbability() 197 ret = -0.5 * FastMath.log(f) + ret; in logBinomialProbability()
|
D | AbstractIntegerDistribution.java | 25 import org.apache.commons.math.util.FastMath; 70 return cumulativeProbability((int) FastMath.floor(x)); in cumulativeProbability() 93 if (FastMath.floor(x0) < x0) { in cumulativeProbability() 94 return cumulativeProbability(((int) FastMath.floor(x0)) + 1, in cumulativeProbability() 95 (int) FastMath.floor(x1)); // don't want to count mass below x0 in cumulativeProbability() 97 return cumulativeProbability((int) FastMath.floor(x0), in cumulativeProbability() 98 (int) FastMath.floor(x1)); in cumulativeProbability() 126 double fl = FastMath.floor(x); in probability()
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/optimization/general/ |
D | LevenbergMarquardtOptimizer.java | 25 import org.apache.commons.math.util.FastMath; 307 xNorm = FastMath.sqrt(xNorm); in doOptimize() 325 maxCosine = FastMath.max(maxCosine, FastMath.abs(sum) / (s * cost)); in doOptimize() 338 diag[j] = FastMath.max(diag[j], jacNorm[j]); in doOptimize() 369 lmNorm = FastMath.sqrt(lmNorm); in doOptimize() 372 delta = FastMath.min(delta, lmNorm); in doOptimize() 415 delta = tmp * FastMath.min(delta, 10.0 * lmNorm); in doOptimize() 431 xNorm = FastMath.sqrt(xNorm); in doOptimize() 456 if (((FastMath.abs(actRed) <= costRelativeTolerance) && in doOptimize() 465 … if ((FastMath.abs(actRed) <= 2.2204e-16) && (preRed <= 2.2204e-16) && (ratio <= 2.0)) { in doOptimize() [all …]
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/special/ |
D | Gamma.java | 22 import org.apache.commons.math.util.FastMath; 62 private static final double HALF_LOG_2_PI = 0.5 * FastMath.log(2.0 * FastMath.PI); 110 ret = ((x + .5) * FastMath.log(tmp)) - tmp + in logGamma() 111 HALF_LOG_2_PI + FastMath.log(sum / x); in logGamma() 179 … while (FastMath.abs(an/sum) > epsilon && n < maxIterations && sum < Double.POSITIVE_INFINITY) { in regularizedGammaP() 192 ret = FastMath.exp(-x + (a * FastMath.log(x)) - logGamma(a)) * sum; in regularizedGammaP() 267 ret = FastMath.exp(-x + (a * FastMath.log(x)) - logGamma(a)) * ret; in regularizedGammaQ() 307 return FastMath.log(x) - 0.5 / x - inv * ((1.0 / 12) + inv * (1.0 / 120 - inv / 252)); in digamma()
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/linear/ |
D | ArrayRealVector.java | 26 import org.apache.commons.math.util.FastMath; 379 data[i] = FastMath.pow(data[i], d); in mapPowToSelf() 388 data[i] = FastMath.exp(data[i]); in mapExpToSelf() 397 data[i] = FastMath.expm1(data[i]); in mapExpm1ToSelf() 406 data[i] = FastMath.log(data[i]); in mapLogToSelf() 415 data[i] = FastMath.log10(data[i]); in mapLog10ToSelf() 424 data[i] = FastMath.log1p(data[i]); in mapLog1pToSelf() 433 data[i] = FastMath.cosh(data[i]); in mapCoshToSelf() 442 data[i] = FastMath.sinh(data[i]); in mapSinhToSelf() 451 data[i] = FastMath.tanh(data[i]); in mapTanhToSelf() [all …]
|
D | EigenDecompositionImpl.java | 24 import org.apache.commons.math.util.FastMath; 149 if (FastMath.abs(mij - mji) > in isSymmetric() 150 (FastMath.max(FastMath.abs(mij), FastMath.abs(mji)) * eps)) { in isSymmetric() 488 if (FastMath.abs(realEigenvalues[i])>maxAbsoluteValue) { in findEigenVectors() 489 maxAbsoluteValue=FastMath.abs(realEigenvalues[i]); in findEigenVectors() 491 if (FastMath.abs(e[i])>maxAbsoluteValue) { in findEigenVectors() 492 maxAbsoluteValue=FastMath.abs(e[i]); in findEigenVectors() 498 if (FastMath.abs(realEigenvalues[i])<=MathUtils.EPSILON*maxAbsoluteValue) { in findEigenVectors() 501 if (FastMath.abs(e[i])<=MathUtils.EPSILON*maxAbsoluteValue) { in findEigenVectors() 512 … double delta = FastMath.abs(realEigenvalues[m]) + FastMath.abs(realEigenvalues[m + 1]); in findEigenVectors() [all …]
|
D | BlockRealMatrix.java | 26 import org.apache.commons.math.util.FastMath; 229 final int pEnd = FastMath.min(pStart + BLOCK_SIZE, rows); in toBlocksLayout() 233 final int qEnd = FastMath.min(qStart + BLOCK_SIZE, columns); in toBlocksLayout() 277 final int pEnd = FastMath.min(pStart + BLOCK_SIZE, rows); in createBlocksLayout() 281 final int qEnd = FastMath.min(qStart + BLOCK_SIZE, columns); in createBlocksLayout() 337 final int pEnd = FastMath.min(pStart + BLOCK_SIZE, rows); in add() 339 final int qEnd = FastMath.min(qStart + BLOCK_SIZE, columns); in add() 410 final int pEnd = FastMath.min(pStart + BLOCK_SIZE, rows); in subtract() 412 final int qEnd = FastMath.min(qStart + BLOCK_SIZE, columns); in subtract() 519 final int pEnd = FastMath.min(pStart + BLOCK_SIZE, rows); in multiply() [all …]
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/ode/events/ |
D | EventState.java | 27 import org.apache.commons.math.util.FastMath; 99 this.convergence = FastMath.abs(convergence); in EventState() 205 if (FastMath.abs(t1 - t0) < convergence) { in evaluateStep() 211 … final int n = FastMath.max(1, (int) FastMath.ceil(FastMath.abs(dt) / maxCheckInterval)); in evaluateStep() 277 (FastMath.abs(root - ta) <= convergence) && in evaluateStep() 278 (FastMath.abs(root - previousEventTime) <= convergence)) { in evaluateStep() 283 (FastMath.abs(previousEventTime - root) > convergence)) { in evaluateStep() 336 if (pendingEvent && (FastMath.abs(pendingEventTime - t) <= convergence)) { in stepAccepted() 367 if (!(pendingEvent && (FastMath.abs(pendingEventTime - t) <= convergence))) { in reset()
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/optimization/ |
D | SimpleScalarValueChecker.java | 20 import org.apache.commons.math.util.FastMath; 77 final double difference = FastMath.abs(p - c); in converged() 78 final double size = FastMath.max(FastMath.abs(p), FastMath.abs(c)); in converged()
|
D | SimpleRealPointChecker.java | 20 import org.apache.commons.math.util.FastMath; 78 final double difference = FastMath.abs(p[i] - c[i]); in converged() 79 final double size = FastMath.max(FastMath.abs(p[i]), FastMath.abs(c[i])); in converged()
|