Home
last modified time | relevance | path

Searched full:pow (Results 1 – 25 of 6412) sorted by relevance

12345678910>>...257

/aosp_15_r20/external/arm-optimized-routines/math/test/testcases/directed/
H A Dpow.tst1 ; Directed test cases for pow
6 func=pow op1=00000000.00000000 op2=00000000.00000000 result=3ff00000.00000000 errno=0
7 func=pow op1=00000000.00000000 op2=00000000.00000001 result=00000000.00000000 errno=0
8 func=pow op1=00000000.00000000 op2=00100000.00000000 result=00000000.00000000 errno=0
9 func=pow op1=00000000.00000000 op2=1fffffff.ffffffff result=00000000.00000000 errno=0
10 func=pow op1=00000000.00000000 op2=3bdfffff.ffffffff result=00000000.00000000 errno=0
11 func=pow op1=00000000.00000000 op2=3be00000.00000000 result=00000000.00000000 errno=0
12 func=pow op1=00000000.00000000 op2=3fe00000.00000000 result=00000000.00000000 errno=0
13 func=pow op1=00000000.00000000 op2=3ff00000.00000000 result=00000000.00000000 errno=0
14 func=pow op1=00000000.00000000 op2=40000000.00000000 result=00000000.00000000 errno=0
[all …]
/aosp_15_r20/external/llvm-libc/test/src/math/smoke/
H A Dpow_test.cpp1 //===-- Unittests for pow -------------------------------------------------===//
10 #include "src/math/pow.h"
32 // pow( 0.0, exponent ) in TEST_F()
33 EXPECT_FP_EQ_WITH_EXCEPTION(inf, LIBC_NAMESPACE::pow(zero, NEG_ODD_INTEGER), in TEST_F()
36 inf, LIBC_NAMESPACE::pow(zero, NEG_EVEN_INTEGER), FE_DIVBYZERO); in TEST_F()
37 EXPECT_FP_EQ_WITH_EXCEPTION(inf, LIBC_NAMESPACE::pow(zero, NEG_NON_INTEGER), in TEST_F()
39 EXPECT_FP_EQ(zero, LIBC_NAMESPACE::pow(zero, POS_ODD_INTEGER)); in TEST_F()
40 EXPECT_FP_EQ(zero, LIBC_NAMESPACE::pow(zero, POS_EVEN_INTEGER)); in TEST_F()
41 EXPECT_FP_EQ(zero, LIBC_NAMESPACE::pow(zero, POS_NON_INTEGER)); in TEST_F()
42 EXPECT_FP_EQ(zero, LIBC_NAMESPACE::pow(zero, ONE_HALF)); in TEST_F()
[all …]
/aosp_15_r20/external/python/cpython3/Lib/test/
Dtest_pow.py9 self.assertEqual(pow(type(i), 0), 1)
10 self.assertEqual(pow(type(i), 1), type(i))
11 self.assertEqual(pow(type(0), 1), type(0))
12 self.assertEqual(pow(type(1), 1), type(1))
15 self.assertEqual(pow(type(i), 3), i*i*i)
19 self.assertEqual(pow(2, i), pow2)
24 inv = pow(ii, -1) # inverse of ii
26 self.assertAlmostEqual(pow(ii, jj), pow(inv, -jj))
34 self.assertRaises(ZeroDivisionError, pow, zero, exp)
52 self.assertRaises(TypeError, pow, type(i), j, k)
[all …]
Dtest_math.py1225 self.assertRaises(TypeError, math.pow)
1226 self.ftest('pow(0,1)', math.pow(0,1), 0)
1227 self.ftest('pow(1,0)', math.pow(1,0), 1)
1228 self.ftest('pow(2,1)', math.pow(2,1), 2)
1229 self.ftest('pow(2,-1)', math.pow(2,-1), 0.5)
1230 self.assertEqual(math.pow(INF, 1), INF)
1231 self.assertEqual(math.pow(NINF, 1), NINF)
1232 self.assertEqual((math.pow(1, INF)), 1.)
1233 self.assertEqual((math.pow(1, NINF)), 1.)
1234 self.assertTrue(math.isnan(math.pow(NAN, 1)))
[all …]
/aosp_15_r20/external/rust/android-crates-io/crates/num-traits/src/
Dpow.rs6 pub trait Pow<RHS> { trait
15 /// use num_traits::Pow;
16 /// assert_eq!(Pow::pow(10u32, 2u32), 100);
18 fn pow(self, rhs: RHS) -> Self::Output; in pow() method
32 pow_impl!($t, $rhs, usize, pow);
35 impl Pow<$rhs> for $t { impl
38 fn pow(self, rhs: $rhs) -> $t {
43 impl<'a> Pow<&'a $rhs> for $t { impl
46 fn pow(self, rhs: &'a $rhs) -> $t {
51 impl<'a> Pow<$rhs> for &'a $t { impl
[all …]
/aosp_15_r20/external/python/cpython2/Lib/test/
Dtest_pow.py8 self.assertEqual(pow(type(i), 0), 1)
9 self.assertEqual(pow(type(i), 1), type(i))
10 self.assertEqual(pow(type(0), 1), type(0))
11 self.assertEqual(pow(type(1), 1), type(1))
14 self.assertEqual(pow(type(i), 3), i*i*i)
18 self.assertEqual(pow(2, i), pow2)
26 pow(ii, jj)
34 self.assertRaises(ZeroDivisionError, pow, zero, exp)
52 self.assertRaises(TypeError, pow, type(i), j, k)
55 pow(type(i),j,k),
[all …]
Dtest_math.py396 # pow() relies on floor() to check for integers
651 self.assertRaises(TypeError, math.pow)
652 self.ftest('pow(0,1)', math.pow(0,1), 0)
653 self.ftest('pow(1,0)', math.pow(1,0), 1)
654 self.ftest('pow(2,1)', math.pow(2,1), 2)
655 self.ftest('pow(2,-1)', math.pow(2,-1), 0.5)
656 self.assertEqual(math.pow(INF, 1), INF)
657 self.assertEqual(math.pow(NINF, 1), NINF)
658 self.assertEqual((math.pow(1, INF)), 1.)
659 self.assertEqual((math.pow(1, NINF)), 1.)
[all …]
/aosp_15_r20/external/rust/android-crates-io/crates/num-bigint/src/biguint/
Dpower.rs7 use num_traits::{One, Pow, ToPrimitive, Zero};
9 impl Pow<&BigUint> for BigUint {
13 fn pow(self, exp: &BigUint) -> BigUint { in pow() method
19 self.pow(exp) in pow()
21 self.pow(exp) in pow()
24 // `2.pow(2¹²⁸)` would require far more memory than 64-bit targets can address! in pow()
30 impl Pow<BigUint> for BigUint {
34 fn pow(self, exp: BigUint) -> BigUint { in pow() method
35 Pow::pow(self, &exp) in pow()
39 impl Pow<&BigUint> for &BigUint { impl
[all …]
/aosp_15_r20/external/rust/android-crates-io/crates/num-complex/src/
Dpow.rs6 use num_traits::{Num, One, Pow};
10 impl<'a, T: Clone + Num> Pow<$U> for &'a Complex<T> { impl
14 fn pow(self, mut exp: $U) -> Self::Output {
41 impl<'a, 'b, T: Clone + Num> Pow<&'b $U> for &'a Complex<T> { impl
45 fn pow(self, exp: &$U) -> Self::Output {
46 self.pow(*exp)
50 impl<'a, T: Clone + Num + Neg<Output = T>> Pow<$S> for &'a Complex<T> {
54 fn pow(self, exp: $S) -> Self::Output {
56 Pow::pow(&self.inv(), exp.wrapping_neg() as $U)
58 Pow::pow(self, exp as $U)
[all …]
/aosp_15_r20/external/llvm/test/Transforms/InstCombine/
H A Dpow-4.ll1 ; Test that the pow library call simplifier works correctly.
6 declare double @llvm.pow.f64(double, double)
7 declare float @llvm.pow.f32(float, float)
9 ; pow(x, 4.0f)
12 ; CHECK-NOT: pow
16 %1 = call fast float @llvm.pow.f32(float %x, float 4.000000e+00)
20 ; pow(x, 3.0)
23 ; CHECK-NOT: pow
27 %1 = call fast double @llvm.pow.f64(double %x, double 3.000000e+00)
31 ; pow(x, 4.0)
[all …]
H A Dpow-1.ll1 ; Test that the pow library call simplifier works correctly.
13 ; NOTE: The readonly attribute on the pow call should be preserved
14 ; in the cases below where pow is transformed into another function call.
17 declare double @pow(double, double) nounwind readonly
19 ; Check pow(1.0, x) -> 1.0.
30 %retval = call double @pow(double 1.0, double %x)
35 ; Check pow(2.0, x) -> exp2(x).
47 %retval = call double @pow(double 2.0, double %x)
53 ; Check pow(x, 0.0) -> 1.0.
64 %retval = call double @pow(double %x, double 0.0)
[all …]
H A Dpow-exp.ll5 %pow = call fast double @llvm.pow.f64(double %call, double %y)
6 ret double %pow
16 %pow = call fast double @llvm.pow.f64(double %call, double %y)
17 ret double %pow
27 %pow = call fast double @llvm.pow.f64(double %call, double %y)
28 ret double %pow
33 ; CHECK-NEXT: %pow = call fast double @llvm.pow.f64(double %call, double %y)
34 ; CHECK-NEXT: ret double %pow
38 %pow = call fast double @llvm.pow.f64(double %call1, double %p1)
39 ret double %pow
[all …]
/aosp_15_r20/prebuilts/go/linux-x86/src/math/
Dpow_s390x.s148 // Pow returns x**y, the base-x exponential of y.
151 // Pow(x, ±0) = 1 for any x
152 // Pow(1, y) = 1 for any y
153 // Pow(x, 1) = x for any x
154 // Pow(NaN, y) = NaN
155 // Pow(x, NaN) = NaN
156 // Pow(±0, y) = ±Inf for y an odd integer < 0
157 // Pow(±0, -Inf) = +Inf
158 // Pow(±0, +Inf) = +0
159 // Pow(±0, y) = +Inf for finite y < 0 and not an odd integer
[all …]
Dpow.go24 // Pow returns x**y, the base-x exponential of y.
28 // Pow(x, ±0) = 1 for any x
29 // Pow(1, y) = 1 for any y
30 // Pow(x, 1) = x for any x
31 // Pow(NaN, y) = NaN
32 // Pow(x, NaN) = NaN
33 // Pow(±0, y) = ±Inf for y an odd integer < 0
34 // Pow(±0, -Inf) = +Inf
35 // Pow(±0, +Inf) = +0
36 // Pow(±0, y) = +Inf for finite y < 0 and not an odd integer
[all …]
/aosp_15_r20/cts/tests/location/location_gnss/src/android/location/cts/gnss/suplClient/
H A DSuplRrlpController.java51 private static final double NAVIGATION_TGD_SCALE_FACTOR = Math.pow(2, -31);
52 private static final double NAVIGATION_TOC_SCALE_FACTOR = Math.pow(2, 4);
53 private static final double NAVIGATION_AF2_SCALE_FACTOR = Math.pow(2, -55);
54 private static final double NAVIGATION_AF1_SCALE_FACTOR = Math.pow(2, -43);
55 private static final double NAVIGATION_AF0_SCALE_FACTOR = Math.pow(2, -31);
56 private static final double NAVIGATION_CRS_SCALE_FACTOR = Math.pow(2, -5);
57 private static final double NAVIGATION_DELTA_N_SCALE_FACTOR = Math.pow(2, -43) * Math.PI;
58 private static final double NAVIGATION_M0_SCALE_FACTOR = Math.pow(2, -31) * Math.PI;
59 private static final double NAVIGATION_CUC_SCALE_FACTOR = Math.pow(2, -29);
60 private static final double NAVIGATION_E_SCALE_FACTOR = Math.pow(2, -33);
[all …]
/aosp_15_r20/external/pytorch/aten/src/ATen/native/cuda/
H A DPow.cuh2 #include <ATen/native/Pow.h>
10 // SFINAE doesn't work well with NVCC under Windows for math functions like pow and sqrt.
12 // As for pow, the following signatures are defined as the device function:
13 // pow(float, int)
14 // pow(double, int)
15 // pow(float, float)
16 // pow(double, double)
18 // Functions for pow
19 // pow for at::Half
21 return static_cast<at::Half>(std::pow(static_cast<float>(base), static_cast<float>(exp))); in pow_()
[all …]
/aosp_15_r20/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
H A DMathTest.java570 assertEquals(14.0, Math.log10(Math.pow(10, 14))); in test_log10_D()
1122 * java.lang.Math#pow(double, double)
1125 // Test for method double java.lang.Math.pow(double, double) in test_powDD()
1152 assertEquals("Result should be Math.pow(" + dval in test_powDD()
1153 + ",-0.0)=+1.0", 1.0, Math.pow(dval, NZERO)); in test_powDD()
1154 assertEquals("Result should be Math.pow(" + negateDval in test_powDD()
1155 + ",-0.0)=+1.0", 1.0, Math.pow(negateDval, NZERO)); in test_powDD()
1156 assertEquals("Result should be Math.pow(" + dval in test_powDD()
1157 + ",+0.0)=+1.0", 1.0, Math.pow(dval, +0.0)); in test_powDD()
1158 assertEquals("Result should be Math.pow(" + negateDval in test_powDD()
[all …]
/aosp_15_r20/external/guava/android/guava-tests/test/com/google/common/math/
H A DBigIntegerMathTest.java189 BigInteger x2 = x.pow(2); in testLog2HalfUp()
200 BigInteger x2 = x.pow(2); in testLog2HalfDown()
246 assertTrue(TEN.pow(result).compareTo(x) <= 0); in testLog10Floor()
247 assertTrue(TEN.pow(result + 1).compareTo(x) > 0); in testLog10Floor()
257 assertTrue(TEN.pow(result).compareTo(x) >= 0); in testLog10Ceiling()
258 assertTrue(result == 0 || TEN.pow(result - 1).compareTo(x) < 0); in testLog10Ceiling()
268 boolean expectSuccess = TEN.pow(logFloor).equals(x); in testLog10Exact()
282 BigInteger x2 = x.pow(2); in testLog10HalfUp()
284 assertTrue(TEN.pow(2 * result + 1).compareTo(x2) > 0); in testLog10HalfUp()
286 assertTrue(result == 0 || TEN.pow(2 * result - 1).compareTo(x2) <= 0); in testLog10HalfUp()
[all …]
/aosp_15_r20/external/guava/guava-tests/test/com/google/common/math/
H A DBigIntegerMathTest.java189 BigInteger x2 = x.pow(2); in testLog2HalfUp()
200 BigInteger x2 = x.pow(2); in testLog2HalfDown()
246 assertTrue(TEN.pow(result).compareTo(x) <= 0); in testLog10Floor()
247 assertTrue(TEN.pow(result + 1).compareTo(x) > 0); in testLog10Floor()
257 assertTrue(TEN.pow(result).compareTo(x) >= 0); in testLog10Ceiling()
258 assertTrue(result == 0 || TEN.pow(result - 1).compareTo(x) < 0); in testLog10Ceiling()
268 boolean expectSuccess = TEN.pow(logFloor).equals(x); in testLog10Exact()
282 BigInteger x2 = x.pow(2); in testLog10HalfUp()
284 assertTrue(TEN.pow(2 * result + 1).compareTo(x2) > 0); in testLog10HalfUp()
286 assertTrue(result == 0 || TEN.pow(2 * result - 1).compareTo(x2) <= 0); in testLog10HalfUp()
[all …]
/aosp_15_r20/packages/modules/NeuralNetworks/runtime/test/generated/spec_V1_2/
Dpow.example.cpp1 // Generated from pow.mod.py
7 namespace generated_tests::pow { namespace
44 .type = TestOperationType::POW, in get_test_model()
60 const auto dummy_test_model = TestModelManager::get().add("pow", get_test_model());
62 } // namespace generated_tests::pow
64 namespace generated_tests::pow { namespace
169 .type = TestOperationType::POW, in get_test_model_all_inputs_as_internal()
187 } // namespace generated_tests::pow
189 namespace generated_tests::pow { namespace
226 .type = TestOperationType::POW, in get_test_model_relaxed()
[all …]
/aosp_15_r20/external/rust/android-crates-io/crates/num-bigint/src/bigint/
Dpower.rs7 use num_traits::{Pow, Signed, Zero};
9 /// Help function for pow
25 impl Pow<$T> for BigInt {
29 fn pow(self, rhs: $T) -> BigInt {
30 BigInt::from_biguint(powsign(self.sign, &rhs), self.data.pow(rhs))
34 impl Pow<&$T> for BigInt {
38 fn pow(self, rhs: &$T) -> BigInt {
39 BigInt::from_biguint(powsign(self.sign, rhs), self.data.pow(rhs))
43 impl Pow<$T> for &BigInt { impl
47 fn pow(self, rhs: $T) -> BigInt {
[all …]
/aosp_15_r20/cts/tests/location/location_gnss/src/android/location/cts/gnss/pseudorange/
H A DEcef2LlaConverter.java36 Math.sqrt(Math.pow(EARTH_SEMI_MAJOR_AXIS_METERS, 2) * (1 - Math.pow(ECCENTRICITY, 2)));
38 (Math.pow(EARTH_SEMI_MAJOR_AXIS_METERS, 2) - Math.pow(SEMI_MINOR_AXIS_METERS, 2))
39 / Math.pow(SEMI_MINOR_AXIS_METERS, 2));
55 double pMeters = Math.sqrt(Math.pow(ecefXMeters, 2) + Math.pow(ecefYMeters, 2)); in convertECEFToLLACloseForm()
66 + Math.pow(SECOND_ECCENTRICITY, 2) * SEMI_MINOR_AXIS_METERS * Math.pow(sinTheta, 3); in convertECEFToLLACloseForm()
68 - Math.pow(ECCENTRICITY, 2) * EARTH_SEMI_MAJOR_AXIS_METERS * (Math.pow(cosTheta, 3)); in convertECEFToLLACloseForm()
72 / Math.sqrt(1 - Math.pow(ECCENTRICITY, 2) * (Math.pow(Math.sin(latRadians), 2))); in convertECEFToLLACloseForm()
97 double xyLengthMeters = Math.sqrt(Math.pow(ecefXMeters, 2) + Math.pow(ecefYMeters, 2));
98 double xyzLengthMeters = Math.sqrt(Math.pow(xyLengthMeters, 2) + Math.pow(ecefZMeters, 2));
/aosp_15_r20/external/sdv/vsomeip/third_party/boost/numeric/odeint/examples/2d_lattice/
Dlattice2d.hpp18 #include <boost/math/special_functions/pow.hpp>
20 using boost::math::pow;
47 dpdt[i][j] = - m_omega[i][j] * pow<Kappa-1>( q[i][j] ) in operator ()()
48 - m_beta * pow<Lambda-1>( q[i][j] - q[i][j_l] ) in operator ()()
49 - m_beta * pow<Lambda-1>( q[i][j] - q[i][j_r] ) in operator ()()
50 - m_beta * pow<Lambda-1>( q[i][j] - q[i_l][j] ) in operator ()()
51 - m_beta * pow<Lambda-1>( q[i][j] - q[i_r][j] ); in operator ()()
72 + m_omega[i][j] * pow<Kappa>( q[i][j] ) / Kappa in energy()
73 + m_beta * pow<Lambda>( q[i][j] - q[i][j_l] ) / Lambda / 2 in energy()
74 + m_beta * pow<Lambda>( q[i][j] - q[i][j_r] ) / Lambda / 2 in energy()
[all …]
/aosp_15_r20/external/pytorch/aten/src/ATen/test/
H A Dpow_test.cpp3 #include <ATen/native/Pow.h>
111 return std::pow(base, exp); in typed_pow()
123 for (const auto pow : pows) { in tensor_pow_scalar() local
125 if ( dtype == kInt && pow > static_cast<float>(std::numeric_limits<int>::max())) { in tensor_pow_scalar()
128 EXPECT_THROW(tensor.pow(pow), std::runtime_error); in tensor_pow_scalar()
131 auto actual_pow = tensor.pow(pow); in tensor_pow_scalar()
135 actual_pow_.pow_(pow); in tensor_pow_scalar()
138 torch::pow_out(actual_pow_out, tensor, pow); in tensor_pow_scalar()
140 auto actual_torch_pow = torch::pow(tensor, pow); in tensor_pow_scalar()
144 …const auto exp = torch::pow(torch::tensor({val}, dtype), torch::tensor(pow, dtype)).template item<… in tensor_pow_scalar()
[all …]
/aosp_15_r20/cts/tests/tests/text/src/android/text/format/cts/
H A DFormatterTest.java62 assertEquals("1.00 kB", Formatter.formatFileSize(context, bd.pow(1).longValue())); in testFormatFileSize()
63 assertEquals("1.50 kB", Formatter.formatFileSize(context, bd.pow(1).longValue() * 3 / 2)); in testFormatFileSize()
64 assertEquals("12.50 kB", Formatter.formatFileSize(context, bd.pow(1).longValue() * 25 / 2)); in testFormatFileSize()
66 assertEquals("1.00 MB", Formatter.formatFileSize(context, bd.pow(2).longValue())); in testFormatFileSize()
68 assertEquals("1.00 GB", Formatter.formatFileSize(context, bd.pow(3).longValue())); in testFormatFileSize()
70 assertEquals("1.00 TB", Formatter.formatFileSize(context, bd.pow(4).longValue())); in testFormatFileSize()
72 assertEquals("1.00 PB", Formatter.formatFileSize(context, bd.pow(5).longValue())); in testFormatFileSize()
74 assertEquals("1000 PB", Formatter.formatFileSize(context, bd.pow(6).longValue())); in testFormatFileSize()
102 assertEquals("1.0 kB", Formatter.formatShortFileSize(context, bd.pow(1).longValue())); in testFormatShortFileSize()
104 bd.pow(1).longValue() * 3 / 2)); in testFormatShortFileSize()
[all …]

12345678910>>...257