Home
last modified time | relevance | path

Searched refs:math (Results 1 – 25 of 3700) sorted by relevance

12345678910>>...148

/external/python/cpython2/Lib/test/
Dtest_math.py6 import math
71 if math.isinf(expected) and got == expected:
143 self.ftest('pi', math.pi, 3.1415926)
144 self.ftest('e', math.e, 2.7182818)
147 self.assertRaises(TypeError, math.acos)
148 self.ftest('acos(-1)', math.acos(-1), math.pi)
149 self.ftest('acos(0)', math.acos(0), math.pi/2)
150 self.ftest('acos(1)', math.acos(1), 0)
151 self.assertRaises(ValueError, math.acos, INF)
152 self.assertRaises(ValueError, math.acos, NINF)
[all …]
/external/python/cpython3/Lib/test/
Dtest_math.py7 import math
61 if math.isnan(x) or math.isinf(x):
67 if math.isinf(x_next):
220 if math.isnan(expected) and math.isnan(got):
223 elif math.isinf(expected) or math.isinf(got):
264 self.ftest('pi', math.pi, 3.141592653589793238462643)
265 self.ftest('e', math.e, 2.718281828459045235360287)
266 self.assertEqual(math.tau, 2*math.pi)
269 self.assertRaises(TypeError, math.acos)
270 self.ftest('acos(-1)', math.acos(-1), math.pi)
[all …]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/bigdec/
DDiagBigDecimalTest.java15 import java.math.BigInteger;
24 import android.icu.math.BigDecimal;
107 private static final android.icu.math.BigDecimal zero = android.icu.math.BigDecimal.ZERO;
108 private static final android.icu.math.BigDecimal one = android.icu.math.BigDecimal.ONE;
109 private static final android.icu.math.BigDecimal two = new android.icu.math.BigDecimal(2);
110 private static final android.icu.math.BigDecimal ten = android.icu.math.BigDecimal.TEN;
111 …private static final android.icu.math.BigDecimal tenlong = new android.icu.math.BigDecimal((long) …
114 private static final android.icu.math.MathContext mcdef = android.icu.math.MathContext.DEFAULT;
115 private static final android.icu.math.MathContext mc3 = new android.icu.math.MathContext(3);
116 private static final android.icu.math.MathContext mc6 = new android.icu.math.MathContext(6);
[all …]
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/bigdec/
DDiagBigDecimalTest.java14 import java.math.BigInteger;
23 import com.ibm.icu.math.BigDecimal;
104 private static final com.ibm.icu.math.BigDecimal zero = com.ibm.icu.math.BigDecimal.ZERO;
105 private static final com.ibm.icu.math.BigDecimal one = com.ibm.icu.math.BigDecimal.ONE;
106 private static final com.ibm.icu.math.BigDecimal two = new com.ibm.icu.math.BigDecimal(2);
107 private static final com.ibm.icu.math.BigDecimal ten = com.ibm.icu.math.BigDecimal.TEN;
108 …private static final com.ibm.icu.math.BigDecimal tenlong = new com.ibm.icu.math.BigDecimal((long) …
111 private static final com.ibm.icu.math.MathContext mcdef = com.ibm.icu.math.MathContext.DEFAULT;
112 private static final com.ibm.icu.math.MathContext mc3 = new com.ibm.icu.math.MathContext(3);
113 private static final com.ibm.icu.math.MathContext mc6 = new com.ibm.icu.math.MathContext(6);
[all …]
/external/guava/guava-gwt/test/com/google/common/math/
DIntMathTest_gwt.java16 package com.google.common.math;
22 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); in testCheckedAdd()
27 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); in testCheckedMultiply()
32 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); in testCheckedPow()
37 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); in testCheckedSubtract()
42 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); in testDivByZeroAlwaysFails()
47 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); in testDivNonZero()
52 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); in testDivNonZeroExact()
57 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); in testFactorial()
62 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); in testFactorialNegative()
[all …]
DBigIntegerMathTest_gwt.java16 package com.google.common.math;
22 …com.google.common.math.BigIntegerMathTest testCase = new com.google.common.math.BigIntegerMathTest… in testBinomialOutside()
27 …com.google.common.math.BigIntegerMathTest testCase = new com.google.common.math.BigIntegerMathTest… in testBinomialSmall()
32 …com.google.common.math.BigIntegerMathTest testCase = new com.google.common.math.BigIntegerMathTest… in testFactorial()
37 …com.google.common.math.BigIntegerMathTest testCase = new com.google.common.math.BigIntegerMathTest… in testFactorial0()
42 …com.google.common.math.BigIntegerMathTest testCase = new com.google.common.math.BigIntegerMathTest… in testFactorialNegative()
47 …com.google.common.math.BigIntegerMathTest testCase = new com.google.common.math.BigIntegerMathTest… in testIsPowerOfTwo()
52 …com.google.common.math.BigIntegerMathTest testCase = new com.google.common.math.BigIntegerMathTest… in testLog2Ceiling()
57 …com.google.common.math.BigIntegerMathTest testCase = new com.google.common.math.BigIntegerMathTest… in testLog2Exact()
62 …com.google.common.math.BigIntegerMathTest testCase = new com.google.common.math.BigIntegerMathTest… in testLog2Floor()
[all …]
DLongMathTest_gwt.java16 package com.google.common.math;
22 com.google.common.math.LongMathTest testCase = new com.google.common.math.LongMathTest(); in testBinomial()
27 com.google.common.math.LongMathTest testCase = new com.google.common.math.LongMathTest(); in testBinomialNegative()
32 com.google.common.math.LongMathTest testCase = new com.google.common.math.LongMathTest(); in testBinomialOutside()
37 com.google.common.math.LongMathTest testCase = new com.google.common.math.LongMathTest(); in testGCDExhaustive()
42 com.google.common.math.LongMathTest testCase = new com.google.common.math.LongMathTest(); in testLessThanBranchFree()
47 com.google.common.math.LongMathTest testCase = new com.google.common.math.LongMathTest(); in testLog2Exact()
52 com.google.common.math.LongMathTest testCase = new com.google.common.math.LongMathTest(); in testLog2MatchesBigInteger()
57 com.google.common.math.LongMathTest testCase = new com.google.common.math.LongMathTest(); in testLog2NegativeAlwaysThrows()
62 com.google.common.math.LongMathTest testCase = new com.google.common.math.LongMathTest(); in testLog2ZeroAlwaysThrows()
[all …]
/external/arm-optimized-routines/
DAndroid.bp14 "math/cosf.c",
15 "math/exp2.c",
16 "math/exp2f.c",
17 "math/exp2f_data.c",
18 "math/exp.c",
19 "math/exp_data.c",
20 "math/expf.c",
21 "math/log2.c",
22 "math/log2_data.c",
23 "math/log2f.c",
[all …]
/external/icu/android_icu4j/src/main/java/android/icu/math/
DBigDecimal.java6 package android.icu.math;
8 import java.math.BigInteger;
235 …public static final android.icu.math.BigDecimal ZERO = new android.icu.math.BigDecimal((long) 0); …
246 …public static final android.icu.math.BigDecimal ONE = new android.icu.math.BigDecimal((long) 1); /…
257 public static final android.icu.math.BigDecimal TEN = new android.icu.math.BigDecimal(10);
265 public static final int ROUND_CEILING = android.icu.math.MathContext.ROUND_CEILING;
272 public static final int ROUND_DOWN = android.icu.math.MathContext.ROUND_DOWN;
279 public static final int ROUND_FLOOR = android.icu.math.MathContext.ROUND_FLOOR;
286 public static final int ROUND_HALF_DOWN = android.icu.math.MathContext.ROUND_HALF_DOWN;
293 public static final int ROUND_HALF_EVEN = android.icu.math.MathContext.ROUND_HALF_EVEN;
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/math/
DBigDecimal.java5 package com.ibm.icu.math;
7 import java.math.BigInteger;
236 …public static final com.ibm.icu.math.BigDecimal ZERO = new com.ibm.icu.math.BigDecimal((long) 0); …
248 …public static final com.ibm.icu.math.BigDecimal ONE = new com.ibm.icu.math.BigDecimal((long) 1); /…
260 public static final com.ibm.icu.math.BigDecimal TEN = new com.ibm.icu.math.BigDecimal(10);
269 public static final int ROUND_CEILING = com.ibm.icu.math.MathContext.ROUND_CEILING;
277 public static final int ROUND_DOWN = com.ibm.icu.math.MathContext.ROUND_DOWN;
285 public static final int ROUND_FLOOR = com.ibm.icu.math.MathContext.ROUND_FLOOR;
293 public static final int ROUND_HALF_DOWN = com.ibm.icu.math.MathContext.ROUND_HALF_DOWN;
301 public static final int ROUND_HALF_EVEN = com.ibm.icu.math.MathContext.ROUND_HALF_EVEN;
[all …]
/external/icu/icu4j/eclipse-build/plugins.template/com.ibm.icu.base/src/com/ibm/icu/math/
DBigDecimal.java5 package com.ibm.icu.math;
7 import java.math.BigInteger;
234 …public static final com.ibm.icu.math.BigDecimal ZERO = new com.ibm.icu.math.BigDecimal((long) 0); …
246 …public static final com.ibm.icu.math.BigDecimal ONE = new com.ibm.icu.math.BigDecimal((long) 1); /…
258 public static final com.ibm.icu.math.BigDecimal TEN = new com.ibm.icu.math.BigDecimal(10);
267 public static final int ROUND_CEILING = com.ibm.icu.math.MathContext.ROUND_CEILING;
275 public static final int ROUND_DOWN = com.ibm.icu.math.MathContext.ROUND_DOWN;
283 public static final int ROUND_FLOOR = com.ibm.icu.math.MathContext.ROUND_FLOOR;
291 public static final int ROUND_HALF_DOWN = com.ibm.icu.math.MathContext.ROUND_HALF_DOWN;
299 public static final int ROUND_HALF_EVEN = com.ibm.icu.math.MathContext.ROUND_HALF_EVEN;
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/test/CodeGen/AMDGPU/
Dinline-attr.ll1 ; RUN: opt -mtriple=amdgcn--amdhsa -S -O3 -enable-unsafe-fp-math %s | FileCheck -check-prefix=GCN …
2 ; RUN: opt -mtriple=amdgcn--amdhsa -S -O3 -enable-no-nans-fp-math %s | FileCheck -check-prefix=GCN …
3 ; RUN: opt -mtriple=amdgcn--amdhsa -S -O3 -enable-no-infs-fp-math %s | FileCheck -check-prefix=GCN …
9 … readnone "less-precise-fpmad"="true" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "unsafe-fp…
10 … nounwind "less-precise-fpmad"="true" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "unsafe-fp…
12 ; NOINFS: attributes #0 = { norecurse nounwind readnone "no-infs-fp-math"="true" }
13 …ounwind "less-precise-fpmad"="false" "no-infs-fp-math"="true" "no-nans-fp-math"="false" "unsafe-fp…
15 ; NONANS: attributes #0 = { norecurse nounwind readnone "no-nans-fp-math"="true" }
16 …ounwind "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="true" "unsafe-fp…
33 … nounwind "less-precise-fpmad"="true" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "unsafe-fp…
/external/clang/test/CodeGenOpenCL/
Drelaxed-fpmath.cl2 // RUN: %clang_cc1 %s -emit-llvm -cl-fast-relaxed-math -o - | FileCheck %s -check-prefix=FAST
3 // RUN: %clang_cc1 %s -emit-llvm -cl-finite-math-only -o - | FileCheck %s -check-prefix=FINITE
4 // RUN: %clang_cc1 %s -emit-llvm -cl-unsafe-math-optimizations -o - | FileCheck %s -check-prefix=UN…
19 // NORMAL: "no-infs-fp-math"="false"
20 // NORMAL: "no-nans-fp-math"="false"
21 // NORMAL: "unsafe-fp-math"="false"
23 // FAST: "no-infs-fp-math"="true"
24 // FAST: "no-nans-fp-math"="true"
25 // FAST: "unsafe-fp-math"="true"
27 // FINITE: "no-infs-fp-math"="true"
[all …]
/external/mesa3d/src/gallium/auxiliary/gallivm/
Df.cpp62 boost::math::ntl::RR exp2(const boost::math::ntl::RR& x) in exp2()
67 boost::math::ntl::RR log2(const boost::math::ntl::RR& x) in log2()
72 boost::math::ntl::RR f(const boost::math::ntl::RR& x, int variant) in f()
88 const boost::math::tools::polynomial<boost::math::ntl::RR>& n, in show_extra()
89 const boost::math::tools::polynomial<boost::math::ntl::RR>& d, in show_extra()
90 const boost::math::ntl::RR& x_offset, in show_extra()
91 const boost::math::ntl::RR& y_offset, in show_extra()
/external/tensorflow/tensorflow/python/training/
Drmsprop_test.py23 import math
329 1.0 - (0.1 * 2.0 / math.sqrt(0.901 + 1.0)),
330 2.0 - (0.1 * 2.0 / math.sqrt(0.901 + 1.0))
334 3.0 - (0.01 * 2.0 / math.sqrt(0.90001 + 1.0)),
335 4.0 - (0.01 * 2.0 / math.sqrt(0.90001 + 1.0))
349 1.0 - (0.1 * 2.0 / math.sqrt(0.901 + 1.0)) -
350 (0.1 * 2.0 / math.sqrt(0.901 * 0.9 + 0.001 + 1.0)),
351 2.0 - (0.1 * 2.0 / math.sqrt(0.901 + 1.0)) -
352 (0.1 * 2.0 / math.sqrt(0.901 * 0.9 + 0.001 + 1.0))
356 3.0 - (0.01 * 2.0 / math.sqrt(0.90001 + 1.0)) -
[all …]
/external/syzkaller/vendor/github.com/google/go-cmp/cmp/cmpopts/
Dequate.go47 if margin < 0 || fraction < 0 || math.IsNaN(margin) || math.IsNaN(fraction) {
60 return !math.IsNaN(x) && !math.IsNaN(y) && !math.IsInf(x, 0) && !math.IsInf(y, 0)
66 relMarg := a.frac * math.Min(math.Abs(x), math.Abs(y))
67 return math.Abs(x-y) <= math.Max(a.marg, relMarg)
85 return math.IsNaN(x) && math.IsNaN(y)
/external/swiftshader/third_party/llvm-7.0/llvm/test/CodeGen/ARM/
Dclang-section.ll52math"="false" "denormal-fp-math"="preserve-sign" "disable-tail-calls"="false" "implicit-section-na…
53math"="false" "denormal-fp-math"="preserve-sign" "disable-tail-calls"="false" "implicit-section-na…
54math"="false" "denormal-fp-math"="preserve-sign" "disable-tail-calls"="false" "less-precise-fpmad"…
55math"="false" "denormal-fp-math"="preserve-sign" "disable-tail-calls"="false" "less-precise-fpmad"…
/external/clang/include/clang/Basic/
DBuiltins.def892 // Builtin math library functions
893 LIBBUILTIN(atan2, "ddd", "fne", "math.h", ALL_LANGUAGES)
894 LIBBUILTIN(atan2f, "fff", "fne", "math.h", ALL_LANGUAGES)
895 LIBBUILTIN(atan2l, "LdLdLd", "fne", "math.h", ALL_LANGUAGES)
901 LIBBUILTIN(copysign, "ddd", "fnc", "math.h", ALL_LANGUAGES)
902 LIBBUILTIN(copysignf, "fff", "fnc", "math.h", ALL_LANGUAGES)
903 LIBBUILTIN(copysignl, "LdLdLd", "fnc", "math.h", ALL_LANGUAGES)
905 LIBBUILTIN(fabs, "dd", "fnc", "math.h", ALL_LANGUAGES)
906 LIBBUILTIN(fabsf, "ff", "fnc", "math.h", ALL_LANGUAGES)
907 LIBBUILTIN(fabsl, "LdLd", "fnc", "math.h", ALL_LANGUAGES)
[all …]
/external/apache-commons-math/src/main/java/org/apache/commons/math/optimization/general/
DAbstractScalarDifferentiableOptimizer.java18 package org.apache.commons.math.optimization.general;
20 import org.apache.commons.math.analysis.DifferentiableMultivariateRealFunction;
21 import org.apache.commons.math.analysis.MultivariateVectorialFunction;
22 import org.apache.commons.math.FunctionEvaluationException;
23 import org.apache.commons.math.MaxEvaluationsExceededException;
24 import org.apache.commons.math.MaxIterationsExceededException;
25 import org.apache.commons.math.optimization.DifferentiableMultivariateRealOptimizer;
26 import org.apache.commons.math.optimization.GoalType;
27 import org.apache.commons.math.optimization.OptimizationException;
28 import org.apache.commons.math.optimization.RealConvergenceChecker;
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/test/CodeGen/Mips/
Dmicromips-attr.ll23 "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false"
25 "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false"
26 "no-signed-zeros-fp-math"="false" "no-trapping-math"="false"
27 "stack-protector-buffer-size"="8" "unsafe-fp-math"="false"
33 "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false"
35 "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false"
36 "no-signed-zeros-fp-math"="false" "no-trapping-math"="false"
37 "stack-protector-buffer-size"="8" "unsafe-fp-math"="false"
/external/tensorflow/tensorflow/contrib/optimizer_v2/
Drmsprop_test.py22 import math
325 1.0 - (0.1 * 2.0 / math.sqrt(0.901)),
326 2.0 - (0.1 * 2.0 / math.sqrt(0.901))
330 3.0 - (0.01 * 2.0 / math.sqrt(0.90001)),
331 4.0 - (0.01 * 2.0 / math.sqrt(0.90001))
343 1.0 - (0.1 * 2.0 / math.sqrt(0.901)) -
344 (0.1 * 2.0 / math.sqrt(0.901 * 0.9 + 0.001)),
345 2.0 - (0.1 * 2.0 / math.sqrt(0.901)) -
346 (0.1 * 2.0 / math.sqrt(0.901 * 0.9 + 0.001))
350 3.0 - (0.01 * 2.0 / math.sqrt(0.90001)) -
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/test/Transforms/Util/
Dlibcalls-fast-math-inf-loop.ll3 ; Test that fast math lib call simplification of double math function to float
5 ; equivalent math function. Otherwise this can cause the generation of infinite
6 ; loops when compiled with -O2/3 and fast math.
16 ; clang -cc1 -O2 -ffast-math -emit-llvm -disable-llvm-passes -triple x86_64-unknown-unknown -o - …
50math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="f…
51math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="f…
/external/tensorflow/tensorflow/contrib/specs/python/
Dparams_ops.py54 import math
55 from math import *
73 return math.exp(random.uniform(math.log(lo), math.log(hi)))
78 return int(math.floor(math.exp(random.uniform(math.log(lo),
79 math.log(hi+1-1e-5)))))
/external/guava/guava-gwt/test-super/com/google/common/math/super/com/google/common/math/
DBigIntegerMathTest.java17 package com.google.common.math;
19 import static com.google.common.math.MathTesting.ALL_BIGINTEGER_CANDIDATES;
20 import static com.google.common.math.MathTesting.ALL_ROUNDING_MODES;
21 import static com.google.common.math.MathTesting.POSITIVE_BIGINTEGER_CANDIDATES;
22 import static java.math.BigInteger.ONE;
23 import static java.math.BigInteger.ZERO;
24 import static java.math.RoundingMode.CEILING;
25 import static java.math.RoundingMode.DOWN;
26 import static java.math.RoundingMode.FLOOR;
27 import static java.math.RoundingMode.HALF_DOWN;
[all …]
/external/icu/icu4j/main/classes/localespi/src/com/ibm/icu/impl/jdkadapter/
DNumberFormatICU.java11 import java.math.RoundingMode;
113 case com.ibm.icu.math.BigDecimal.ROUND_CEILING: in getRoundingMode()
116 case com.ibm.icu.math.BigDecimal.ROUND_DOWN: in getRoundingMode()
119 case com.ibm.icu.math.BigDecimal.ROUND_FLOOR: in getRoundingMode()
122 case com.ibm.icu.math.BigDecimal.ROUND_HALF_DOWN: in getRoundingMode()
125 case com.ibm.icu.math.BigDecimal.ROUND_HALF_EVEN: in getRoundingMode()
128 case com.ibm.icu.math.BigDecimal.ROUND_HALF_UP: in getRoundingMode()
131 case com.ibm.icu.math.BigDecimal.ROUND_UNNECESSARY: in getRoundingMode()
134 case com.ibm.icu.math.BigDecimal.ROUND_UP: in getRoundingMode()
210 fIcuNfmt.setRoundingMode(com.ibm.icu.math.BigDecimal.ROUND_CEILING); in setRoundingMode()
[all …]

12345678910>>...148