Home
last modified time | relevance | path

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

12345678910>>...20

/llvm-project-15.0.7/clang/lib/Headers/openmp_wrappers/
H A Dcomplex_cmath.h60 return abs(__c.real()); in norm()
63 return __c.real() * __c.real() + __c.imag() * __c.imag(); in norm()
189 return std::complex<_Tp>(__x.real(), __x.real()); in asinh()
195 return std::complex<_Tp>(copysign(__z.real(), __x.real()), in asinh()
215 if (__x.real() < 0) in acosh()
222 return std::complex<_Tp>(__x.real(), __x.real()); in acosh()
242 if (std::isinf(__x.real()) || __x.real() == 0) in atanh()
247 return std::complex<_Tp>(__x.real(), __x.real()); in atanh()
258 return std::complex<_Tp>(copysign(__z.real(), __x.real()), in atanh()
339 signbit(__x.imag()) ? __x.real() : -__x.real()); in acos()
[all …]
/llvm-project-15.0.7/libcxx/test/std/numerics/complex.number/complex.transcendentals/
H A Datanh.pass.cpp44 assert(std::signbit(r.real()) == std::signbit(testcases[i].real())); in test_edges()
49 assert(r.real() == 0); in test_edges()
50 assert(std::signbit(testcases[i].real()) == std::signbit(r.real())); in test_edges()
56 assert(std::signbit(testcases[i].real()) == std::signbit(r.real())); in test_edges()
62 assert(r.real() == 0); in test_edges()
63 assert(std::signbit(testcases[i].real()) == std::signbit(r.real())); in test_edges()
77 assert(std::signbit(testcases[i].real()) == std::signbit(r.real())); in test_edges()
86 assert(std::signbit(testcases[i].real()) == std::signbit(r.real())); in test_edges()
95 assert(std::signbit(testcases[i].real()) == std::signbit(r.real())); in test_edges()
106 assert(std::signbit(testcases[i].real()) == std::signbit(r.real())); in test_edges()
[all …]
H A Dacosh.pass.cpp52 assert(r.real() == 0); in test_edges()
59 assert(r.real() == 0); in test_edges()
68 assert(std::isinf(r.real())); in test_edges()
69 assert(r.real() > 0); in test_edges()
77 assert(std::isnan(r.real())); in test_edges()
83 assert(r.real() > 0); in test_edges()
92 assert(r.real() > 0); in test_edges()
99 assert(r.real() > 0); in test_edges()
108 assert(r.real() > 0); in test_edges()
117 assert(r.real() > 0); in test_edges()
[all …]
H A Dasin.pass.cpp44 assert(std::signbit(r.real()) == std::signbit(testcases[i].real())); in test_edges()
49 assert(r.real() == 0); in test_edges()
50 assert(std::signbit(testcases[i].real()) == std::signbit(r.real())); in test_edges()
56 assert(r.real() == 0); in test_edges()
57 assert(std::signbit(testcases[i].real()) == std::signbit(r.real())); in test_edges()
62 assert(std::isnan(r.real())); in test_edges()
67 if (testcases[i].real() > 0) in test_edges()
68 is_about(r.real(), pi/2); in test_edges()
85 assert(std::isnan(r.real())); in test_edges()
91 assert(std::isnan(r.real())); in test_edges()
[all …]
H A Dasinh.pass.cpp44 assert(std::signbit(r.real()) == std::signbit(testcases[i].real())); in test_edges()
49 assert(r.real() == 0); in test_edges()
58 assert(std::isinf(r.real())); in test_edges()
59 assert(std::signbit(testcases[i].real()) == std::signbit(r.real())); in test_edges()
67 assert(std::isnan(r.real())); in test_edges()
72 assert(std::isinf(r.real())); in test_edges()
73 assert(std::signbit(testcases[i].real()) == std::signbit(r.real())); in test_edges()
79 assert(std::isinf(r.real())); in test_edges()
80 assert(std::signbit(testcases[i].real()) == std::signbit(r.real())); in test_edges()
89 assert(std::signbit(testcases[i].real()) == std::signbit(r.real())); in test_edges()
[all …]
H A Dlog.pass.cpp47 assert(r.real() < 0); in test_edges()
56 assert(r.real() < 0); in test_edges()
63 assert(std::isinf(r.real())); in test_edges()
64 assert(r.real() > 0); in test_edges()
72 assert(std::isnan(r.real())); in test_edges()
77 assert(std::isinf(r.real()) && r.real() > 0); in test_edges()
85 assert(std::isinf(r.real()) && r.real() > 0); in test_edges()
91 assert(r.real() == 0); in test_edges()
96 assert(r.real() == 0); in test_edges()
101 assert(r.real() == 0); in test_edges()
[all …]
H A Dacos.pass.cpp44 is_about(r.real(), pi/2); in test_edges()
50 is_about(r.real(), pi/2); in test_edges()
55 is_about(r.real(), pi/2); in test_edges()
59 …else if (std::isfinite(testcases[i].real()) && testcases[i].real() != 0 && std::isnan(testcases[i]… in test_edges()
61 assert(std::isnan(r.real())); in test_edges()
64 …else if (std::isinf(testcases[i].real()) && testcases[i].real() < 0 && std::isfinite(testcases[i].… in test_edges()
66 is_about(r.real(), pi); in test_edges()
72 assert(r.real() == 0); in test_edges()
77 …else if (std::isinf(testcases[i].real()) && testcases[i].real() < 0 && std::isinf(testcases[i].ima… in test_edges()
83 …else if (std::isinf(testcases[i].real()) && testcases[i].real() > 0 && std::isinf(testcases[i].ima… in test_edges()
[all …]
H A Dsinh.pass.cpp43 assert(r.real() == 0); in test_edges()
44 assert(std::signbit(r.real()) == std::signbit(testcases[i].real())); in test_edges()
50 assert(r.real() == 0); in test_edges()
55 assert(std::isnan(r.real())); in test_edges()
60 assert(r.real() == 0); in test_edges()
65 assert(std::isnan(r.real())); in test_edges()
70 assert(std::isinf(r.real())); in test_edges()
71 assert(std::signbit(r.real()) == std::signbit(testcases[i].real())); in test_edges()
77 assert(std::isinf(r.real())); in test_edges()
78 … assert(std::signbit(r.real()) == std::signbit(testcases[i].real() * cos(testcases[i].imag()))); in test_edges()
[all …]
H A Dexp.pass.cpp43 assert(r.real() == 1.0); in test_edges()
49 assert(std::isnan(r.real())); in test_edges()
54 assert(std::isnan(r.real())); in test_edges()
57 … else if (std::isinf(testcases[i].real()) && testcases[i].real() > 0 && testcases[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(testcases[i].real()) && testcases[i].real() < 0 && std::isinf(testcases[i].ima… in test_edges()
66 assert(r.real() == 0); in test_edges()
69 …else if (std::isinf(testcases[i].real()) && testcases[i].real() > 0 && std::isinf(testcases[i].ima… in test_edges()
74 …else if (std::isinf(testcases[i].real()) && testcases[i].real() < 0 && std::isnan(testcases[i].ima… in test_edges()
[all …]
H A Dcosh.pass.cpp43 assert(r.real() == 1); in test_edges()
49 assert(std::isnan(r.real())); in test_edges()
54 assert(std::isnan(r.real())); in test_edges()
59 assert(std::isnan(r.real())); in test_edges()
64 assert(std::isnan(r.real())); in test_edges()
69 assert(std::isinf(r.real())); in test_edges()
76 assert(std::isinf(r.real())); in test_edges()
83 assert(std::isinf(r.real())); in test_edges()
88 assert(std::isinf(r.real())); in test_edges()
89 assert(r.real() > 0); in test_edges()
[all …]
H A Dsqrt.pass.cpp26 is_about(real(a), real(x)); in test()
50 assert(std::isinf(r.real())); in test_edges()
51 assert(r.real() > 0); in test_edges()
57 assert(std::isnan(r.real())); in test_edges()
62 assert(r.real() == 0); in test_edges()
69 assert(std::isinf(r.real())); in test_edges()
70 assert(r.real() > 0); in test_edges()
74 …else if (std::isinf(testcases[i].real()) && testcases[i].real() < 0 && std::isnan(testcases[i].ima… in test_edges()
76 assert(std::isnan(r.real())); in test_edges()
79 …else if (std::isinf(testcases[i].real()) && testcases[i].real() > 0 && std::isnan(testcases[i].ima… in test_edges()
[all …]
H A Dtanh.pass.cpp41 if (testcases[i].real() == 0 && testcases[i].imag() == 0) in test_edges()
43 assert(r.real() == 0); in test_edges()
44 assert(std::signbit(r.real()) == std::signbit(testcases[i].real())); in test_edges()
50 assert(std::isnan(r.real())); in test_edges()
55 assert(std::isnan(r.real())); in test_edges()
60 assert(r.real() == (testcases[i].real() > 0 ? 1 : -1)); in test_edges()
66 assert(r.real() == (testcases[i].real() > 0 ? 1 : -1)); in test_edges()
71 assert(r.real() == (testcases[i].real() > 0 ? 1 : -1)); in test_edges()
76 assert(std::isnan(r.real())); in test_edges()
82 assert(std::isnan(r.real())); in test_edges()
[all …]
H A Dsin.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()
44 if (std::isnan(real(r))) in test_edges()
45 assert(std::isnan(real(z))); in test_edges()
48 assert(real(r) == real(z)); in test_edges()
49 assert(std::signbit(real(r)) == std::signbit(real(z))); in test_edges()
H A Dpow_complex_scalar.pass.cpp26 is_about(real(c), real(x)); in test()
44 std::complex<double> r = pow(testcases[i], real(testcases[j])); in test_edges()
45 … std::complex<double> z = exp(std::complex<double>(real(testcases[j])) * log(testcases[i])); 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()
H A Dpow_scalar_complex.pass.cpp26 is_about(real(c), real(x)); in test()
44 std::complex<double> r = pow(real(testcases[i]), testcases[j]); in test_edges()
45 … std::complex<double> z = exp(testcases[j] * log(std::complex<double>(real(testcases[i])))); 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()
H A 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()
44 if (std::isnan(real(r))) in test_edges()
45 assert(std::isnan(real(z))); in test_edges()
48 assert(real(r) == real(z)); in test_edges()
49 assert(std::signbit(real(r)) == std::signbit(real(z))); in test_edges()
/llvm-project-15.0.7/flang/test/Fir/
H A Dtarget-rewrite-complex.fir10 // AARCH64-LABEL: func @returncomplex4() -> tuple<!fir.real<4>, !fir.real<4>>
11 // PPC-LABEL: func @returncomplex4() -> tuple<!fir.real<4>, !fir.real<4>>
44 // AARCH64: return [[RES]] : tuple<!fir.real<4>, !fir.real<4>>
49 // PPC: return [[RES]] : tuple<!fir.real<4>, !fir.real<4>>
84 // X64: return [[RES]] : tuple<!fir.real<8>, !fir.real<8>>
89 // AARCH64: return [[RES]] : tuple<!fir.real<8>, !fir.real<8>>
94 // PPC: return [[RES]] : tuple<!fir.real<8>, !fir.real<8>>
218 …ate @calleemultipleparamscomplex4(!fir.real<4>, !fir.real<4>, !fir.real<4>, !fir.real<4>, !fir.rea…
228 …real<4>, [[B1:%[0-9A-Za-z]+]]: !fir.real<4>, [[A2:%[0-9A-Za-z]+]]: !fir.real<4>, [[B2:%[0-9A-Za-z]…
247 … (!fir.ref<tuple<!fir.real<4>, !fir.real<4>>>, !fir.ref<tuple<!fir.real<4>, !fir.real<4>>>, !fir.r…
[all …]
H A Dtarget-rewrite-complex16.fir9 %3 = fir.convert %2 : (f128) -> !fir.real<16>
51 // CHECK-SAME: %[[VAL_0:.*]]: !fir.ref<tuple<!fir.real<16>, !fir.real<16>>> {llvm.align = 16 :…
64 // CHECK: func.func private @paramcomplex16(!fir.ref<tuple<!fir.real<16>, !fir.real<16>>> {…
67 // CHECK: %[[VAL_0:.*]] = fir.alloca tuple<!fir.real<16>, !fir.real<16>>
68 … fir.call @returncomplex16(%[[VAL_0]]) : (!fir.ref<tuple<!fir.real<16>, !fir.real<16>>>) -> ()
74 // CHECK: fir.call @paramcomplex16(%[[VAL_4]]) : (!fir.ref<tuple<!fir.real<16>, !fir.real…
77 …real<16>, !fir.real<16>>> {llvm.align = 16 : i32, llvm.byval}, !fir.ref<tuple<!fir.real<16>, !fir.…
80 …real<16>, !fir.real<16>>> {llvm.align = 16 : i32, llvm.byval}, %[[VAL_1:.*]]: !fir.ref<tuple<!fir.…
96 …!fir.ref<tuple<!fir.real<16>, !fir.real<16>>>, !fir.ref<tuple<!fir.real<16>, !fir.real<16>>>, !fir…
122 …L_0:.*]] = fir.address_of(@returncomplex16) : (!fir.ref<tuple<!fir.real<16>, !fir.real<16>>>) -> ()
[all …]
/llvm-project-15.0.7/libcxx/include/
H A Dcomplex32 void real(T);
60 void real(float);
89 void real(double);
747 return __x.real() == __y.real() && __x.imag() == __y.imag();
813 // real
826 real(_Tp __re)
914 return __c.real() * __c.real() + __c.imag() * __c.imag();
1158 return complex<_Tp>(__x.real(), __x.real());
1192 return complex<_Tp>(__x.real(), __x.real());
1219 return complex<_Tp>(__x.real(), __x.real());
[all …]
/llvm-project-15.0.7/libcxx/test/std/numerics/complex.number/complex.members/
H A Dreal_imag.pass.cpp25 static_assert(c1.real() == 0, ""); in test_constexpr()
28 static_assert(c2.real() == 3, ""); in test_constexpr()
31 static_assert(c3.real() == 3, ""); in test_constexpr()
41 assert(c.real() == 0); in test()
43 c.real(3.5); in test()
44 assert(c.real() == 3.5); in test()
47 assert(c.real() == 3.5); in test()
49 c.real(-4.5); in test()
50 assert(c.real() == -4.5); in test()
53 assert(c.real() == -4.5); in test()
H A Dconstruct.pass.cpp24 assert(c.real() == 0); in test()
29 assert(c.real() == 7.5); in test()
34 assert(c.real() == 8.5); in test()
39 assert(c.real() == 10.5); in test()
45 static_assert(c.real() == 0, ""); in test()
50 static_assert(c.real() == 7.5, ""); in test()
55 static_assert(c.real() == 8.5, ""); in test()
60 static_assert(c.real() == 10.5, ""); in test()
/llvm-project-15.0.7/llvm/test/Transforms/InstCombine/
H A Dcabs-discrete.ll4 define double @std_cabs(double %real, double %imag) {
9 %call = tail call double @cabs(double %real, double %imag)
13 define float @std_cabsf(float %real, float %imag) {
18 %call = tail call float @cabsf(float %real, float %imag)
22 define fp128 @std_cabsl(fp128 %real, fp128 %imag) {
31 define double @fast_cabs(double %real, double %imag) {
43 define float @fast_cabsf(float %real, float %imag) {
55 define fp128 @fast_cabsl(fp128 %real, fp128 %imag) {
67 declare double @cabs(double %real, double %imag)
68 declare float @cabsf(float %real, float %imag)
[all …]
/llvm-project-15.0.7/mlir/lib/Conversion/ComplexToLLVM/
H A DComplexToLLVM.cpp67 Value real = complexStruct.real(rewriter, op.getLoc()); in matchAndRewrite() local
72 loc, rewriter.create<LLVM::FMulOp>(loc, real, real, fmf), in matchAndRewrite()
118 Value real = complexStruct.real(rewriter, op.getLoc()); in matchAndRewrite() local
119 rewriter.replaceOp(op, real); in matchAndRewrite()
154 unpacked.lhs.real(lhs.real(rewriter, loc)); in unpackBinaryComplexOperands()
157 unpacked.rhs.real(rhs.real(rewriter, loc)); in unpackBinaryComplexOperands()
179 Value real = in matchAndRewrite() local
180 rewriter.create<LLVM::FAddOp>(loc, arg.lhs.real(), arg.rhs.real(), fmf); in matchAndRewrite()
207 Value rhsRe = arg.rhs.real(); in matchAndRewrite()
289 Value real = in matchAndRewrite() local
[all …]
/llvm-project-15.0.7/compiler-rt/lib/builtins/ppc/
H A Ddivtc3.c49 DD real = {.ld = __gcc_qdiv(realNumerator, denom)}; in __divtc3() local
52 real.s.hi = __compiler_rt_scalbn(real.s.hi, -ilogbw); in __divtc3()
53 real.s.lo = __compiler_rt_scalbn(real.s.lo, -ilogbw); in __divtc3()
57 if (crt_isnan(real.s.hi) && crt_isnan(imag.s.hi)) { in __divtc3()
63 real.s.hi = crt_copysign(CRT_INFINITY, cDD.s.hi) * aDD.s.hi; in __divtc3()
64 real.s.lo = 0.0; in __divtc3()
73 real.s.hi = CRT_INFINITY * (aDD.s.hi * cDD.s.hi + bDD.s.hi * dDD.s.hi); in __divtc3()
74 real.s.lo = 0.0; in __divtc3()
83 real.s.hi = in __divtc3()
85 real.s.lo = 0.0; in __divtc3()
[all …]
/llvm-project-15.0.7/libcxx/test/std/numerics/complex.number/cmplx.over/
H A 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()

12345678910>>...20