Lines Matching defs:cos
222 Value cos = rewriter.create<math::CosOp>(loc, real, fmf);
225 combine(loc, scaledExp, reciprocalExp, sin, cos, rewriter, fmf);
234 Value cos, ConversionPatternRewriter &rewriter,
242 Value reciprocalExp, Value sin, Value cos,
246 // cos(x + iy) = 0.5 * (exp(i(x + iy)) + exp(-i(x + iy)))
248 // exp(i(x+iy)) = exp(-y + ix) = exp(-y)(cos(x) + i sin(x))
249 // exp(-i(x+iy)) = exp(y + i(-x)) = exp(y)(cos(x) + i (-sin(x)))
252 // Re(cos(x + iy)) = (0.5/t + 0.5*t) * cos x
253 // Im(cos(x + iy)) = (0.5/t - 0.5*t) * sin x
256 Value resultReal = rewriter.create<arith::MulFOp>(loc, sum, cos, fmf);
541 // e^(a+bi)-1 = (e^a*cos(b)-1)+e^a*sin(b)i
543 // = ((e^a - 1) * cos(b) + cos(b) - 1) + e^a*sin(b)i
544 // = (expm1(a) * cos(b) + cosm1(b)) + e^a*sin(b)i
593 Value cos = b.create<math::CosOp>(arg, fmf);
594 Value forLargeArg = b.create<arith::AddFOp>(cos, negOne, fmf);
745 Value reciprocalExp, Value sin, Value cos,
751 // exp(i(x+iy)) = exp(-y + ix) = exp(-y)(cos(x) + i sin(x))
752 // exp(-i(x+iy)) = exp(y + i(-x)) = exp(y)(cos(x) + i (-sin(x)))
756 // Im(cos(x + iy)) = (0.5*t - 0.5/t) * cos x
762 Value resultImag = rewriter.create<arith::MulFOp>(loc, diff, cos, fmf);
794 Value cos = b.create<math::CosOp>(sqrtArg, fmf);
801 Value resultReal = b.create<arith::MulFOp>(absSqrt, cos, fmf);
999 /// (a*a+b*b)^(0.5c) * exp(-d*atan2(b,a)) * (cos(q) + i*sin(q)),
1148 Value cos = b.create<math::CosOp>(rsqrtArg, fmf);
1151 Value resultReal = b.create<arith::MulFOp>(absRsqrt, cos, fmf);