/external/chromium_org/v8/test/mjsunit/ |
math-floor-of-div-nosudiv.js | 54 assertEquals(Math.floor(div(k, 1)), Math.floor(k / 1)); 55 assertEquals(Math.floor(div(k, -1)), Math.floor(k / -1)); 56 assertEquals(Math.floor(div(k, 2)), Math.floor(k / 2)); 57 assertEquals(Math.floor(div(k, -2)), Math.floor(k / -2)); 58 assertEquals(Math.floor(div(k, 3)), Math.floor(k / 3)) [all...] |
math-floor-of-div.js | 54 assertEquals(Math.floor(div(k, 1)), Math.floor(k / 1)); 55 assertEquals(Math.floor(div(k, -1)), Math.floor(k / -1)); 56 assertEquals(Math.floor(div(k, 2)), Math.floor(k / 2)); 57 assertEquals(Math.floor(div(k, -2)), Math.floor(k / -2)); 58 assertEquals(Math.floor(div(k, 3)), Math.floor(k / 3)) [all...] |
math-pow.js | 33 assertEquals(4, Math.pow(2, 2)); 34 assertEquals(2147483648, Math.pow(2, 31)); 35 assertEquals(0.25, Math.pow(2, -2)); 36 assertEquals(0.0625, Math.pow(2, -4)); 37 assertEquals(1, Math.pow(1, 100)); 38 assertEquals(0, Math.pow(0, 1000)); 41 assertEquals(NaN, Math.pow(2, NaN)); 42 assertEquals(NaN, Math.pow(+0, NaN)); 43 assertEquals(NaN, Math.pow(-0, NaN)); 44 assertEquals(NaN, Math.pow(Infinity, NaN)) [all...] |
constant-folding-2.js | 108 assertEquals(1, Math.min(1, 10)); 109 assertEquals(1.5, Math.min(1.5, 2.5)); 110 assertEquals(0, Math.min(Infinity, 0)); 111 assertEquals("Infinity", String(Math.min(Infinity, Infinity))); 112 assertEquals("-Infinity", String(Math.min(Infinity, -Infinity))); 113 assertEquals("NaN", String(Math.min(NaN, 1))); 114 assertEquals("Infinity", String(1 / Math.min(0.0, 0.0))); 115 assertEquals("-Infinity", String(1 / Math.min(-0.0, -0.0))); 116 assertEquals("-Infinity", String(1 / Math.min(0.0, -0.0))); 120 assertEquals(10, Math.max(1, 10)) [all...] |
math-min-max.js | 30 // Test Math.min(). 32 assertEquals(Infinity, Math.min()); 33 assertEquals(1, Math.min(1)); 34 assertEquals(1, Math.min(1, 2)); 35 assertEquals(1, Math.min(2, 1)); 36 assertEquals(1, Math.min(1, 2, 3)); 37 assertEquals(1, Math.min(3, 2, 1)); 38 assertEquals(1, Math.min(2, 3, 1)); 39 assertEquals(1.1, Math.min(1.1, 2.2, 3.3)); 40 assertEquals(1.1, Math.min(3.3, 2.2, 1.1)) [all...] |
/external/chromium_org/third_party/flot/ |
jquery.flot.symbol.min.js | 1 (function(b){function a(h,e,g){var d={square:function(k,j,n,i,m){var l=i*Math.sqrt(Math.PI)/2;k.rect(j-l,n-l,l+l,l+l)},diamond:function(k,j,n,i,m){var l=i*Math.sqrt(Math.PI/2);k.moveTo(j-l,n);k.lineTo(j,n-l);k.lineTo(j+l,n);k.lineTo(j,n+l);k.lineTo(j-l,n)},triangle:function(l,k,o,j,n){var m=j*Math.sqrt(2*Math.PI/Math.sin(Math.PI/3));var i=m*Math.sin(Math.PI/3);l.moveTo(k-m/2,o+i/2);l.lineTo(k+m/2,o+i/2);if(!n){l.lineTo(k,o-i/2);l.lineTo(k-m/2,o+i/2)}} (…) [all...] |
/external/chromium_org/v8/test/webkit/ |
math.js | 26 "This test checks the behavior of the Math object as described in 15.8 of the language specification." 30 shouldBe("Math.abs(NaN)", "NaN"); 31 shouldBe("Math.abs(0)", "0"); 32 shouldBe("Math.abs(-0)", "0"); 33 shouldBe("Math.abs(1)", "1"); 34 shouldBe("Math.abs(-1)", "1"); 35 shouldBe("Math.abs(Number.MIN_VALUE)", "Number.MIN_VALUE"); 36 shouldBe("Math.abs(-Number.MIN_VALUE)", "Number.MIN_VALUE"); 37 shouldBe("Math.abs(Number.MAX_VALUE)", "Number.MAX_VALUE"); 38 shouldBe("Math.abs(-Number.MAX_VALUE)", "Number.MAX_VALUE") [all...] |
/libcore/luni/src/test/java/libcore/java/lang/ |
OldAndroidMathTest.java | 25 private static final double HYP = Math.sqrt(2.0); 36 Assert.assertEquals(message, expected, actual, Math.ulp(expected)); 44 Assert.assertEquals(message, expected, actual, Math.ulp(expected)); 51 // Test for method double java.lang.Math.abs(double) 54 (Math.abs(-1908.8976) == 1908.8976)); 56 (Math.abs(1908.8976) == 1908.8976)); 60 // Test for method float java.lang.Math.abs(float) 62 (Math.abs(-1908.8976f) == 1908.8976f)); 64 (Math.abs(1908.8976f) == 1908.8976f)); 68 // Test for method int java.lang.Math.abs(int [all...] |
/external/jmonkeyengine/engine/src/desktop/jme3tools/navigation/ |
NavCalculator.java | 98 trueCourse = (float) Math.toDegrees(Math.atan(dLong / dmp)); 100 distance = (float) Math.abs(dLat / Math.cos(Math.toRadians(trueCourse))); 121 double sgnDLong = 0 - (dLong / Math.abs(dLong)); 122 if (Math.abs(dLong) > 180 * 60) { 123 dLong = (360 * 60 - Math.abs(dLong)) * sgnDLong; 129 redist = Math.abs(dLong); 131 redist = Math.abs(dLong * (float) Math.cos(p1.getLatitude() * 2 * Math.PI / 360)) [all...] |
NumUtil.java | 25 float p = (float) Math.pow(10, Rpl); 27 float tmp = Math.round(Rval);
|
/external/v8/test/mjsunit/ |
math-pow.js | 33 assertEquals(4, Math.pow(2, 2)); 34 assertEquals(2147483648, Math.pow(2, 31)); 35 assertEquals(0.25, Math.pow(2, -2)); 36 assertEquals(0.0625, Math.pow(2, -4)); 37 assertEquals(1, Math.pow(1, 100)); 38 assertEquals(0, Math.pow(0, 1000)); 41 assertEquals(NaN, Math.pow(2, NaN)); 42 assertEquals(NaN, Math.pow(+0, NaN)); 43 assertEquals(NaN, Math.pow(-0, NaN)); 44 assertEquals(NaN, Math.pow(Infinity, NaN)) [all...] |
math-min-max.js | 30 // Test Math.min(). 32 assertEquals(Infinity, Math.min()); 33 assertEquals(1, Math.min(1)); 34 assertEquals(1, Math.min(1, 2)); 35 assertEquals(1, Math.min(2, 1)); 36 assertEquals(1, Math.min(1, 2, 3)); 37 assertEquals(1, Math.min(3, 2, 1)); 38 assertEquals(1, Math.min(2, 3, 1)); 39 assertEquals(1.1, Math.min(1.1, 2.2, 3.3)); 40 assertEquals(1.1, Math.min(3.3, 2.2, 1.1)) [all...] |
/frameworks/base/tools/layoutlib/bridge/src/android/util/ |
FloatMath_Delegate.java | 46 return (float)Math.floor(value); 58 return (float)Math.ceil(value); 69 return (float)Math.sin(angle); 80 return (float)Math.cos(angle); 92 return (float)Math.sqrt(value); 104 return (float)Math.exp(value); 117 return (float)Math.pow(x, y); 130 return (float)Math.sqrt(x*x + y*y);
|
/external/apache-harmony/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ |
MathTest.java | 22 double HYP = Math.sqrt(2.0); 32 * @tests java.lang.Math#abs(double) 35 // Test for method double java.lang.Math.abs(double) 38 (Math.abs(-1908.8976) == 1908.8976)); 40 (Math.abs(1908.8976) == 1908.8976)); 44 * @tests java.lang.Math#abs(float) 47 // Test for method float java.lang.Math.abs(float) 49 (Math.abs(-1908.8976f) == 1908.8976f)); 51 (Math.abs(1908.8976f) == 1908.8976f)); 55 * @tests java.lang.Math#abs(int [all...] |
/cts/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_static/d/ |
T_invoke_static_1.java | 22 return Math.abs(-1234567);
|
T_invoke_static_19.java | 22 return Math.abs(-1234567);
|
/cts/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_static_range/d/ |
T_invoke_static_range_1.java | 22 return Math.abs(-1234567);
|
T_invoke_static_range_19.java | 22 return Math.abs(-1234567);
|
/external/chromium_org/v8/test/webkit/fast/js/kde/ |
math.js | 25 var negativeZero = Math.atan2(-1, Infinity); // ### any nicer way? 37 shouldBe("String()+Math.E", "'2.718281828459045'"); 38 shouldBe("String()+Math.LN2", "'0.6931471805599453'"); 39 shouldBe("String()+Math.LN10", "'2.302585092994046'"); 40 shouldBe("String()+Math.LOG2E", "'1.4426950408889634'"); 41 shouldBe("String()+Math.LOG10E", "'0.4342944819032518'"); 42 shouldBe("String()+Math.PI", "'3.141592653589793'"); 43 shouldBe("String()+Math.SQRT1_2", "'0.7071067811865476'"); 44 shouldBe("String()+Math.SQRT2", "'1.4142135623730951'"); 51 shouldBe("Math.abs(-5)", "5") [all...] |
/external/robolectric/src/main/java/com/xtremelabs/robolectric/shadows/ |
ShadowFloatMath.java | 28 return (float) Math.floor(value); 33 return (float) Math.ceil(value); 38 return (float) Math.sin(angle); 43 return (float) Math.cos(angle); 48 return (float) Math.sqrt(value);
|
/libcore/benchmarks/src/benchmarks/regression/ |
MathBenchmark.java | 35 Math.abs(d); 41 Math.abs(f); 47 Math.abs(i); 53 Math.abs(l); 59 Math.acos(d); 65 Math.asin(d); 71 Math.atan(d); 77 Math.atan2(3, 4); 83 Math.cbrt(d); 89 Math.ceil(d) [all...] |
/packages/apps/UnifiedEmail/src/com/android/bitmap/ |
BitmapUtils.java | 69 final float scale = Math.min(sampleSize, regularScale); 71 final int srcCroppedW = Math.round(dstW * scale); 72 final int srcCroppedH = Math.round(dstH * scale); 73 final int srcCroppedSliceH = Math.round(dstSliceH * scale); 74 final int srcHalfSliceH = Math.min(srcCroppedSliceH, srcH) / 2; 83 centerV = Math.max(minCenterV, Math.min(maxCenterV, Math.round(srcH * vertSliceFrac))); 85 centerV = Math 86 .round(Math.abs(srcH - srcCroppedSliceH) * vertSliceFrac + srcHalfSliceH) [all...] |
/libcore/luni/src/main/native/ |
java_lang_Math.cpp | 17 #define LOG_TAG "Math" 24 #include <math.h> 123 NATIVE_METHOD(Math, IEEEremainder, "!(DD)D"), 124 NATIVE_METHOD(Math, acos, "!(D)D"), 125 NATIVE_METHOD(Math, asin, "!(D)D"), 126 NATIVE_METHOD(Math, atan, "!(D)D"), 127 NATIVE_METHOD(Math, atan2, "!(DD)D"), 128 NATIVE_METHOD(Math, cbrt, "!(D)D"), 129 NATIVE_METHOD(Math, ceil, "!(D)D"), 130 NATIVE_METHOD(Math, cos, "!(D)D") [all...] |
/frameworks/base/core/java/android/gesture/ |
Instance.java | 30 0, (float) (Math.PI / 4), (float) (Math.PI / 2), (float) (Math.PI * 3 / 4), 31 (float) Math.PI, -0, (float) (-Math.PI / 4), (float) (-Math.PI / 2), 32 (float) (-Math.PI * 3 / 4), (float) -Math.PI 59 float magnitude = (float)Math.sqrt(sum); 94 float orientation = (float)Math.atan2(pts[1] - center[1], pts[0] - center[0]) [all...] |
/frameworks/base/services/java/com/android/server/ |
TwilightCalculator.java | 31 private static final float DEGREES_TO_RADIANS = (float) (Math.PI / 180.0f); 82 final float solarLng = trueAnomaly + 1.796593063f + (float) Math.PI; 86 float n = Math.round(daysSince2000 - J0 - arcLongitude); 91 double solarDec = Math.asin(FloatMath.sin(solarLng) * FloatMath.sin(OBLIQUITY)); 95 double cosHourAngle = (FloatMath.sin(ALTIDUTE_CORRECTION_CIVIL_TWILIGHT) - Math.sin(latRad) 96 * Math.sin(solarDec)) / (Math.cos(latRad) * Math.cos(solarDec)); 111 float hourAngle = (float) (Math.acos(cosHourAngle) / (2 * Math.PI)) [all...] |