Home
last modified time | relevance | path

Searched refs:real (Results 1 – 25 of 101) sorted by relevance

12345

/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/complex.number/complex.transcendentals/
Datanh.pass.cpp43 if (x[i].real() == 0 && x[i].imag() == 0) in test_edges()
45 assert(std::signbit(r.real()) == std::signbit(x[i].real())); in test_edges()
48 else if ( x[i].real() == 0 && std::isnan(x[i].imag())) in test_edges()
50 assert(r.real() == 0); in test_edges()
51 assert(std::signbit(x[i].real()) == std::signbit(r.real())); in test_edges()
54 else if (std::abs(x[i].real()) == 1 && x[i].imag() == 0) in test_edges()
56 assert(std::isinf(r.real())); in test_edges()
57 assert(std::signbit(x[i].real()) == std::signbit(r.real())); in test_edges()
61 else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag())) in test_edges()
63 assert(r.real() == 0); in test_edges()
[all …]
Dacosh.pass.cpp43 if (x[i].real() == 0 && x[i].imag() == 0) in test_edges()
45 assert(!std::signbit(r.real())); in test_edges()
51 else if (x[i].real() == 1 && x[i].imag() == 0) in test_edges()
53 assert(r.real() == 0); in test_edges()
54 assert(!std::signbit(r.real())); in test_edges()
58 else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag())) in test_edges()
60 assert(std::isinf(r.real())); in test_edges()
61 assert(r.real() > 0); in test_edges()
67 else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag())) in test_edges()
69 assert(std::isnan(r.real())); in test_edges()
[all …]
Dexp.pass.cpp41 if (x[i].real() == 0 && x[i].imag() == 0) in test_edges()
43 assert(r.real() == 1.0); in test_edges()
47 else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag())) in test_edges()
49 assert(std::isnan(r.real())); in test_edges()
52 else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag())) in test_edges()
54 assert(std::isnan(r.real())); in test_edges()
57 else if (std::isinf(x[i].real()) && x[i].real() > 0 && x[i].imag() == 0) in test_edges()
59 assert(std::isinf(r.real())); in test_edges()
60 assert(r.real() > 0); in test_edges()
64 else if (std::isinf(x[i].real()) && x[i].real() < 0 && std::isinf(x[i].imag())) in test_edges()
[all …]
Dlog.pass.cpp42 if (x[i].real() == 0 && x[i].imag() == 0) in test_edges()
44 if (std::signbit(x[i].real())) in test_edges()
46 assert(std::isinf(r.real())); in test_edges()
47 assert(r.real() < 0); in test_edges()
55 assert(std::isinf(r.real())); in test_edges()
56 assert(r.real() < 0); in test_edges()
61 else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag())) in test_edges()
63 assert(std::isinf(r.real())); in test_edges()
64 assert(r.real() > 0); in test_edges()
70 else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag())) in test_edges()
[all …]
Dsinh.pass.cpp43 if (x[i].real() == 0 && x[i].imag() == 0) in test_edges()
45 assert(r.real() == 0); in test_edges()
46 assert(std::signbit(r.real()) == std::signbit(x[i].real())); in test_edges()
50 else if (x[i].real() == 0 && std::isinf(x[i].imag())) in test_edges()
52 assert(r.real() == 0); in test_edges()
55 else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag())) in test_edges()
57 assert(std::isnan(r.real())); in test_edges()
60 else if (x[i].real() == 0 && std::isnan(x[i].imag())) in test_edges()
62 assert(r.real() == 0); in test_edges()
65 else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag())) in test_edges()
[all …]
Dasin.pass.cpp43 if (x[i].real() == 0 && x[i].imag() == 0) in test_edges()
45 assert(std::signbit(r.real()) == std::signbit(x[i].real())); in test_edges()
48 else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag())) in test_edges()
50 assert(r.real() == 0); in test_edges()
51 assert(std::signbit(x[i].real()) == std::signbit(r.real())); in test_edges()
55 else if ( x[i].real() == 0 && std::isnan(x[i].imag())) in test_edges()
57 assert(r.real() == 0); in test_edges()
58 assert(std::signbit(x[i].real()) == std::signbit(r.real())); in test_edges()
61 else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag())) in test_edges()
63 assert(std::isnan(r.real())); in test_edges()
[all …]
Dsqrt.pass.cpp26 is_about(real(a), real(x)); in test()
43 if (x[i].real() == 0 && x[i].imag() == 0) in test_edges()
45 assert(!std::signbit(r.real())); in test_edges()
50 assert(std::isinf(r.real())); in test_edges()
51 assert(r.real() > 0); in test_edges()
55 else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag())) in test_edges()
57 assert(std::isnan(r.real())); in test_edges()
60 else if (std::isinf(x[i].real()) && x[i].real() < 0 && std::isfinite(x[i].imag())) in test_edges()
62 assert(r.real() == 0); in test_edges()
63 assert(!std::signbit(r.real())); in test_edges()
[all …]
Dacos.pass.cpp43 if (x[i].real() == 0 && x[i].imag() == 0) in test_edges()
45 is_about(r.real(), pi/2); in test_edges()
49 else if (x[i].real() == 0 && std::isnan(x[i].imag())) in test_edges()
51 is_about(r.real(), pi/2); in test_edges()
54 else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag())) in test_edges()
56 is_about(r.real(), pi/2); in test_edges()
60 else if (std::isfinite(x[i].real()) && x[i].real() != 0 && std::isnan(x[i].imag())) in test_edges()
62 assert(std::isnan(r.real())); in test_edges()
65 else if (std::isinf(x[i].real()) && x[i].real() < 0 && std::isfinite(x[i].imag())) in test_edges()
67 is_about(r.real(), pi); in test_edges()
[all …]
Dasinh.pass.cpp43 if (x[i].real() == 0 && x[i].imag() == 0) in test_edges()
45 assert(std::signbit(r.real()) == std::signbit(x[i].real())); in test_edges()
48 else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag())) in test_edges()
50 assert(std::isinf(r.real())); in test_edges()
51 assert(std::signbit(x[i].real()) == std::signbit(r.real())); in test_edges()
57 else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag())) in test_edges()
59 assert(std::isnan(r.real())); in test_edges()
62 else if (std::isinf(x[i].real()) && std::isfinite(x[i].imag())) in test_edges()
64 assert(std::isinf(r.real())); in test_edges()
65 assert(std::signbit(x[i].real()) == std::signbit(r.real())); in test_edges()
[all …]
Dcosh.pass.cpp43 if (x[i].real() == 0 && x[i].imag() == 0) in test_edges()
45 assert(r.real() == 1); in test_edges()
49 else if (x[i].real() == 0 && std::isinf(x[i].imag())) in test_edges()
51 assert(std::isnan(r.real())); in test_edges()
54 else if (x[i].real() == 0 && std::isnan(x[i].imag())) in test_edges()
56 assert(std::isnan(r.real())); in test_edges()
59 else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag())) in test_edges()
61 assert(std::isnan(r.real())); in test_edges()
64 else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag())) in test_edges()
66 assert(std::isnan(r.real())); in test_edges()
[all …]
Dtanh.pass.cpp43 if (x[i].real() == 0 && x[i].imag() == 0) in test_edges()
45 assert(r.real() == 0); in test_edges()
46 assert(std::signbit(r.real()) == std::signbit(x[i].real())); in test_edges()
50 else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag())) in test_edges()
52 assert(std::isnan(r.real())); in test_edges()
55 else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag())) in test_edges()
57 assert(std::isnan(r.real())); in test_edges()
60 else if (std::isinf(x[i].real()) && std::isfinite(x[i].imag())) in test_edges()
62 assert(r.real() == 1); in test_edges()
66 else if (std::isinf(x[i].real()) && std::isinf(x[i].imag())) in test_edges()
[all …]
Dpow_complex_scalar.pass.cpp26 is_about(real(c), real(x)); in test()
45 std::complex<double> r = pow(x[i], real(x[j])); in test_edges()
46 std::complex<double> z = exp(std::complex<double>(real(x[j])) * log(x[i])); in test_edges()
47 if (std::isnan(real(r))) in test_edges()
48 assert(std::isnan(real(z))); in test_edges()
51 assert(real(r) == real(z)); in test_edges()
Dpow_scalar_complex.pass.cpp26 is_about(real(c), real(x)); in test()
45 std::complex<double> r = pow(real(x[i]), x[j]); in test_edges()
46 std::complex<double> z = exp(x[j] * log(std::complex<double>(real(x[i])))); in test_edges()
47 if (std::isnan(real(r))) in test_edges()
48 assert(std::isnan(real(z))); in test_edges()
51 assert(real(r) == real(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()
45 if (std::isnan(real(r))) in test_edges()
46 assert(std::isnan(real(z))); in test_edges()
49 assert(real(r) == real(z)); in test_edges()
50 assert(std::signbit(real(r)) == std::signbit(real(z))); in test_edges()
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()
46 if (std::isnan(real(r))) in test_edges()
47 assert(std::isnan(real(z))); in test_edges()
50 assert(real(r) == real(z)); in test_edges()
51 assert(std::signbit(real(r)) == std::signbit(real(z))); in test_edges()
Dpow_complex_complex.pass.cpp26 is_about(real(c), real(x)); in test()
47 if (std::isnan(real(r))) in test_edges()
48 assert(std::isnan(real(z))); in test_edges()
51 assert(real(r) == real(z)); in test_edges()
52 assert(std::signbit(real(r)) == std::signbit(real(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()
47 if (std::isnan(real(r))) in test_edges()
48 assert(std::isnan(real(z))); in test_edges()
51 assert(real(r) == real(z)); in test_edges()
52 assert(std::signbit(real(r)) == std::signbit(real(z))); in test_edges()
Dcos.pass.cpp43 std::complex<double> t1(-imag(x[i]), real(x[i])); in test_edges()
45 if (std::isnan(real(r))) in test_edges()
46 assert(std::isnan(real(z))); in test_edges()
49 assert(real(r) == real(z)); in test_edges()
50 assert(std::signbit(real(r)) == std::signbit(real(z))); in test_edges()
Dlog10.pass.cpp43 if (std::isnan(real(r))) in test_edges()
44 assert(std::isnan(real(z))); in test_edges()
47 assert(real(r) == real(z)); in test_edges()
48 assert(std::signbit(real(r)) == std::signbit(real(z))); in test_edges()
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/complex.number/complex.members/
Dreal_imag.pass.cpp24 static_assert(c1.real() == 0, ""); in test_constexpr()
27 static_assert(c2.real() == 3, ""); in test_constexpr()
30 static_assert(c3.real() == 3, ""); in test_constexpr()
40 assert(c.real() == 0); in test()
42 c.real(3.5); in test()
43 assert(c.real() == 3.5); in test()
46 assert(c.real() == 3.5); in test()
48 c.real(-4.5); in test()
49 assert(c.real() == -4.5); in test()
52 assert(c.real() == -4.5); in test()
Dconstruct.pass.cpp23 assert(c.real() == 0); in test()
28 assert(c.real() == 7.5); in test()
33 assert(c.real() == 8.5); in test()
38 assert(c.real() == 10.5); in test()
44 static_assert(c.real() == 0, ""); in test()
49 static_assert(c.real() == 7.5, ""); in test()
54 static_assert(c.real() == 8.5, ""); in test()
59 static_assert(c.real() == 10.5, ""); in test()
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/complex.number/cmplx.over/
Dreal.pass.cpp26 static_assert((std::is_same<decltype(std::real(T(x))), double>::value), ""); in test()
27 assert(std::real(x) == x); in test()
30 static_assert(std::real(val) == val, ""); in test()
32 static_assert(t.real() == x, "" ); in test()
40 static_assert((std::is_same<decltype(std::real(T(x))), T>::value), ""); in test()
41 assert(std::real(x) == x); in test()
44 static_assert(std::real(val) == val, ""); in test()
46 static_assert(t.real() == x, "" ); in test()
/ndk/sources/cxx-stl/llvm-libc++/libcxx/include/
Dcomplex30 T real() const; // constexpr in C++14
33 void real(T);
60 constexpr float real() const;
61 void real(float);
89 constexpr double real() const;
90 void real(double);
118 constexpr long double real() const;
119 void real(long double);
168 template<class T> T real(const complex<T>&); // constexpr in C++14
169 long double real(long double); // constexpr in C++14
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/complex.number/complex.member.ops/
Dtimes_equal_scalar.pass.cpp22 assert(c.real() == 1); in test()
25 assert(c.real() == 1.5); in test()
28 assert(c.real() == 2.25); in test()
31 assert(c.real() == -3.375); in test()
35 assert(c.real() == -5.0625); in test()
Ddivide_equal_scalar.pass.cpp22 assert(c.real() == 1); in test()
25 assert(c.real() == 2); in test()
28 assert(c.real() == 4); in test()
31 assert(c.real() == -8); in test()
35 assert(c.real() == -16); in test()

12345