Home
last modified time | relevance | path

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

123

/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/complex.number/complex.transcendentals/
Dlog.pass.cpp42 if (x[i].real() == 0 && x[i].imag() == 0) in test_edges()
48 if (std::signbit(x[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(x[i].imag()) == std::signbit(r.imag())); in test_edges()
61 else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag())) in test_edges()
65 if (x[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 (x[i].real() == 0 && x[i].imag() == 0) in test_edges()
46 assert(r.imag() == 0); in test_edges()
47 assert(std::signbit(x[i].imag()) != std::signbit(r.imag())); in test_edges()
49 else if (x[i].real() == 0 && std::isnan(x[i].imag())) in test_edges()
52 assert(std::isnan(r.imag())); in test_edges()
54 else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag())) in test_edges()
57 assert(std::isinf(r.imag())); in test_edges()
58 assert(std::signbit(x[i].imag()) != std::signbit(r.imag())); in test_edges()
60 else if (std::isfinite(x[i].real()) && x[i].real() != 0 && std::isnan(x[i].imag())) in test_edges()
63 assert(std::isnan(r.imag())); in test_edges()
[all …]
Dacosh.pass.cpp43 if (x[i].real() == 0 && x[i].imag() == 0) in test_edges()
46 if (std::signbit(x[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 (x[i].real() == 1 && x[i].imag() == 0) in test_edges()
55 assert(r.imag() == 0); in test_edges()
56 assert(std::signbit(r.imag()) == std::signbit(x[i].imag())); in test_edges()
58 else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag())) in test_edges()
62 if (std::signbit(x[i].imag())) in test_edges()
63 is_about(r.imag(), -pi/2); in test_edges()
[all …]
Dexp.pass.cpp41 if (x[i].real() == 0 && x[i].imag() == 0) in test_edges()
44 assert(r.imag() == 0); in test_edges()
45 assert(std::signbit(x[i].imag()) == std::signbit(r.imag())); in test_edges()
47 else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag())) in test_edges()
50 assert(std::isnan(r.imag())); in test_edges()
52 else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag())) in test_edges()
55 assert(std::isnan(r.imag())); in test_edges()
57 else if (std::isinf(x[i].real()) && x[i].real() > 0 && x[i].imag() == 0) in test_edges()
61 assert(r.imag() == 0); in test_edges()
62 assert(std::signbit(x[i].imag()) == std::signbit(r.imag())); in test_edges()
[all …]
Dsinh.pass.cpp43 if (x[i].real() == 0 && x[i].imag() == 0) in test_edges()
47 assert(r.imag() == 0); in test_edges()
48 assert(std::signbit(r.imag()) == std::signbit(x[i].imag())); in test_edges()
50 else if (x[i].real() == 0 && std::isinf(x[i].imag())) in test_edges()
53 assert(std::isnan(r.imag())); in test_edges()
55 else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag())) in test_edges()
58 assert(std::isnan(r.imag())); in test_edges()
60 else if (x[i].real() == 0 && std::isnan(x[i].imag())) in test_edges()
63 assert(std::isnan(r.imag())); in test_edges()
65 else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag())) in test_edges()
[all …]
Dcosh.pass.cpp43 if (x[i].real() == 0 && x[i].imag() == 0) in test_edges()
46 assert(r.imag() == 0); in test_edges()
47 assert(std::signbit(r.imag()) == std::signbit(x[i].imag())); in test_edges()
49 else if (x[i].real() == 0 && std::isinf(x[i].imag())) in test_edges()
52 assert(r.imag() == 0); in test_edges()
54 else if (x[i].real() == 0 && std::isnan(x[i].imag())) in test_edges()
57 assert(r.imag() == 0); in test_edges()
59 else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag())) in test_edges()
62 assert(std::isnan(r.imag())); in test_edges()
64 else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag())) in test_edges()
[all …]
Datanh.pass.cpp43 if (x[i].real() == 0 && x[i].imag() == 0) in test_edges()
46 assert(std::signbit(r.imag()) == std::signbit(x[i].imag())); in test_edges()
48 else if ( x[i].real() == 0 && std::isnan(x[i].imag())) in test_edges()
52 assert(std::isnan(r.imag())); in test_edges()
54 else if (std::abs(x[i].real()) == 1 && x[i].imag() == 0) in test_edges()
58 assert(r.imag() == 0); in test_edges()
59 assert(std::signbit(x[i].imag()) == std::signbit(r.imag())); in test_edges()
61 else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag())) in test_edges()
65 if (x[i].imag() > 0) in test_edges()
66 is_about(r.imag(), pi/2); in test_edges()
[all …]
Dsqrt.pass.cpp27 assert(std::abs(imag(c)) < 1.e-6); in test()
43 if (x[i].real() == 0 && x[i].imag() == 0) in test_edges()
46 assert(std::signbit(r.imag()) == std::signbit(x[i].imag())); in test_edges()
48 else if (std::isinf(x[i].imag())) in test_edges()
52 assert(std::isinf(r.imag())); in test_edges()
53 assert(std::signbit(r.imag()) == std::signbit(x[i].imag())); in test_edges()
55 else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag())) in test_edges()
58 assert(std::isnan(r.imag())); in test_edges()
60 else if (std::isinf(x[i].real()) && x[i].real() < 0 && std::isfinite(x[i].imag())) in test_edges()
64 assert(std::isinf(r.imag())); in test_edges()
[all …]
Dasin.pass.cpp43 if (x[i].real() == 0 && x[i].imag() == 0) in test_edges()
46 assert(std::signbit(r.imag()) == std::signbit(x[i].imag())); in test_edges()
48 else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag())) in test_edges()
52 assert(std::isinf(r.imag())); in test_edges()
53 assert(std::signbit(x[i].imag()) == std::signbit(r.imag())); in test_edges()
55 else if ( x[i].real() == 0 && std::isnan(x[i].imag())) in test_edges()
59 assert(std::isnan(r.imag())); in test_edges()
61 else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag())) in test_edges()
64 assert(std::isnan(r.imag())); in test_edges()
66 else if (std::isinf(x[i].real()) && std::isfinite(x[i].imag())) in test_edges()
[all …]
Dtanh.pass.cpp43 if (x[i].real() == 0 && x[i].imag() == 0) in test_edges()
47 assert(r.imag() == 0); in test_edges()
48 assert(std::signbit(r.imag()) == std::signbit(x[i].imag())); in test_edges()
50 else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag())) in test_edges()
53 assert(std::isnan(r.imag())); in test_edges()
55 else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag())) in test_edges()
58 assert(std::isnan(r.imag())); in test_edges()
60 else if (std::isinf(x[i].real()) && std::isfinite(x[i].imag())) in test_edges()
63 assert(r.imag() == 0); in test_edges()
64 assert(std::signbit(r.imag()) == std::signbit(sin(2*x[i].imag()))); in test_edges()
[all …]
Dasinh.pass.cpp43 if (x[i].real() == 0 && x[i].imag() == 0) in test_edges()
46 assert(std::signbit(r.imag()) == std::signbit(x[i].imag())); in test_edges()
48 else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag())) in test_edges()
52 if (std::signbit(x[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(x[i].real()) && std::isnan(x[i].imag())) in test_edges()
60 assert(std::isnan(r.imag())); in test_edges()
62 else if (std::isinf(x[i].real()) && std::isfinite(x[i].imag())) in test_edges()
66 assert(r.imag() == 0); in test_edges()
[all …]
Dsin.pass.cpp43 std::complex<double> t1(-imag(x[i]), real(x[i])); in test_edges()
45 std::complex<double> z(imag(t2), -real(t2)); in test_edges()
53 if (std::isnan(imag(r))) in test_edges()
54 assert(std::isnan(imag(z))); in test_edges()
57 assert(imag(r) == imag(z)); in test_edges()
58 assert(std::signbit(imag(r)) == std::signbit(imag(z))); in test_edges()
Datan.pass.cpp42 std::complex<double> t1(-imag(x[i]), real(x[i])); in test_edges()
44 std::complex<double> z(imag(t2), -real(t2)); in test_edges()
52 if (std::isnan(imag(r))) in test_edges()
53 assert(std::isnan(imag(z))); in test_edges()
56 assert(imag(r) == imag(z)); in test_edges()
57 assert(std::signbit(imag(r)) == std::signbit(imag(z))); in test_edges()
Dtan.pass.cpp44 std::complex<double> t1(-imag(x[i]), real(x[i])); in test_edges()
46 std::complex<double> z(imag(t2), -real(t2)); in test_edges()
54 if (std::isnan(imag(r))) in test_edges()
55 assert(std::isnan(imag(z))); in test_edges()
58 assert(imag(r) == imag(z)); in test_edges()
59 assert(std::signbit(imag(r)) == std::signbit(imag(z))); in test_edges()
Dpow_complex_complex.pass.cpp27 is_about(imag(c), imag(x)); in test()
54 if (std::isnan(imag(r))) in test_edges()
55 assert(std::isnan(imag(z))); in test_edges()
58 assert(imag(r) == imag(z)); in test_edges()
59 assert(std::signbit(imag(r)) == std::signbit(imag(z))); in test_edges()
Dcos.pass.cpp43 std::complex<double> t1(-imag(x[i]), real(x[i])); in test_edges()
52 if (std::isnan(imag(r))) in test_edges()
53 assert(std::isnan(imag(z))); in test_edges()
56 assert(imag(r) == imag(z)); in test_edges()
57 assert(std::signbit(imag(r)) == std::signbit(imag(z))); in test_edges()
Dlog10.pass.cpp50 if (std::isnan(imag(r))) in test_edges()
51 assert(std::isnan(imag(z))); in test_edges()
54 assert(imag(r) == imag(z)); in test_edges()
55 assert(std::signbit(imag(r)) == std::signbit(imag(z))); in test_edges()
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/complex.number/complex.members/
Dreal_imag.pass.cpp25 static_assert(c1.imag() == 0, ""); in test_constexpr()
28 static_assert(c2.imag() == 0, ""); in test_constexpr()
31 static_assert(c3.imag() == 4, ""); in test_constexpr()
41 assert(c.imag() == 0); in test()
44 assert(c.imag() == 0); in test()
45 c.imag(4.5); in test()
47 assert(c.imag() == 4.5); in test()
50 assert(c.imag() == 4.5); in test()
51 c.imag(-5.5); in test()
53 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()
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/complex.number/complex.value.ops/
Darg.pass.cpp36 if (std::isnan(x[i].real()) || std::isnan(x[i].imag())) in test_edges()
45 if (std::signbit(x[i].imag())) in test_edges()
52 assert(std::signbit(x[i].imag()) == std::signbit(r)); in test_edges()
58 if (x[i].imag() < 0) in test_edges()
63 else if (x[i].imag() == 0) in test_edges()
67 if (std::signbit(x[i].imag())) in test_edges()
75 assert(std::signbit(x[i].imag()) == std::signbit(r)); in test_edges()
78 else if (x[i].imag() > 0) in test_edges()
84 if (std::isinf(x[i].real()) && std::isinf(x[i].imag())) in test_edges()
88 if (x[i].imag() > 0) in test_edges()
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/complex.number/cmplx.over/
Dimag.pass.cpp26 static_assert((std::is_same<decltype(std::imag(T(x))), double>::value), ""); in test()
27 assert(std::imag(x) == 0); in test()
30 static_assert(std::imag(val) == 0, ""); in test()
32 static_assert(t.imag() == x, "" ); in test()
40 static_assert((std::is_same<decltype(std::imag(T(x))), T>::value), ""); in test()
41 assert(std::imag(x) == 0); in test()
44 static_assert(std::imag(val) == 0, ""); in test()
46 static_assert(t.imag() == x, "" ); in test()
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/complex.number/complex.member.ops/
Ddivide_equal_scalar.pass.cpp23 assert(c.imag() == 0); in test()
26 assert(c.imag() == 0); in test()
29 assert(c.imag() == 0); in test()
32 assert(c.imag() == 0); in test()
33 c.imag(2); in test()
36 assert(c.imag() == 4); in test()
Dtimes_equal_scalar.pass.cpp23 assert(c.imag() == 0); in test()
26 assert(c.imag() == 0); in test()
29 assert(c.imag() == 0); in test()
32 assert(c.imag() == 0); in test()
33 c.imag(2); in test()
36 assert(c.imag() == 3); in test()
Dplus_equal_complex.pass.cpp24 assert(c.imag() == 0); in test()
27 assert(c.imag() == 2.5); in test()
30 assert(c.imag() == 5); in test()
38 assert(c3.imag() == 6); in test()
44 assert(c3.imag() == 6); in test()
/ndk/sources/cxx-stl/llvm-libc++/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 …]

123