Home
last modified time | relevance | path

Searched refs:imag (Results 1 – 25 of 184) sorted by relevance

12345678

/external/libcxx/test/std/numerics/complex.number/complex.transcendentals/
Dlog.pass.cpp42 if (testcases[i].real() == 0 && testcases[i].imag() == 0) in test_edges()
48 if (std::signbit(testcases[i].imag())) in test_edges()
49 is_about(r.imag(), -pi); in test_edges()
51 is_about(r.imag(), pi); in test_edges()
57 assert(r.imag() == 0); in test_edges()
58 assert(std::signbit(testcases[i].imag()) == std::signbit(r.imag())); in test_edges()
61 else if (std::isfinite(testcases[i].real()) && std::isinf(testcases[i].imag())) in test_edges()
65 if (testcases[i].imag() > 0) in test_edges()
66 is_about(r.imag(), pi/2); in test_edges()
68 is_about(r.imag(), -pi/2); in test_edges()
[all …]
Dacos.pass.cpp43 if (testcases[i].real() == 0 && testcases[i].imag() == 0) in test_edges()
46 assert(r.imag() == 0); in test_edges()
47 assert(std::signbit(testcases[i].imag()) != std::signbit(r.imag())); in test_edges()
49 else if (testcases[i].real() == 0 && std::isnan(testcases[i].imag())) in test_edges()
52 assert(std::isnan(r.imag())); in test_edges()
54 else if (std::isfinite(testcases[i].real()) && std::isinf(testcases[i].imag())) in test_edges()
57 assert(std::isinf(r.imag())); in test_edges()
58 assert(std::signbit(testcases[i].imag()) != std::signbit(r.imag())); in test_edges()
60 …(std::isfinite(testcases[i].real()) && testcases[i].real() != 0 && std::isnan(testcases[i].imag())) in test_edges()
63 assert(std::isnan(r.imag())); in test_edges()
[all …]
Dacosh.pass.cpp43 if (testcases[i].real() == 0 && testcases[i].imag() == 0) in test_edges()
46 if (std::signbit(testcases[i].imag())) in test_edges()
47 is_about(r.imag(), -pi/2); in test_edges()
49 is_about(r.imag(), pi/2); in test_edges()
51 else if (testcases[i].real() == 1 && testcases[i].imag() == 0) in test_edges()
55 assert(r.imag() == 0); in test_edges()
56 assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag())); in test_edges()
58 else if (std::isfinite(testcases[i].real()) && std::isinf(testcases[i].imag())) in test_edges()
62 if (std::signbit(testcases[i].imag())) in test_edges()
63 is_about(r.imag(), -pi/2); in test_edges()
[all …]
Dexp.pass.cpp41 if (testcases[i].real() == 0 && testcases[i].imag() == 0) in test_edges()
44 assert(r.imag() == 0); in test_edges()
45 assert(std::signbit(testcases[i].imag()) == std::signbit(r.imag())); in test_edges()
47 else if (std::isfinite(testcases[i].real()) && std::isinf(testcases[i].imag())) in test_edges()
50 assert(std::isnan(r.imag())); in test_edges()
52 else if (std::isfinite(testcases[i].real()) && std::isnan(testcases[i].imag())) in test_edges()
55 assert(std::isnan(r.imag())); in test_edges()
57 … else if (std::isinf(testcases[i].real()) && testcases[i].real() > 0 && testcases[i].imag() == 0) in test_edges()
61 assert(r.imag() == 0); in test_edges()
62 assert(std::signbit(testcases[i].imag()) == std::signbit(r.imag())); in test_edges()
[all …]
Dsinh.pass.cpp42 if (testcases[i].real() == 0 && testcases[i].imag() == 0) in test_edges()
46 assert(r.imag() == 0); in test_edges()
47 assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag())); in test_edges()
49 else if (testcases[i].real() == 0 && std::isinf(testcases[i].imag())) in test_edges()
52 assert(std::isnan(r.imag())); in test_edges()
54 else if (std::isfinite(testcases[i].real()) && std::isinf(testcases[i].imag())) in test_edges()
57 assert(std::isnan(r.imag())); in test_edges()
59 else if (testcases[i].real() == 0 && std::isnan(testcases[i].imag())) in test_edges()
62 assert(std::isnan(r.imag())); in test_edges()
64 else if (std::isfinite(testcases[i].real()) && std::isnan(testcases[i].imag())) in test_edges()
[all …]
Datanh.pass.cpp43 if (testcases[i].real() == 0 && testcases[i].imag() == 0) in test_edges()
46 assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag())); in test_edges()
48 else if ( testcases[i].real() == 0 && std::isnan(testcases[i].imag())) in test_edges()
52 assert(std::isnan(r.imag())); in test_edges()
54 else if (std::abs(testcases[i].real()) == 1 && testcases[i].imag() == 0) in test_edges()
58 assert(r.imag() == 0); in test_edges()
59 assert(std::signbit(testcases[i].imag()) == std::signbit(r.imag())); in test_edges()
61 else if (std::isfinite(testcases[i].real()) && std::isinf(testcases[i].imag())) in test_edges()
65 if (testcases[i].imag() > 0) in test_edges()
66 is_about(r.imag(), pi/2); in test_edges()
[all …]
Dcosh.pass.cpp42 if (testcases[i].real() == 0 && testcases[i].imag() == 0) in test_edges()
45 assert(r.imag() == 0); in test_edges()
46 assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag())); in test_edges()
48 else if (testcases[i].real() == 0 && std::isinf(testcases[i].imag())) in test_edges()
51 assert(r.imag() == 0); in test_edges()
53 else if (testcases[i].real() == 0 && std::isnan(testcases[i].imag())) in test_edges()
56 assert(r.imag() == 0); in test_edges()
58 else if (std::isfinite(testcases[i].real()) && std::isinf(testcases[i].imag())) in test_edges()
61 assert(std::isnan(r.imag())); in test_edges()
63 else if (std::isfinite(testcases[i].real()) && std::isnan(testcases[i].imag())) in test_edges()
[all …]
Dasin.pass.cpp43 if (testcases[i].real() == 0 && testcases[i].imag() == 0) in test_edges()
46 assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag())); in test_edges()
48 else if (std::isfinite(testcases[i].real()) && std::isinf(testcases[i].imag())) in test_edges()
52 assert(std::isinf(r.imag())); in test_edges()
53 assert(std::signbit(testcases[i].imag()) == std::signbit(r.imag())); in test_edges()
55 else if ( testcases[i].real() == 0 && std::isnan(testcases[i].imag())) in test_edges()
59 assert(std::isnan(r.imag())); in test_edges()
61 else if (std::isfinite(testcases[i].real()) && std::isnan(testcases[i].imag())) in test_edges()
64 assert(std::isnan(r.imag())); in test_edges()
66 else if (std::isinf(testcases[i].real()) && std::isfinite(testcases[i].imag())) in test_edges()
[all …]
Dsqrt.pass.cpp27 assert(std::abs(imag(c)) < 1.e-6); in test()
43 if (testcases[i].real() == 0 && testcases[i].imag() == 0) in test_edges()
46 assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag())); in test_edges()
48 else if (std::isinf(testcases[i].imag())) in test_edges()
52 assert(std::isinf(r.imag())); in test_edges()
53 assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag())); in test_edges()
55 else if (std::isfinite(testcases[i].real()) && std::isnan(testcases[i].imag())) in test_edges()
58 assert(std::isnan(r.imag())); in test_edges()
60 … (std::isinf(testcases[i].real()) && testcases[i].real() < 0 && std::isfinite(testcases[i].imag())) in test_edges()
64 assert(std::isinf(r.imag())); in test_edges()
[all …]
Dasinh.pass.cpp43 if (testcases[i].real() == 0 && testcases[i].imag() == 0) in test_edges()
46 assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag())); in test_edges()
48 else if (std::isfinite(testcases[i].real()) && std::isinf(testcases[i].imag())) in test_edges()
52 if (std::signbit(testcases[i].imag())) in test_edges()
53 is_about(r.imag(), -pi/2); in test_edges()
55 is_about(r.imag(), pi/2); in test_edges()
57 else if (std::isfinite(testcases[i].real()) && std::isnan(testcases[i].imag())) in test_edges()
60 assert(std::isnan(r.imag())); in test_edges()
62 else if (std::isinf(testcases[i].real()) && std::isfinite(testcases[i].imag())) in test_edges()
66 assert(r.imag() == 0); in test_edges()
[all …]
Dtanh.pass.cpp42 if (testcases[i].real() == 0 && testcases[i].imag() == 0) in test_edges()
46 assert(r.imag() == 0); in test_edges()
47 assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag())); in test_edges()
49 else if (std::isfinite(testcases[i].real()) && std::isinf(testcases[i].imag())) in test_edges()
52 assert(std::isnan(r.imag())); in test_edges()
54 else if (std::isfinite(testcases[i].real()) && std::isnan(testcases[i].imag())) in test_edges()
57 assert(std::isnan(r.imag())); in test_edges()
59 else if (std::isinf(testcases[i].real()) && std::isfinite(testcases[i].imag())) in test_edges()
62 assert(r.imag() == 0); in test_edges()
63 assert(std::signbit(r.imag()) == std::signbit(sin(2*testcases[i].imag()))); in test_edges()
[all …]
Datan.pass.cpp41 std::complex<double> t1(-imag(testcases[i]), real(testcases[i])); in test_edges()
43 std::complex<double> z(imag(t2), -real(t2)); in test_edges()
51 if (std::isnan(imag(r))) in test_edges()
52 assert(std::isnan(imag(z))); in test_edges()
55 assert(imag(r) == imag(z)); in test_edges()
56 assert(std::signbit(imag(r)) == std::signbit(imag(z))); in test_edges()
/external/webrtc/webrtc/modules/audio_processing/beamformer/
Dcovariance_matrix_generator_unittest.cc46 EXPECT_NEAR(actual_els[0][0].imag(), 0.f, kTolerance); in TEST()
47 EXPECT_NEAR(actual_els[0][1].imag(), 0.f, kTolerance); in TEST()
48 EXPECT_NEAR(actual_els[1][0].imag(), 0.f, kTolerance); in TEST()
49 EXPECT_NEAR(actual_els[1][1].imag(), 0.f, kTolerance); in TEST()
79 EXPECT_NEAR(actual_els[0][0].imag(), 0.f, kTolerance); in TEST()
80 EXPECT_NEAR(actual_els[0][1].imag(), 0.f, kTolerance); in TEST()
81 EXPECT_NEAR(actual_els[0][2].imag(), 0.f, kTolerance); in TEST()
82 EXPECT_NEAR(actual_els[1][0].imag(), 0.f, kTolerance); in TEST()
83 EXPECT_NEAR(actual_els[1][1].imag(), 0.f, kTolerance); in TEST()
84 EXPECT_NEAR(actual_els[1][2].imag(), 0.f, kTolerance); in TEST()
[all …]
/external/python/cpython2/Modules/
Dcmathmodule.c101 if (!Py_IS_FINITE((z).real) || !Py_IS_FINITE((z).imag)) { \
104 [special_type((z).imag)]; \
133 if (fabs(z.real) > CM_LARGE_DOUBLE || fabs(z.imag) > CM_LARGE_DOUBLE) { in c_acos()
135 r.real = atan2(fabs(z.imag), z.real); in c_acos()
139 r.imag = -copysign(log(hypot(z.real/2., z.imag/2.)) + in c_acos()
140 M_LN2*2., z.imag); in c_acos()
142 r.imag = copysign(log(hypot(z.real/2., z.imag/2.)) + in c_acos()
143 M_LN2*2., -z.imag); in c_acos()
147 s1.imag = -z.imag; in c_acos()
150 s2.imag = z.imag; in c_acos()
[all …]
/external/python/cpython2/Objects/
Dcomplexobject.c38 r.imag = a.imag + b.imag; in c_sum()
47 r.imag = a.imag - b.imag; in c_diff()
56 r.imag = -a.imag; in c_neg()
64 r.real = a.real*b.real - a.imag*b.imag; in c_prod()
65 r.imag = a.real*b.imag + a.imag*b.real; in c_prod()
97 const double abs_bimag = b.imag < 0 ? -b.imag : b.imag; in c_quot()
103 r.real = r.imag = 0.0; in c_quot()
106 const double ratio = b.imag / b.real; in c_quot()
107 const double denom = b.real + b.imag * ratio; in c_quot()
108 r.real = (a.real + a.imag * ratio) / denom; in c_quot()
[all …]
/external/cblas/testing/
Dc_cblas2.c27 A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; in F77_cgemv()
59 A[ LDA*(j-jcol)+irow ].imag=a[ (*lda)*j+i ].imag; in F77_cgbmv()
66 A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag; in F77_cgbmv()
73 A[ LDA*j+irow ].imag=a[ (*lda)*(j-jcol)+i ].imag; in F77_cgbmv()
101 A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; in F77_cgeru()
107 a[ (*lda)*j+i ].imag=A[ LDA*i+j ].imag; in F77_cgeru()
129 A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; in F77_cgerc()
135 a[ (*lda)*j+i ].imag=A[ LDA*i+j ].imag; in F77_cgerc()
161 A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; in F77_chemv()
200 A[ LDA*(j-jcol)+irow ].imag=a[ (*lda)*j+i ].imag; in F77_chbmv()
[all …]
Dc_zblas2.c27 A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; in F77_zgemv()
59 A[ LDA*(j-jcol)+irow ].imag=a[ (*lda)*j+i ].imag; in F77_zgbmv()
66 A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag; in F77_zgbmv()
73 A[ LDA*j+irow ].imag=a[ (*lda)*(j-jcol)+i ].imag; in F77_zgbmv()
101 A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; in F77_zgeru()
107 a[ (*lda)*j+i ].imag=A[ LDA*i+j ].imag; in F77_zgeru()
129 A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; in F77_zgerc()
135 a[ (*lda)*j+i ].imag=A[ LDA*i+j ].imag; in F77_zgerc()
161 A[ LDA*i+j ].imag=a[ (*lda)*j+i ].imag; in F77_zhemv()
200 A[ LDA*(j-jcol)+irow ].imag=a[ (*lda)*j+i ].imag; in F77_zhbmv()
[all …]
Dc_zblas3.c33 A[i*LDA+j].imag=a[j*(*lda)+i].imag; in F77_zgemm()
42 A[i*LDA+j].imag=a[j*(*lda)+i].imag; in F77_zgemm()
52 B[i*LDB+j].imag=b[j*(*ldb)+i].imag; in F77_zgemm()
61 B[i*LDB+j].imag=b[j*(*ldb)+i].imag; in F77_zgemm()
70 C[i*LDC+j].imag=c[j*(*ldc)+i].imag; in F77_zgemm()
77 c[j*(*ldc)+i].imag=C[i*LDC+j].imag; in F77_zgemm()
110 A[i*LDA+j].imag=a[j*(*lda)+i].imag; in F77_zhemm()
119 A[i*LDA+j].imag=a[j*(*lda)+i].imag; in F77_zhemm()
127 B[i*LDB+j].imag=b[j*(*ldb)+i].imag; in F77_zhemm()
134 C[i*LDC+j].imag=c[j*(*ldc)+i].imag; in F77_zhemm()
[all …]
Dc_cblas3.c33 A[i*LDA+j].imag=a[j*(*lda)+i].imag; in F77_cgemm()
42 A[i*LDA+j].imag=a[j*(*lda)+i].imag; in F77_cgemm()
52 B[i*LDB+j].imag=b[j*(*ldb)+i].imag; in F77_cgemm()
61 B[i*LDB+j].imag=b[j*(*ldb)+i].imag; in F77_cgemm()
70 C[i*LDC+j].imag=c[j*(*ldc)+i].imag; in F77_cgemm()
77 c[j*(*ldc)+i].imag=C[i*LDC+j].imag; in F77_cgemm()
110 A[i*LDA+j].imag=a[j*(*lda)+i].imag; in F77_chemm()
119 A[i*LDA+j].imag=a[j*(*lda)+i].imag; in F77_chemm()
127 B[i*LDB+j].imag=b[j*(*ldb)+i].imag; in F77_chemm()
134 C[i*LDC+j].imag=c[j*(*ldc)+i].imag; in F77_chemm()
[all …]
/external/libcxx/include/
Dcomplex31 T imag() const; // constexpr in C++14
34 void imag(T);
62 constexpr float imag() const;
63 void imag(float);
91 constexpr double imag() const;
92 void imag(double);
120 constexpr long double imag() const;
121 void imag(long double);
174 template<class T> T imag(const complex<T>&); // constexpr in C++14
175 long double imag(long double); // constexpr in C++14
[all …]
/external/libcxx/test/std/numerics/complex.number/complex.value.ops/
Darg.pass.cpp36 if (std::isnan(testcases[i].real()) || std::isnan(testcases[i].imag())) in test_edges()
45 if (std::signbit(testcases[i].imag())) in test_edges()
52 assert(std::signbit(testcases[i].imag()) == std::signbit(r)); in test_edges()
58 if (testcases[i].imag() < 0) in test_edges()
63 else if (testcases[i].imag() == 0) in test_edges()
67 if (std::signbit(testcases[i].imag())) in test_edges()
75 assert(std::signbit(testcases[i].imag()) == std::signbit(r)); in test_edges()
78 else if (testcases[i].imag() > 0) in test_edges()
84 if (std::isinf(testcases[i].real()) && std::isinf(testcases[i].imag())) in test_edges()
88 if (testcases[i].imag() > 0) in test_edges()
[all …]
/external/libcxx/test/std/numerics/complex.number/complex.members/
Dreal_imag.pass.cpp27 static_assert(c1.imag() == 0, ""); in test_constexpr()
30 static_assert(c2.imag() == 0, ""); in test_constexpr()
33 static_assert(c3.imag() == 4, ""); in test_constexpr()
43 assert(c.imag() == 0); in test()
46 assert(c.imag() == 0); in test()
47 c.imag(4.5); in test()
49 assert(c.imag() == 4.5); in test()
52 assert(c.imag() == 4.5); in test()
53 c.imag(-5.5); in test()
55 assert(c.imag() == -5.5); in test()
Dconstruct.pass.cpp24 assert(c.imag() == 0); in test()
29 assert(c.imag() == 0); in test()
34 assert(c.imag() == 0); in test()
39 assert(c.imag() == -9.5); in test()
45 static_assert(c.imag() == 0, ""); in test()
50 static_assert(c.imag() == 0, ""); in test()
55 static_assert(c.imag() == 0, ""); in test()
60 static_assert(c.imag() == -9.5, ""); in test()
/external/libcxx/test/std/numerics/complex.number/cmplx.over/
Dimag.pass.cpp27 static_assert((std::is_same<decltype(std::imag(T(x))), double>::value), ""); in test()
28 assert(std::imag(x) == 0); in test()
31 static_assert(std::imag(val) == 0, ""); in test()
33 static_assert(t.imag() == x, "" ); in test()
41 static_assert((std::is_same<decltype(std::imag(T(x))), T>::value), ""); in test()
42 assert(std::imag(x) == 0); in test()
45 static_assert(std::imag(val) == 0, ""); in test()
47 static_assert(t.imag() == x, "" ); in test()
/external/compiler-rt/lib/builtins/ppc/
Ddivtc3.c41 DD imag = { .ld = __gcc_qdiv(imagNumerator, denom) }; in __divtc3() local
45 imag.s.hi = crt_scalbn(imag.s.hi, -ilogbw); in __divtc3()
46 imag.s.lo = crt_scalbn(imag.s.lo, -ilogbw); in __divtc3()
48 if (crt_isnan(real.s.hi) && crt_isnan(imag.s.hi)) in __divtc3()
59 imag.s.hi = crt_copysign(CRT_INFINITY,cDD.s.hi) * bDD.s.hi; in __divtc3()
60 imag.s.lo = 0.0; in __divtc3()
70 imag.s.hi = CRT_INFINITY * (bDD.s.hi*cDD.s.hi - aDD.s.hi*dDD.s.hi); in __divtc3()
71 imag.s.lo = 0.0; in __divtc3()
81 imag.s.hi = crt_copysign(0.0,(bDD.s.hi*cDD.s.hi - aDD.s.hi*dDD.s.hi)); in __divtc3()
82 imag.s.lo = 0.0; in __divtc3()
[all …]

12345678