Home
last modified time | relevance | path

Searched refs:sqrt (Results 1 – 25 of 30) sorted by relevance

12

/libcore/ojluni/src/test/java/math/BigDecimal/
DSquareRootTests.java57 BigDecimal result = input.sqrt(MathContext.DECIMAL64); in negativeTests()
72 compare(BigDecimal.valueOf(0L, i).sqrt(MathContext.UNLIMITED), in zeroTests()
75 compare(BigDecimal.valueOf(0L, i).sqrt(MathContext.DECIMAL64), in zeroTests()
146 equalNumerically(BigSquareRoot.sqrt(bd, mc), in compareSqrtImplementations()
147 bd.sqrt(mc), "sqrt(" + bd + ") under " + mc); in compareSqrtImplementations()
166 result = testValue.sqrt(MathContext.DECIMAL64), in evenPowersOfTenTests()
171 result = testValue.sqrt(oneDigitExactly), in evenPowersOfTenTests()
203 BigDecimal computed = TWO.sqrt(mc); in squareRootTwoTests()
204 BigDecimal altComputed = BigSquareRoot.sqrt(TWO, mc); in squareRootTwoTests()
236 BigDecimal computedRoot = scaledSquare.sqrt(mc); in lowPrecisionPerfectSquares()
[all …]
/libcore/luni/src/test/resources/
Dmath_important_numbers.csv481 sqrt,0x1.a61298e1e069cp0,0x1.5bf0a8b145769p1,2.718281828459045
482 sqrt,0x0.0p0,0x0.0p0,0.0
483 sqrt,-0x0.0p0,-0x0.0p0,-0.0
484 sqrt,0x1.0p0,0x1.0p0,1.0
485 sqrt,0x1.6a09e667f3bcdp-1,0x1.0p-1,0.5
486 sqrt,0x0.0p0,0x0.0p0,0.0
487 sqrt,0x1.05f8bd37c0e62p-1,0x1.0c152382d7365p-2,0.2617993877991494
488 sqrt,0x1.727bdd17583bbp-1,0x1.0c152382d7365p-1,0.5235987755982988
489 sqrt,0x1.c5bf891b4ef6ap-1,0x1.921fb54442d18p-1,0.7853981633974483
490 sqrt,0x1.05f8bd37c0e62p0,0x1.0c152382d7365p0,1.0471975511965976
[all …]
/libcore/luni/src/test/java/libcore/java/lang/
DOldAndroidFloatDoubleTest.java89 Float sqrtm2 = Float.valueOf((float) Math.sqrt(-2.0f)); in testFloat()
90 Float sqrtm3 = Float.valueOf((float) Math.sqrt(-3.0f)); in testFloat()
144 Double sqrtm2 = Double.valueOf(Math.sqrt(-2.0)); in testDouble()
145 Double sqrtm3 = Double.valueOf(Math.sqrt(-3.0)); in testDouble()
DIntrinsicTest.java88 StrictMath.sqrt(2.0); in testStrictMath_sqrt()
103 Math.sqrt(2.0); in testMath_sqrt()
DOldAndroidStrictMathTest.java24 private final double HYP = StrictMath.sqrt(2.0);
543 2, StrictMath.sqrt(StrictMath.pow(StrictMath.sqrt(2), 4)), 0.0); in testSqrtD()
544 assertEquals("Incorrect root returned2", 7, StrictMath.sqrt(49), 0.0); in testSqrtD()
DOldAndroidMathTest.java27 private static final double HYP = Math.sqrt(2.0);
455 2, Math.sqrt(Math.pow(Math.sqrt(2), 4)), 0); in testPowDD()
563 assertEquals("Incorrect root returned2", 7, Math.sqrt(49), 0); in testSqrtD()
/libcore/ojluni/src/main/native/
DMath.c76 return sqrt(d); in Math_sqrt()
165 FAST_NATIVE_METHOD(Math, sqrt, "(D)D"),
Djfdlibm.h48 #define sqrt jsqrt macro
Dfdlibm.h136 extern double sqrt __P((double));
DStrictMath.c169 NATIVE_METHOD(StrictMath, sqrt, "(D)D"),
/libcore/support/src/test/java/tests/util/
DSummaryStatistics.java64 return Math.sqrt(var()); in stddev()
/libcore/ojluni/src/test/java/math/BigInteger/
DBigIntegerTest.java251 s = n.sqrt(); in squareRootSmall()
259 checkResult(BigInteger.ZERO, BigInteger.ZERO.sqrt(), "sqrt(0) != BigInteger.ZERO"); in squareRootSmall()
264 checkResult(BigInteger.ONE, BigInteger.valueOf(small).sqrt(), "sqrt("+small+") != 1"); in squareRootSmall()
275 checkResult(n, n2.sqrt(), "sqrt() n^2 -> n"); in squareRoot()
279 checkResult(n, n2up.sqrt(), "sqrt() n^2 + 1 -> n"); in squareRoot()
283 checkResult(n, up.sqrt(), "sqrt() (n + 1)^2 - 1 -> n"); in squareRoot()
286 BigInteger s = n.sqrt(); in squareRoot()
317 (double) Long.MAX_VALUE + 1.0, Math.sqrt(Double.MAX_VALUE)); in squareRoot()
/libcore/ojluni/src/test/java/lang/StrictMath/
DFdlibmTranslit.java228 w = Math.sqrt(t1 * t1 - (b * (-b) - t2 * (a + t1))); in compute()
237 w = Math.sqrt(t1 * y1 - (w * (-w) - (t1 * y2 + t2 * b))); in compute()
/libcore/ojluni/annotations/sdk/nullability/java/math/
DBigInteger.annotated.java85 @libcore.util.NonNull public BigInteger sqrt() { throw new RuntimeException("Stub!"); } in sqrt() method in BigInteger
/libcore/ojluni/annotations/flagged_api/java/lang/
DStrictMath.annotated.java56 public static native double sqrt(double a); in sqrt() method in StrictMath
DMath.annotated.java57 public static native double sqrt(double a); in sqrt() method in Math
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DOldBigIntegerTest.java364 long maxlen = ((long) Math.sqrt(b)) + 2; in isPrime()
/libcore/ojluni/src/main/java/java/util/
DRandom.java548 double multiplier = StrictMath.sqrt(-2 * StrictMath.log(s)/s); in nextGaussian()
/libcore/benchmarks/src/benchmarks/regression/
DStrictMathBenchmark.java347 StrictMath.sqrt(d); in timeSqrt()
DMathBenchmark.java429 result = Math.sqrt(d); in timeSqrt()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DStrictMathTest.java32 private static final double HYP = StrictMath.sqrt(2.0);
1399 2, StrictMath.sqrt(StrictMath.pow(StrictMath.sqrt(2), 4)), 0.0); in test_sqrtD()
1400 assertEquals("Incorrect root returned2", 7, StrictMath.sqrt(49), 0.0); in test_sqrtD()
DMathTest.java22 double HYP = Math.sqrt(2.0);
1374 2, Math.sqrt(Math.pow(Math.sqrt(2), 4)), 0); in test_powDD()
1814 assertEquals("Incorrect root returned2", 7, Math.sqrt(49), 0); in test_sqrtD()
/libcore/ojluni/src/main/java/java/lang/
DStrictMath.java381 public static native double sqrt(double a); in sqrt() method in StrictMath
DMath.java487 public static native double sqrt(double a); in sqrt() method in Math
/libcore/ojluni/src/main/java/java/math/
DMutableBigInteger.java1888 MutableBigInteger sqrt() {
1900 long xk = (long)Math.floor(Math.sqrt(v));
1937 BigInteger bi = BigInteger.valueOf((long)Math.ceil(Math.sqrt(d)));

12