Open kuzminrobin opened 3 years ago
Currently tan(x) is implemented as sin(x) / cos(x):
tan(x)
sin(x) / cos(x)
define double @__quantum__qis__tan__body(double %theta) { %sin = call double @llvm.sin.f64(double %theta) %cos = call double @llvm.cos.f64(double %theta) %result = fdiv double %sin, %cos ; tg(x) = sin(x) / cos(x) ret double %result }
The std::tan(x) can potentially handle the corner cases better. Consider reimplementing. More details are here.
std::tan(x)
@kuzminrobin Sounds like a good thing to do. I'll assign it to you to update that as part of implementing the QIR runtime functions.
Currently
tan(x)
is implemented assin(x) / cos(x)
:The
std::tan(x)
can potentially handle the corner cases better. Consider reimplementing. More details are here.