
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
\end{array}
Initial program 42.2%
Simplified82.6%
Final simplification82.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_2
(*
(exp (- (* y.re t_1) t_0))
(sin (+ (* y.re (atan2 x.im x.re)) (* y.im t_1))))))
(if (<= t_2 0.0005)
t_2
(*
(exp (- (* (log (hypot x.re x.im)) y.re) t_0))
(pow (cbrt (sin (* y.im (log (hypot x.im x.re))))) 3.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_2 = exp(((y_46_re * t_1) - t_0)) * sin(((y_46_re * atan2(x_46_im, x_46_re)) + (y_46_im * t_1)));
double tmp;
if (t_2 <= 0.0005) {
tmp = t_2;
} else {
tmp = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * pow(cbrt(sin((y_46_im * log(hypot(x_46_im, x_46_re))))), 3.0);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_2 = Math.exp(((y_46_re * t_1) - t_0)) * Math.sin(((y_46_re * Math.atan2(x_46_im, x_46_re)) + (y_46_im * t_1)));
double tmp;
if (t_2 <= 0.0005) {
tmp = t_2;
} else {
tmp = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * Math.pow(Math.cbrt(Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))))), 3.0);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_2 = Float64(exp(Float64(Float64(y_46_re * t_1) - t_0)) * sin(Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) + Float64(y_46_im * t_1)))) tmp = 0.0 if (t_2 <= 0.0005) tmp = t_2; else tmp = Float64(exp(Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * (cbrt(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))) ^ 3.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Exp[N[(N[(y$46$re * t$95$1), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + N[(y$46$im * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0005], t$95$2, N[(N[Exp[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Power[N[Power[N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_2 := e^{y.re \cdot t_1 - t_0} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot t_1\right)\\
\mathbf{if}\;t_2 \leq 0.0005:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0} \cdot {\left(\sqrt[3]{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}\right)}^{3}\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < 5.0000000000000001e-4Initial program 91.3%
if 5.0000000000000001e-4 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 9.2%
Simplified76.7%
*-commutative76.7%
hypot-udef9.2%
fma-def9.2%
add-cube-cbrt7.8%
pow37.8%
*-commutative7.8%
hypot-udef76.4%
fma-def76.4%
Applied egg-rr76.4%
Taylor expanded in y.re around 0 5.2%
unpow1/39.8%
unpow29.8%
unpow29.8%
Simplified9.8%
add-cube-cbrt9.8%
pow39.8%
unpow39.2%
add-cube-cbrt9.2%
hypot-udef74.2%
Applied egg-rr74.2%
Final simplification81.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (sin (* y.re (atan2 x.im x.re))))
(t_2 (* (exp (- (* (log (hypot x.re x.im)) y.re) t_0)) t_1))
(t_3 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(if (<= y.re -5.3e-132)
t_2
(if (<= y.re 2.1e-169)
(/ (sin (* y.im (log (hypot x.im x.re)))) (exp t_0))
(if (<= y.re 2.05e+22)
t_2
(if (<= y.re 8.6e+196)
(* (exp (- (* y.re t_3) t_0)) (* y.im t_3))
(* t_1 (pow (hypot x.im x.re) y.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_2 = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * t_1;
double t_3 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double tmp;
if (y_46_re <= -5.3e-132) {
tmp = t_2;
} else if (y_46_re <= 2.1e-169) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(t_0);
} else if (y_46_re <= 2.05e+22) {
tmp = t_2;
} else if (y_46_re <= 8.6e+196) {
tmp = exp(((y_46_re * t_3) - t_0)) * (y_46_im * t_3);
} else {
tmp = t_1 * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_2 = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * t_1;
double t_3 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double tmp;
if (y_46_re <= -5.3e-132) {
tmp = t_2;
} else if (y_46_re <= 2.1e-169) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.exp(t_0);
} else if (y_46_re <= 2.05e+22) {
tmp = t_2;
} else if (y_46_re <= 8.6e+196) {
tmp = Math.exp(((y_46_re * t_3) - t_0)) * (y_46_im * t_3);
} else {
tmp = t_1 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_2 = math.exp(((math.log(math.hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * t_1 t_3 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) tmp = 0 if y_46_re <= -5.3e-132: tmp = t_2 elif y_46_re <= 2.1e-169: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / math.exp(t_0) elif y_46_re <= 2.05e+22: tmp = t_2 elif y_46_re <= 8.6e+196: tmp = math.exp(((y_46_re * t_3) - t_0)) * (y_46_im * t_3) else: tmp = t_1 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_2 = Float64(exp(Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * t_1) t_3 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) tmp = 0.0 if (y_46_re <= -5.3e-132) tmp = t_2; elseif (y_46_re <= 2.1e-169) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(t_0)); elseif (y_46_re <= 2.05e+22) tmp = t_2; elseif (y_46_re <= 8.6e+196) tmp = Float64(exp(Float64(Float64(y_46_re * t_3) - t_0)) * Float64(y_46_im * t_3)); else tmp = Float64(t_1 * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_2 = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * t_1; t_3 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = 0.0; if (y_46_re <= -5.3e-132) tmp = t_2; elseif (y_46_re <= 2.1e-169) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(t_0); elseif (y_46_re <= 2.05e+22) tmp = t_2; elseif (y_46_re <= 8.6e+196) tmp = exp(((y_46_re * t_3) - t_0)) * (y_46_im * t_3); else tmp = t_1 * (hypot(x_46_im, x_46_re) ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Exp[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -5.3e-132], t$95$2, If[LessEqual[y$46$re, 2.1e-169], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.05e+22], t$95$2, If[LessEqual[y$46$re, 8.6e+196], N[(N[Exp[N[(N[(y$46$re * t$95$3), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * t$95$3), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0} \cdot t_1\\
t_3 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
\mathbf{if}\;y.re \leq -5.3 \cdot 10^{-132}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.re \leq 2.1 \cdot 10^{-169}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{t_0}}\\
\mathbf{elif}\;y.re \leq 2.05 \cdot 10^{+22}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.re \leq 8.6 \cdot 10^{+196}:\\
\;\;\;\;e^{y.re \cdot t_3 - t_0} \cdot \left(y.im \cdot t_3\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -5.3000000000000003e-132 or 2.1000000000000001e-169 < y.re < 2.0499999999999999e22Initial program 42.2%
Simplified89.5%
Taylor expanded in y.im around 0 82.8%
if -5.3000000000000003e-132 < y.re < 2.1000000000000001e-169Initial program 44.9%
exp-diff44.9%
+-rgt-identity44.9%
+-rgt-identity44.9%
exp-to-pow44.9%
hypot-def44.9%
*-commutative44.9%
exp-prod44.8%
+-commutative44.8%
*-commutative44.8%
Simplified88.0%
Taylor expanded in y.re around 0 38.4%
unpow238.4%
unpow238.4%
hypot-def79.8%
Simplified79.8%
if 2.0499999999999999e22 < y.re < 8.60000000000000024e196Initial program 35.3%
Taylor expanded in y.re around 0 27.5%
unpow227.5%
unpow227.5%
hypot-def58.9%
Simplified58.9%
Taylor expanded in y.im around 0 72.7%
unpow245.9%
unpow245.9%
Simplified72.7%
if 8.60000000000000024e196 < y.re Initial program 50.0%
exp-diff38.5%
+-rgt-identity38.5%
+-rgt-identity38.5%
exp-to-pow38.5%
hypot-def38.5%
*-commutative38.5%
exp-prod38.5%
+-commutative38.5%
*-commutative38.5%
Simplified61.5%
Taylor expanded in y.im around 0 76.9%
unpow276.9%
unpow276.9%
hypot-def76.9%
Simplified76.9%
Final simplification79.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2 (pow (hypot x.im x.re) y.re))
(t_3 (exp (* (atan2 x.im x.re) y.im)))
(t_4 (/ (* t_1 (pow (hypot x.re x.im) y.re)) t_3)))
(if (<= y.re -9.5e+33)
(* t_2 (sin (fabs t_0)))
(if (<= y.re -4.1e-135)
t_4
(if (<= y.re 2.45e-169)
(/ (sin (* y.im (log (hypot x.im x.re)))) t_3)
(if (<= y.re 0.00019) t_4 (* t_1 t_2)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_3 = exp((atan2(x_46_im, x_46_re) * y_46_im));
double t_4 = (t_1 * pow(hypot(x_46_re, x_46_im), y_46_re)) / t_3;
double tmp;
if (y_46_re <= -9.5e+33) {
tmp = t_2 * sin(fabs(t_0));
} else if (y_46_re <= -4.1e-135) {
tmp = t_4;
} else if (y_46_re <= 2.45e-169) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / t_3;
} else if (y_46_re <= 0.00019) {
tmp = t_4;
} else {
tmp = t_1 * t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double t_2 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_3 = Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
double t_4 = (t_1 * Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re)) / t_3;
double tmp;
if (y_46_re <= -9.5e+33) {
tmp = t_2 * Math.sin(Math.abs(t_0));
} else if (y_46_re <= -4.1e-135) {
tmp = t_4;
} else if (y_46_re <= 2.45e-169) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / t_3;
} else if (y_46_re <= 0.00019) {
tmp = t_4;
} else {
tmp = t_1 * t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) t_2 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_3 = math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) t_4 = (t_1 * math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) / t_3 tmp = 0 if y_46_re <= -9.5e+33: tmp = t_2 * math.sin(math.fabs(t_0)) elif y_46_re <= -4.1e-135: tmp = t_4 elif y_46_re <= 2.45e-169: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / t_3 elif y_46_re <= 0.00019: tmp = t_4 else: tmp = t_1 * t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) t_2 = hypot(x_46_im, x_46_re) ^ y_46_re t_3 = exp(Float64(atan(x_46_im, x_46_re) * y_46_im)) t_4 = Float64(Float64(t_1 * (hypot(x_46_re, x_46_im) ^ y_46_re)) / t_3) tmp = 0.0 if (y_46_re <= -9.5e+33) tmp = Float64(t_2 * sin(abs(t_0))); elseif (y_46_re <= -4.1e-135) tmp = t_4; elseif (y_46_re <= 2.45e-169) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / t_3); elseif (y_46_re <= 0.00019) tmp = t_4; else tmp = Float64(t_1 * t_2); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = sin(t_0); t_2 = hypot(x_46_im, x_46_re) ^ y_46_re; t_3 = exp((atan2(x_46_im, x_46_re) * y_46_im)); t_4 = (t_1 * (hypot(x_46_re, x_46_im) ^ y_46_re)) / t_3; tmp = 0.0; if (y_46_re <= -9.5e+33) tmp = t_2 * sin(abs(t_0)); elseif (y_46_re <= -4.1e-135) tmp = t_4; elseif (y_46_re <= 2.45e-169) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / t_3; elseif (y_46_re <= 0.00019) tmp = t_4; else tmp = t_1 * t_2; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$1 * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]}, If[LessEqual[y$46$re, -9.5e+33], N[(t$95$2 * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -4.1e-135], t$95$4, If[LessEqual[y$46$re, 2.45e-169], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$3), $MachinePrecision], If[LessEqual[y$46$re, 0.00019], t$95$4, N[(t$95$1 * t$95$2), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t_0\\
t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_3 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_4 := \frac{t_1 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t_3}\\
\mathbf{if}\;y.re \leq -9.5 \cdot 10^{+33}:\\
\;\;\;\;t_2 \cdot \sin \left(\left|t_0\right|\right)\\
\mathbf{elif}\;y.re \leq -4.1 \cdot 10^{-135}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y.re \leq 2.45 \cdot 10^{-169}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{t_3}\\
\mathbf{elif}\;y.re \leq 0.00019:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot t_2\\
\end{array}
\end{array}
if y.re < -9.5000000000000003e33Initial program 32.8%
exp-diff29.5%
+-rgt-identity29.5%
+-rgt-identity29.5%
exp-to-pow29.5%
hypot-def29.5%
*-commutative29.5%
exp-prod27.9%
+-commutative27.9%
*-commutative27.9%
Simplified72.1%
Taylor expanded in y.im around 0 88.6%
unpow288.6%
unpow288.6%
hypot-def88.6%
Simplified88.6%
*-commutative88.6%
add-sqr-sqrt55.7%
sqrt-unprod47.6%
pow247.6%
Applied egg-rr47.6%
*-commutative47.6%
unpow247.6%
rem-sqrt-square90.2%
Simplified90.2%
if -9.5000000000000003e33 < y.re < -4.1000000000000001e-135 or 2.45e-169 < y.re < 1.9000000000000001e-4Initial program 50.8%
exp-diff49.0%
+-rgt-identity49.0%
+-rgt-identity49.0%
exp-to-pow49.0%
hypot-def49.0%
*-commutative49.0%
exp-prod49.0%
+-commutative49.0%
*-commutative49.0%
Simplified83.6%
Taylor expanded in y.re around inf 83.9%
expm1-log1p-u83.9%
Applied egg-rr83.9%
Taylor expanded in y.im around 0 74.4%
if -4.1000000000000001e-135 < y.re < 2.45e-169Initial program 44.9%
exp-diff44.9%
+-rgt-identity44.9%
+-rgt-identity44.9%
exp-to-pow44.9%
hypot-def44.9%
*-commutative44.9%
exp-prod44.8%
+-commutative44.8%
*-commutative44.8%
Simplified88.0%
Taylor expanded in y.re around 0 38.4%
unpow238.4%
unpow238.4%
hypot-def79.8%
Simplified79.8%
if 1.9000000000000001e-4 < y.re Initial program 41.7%
exp-diff35.7%
+-rgt-identity35.7%
+-rgt-identity35.7%
exp-to-pow35.7%
hypot-def35.7%
*-commutative35.7%
exp-prod34.5%
+-commutative34.5%
*-commutative34.5%
Simplified54.8%
Taylor expanded in y.im around 0 58.5%
unpow258.5%
unpow258.5%
hypot-def58.5%
Simplified58.5%
Final simplification74.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im)))
(if (or (<= y.re -2.1e-133) (not (<= y.re 4.6e-169)))
(*
(exp (- (* (log (hypot x.re x.im)) y.re) t_0))
(sin (* y.re (atan2 x.im x.re))))
(/ (sin (* y.im (log (hypot x.im x.re)))) (exp t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if ((y_46_re <= -2.1e-133) || !(y_46_re <= 4.6e-169)) {
tmp = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(t_0);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if ((y_46_re <= -2.1e-133) || !(y_46_re <= 4.6e-169)) {
tmp = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.exp(t_0);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im tmp = 0 if (y_46_re <= -2.1e-133) or not (y_46_re <= 4.6e-169): tmp = math.exp(((math.log(math.hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) else: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / math.exp(t_0) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if ((y_46_re <= -2.1e-133) || !(y_46_re <= 4.6e-169)) tmp = Float64(exp(Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(t_0)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; tmp = 0.0; if ((y_46_re <= -2.1e-133) || ~((y_46_re <= 4.6e-169))) tmp = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * sin((y_46_re * atan2(x_46_im, x_46_re))); else tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(t_0); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -2.1e-133], N[Not[LessEqual[y$46$re, 4.6e-169]], $MachinePrecision]], N[(N[Exp[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;y.re \leq -2.1 \cdot 10^{-133} \lor \neg \left(y.re \leq 4.6 \cdot 10^{-169}\right):\\
\;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{t_0}}\\
\end{array}
\end{array}
if y.re < -2.1000000000000001e-133 or 4.6000000000000002e-169 < y.re Initial program 41.5%
Simplified81.1%
Taylor expanded in y.im around 0 75.0%
if -2.1000000000000001e-133 < y.re < 4.6000000000000002e-169Initial program 44.9%
exp-diff44.9%
+-rgt-identity44.9%
+-rgt-identity44.9%
exp-to-pow44.9%
hypot-def44.9%
*-commutative44.9%
exp-prod44.8%
+-commutative44.8%
*-commutative44.8%
Simplified88.0%
Taylor expanded in y.re around 0 38.4%
unpow238.4%
unpow238.4%
hypot-def79.8%
Simplified79.8%
Final simplification76.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (pow (hypot x.im x.re) y.re))
(t_2 (* (sin t_0) t_1))
(t_3 (exp (* (atan2 x.im x.re) y.im))))
(if (<= y.re -2.8e-37)
t_2
(if (<= y.re 4.5e-169)
(/ (sin (* y.im (log (hypot x.im x.re)))) t_3)
(if (<= y.re 2.55e-10)
(/ t_0 t_3)
(if (<= y.re 2e+79)
(* t_1 (sin (cbrt (pow t_0 3.0))))
(if (<= y.re 1.7e+149) (* t_1 (sin (fabs t_0))) t_2)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = sin(t_0) * t_1;
double t_3 = exp((atan2(x_46_im, x_46_re) * y_46_im));
double tmp;
if (y_46_re <= -2.8e-37) {
tmp = t_2;
} else if (y_46_re <= 4.5e-169) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / t_3;
} else if (y_46_re <= 2.55e-10) {
tmp = t_0 / t_3;
} else if (y_46_re <= 2e+79) {
tmp = t_1 * sin(cbrt(pow(t_0, 3.0)));
} else if (y_46_re <= 1.7e+149) {
tmp = t_1 * sin(fabs(t_0));
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_2 = Math.sin(t_0) * t_1;
double t_3 = Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
double tmp;
if (y_46_re <= -2.8e-37) {
tmp = t_2;
} else if (y_46_re <= 4.5e-169) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / t_3;
} else if (y_46_re <= 2.55e-10) {
tmp = t_0 / t_3;
} else if (y_46_re <= 2e+79) {
tmp = t_1 * Math.sin(Math.cbrt(Math.pow(t_0, 3.0)));
} else if (y_46_re <= 1.7e+149) {
tmp = t_1 * Math.sin(Math.abs(t_0));
} else {
tmp = t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re t_2 = Float64(sin(t_0) * t_1) t_3 = exp(Float64(atan(x_46_im, x_46_re) * y_46_im)) tmp = 0.0 if (y_46_re <= -2.8e-37) tmp = t_2; elseif (y_46_re <= 4.5e-169) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / t_3); elseif (y_46_re <= 2.55e-10) tmp = Float64(t_0 / t_3); elseif (y_46_re <= 2e+79) tmp = Float64(t_1 * sin(cbrt((t_0 ^ 3.0)))); elseif (y_46_re <= 1.7e+149) tmp = Float64(t_1 * sin(abs(t_0))); else tmp = t_2; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -2.8e-37], t$95$2, If[LessEqual[y$46$re, 4.5e-169], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$3), $MachinePrecision], If[LessEqual[y$46$re, 2.55e-10], N[(t$95$0 / t$95$3), $MachinePrecision], If[LessEqual[y$46$re, 2e+79], N[(t$95$1 * N[Sin[N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.7e+149], N[(t$95$1 * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := \sin t_0 \cdot t_1\\
t_3 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -2.8 \cdot 10^{-37}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.re \leq 4.5 \cdot 10^{-169}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{t_3}\\
\mathbf{elif}\;y.re \leq 2.55 \cdot 10^{-10}:\\
\;\;\;\;\frac{t_0}{t_3}\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+79}:\\
\;\;\;\;t_1 \cdot \sin \left(\sqrt[3]{{t_0}^{3}}\right)\\
\mathbf{elif}\;y.re \leq 1.7 \cdot 10^{+149}:\\
\;\;\;\;t_1 \cdot \sin \left(\left|t_0\right|\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y.re < -2.8000000000000001e-37 or 1.6999999999999999e149 < y.re Initial program 38.2%
exp-diff32.1%
+-rgt-identity32.1%
+-rgt-identity32.1%
exp-to-pow32.1%
hypot-def32.1%
*-commutative32.1%
exp-prod31.3%
+-commutative31.3%
*-commutative31.3%
Simplified66.9%
Taylor expanded in y.im around 0 75.8%
unpow275.8%
unpow275.8%
hypot-def76.7%
Simplified76.7%
if -2.8000000000000001e-37 < y.re < 4.4999999999999999e-169Initial program 46.7%
exp-diff46.7%
+-rgt-identity46.7%
+-rgt-identity46.7%
exp-to-pow46.7%
hypot-def46.7%
*-commutative46.7%
exp-prod46.7%
+-commutative46.7%
*-commutative46.7%
Simplified89.4%
Taylor expanded in y.re around 0 35.2%
unpow235.2%
unpow235.2%
hypot-def74.0%
Simplified74.0%
if 4.4999999999999999e-169 < y.re < 2.54999999999999998e-10Initial program 46.1%
exp-diff46.1%
+-rgt-identity46.1%
+-rgt-identity46.1%
exp-to-pow46.1%
hypot-def46.1%
*-commutative46.1%
exp-prod46.1%
+-commutative46.1%
*-commutative46.1%
Simplified84.6%
Taylor expanded in y.re around inf 85.3%
expm1-log1p-u85.3%
Applied egg-rr85.3%
Taylor expanded in y.im around 0 83.9%
Taylor expanded in y.re around 0 83.5%
if 2.54999999999999998e-10 < y.re < 1.99999999999999993e79Initial program 39.1%
exp-diff39.1%
+-rgt-identity39.1%
+-rgt-identity39.1%
exp-to-pow39.1%
hypot-def39.1%
*-commutative39.1%
exp-prod34.8%
+-commutative34.8%
*-commutative34.8%
Simplified52.2%
Taylor expanded in y.im around 0 56.8%
unpow256.8%
unpow256.8%
hypot-def56.8%
Simplified56.8%
*-commutative3.3%
add-cbrt-cube11.6%
pow311.6%
Applied egg-rr65.3%
if 1.99999999999999993e79 < y.re < 1.6999999999999999e149Initial program 47.4%
exp-diff42.1%
+-rgt-identity42.1%
+-rgt-identity42.1%
exp-to-pow42.1%
hypot-def42.1%
*-commutative42.1%
exp-prod42.1%
+-commutative42.1%
*-commutative42.1%
Simplified47.4%
Taylor expanded in y.im around 0 42.2%
unpow242.2%
unpow242.2%
hypot-def42.2%
Simplified42.2%
*-commutative42.2%
add-sqr-sqrt15.9%
sqrt-unprod58.0%
pow258.0%
Applied egg-rr58.0%
*-commutative58.0%
unpow258.0%
rem-sqrt-square58.0%
Simplified58.0%
Final simplification74.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (* (sin t_0) (pow (hypot x.im x.re) y.re)))
(t_2 (exp (* (atan2 x.im x.re) y.im)))
(t_3 (/ (sin (* y.im (log (hypot x.im x.re)))) t_2)))
(if (<= y.re -1.65e-41)
t_1
(if (<= y.re 4.4e-169)
t_3
(if (<= y.re 1.4e-12)
(/ t_0 t_2)
(if (<= y.re 6.2e+19)
t_1
(if (<= y.re 2.55e+29)
t_3
(if (<= y.re 2.6e+89)
(/ (* y.im (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_2)
t_1))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0) * pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = exp((atan2(x_46_im, x_46_re) * y_46_im));
double t_3 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / t_2;
double tmp;
if (y_46_re <= -1.65e-41) {
tmp = t_1;
} else if (y_46_re <= 4.4e-169) {
tmp = t_3;
} else if (y_46_re <= 1.4e-12) {
tmp = t_0 / t_2;
} else if (y_46_re <= 6.2e+19) {
tmp = t_1;
} else if (y_46_re <= 2.55e+29) {
tmp = t_3;
} else if (y_46_re <= 2.6e+89) {
tmp = (y_46_im * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) / t_2;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_2 = Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
double t_3 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / t_2;
double tmp;
if (y_46_re <= -1.65e-41) {
tmp = t_1;
} else if (y_46_re <= 4.4e-169) {
tmp = t_3;
} else if (y_46_re <= 1.4e-12) {
tmp = t_0 / t_2;
} else if (y_46_re <= 6.2e+19) {
tmp = t_1;
} else if (y_46_re <= 2.55e+29) {
tmp = t_3;
} else if (y_46_re <= 2.6e+89) {
tmp = (y_46_im * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) / t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_2 = math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) t_3 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / t_2 tmp = 0 if y_46_re <= -1.65e-41: tmp = t_1 elif y_46_re <= 4.4e-169: tmp = t_3 elif y_46_re <= 1.4e-12: tmp = t_0 / t_2 elif y_46_re <= 6.2e+19: tmp = t_1 elif y_46_re <= 2.55e+29: tmp = t_3 elif y_46_re <= 2.6e+89: tmp = (y_46_im * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) / t_2 else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(sin(t_0) * (hypot(x_46_im, x_46_re) ^ y_46_re)) t_2 = exp(Float64(atan(x_46_im, x_46_re) * y_46_im)) t_3 = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / t_2) tmp = 0.0 if (y_46_re <= -1.65e-41) tmp = t_1; elseif (y_46_re <= 4.4e-169) tmp = t_3; elseif (y_46_re <= 1.4e-12) tmp = Float64(t_0 / t_2); elseif (y_46_re <= 6.2e+19) tmp = t_1; elseif (y_46_re <= 2.55e+29) tmp = t_3; elseif (y_46_re <= 2.6e+89) tmp = Float64(Float64(y_46_im * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) / t_2); else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = sin(t_0) * (hypot(x_46_im, x_46_re) ^ y_46_re); t_2 = exp((atan2(x_46_im, x_46_re) * y_46_im)); t_3 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / t_2; tmp = 0.0; if (y_46_re <= -1.65e-41) tmp = t_1; elseif (y_46_re <= 4.4e-169) tmp = t_3; elseif (y_46_re <= 1.4e-12) tmp = t_0 / t_2; elseif (y_46_re <= 6.2e+19) tmp = t_1; elseif (y_46_re <= 2.55e+29) tmp = t_3; elseif (y_46_re <= 2.6e+89) tmp = (y_46_im * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) / t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[y$46$re, -1.65e-41], t$95$1, If[LessEqual[y$46$re, 4.4e-169], t$95$3, If[LessEqual[y$46$re, 1.4e-12], N[(t$95$0 / t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 6.2e+19], t$95$1, If[LessEqual[y$46$re, 2.55e+29], t$95$3, If[LessEqual[y$46$re, 2.6e+89], N[(N[(y$46$im * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], t$95$1]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_3 := \frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{t_2}\\
\mathbf{if}\;y.re \leq -1.65 \cdot 10^{-41}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq 4.4 \cdot 10^{-169}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.re \leq 1.4 \cdot 10^{-12}:\\
\;\;\;\;\frac{t_0}{t_2}\\
\mathbf{elif}\;y.re \leq 6.2 \cdot 10^{+19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq 2.55 \cdot 10^{+29}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.re \leq 2.6 \cdot 10^{+89}:\\
\;\;\;\;\frac{y.im \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}{t_2}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.re < -1.65000000000000012e-41 or 1.4000000000000001e-12 < y.re < 6.2e19 or 2.6000000000000001e89 < y.re Initial program 40.4%
exp-diff34.5%
+-rgt-identity34.5%
+-rgt-identity34.5%
exp-to-pow34.5%
hypot-def34.5%
*-commutative34.5%
exp-prod33.1%
+-commutative33.1%
*-commutative33.1%
Simplified63.9%
Taylor expanded in y.im around 0 73.0%
unpow273.0%
unpow273.0%
hypot-def73.7%
Simplified73.7%
if -1.65000000000000012e-41 < y.re < 4.40000000000000015e-169 or 6.2e19 < y.re < 2.55e29Initial program 44.9%
exp-diff44.9%
+-rgt-identity44.9%
+-rgt-identity44.9%
exp-to-pow44.9%
hypot-def44.9%
*-commutative44.9%
exp-prod44.9%
+-commutative44.9%
*-commutative44.9%
Simplified85.9%
Taylor expanded in y.re around 0 33.8%
unpow233.8%
unpow233.8%
hypot-def73.7%
Simplified73.7%
if 4.40000000000000015e-169 < y.re < 1.4000000000000001e-12Initial program 46.1%
exp-diff46.1%
+-rgt-identity46.1%
+-rgt-identity46.1%
exp-to-pow46.1%
hypot-def46.1%
*-commutative46.1%
exp-prod46.1%
+-commutative46.1%
*-commutative46.1%
Simplified84.6%
Taylor expanded in y.re around inf 85.3%
expm1-log1p-u85.3%
Applied egg-rr85.3%
Taylor expanded in y.im around 0 83.9%
Taylor expanded in y.re around 0 83.5%
if 2.55e29 < y.re < 2.6000000000000001e89Initial program 38.9%
exp-diff38.9%
+-rgt-identity38.9%
+-rgt-identity38.9%
exp-to-pow38.9%
hypot-def38.9%
*-commutative38.9%
exp-prod38.9%
+-commutative38.9%
*-commutative38.9%
Simplified61.1%
Taylor expanded in y.re around 0 12.0%
unpow212.0%
unpow212.0%
hypot-def23.8%
Simplified23.8%
Taylor expanded in y.im around 0 62.0%
unpow262.0%
unpow262.0%
Simplified62.0%
Final simplification73.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (* (atan2 x.im x.re) y.im)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (/ t_1 t_0))
(t_3 (* (sin t_1) (pow (hypot x.im x.re) y.re))))
(if (<= y.re -2.8e-33)
t_3
(if (<= y.re 2.15e-7)
t_2
(if (<= y.re 2.25e+20)
t_3
(if (<= y.re 1.6e+29)
t_2
(if (<= y.re 3e+89)
(/ (* y.im (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)
t_3)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp((atan2(x_46_im, x_46_re) * y_46_im));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = t_1 / t_0;
double t_3 = sin(t_1) * pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -2.8e-33) {
tmp = t_3;
} else if (y_46_re <= 2.15e-7) {
tmp = t_2;
} else if (y_46_re <= 2.25e+20) {
tmp = t_3;
} else if (y_46_re <= 1.6e+29) {
tmp = t_2;
} else if (y_46_re <= 3e+89) {
tmp = (y_46_im * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) / t_0;
} else {
tmp = t_3;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = t_1 / t_0;
double t_3 = Math.sin(t_1) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -2.8e-33) {
tmp = t_3;
} else if (y_46_re <= 2.15e-7) {
tmp = t_2;
} else if (y_46_re <= 2.25e+20) {
tmp = t_3;
} else if (y_46_re <= 1.6e+29) {
tmp = t_2;
} else if (y_46_re <= 3e+89) {
tmp = (y_46_im * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) / t_0;
} else {
tmp = t_3;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = t_1 / t_0 t_3 = math.sin(t_1) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -2.8e-33: tmp = t_3 elif y_46_re <= 2.15e-7: tmp = t_2 elif y_46_re <= 2.25e+20: tmp = t_3 elif y_46_re <= 1.6e+29: tmp = t_2 elif y_46_re <= 3e+89: tmp = (y_46_im * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) / t_0 else: tmp = t_3 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(atan(x_46_im, x_46_re) * y_46_im)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(t_1 / t_0) t_3 = Float64(sin(t_1) * (hypot(x_46_im, x_46_re) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -2.8e-33) tmp = t_3; elseif (y_46_re <= 2.15e-7) tmp = t_2; elseif (y_46_re <= 2.25e+20) tmp = t_3; elseif (y_46_re <= 1.6e+29) tmp = t_2; elseif (y_46_re <= 3e+89) tmp = Float64(Float64(y_46_im * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) / t_0); else tmp = t_3; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp((atan2(x_46_im, x_46_re) * y_46_im)); t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = t_1 / t_0; t_3 = sin(t_1) * (hypot(x_46_im, x_46_re) ^ y_46_re); tmp = 0.0; if (y_46_re <= -2.8e-33) tmp = t_3; elseif (y_46_re <= 2.15e-7) tmp = t_2; elseif (y_46_re <= 2.25e+20) tmp = t_3; elseif (y_46_re <= 1.6e+29) tmp = t_2; elseif (y_46_re <= 3e+89) tmp = (y_46_im * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) / t_0; else tmp = t_3; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sin[t$95$1], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.8e-33], t$95$3, If[LessEqual[y$46$re, 2.15e-7], t$95$2, If[LessEqual[y$46$re, 2.25e+20], t$95$3, If[LessEqual[y$46$re, 1.6e+29], t$95$2, If[LessEqual[y$46$re, 3e+89], N[(N[(y$46$im * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \frac{t_1}{t_0}\\
t_3 := \sin t_1 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -2.8 \cdot 10^{-33}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.re \leq 2.15 \cdot 10^{-7}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.re \leq 2.25 \cdot 10^{+20}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.re \leq 1.6 \cdot 10^{+29}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.re \leq 3 \cdot 10^{+89}:\\
\;\;\;\;\frac{y.im \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}{t_0}\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if y.re < -2.8e-33 or 2.1500000000000001e-7 < y.re < 2.25e20 or 3.00000000000000013e89 < y.re Initial program 40.4%
exp-diff34.5%
+-rgt-identity34.5%
+-rgt-identity34.5%
exp-to-pow34.5%
hypot-def34.5%
*-commutative34.5%
exp-prod33.1%
+-commutative33.1%
*-commutative33.1%
Simplified63.9%
Taylor expanded in y.im around 0 73.0%
unpow273.0%
unpow273.0%
hypot-def73.7%
Simplified73.7%
if -2.8e-33 < y.re < 2.1500000000000001e-7 or 2.25e20 < y.re < 1.59999999999999993e29Initial program 45.2%
exp-diff45.2%
+-rgt-identity45.2%
+-rgt-identity45.2%
exp-to-pow45.2%
hypot-def45.2%
*-commutative45.2%
exp-prod45.2%
+-commutative45.2%
*-commutative45.2%
Simplified85.5%
Taylor expanded in y.re around inf 85.7%
expm1-log1p-u85.7%
Applied egg-rr85.7%
Taylor expanded in y.im around 0 57.4%
Taylor expanded in y.re around 0 59.3%
if 1.59999999999999993e29 < y.re < 3.00000000000000013e89Initial program 38.9%
exp-diff38.9%
+-rgt-identity38.9%
+-rgt-identity38.9%
exp-to-pow38.9%
hypot-def38.9%
*-commutative38.9%
exp-prod38.9%
+-commutative38.9%
*-commutative38.9%
Simplified61.1%
Taylor expanded in y.re around 0 12.0%
unpow212.0%
unpow212.0%
hypot-def23.8%
Simplified23.8%
Taylor expanded in y.im around 0 62.0%
unpow262.0%
unpow262.0%
Simplified62.0%
Final simplification67.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.re -2.8e-33) (not (<= y.re 9.2e-7)))
(* (sin t_0) (pow (hypot x.im x.re) y.re))
(/ t_0 (exp (* (atan2 x.im x.re) y.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -2.8e-33) || !(y_46_re <= 9.2e-7)) {
tmp = sin(t_0) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_0 / exp((atan2(x_46_im, x_46_re) * y_46_im));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -2.8e-33) || !(y_46_re <= 9.2e-7)) {
tmp = Math.sin(t_0) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_0 / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if (y_46_re <= -2.8e-33) or not (y_46_re <= 9.2e-7): tmp = math.sin(t_0) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = t_0 / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -2.8e-33) || !(y_46_re <= 9.2e-7)) tmp = Float64(sin(t_0) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(t_0 / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if ((y_46_re <= -2.8e-33) || ~((y_46_re <= 9.2e-7))) tmp = sin(t_0) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = t_0 / exp((atan2(x_46_im, x_46_re) * y_46_im)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -2.8e-33], N[Not[LessEqual[y$46$re, 9.2e-7]], $MachinePrecision]], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -2.8 \cdot 10^{-33} \lor \neg \left(y.re \leq 9.2 \cdot 10^{-7}\right):\\
\;\;\;\;\sin t_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\end{array}
\end{array}
if y.re < -2.8e-33 or 9.1999999999999998e-7 < y.re Initial program 39.5%
exp-diff34.4%
+-rgt-identity34.4%
+-rgt-identity34.4%
exp-to-pow34.4%
hypot-def34.4%
*-commutative34.4%
exp-prod33.1%
+-commutative33.1%
*-commutative33.1%
Simplified62.4%
Taylor expanded in y.im around 0 69.0%
unpow269.0%
unpow269.0%
hypot-def69.6%
Simplified69.6%
if -2.8e-33 < y.re < 9.1999999999999998e-7Initial program 46.6%
exp-diff46.6%
+-rgt-identity46.6%
+-rgt-identity46.6%
exp-to-pow46.6%
hypot-def46.6%
*-commutative46.6%
exp-prod46.6%
+-commutative46.6%
*-commutative46.6%
Simplified88.1%
Taylor expanded in y.re around inf 88.3%
expm1-log1p-u88.3%
Applied egg-rr88.3%
Taylor expanded in y.im around 0 59.1%
Taylor expanded in y.re around 0 59.1%
Final simplification65.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (sin t_0)))
(if (<= y.re -6e+40)
(* t_1 (pow x.im y.re))
(if (<= y.re 410000000000.0)
(/ t_0 (exp (* (atan2 x.im x.re) y.im)))
(* t_1 (pow x.re y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double tmp;
if (y_46_re <= -6e+40) {
tmp = t_1 * pow(x_46_im, y_46_re);
} else if (y_46_re <= 410000000000.0) {
tmp = t_0 / exp((atan2(x_46_im, x_46_re) * y_46_im));
} else {
tmp = t_1 * pow(x_46_re, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
t_1 = sin(t_0)
if (y_46re <= (-6d+40)) then
tmp = t_1 * (x_46im ** y_46re)
else if (y_46re <= 410000000000.0d0) then
tmp = t_0 / exp((atan2(x_46im, x_46re) * y_46im))
else
tmp = t_1 * (x_46re ** y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double tmp;
if (y_46_re <= -6e+40) {
tmp = t_1 * Math.pow(x_46_im, y_46_re);
} else if (y_46_re <= 410000000000.0) {
tmp = t_0 / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
} else {
tmp = t_1 * Math.pow(x_46_re, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) tmp = 0 if y_46_re <= -6e+40: tmp = t_1 * math.pow(x_46_im, y_46_re) elif y_46_re <= 410000000000.0: tmp = t_0 / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) else: tmp = t_1 * math.pow(x_46_re, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) tmp = 0.0 if (y_46_re <= -6e+40) tmp = Float64(t_1 * (x_46_im ^ y_46_re)); elseif (y_46_re <= 410000000000.0) tmp = Float64(t_0 / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))); else tmp = Float64(t_1 * (x_46_re ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = sin(t_0); tmp = 0.0; if (y_46_re <= -6e+40) tmp = t_1 * (x_46_im ^ y_46_re); elseif (y_46_re <= 410000000000.0) tmp = t_0 / exp((atan2(x_46_im, x_46_re) * y_46_im)); else tmp = t_1 * (x_46_re ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$re, -6e+40], N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 410000000000.0], N[(t$95$0 / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t_0\\
\mathbf{if}\;y.re \leq -6 \cdot 10^{+40}:\\
\;\;\;\;t_1 \cdot {x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq 410000000000:\\
\;\;\;\;\frac{t_0}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if y.re < -6.0000000000000004e40Initial program 33.3%
exp-diff30.0%
+-rgt-identity30.0%
+-rgt-identity30.0%
exp-to-pow30.0%
hypot-def30.0%
*-commutative30.0%
exp-prod28.3%
+-commutative28.3%
*-commutative28.3%
Simplified73.3%
Taylor expanded in y.im around 0 90.1%
unpow290.1%
unpow290.1%
hypot-def90.1%
Simplified90.1%
Taylor expanded in x.re around 0 70.3%
if -6.0000000000000004e40 < y.re < 4.1e11Initial program 48.3%
exp-diff47.4%
+-rgt-identity47.4%
+-rgt-identity47.4%
exp-to-pow47.4%
hypot-def47.4%
*-commutative47.4%
exp-prod47.4%
+-commutative47.4%
*-commutative47.4%
Simplified85.3%
Taylor expanded in y.re around inf 85.5%
expm1-log1p-u85.5%
Applied egg-rr85.5%
Taylor expanded in y.im around 0 58.4%
Taylor expanded in y.re around 0 56.0%
if 4.1e11 < y.re Initial program 40.2%
exp-diff34.1%
+-rgt-identity34.1%
+-rgt-identity34.1%
exp-to-pow34.1%
hypot-def34.1%
*-commutative34.1%
exp-prod32.9%
+-commutative32.9%
*-commutative32.9%
Simplified53.7%
Taylor expanded in y.im around 0 57.5%
unpow257.5%
unpow257.5%
hypot-def57.5%
Simplified57.5%
Taylor expanded in x.im around 0 49.2%
Final simplification57.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.re -1.15e+19) (not (<= y.re 4.9e-5)))
(* (sin t_0) (pow x.im y.re))
(cbrt (pow t_0 3.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -1.15e+19) || !(y_46_re <= 4.9e-5)) {
tmp = sin(t_0) * pow(x_46_im, y_46_re);
} else {
tmp = cbrt(pow(t_0, 3.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -1.15e+19) || !(y_46_re <= 4.9e-5)) {
tmp = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
} else {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -1.15e+19) || !(y_46_re <= 4.9e-5)) tmp = Float64(sin(t_0) * (x_46_im ^ y_46_re)); else tmp = cbrt((t_0 ^ 3.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -1.15e+19], N[Not[LessEqual[y$46$re, 4.9e-5]], $MachinePrecision]], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -1.15 \cdot 10^{+19} \lor \neg \left(y.re \leq 4.9 \cdot 10^{-5}\right):\\
\;\;\;\;\sin t_0 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{t_0}^{3}}\\
\end{array}
\end{array}
if y.re < -1.15e19 or 4.9e-5 < y.re Initial program 38.8%
exp-diff34.0%
+-rgt-identity34.0%
+-rgt-identity34.0%
exp-to-pow34.0%
hypot-def34.0%
*-commutative34.0%
exp-prod32.7%
+-commutative32.7%
*-commutative32.7%
Simplified62.6%
Taylor expanded in y.im around 0 71.5%
unpow271.5%
unpow271.5%
hypot-def71.5%
Simplified71.5%
Taylor expanded in x.re around 0 55.6%
if -1.15e19 < y.re < 4.9e-5Initial program 46.9%
exp-diff45.9%
+-rgt-identity45.9%
+-rgt-identity45.9%
exp-to-pow45.9%
hypot-def45.9%
*-commutative45.9%
exp-prod45.9%
+-commutative45.9%
*-commutative45.9%
Simplified85.5%
Taylor expanded in y.im around 0 24.0%
unpow224.0%
unpow224.0%
hypot-def22.7%
Simplified22.7%
Taylor expanded in x.re around 0 11.5%
Taylor expanded in y.re around 0 21.7%
*-commutative21.7%
add-cbrt-cube34.9%
pow334.9%
Applied egg-rr34.9%
Final simplification46.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (sin t_0)))
(if (<= y.re -1.15e+19)
(* t_1 (pow x.im y.re))
(if (<= y.re 1600000.0) (cbrt (pow t_0 3.0)) (* t_1 (pow x.re y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double tmp;
if (y_46_re <= -1.15e+19) {
tmp = t_1 * pow(x_46_im, y_46_re);
} else if (y_46_re <= 1600000.0) {
tmp = cbrt(pow(t_0, 3.0));
} else {
tmp = t_1 * pow(x_46_re, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double tmp;
if (y_46_re <= -1.15e+19) {
tmp = t_1 * Math.pow(x_46_im, y_46_re);
} else if (y_46_re <= 1600000.0) {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
} else {
tmp = t_1 * Math.pow(x_46_re, y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) tmp = 0.0 if (y_46_re <= -1.15e+19) tmp = Float64(t_1 * (x_46_im ^ y_46_re)); elseif (y_46_re <= 1600000.0) tmp = cbrt((t_0 ^ 3.0)); else tmp = Float64(t_1 * (x_46_re ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$re, -1.15e+19], N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1600000.0], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision], N[(t$95$1 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t_0\\
\mathbf{if}\;y.re \leq -1.15 \cdot 10^{+19}:\\
\;\;\;\;t_1 \cdot {x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq 1600000:\\
\;\;\;\;\sqrt[3]{{t_0}^{3}}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if y.re < -1.15e19Initial program 34.9%
exp-diff31.7%
+-rgt-identity31.7%
+-rgt-identity31.7%
exp-to-pow31.7%
hypot-def31.7%
*-commutative31.7%
exp-prod30.2%
+-commutative30.2%
*-commutative30.2%
Simplified73.0%
Taylor expanded in y.im around 0 89.0%
unpow289.0%
unpow289.0%
hypot-def89.0%
Simplified89.0%
Taylor expanded in x.re around 0 70.2%
if -1.15e19 < y.re < 1.6e6Initial program 47.8%
exp-diff46.9%
+-rgt-identity46.9%
+-rgt-identity46.9%
exp-to-pow46.9%
hypot-def46.9%
*-commutative46.9%
exp-prod46.9%
+-commutative46.9%
*-commutative46.9%
Simplified85.8%
Taylor expanded in y.im around 0 25.4%
unpow225.4%
unpow225.4%
hypot-def24.1%
Simplified24.1%
Taylor expanded in x.re around 0 13.1%
Taylor expanded in y.re around 0 21.6%
*-commutative21.6%
add-cbrt-cube34.5%
pow334.5%
Applied egg-rr34.5%
if 1.6e6 < y.re Initial program 40.2%
exp-diff34.1%
+-rgt-identity34.1%
+-rgt-identity34.1%
exp-to-pow34.1%
hypot-def34.1%
*-commutative34.1%
exp-prod32.9%
+-commutative32.9%
*-commutative32.9%
Simplified53.7%
Taylor expanded in y.im around 0 57.5%
unpow257.5%
unpow257.5%
hypot-def57.5%
Simplified57.5%
Taylor expanded in x.im around 0 49.2%
Final simplification48.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.im -2.1e+19)
(+ (exp (log1p t_0)) -1.0)
(if (<= y.im 1.48e-37)
(log1p (expm1 t_0))
(pow (pow t_0 3.0) 0.3333333333333333)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -2.1e+19) {
tmp = exp(log1p(t_0)) + -1.0;
} else if (y_46_im <= 1.48e-37) {
tmp = log1p(expm1(t_0));
} else {
tmp = pow(pow(t_0, 3.0), 0.3333333333333333);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -2.1e+19) {
tmp = Math.exp(Math.log1p(t_0)) + -1.0;
} else if (y_46_im <= 1.48e-37) {
tmp = Math.log1p(Math.expm1(t_0));
} else {
tmp = Math.pow(Math.pow(t_0, 3.0), 0.3333333333333333);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_im <= -2.1e+19: tmp = math.exp(math.log1p(t_0)) + -1.0 elif y_46_im <= 1.48e-37: tmp = math.log1p(math.expm1(t_0)) else: tmp = math.pow(math.pow(t_0, 3.0), 0.3333333333333333) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -2.1e+19) tmp = Float64(exp(log1p(t_0)) + -1.0); elseif (y_46_im <= 1.48e-37) tmp = log1p(expm1(t_0)); else tmp = (t_0 ^ 3.0) ^ 0.3333333333333333; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.1e+19], N[(N[Exp[N[Log[1 + t$95$0], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[y$46$im, 1.48e-37], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -2.1 \cdot 10^{+19}:\\
\;\;\;\;e^{\mathsf{log1p}\left(t_0\right)} + -1\\
\mathbf{elif}\;y.im \leq 1.48 \cdot 10^{-37}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left({t_0}^{3}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if y.im < -2.1e19Initial program 42.7%
exp-diff39.3%
+-rgt-identity39.3%
+-rgt-identity39.3%
exp-to-pow39.3%
hypot-def39.3%
*-commutative39.3%
exp-prod37.6%
+-commutative37.6%
*-commutative37.6%
Simplified63.1%
Taylor expanded in y.im around 0 35.6%
unpow235.6%
unpow235.6%
hypot-def31.1%
Simplified31.1%
Taylor expanded in x.re around 0 21.0%
Taylor expanded in y.re around 0 3.2%
*-commutative3.2%
expm1-log1p-u2.8%
expm1-udef33.2%
Applied egg-rr33.2%
if -2.1e19 < y.im < 1.48e-37Initial program 45.4%
exp-diff45.4%
+-rgt-identity45.4%
+-rgt-identity45.4%
exp-to-pow45.4%
hypot-def45.4%
*-commutative45.4%
exp-prod45.4%
+-commutative45.4%
*-commutative45.4%
Simplified87.4%
Taylor expanded in y.im around 0 59.2%
unpow259.2%
unpow259.2%
hypot-def64.8%
Simplified64.8%
Taylor expanded in x.re around 0 43.7%
Taylor expanded in y.re around 0 20.0%
*-commutative20.0%
log1p-expm1-u29.0%
Applied egg-rr29.0%
if 1.48e-37 < y.im Initial program 36.8%
exp-diff28.9%
+-rgt-identity28.9%
+-rgt-identity28.9%
exp-to-pow28.9%
hypot-def28.9%
*-commutative28.9%
exp-prod27.6%
+-commutative27.6%
*-commutative27.6%
Simplified55.5%
Taylor expanded in y.im around 0 50.9%
unpow250.9%
unpow250.9%
hypot-def43.6%
Simplified43.6%
Taylor expanded in x.re around 0 38.1%
Taylor expanded in y.re around 0 4.5%
*-commutative4.5%
add-cbrt-cube30.5%
pow1/331.5%
pow331.5%
Applied egg-rr31.5%
Final simplification30.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.im -4.3e+68) (not (<= y.im 3.5e-139)))
(cbrt (pow t_0 3.0))
(log1p (expm1 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -4.3e+68) || !(y_46_im <= 3.5e-139)) {
tmp = cbrt(pow(t_0, 3.0));
} else {
tmp = log1p(expm1(t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -4.3e+68) || !(y_46_im <= 3.5e-139)) {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
} else {
tmp = Math.log1p(Math.expm1(t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -4.3e+68) || !(y_46_im <= 3.5e-139)) tmp = cbrt((t_0 ^ 3.0)); else tmp = log1p(expm1(t_0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -4.3e+68], N[Not[LessEqual[y$46$im, 3.5e-139]], $MachinePrecision]], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -4.3 \cdot 10^{+68} \lor \neg \left(y.im \leq 3.5 \cdot 10^{-139}\right):\\
\;\;\;\;\sqrt[3]{{t_0}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\
\end{array}
\end{array}
if y.im < -4.3000000000000001e68 or 3.50000000000000001e-139 < y.im Initial program 41.9%
exp-diff36.4%
+-rgt-identity36.4%
+-rgt-identity36.4%
exp-to-pow36.4%
hypot-def36.4%
*-commutative36.4%
exp-prod35.1%
+-commutative35.1%
*-commutative35.1%
Simplified64.6%
Taylor expanded in y.im around 0 44.4%
unpow244.4%
unpow244.4%
hypot-def39.4%
Simplified39.4%
Taylor expanded in x.re around 0 30.5%
Taylor expanded in y.re around 0 5.1%
*-commutative5.1%
add-cbrt-cube28.9%
pow328.9%
Applied egg-rr28.9%
if -4.3000000000000001e68 < y.im < 3.50000000000000001e-139Initial program 42.6%
exp-diff42.6%
+-rgt-identity42.6%
+-rgt-identity42.6%
exp-to-pow42.6%
hypot-def42.6%
*-commutative42.6%
exp-prod42.6%
+-commutative42.6%
*-commutative42.6%
Simplified82.6%
Taylor expanded in y.im around 0 60.4%
unpow260.4%
unpow260.4%
hypot-def65.8%
Simplified65.8%
Taylor expanded in x.re around 0 45.1%
Taylor expanded in y.re around 0 20.1%
*-commutative20.1%
log1p-expm1-u30.0%
Applied egg-rr30.0%
Final simplification29.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.im -2.8e+23)
(+ (exp (log1p t_0)) -1.0)
(if (<= y.im 4.6e-139) (log1p (expm1 t_0)) (cbrt (pow t_0 3.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -2.8e+23) {
tmp = exp(log1p(t_0)) + -1.0;
} else if (y_46_im <= 4.6e-139) {
tmp = log1p(expm1(t_0));
} else {
tmp = cbrt(pow(t_0, 3.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -2.8e+23) {
tmp = Math.exp(Math.log1p(t_0)) + -1.0;
} else if (y_46_im <= 4.6e-139) {
tmp = Math.log1p(Math.expm1(t_0));
} else {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -2.8e+23) tmp = Float64(exp(log1p(t_0)) + -1.0); elseif (y_46_im <= 4.6e-139) tmp = log1p(expm1(t_0)); else tmp = cbrt((t_0 ^ 3.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.8e+23], N[(N[Exp[N[Log[1 + t$95$0], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[y$46$im, 4.6e-139], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -2.8 \cdot 10^{+23}:\\
\;\;\;\;e^{\mathsf{log1p}\left(t_0\right)} + -1\\
\mathbf{elif}\;y.im \leq 4.6 \cdot 10^{-139}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{t_0}^{3}}\\
\end{array}
\end{array}
if y.im < -2.8e23Initial program 42.7%
exp-diff39.3%
+-rgt-identity39.3%
+-rgt-identity39.3%
exp-to-pow39.3%
hypot-def39.3%
*-commutative39.3%
exp-prod37.6%
+-commutative37.6%
*-commutative37.6%
Simplified63.1%
Taylor expanded in y.im around 0 35.6%
unpow235.6%
unpow235.6%
hypot-def31.1%
Simplified31.1%
Taylor expanded in x.re around 0 21.0%
Taylor expanded in y.re around 0 3.2%
*-commutative3.2%
expm1-log1p-u2.8%
expm1-udef33.2%
Applied egg-rr33.2%
if -2.8e23 < y.im < 4.60000000000000025e-139Initial program 44.9%
exp-diff44.9%
+-rgt-identity44.9%
+-rgt-identity44.9%
exp-to-pow44.9%
hypot-def44.9%
*-commutative44.9%
exp-prod44.9%
+-commutative44.9%
*-commutative44.9%
Simplified84.8%
Taylor expanded in y.im around 0 61.4%
unpow261.4%
unpow261.4%
hypot-def67.2%
Simplified67.2%
Taylor expanded in x.re around 0 44.6%
Taylor expanded in y.re around 0 21.8%
*-commutative21.8%
log1p-expm1-u31.8%
Applied egg-rr31.8%
if 4.60000000000000025e-139 < y.im Initial program 39.2%
exp-diff33.0%
+-rgt-identity33.0%
+-rgt-identity33.0%
exp-to-pow33.0%
hypot-def33.0%
*-commutative33.0%
exp-prod31.9%
+-commutative31.9%
*-commutative31.9%
Simplified65.1%
Taylor expanded in y.im around 0 50.4%
unpow250.4%
unpow250.4%
hypot-def45.7%
Simplified45.7%
Taylor expanded in x.re around 0 38.4%
Taylor expanded in y.re around 0 6.0%
*-commutative6.0%
add-cbrt-cube27.4%
pow327.4%
Applied egg-rr27.4%
Final simplification30.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (log1p (expm1 (* y.re (atan2 x.im x.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
Initial program 42.2%
exp-diff39.1%
+-rgt-identity39.1%
+-rgt-identity39.1%
exp-to-pow39.1%
hypot-def39.1%
*-commutative39.1%
exp-prod38.3%
+-commutative38.3%
*-commutative38.3%
Simplified72.4%
Taylor expanded in y.im around 0 51.3%
unpow251.3%
unpow251.3%
hypot-def50.7%
Simplified50.7%
Taylor expanded in x.re around 0 36.8%
Taylor expanded in y.re around 0 11.5%
*-commutative11.5%
log1p-expm1-u21.3%
Applied egg-rr21.3%
Final simplification21.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (atan2 x.im x.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * atan2(x_46_im, x_46_re);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * atan2(x_46im, x_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * Math.atan2(x_46_im, x_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * math.atan2(x_46_im, x_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * atan(x_46_im, x_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * atan2(x_46_im, x_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Initial program 42.2%
exp-diff39.1%
+-rgt-identity39.1%
+-rgt-identity39.1%
exp-to-pow39.1%
hypot-def39.1%
*-commutative39.1%
exp-prod38.3%
+-commutative38.3%
*-commutative38.3%
Simplified72.4%
Taylor expanded in y.im around 0 51.3%
unpow251.3%
unpow251.3%
hypot-def50.7%
Simplified50.7%
Taylor expanded in x.re around 0 36.8%
Taylor expanded in y.re around 0 11.5%
Final simplification11.5%
herbie shell --seed 2023200
(FPCore (x.re x.im y.re y.im)
:name "powComplex, imaginary part"
:precision binary64
(* (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) (* (atan2 x.im x.re) y.im))) (sin (+ (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.im) (* (atan2 x.im x.re) y.re)))))