
(FPCore (re im) :precision binary64 (* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))
double code(double re, double im) {
return (0.5 * sin(re)) * (exp((0.0 - im)) + exp(im));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = (0.5d0 * sin(re)) * (exp((0.0d0 - im)) + exp(im))
end function
public static double code(double re, double im) {
return (0.5 * Math.sin(re)) * (Math.exp((0.0 - im)) + Math.exp(im));
}
def code(re, im): return (0.5 * math.sin(re)) * (math.exp((0.0 - im)) + math.exp(im))
function code(re, im) return Float64(Float64(0.5 * sin(re)) * Float64(exp(Float64(0.0 - im)) + exp(im))) end
function tmp = code(re, im) tmp = (0.5 * sin(re)) * (exp((0.0 - im)) + exp(im)); end
code[re_, im_] := N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[Exp[N[(0.0 - im), $MachinePrecision]], $MachinePrecision] + N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (re im) :precision binary64 (* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))
double code(double re, double im) {
return (0.5 * sin(re)) * (exp((0.0 - im)) + exp(im));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = (0.5d0 * sin(re)) * (exp((0.0d0 - im)) + exp(im))
end function
public static double code(double re, double im) {
return (0.5 * Math.sin(re)) * (Math.exp((0.0 - im)) + Math.exp(im));
}
def code(re, im): return (0.5 * math.sin(re)) * (math.exp((0.0 - im)) + math.exp(im))
function code(re, im) return Float64(Float64(0.5 * sin(re)) * Float64(exp(Float64(0.0 - im)) + exp(im))) end
function tmp = code(re, im) tmp = (0.5 * sin(re)) * (exp((0.0 - im)) + exp(im)); end
code[re_, im_] := N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[Exp[N[(0.0 - im), $MachinePrecision]], $MachinePrecision] + N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right)
\end{array}
(FPCore (re im) :precision binary64 (* (* 0.5 (sin re)) (+ (exp (- im)) (exp im))))
double code(double re, double im) {
return (0.5 * sin(re)) * (exp(-im) + exp(im));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = (0.5d0 * sin(re)) * (exp(-im) + exp(im))
end function
public static double code(double re, double im) {
return (0.5 * Math.sin(re)) * (Math.exp(-im) + Math.exp(im));
}
def code(re, im): return (0.5 * math.sin(re)) * (math.exp(-im) + math.exp(im))
function code(re, im) return Float64(Float64(0.5 * sin(re)) * Float64(exp(Float64(-im)) + exp(im))) end
function tmp = code(re, im) tmp = (0.5 * sin(re)) * (exp(-im) + exp(im)); end
code[re_, im_] := N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[Exp[(-im)], $MachinePrecision] + N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} + e^{im}\right)
\end{array}
Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (re im)
:precision binary64
(if (<= im 4.2e-7)
(* (sin re) (fma 0.5 (* im im) 1.0))
(if (<= im 1.9e+154)
(* (* 0.5 re) (+ (exp (- im)) (exp im)))
(* (sin re) (* im (* 0.5 im))))))
double code(double re, double im) {
double tmp;
if (im <= 4.2e-7) {
tmp = sin(re) * fma(0.5, (im * im), 1.0);
} else if (im <= 1.9e+154) {
tmp = (0.5 * re) * (exp(-im) + exp(im));
} else {
tmp = sin(re) * (im * (0.5 * im));
}
return tmp;
}
function code(re, im) tmp = 0.0 if (im <= 4.2e-7) tmp = Float64(sin(re) * fma(0.5, Float64(im * im), 1.0)); elseif (im <= 1.9e+154) tmp = Float64(Float64(0.5 * re) * Float64(exp(Float64(-im)) + exp(im))); else tmp = Float64(sin(re) * Float64(im * Float64(0.5 * im))); end return tmp end
code[re_, im_] := If[LessEqual[im, 4.2e-7], N[(N[Sin[re], $MachinePrecision] * N[(0.5 * N[(im * im), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 1.9e+154], N[(N[(0.5 * re), $MachinePrecision] * N[(N[Exp[(-im)], $MachinePrecision] + N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * N[(im * N[(0.5 * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 4.2 \cdot 10^{-7}:\\
\;\;\;\;\sin re \cdot \mathsf{fma}\left(0.5, im \cdot im, 1\right)\\
\mathbf{elif}\;im \leq 1.9 \cdot 10^{+154}:\\
\;\;\;\;\left(0.5 \cdot re\right) \cdot \left(e^{-im} + e^{im}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot \left(im \cdot \left(0.5 \cdot im\right)\right)\\
\end{array}
\end{array}
if im < 4.2e-7Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 77.1%
Simplified77.1%
Taylor expanded in re around inf 77.1%
*-commutative77.1%
associate-*r*77.1%
distribute-rgt1-in77.1%
fma-def77.1%
unpow277.1%
Simplified77.1%
if 4.2e-7 < im < 1.8999999999999999e154Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 71.9%
Simplified71.9%
if 1.8999999999999999e154 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 100.0%
Simplified100.0%
Taylor expanded in re around inf 100.0%
*-commutative100.0%
associate-*r*100.0%
distribute-rgt1-in100.0%
fma-def100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in im around inf 100.0%
*-commutative100.0%
associate-*r*100.0%
unpow2100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Final simplification79.6%
(FPCore (re im)
:precision binary64
(if (<= im 4.2e-7)
(+ (sin re) (* (* 0.5 (sin re)) (* im im)))
(if (<= im 1.9e+154)
(* (* 0.5 re) (+ (exp (- im)) (exp im)))
(* (sin re) (* im (* 0.5 im))))))
double code(double re, double im) {
double tmp;
if (im <= 4.2e-7) {
tmp = sin(re) + ((0.5 * sin(re)) * (im * im));
} else if (im <= 1.9e+154) {
tmp = (0.5 * re) * (exp(-im) + exp(im));
} else {
tmp = sin(re) * (im * (0.5 * im));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 4.2d-7) then
tmp = sin(re) + ((0.5d0 * sin(re)) * (im * im))
else if (im <= 1.9d+154) then
tmp = (0.5d0 * re) * (exp(-im) + exp(im))
else
tmp = sin(re) * (im * (0.5d0 * im))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 4.2e-7) {
tmp = Math.sin(re) + ((0.5 * Math.sin(re)) * (im * im));
} else if (im <= 1.9e+154) {
tmp = (0.5 * re) * (Math.exp(-im) + Math.exp(im));
} else {
tmp = Math.sin(re) * (im * (0.5 * im));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 4.2e-7: tmp = math.sin(re) + ((0.5 * math.sin(re)) * (im * im)) elif im <= 1.9e+154: tmp = (0.5 * re) * (math.exp(-im) + math.exp(im)) else: tmp = math.sin(re) * (im * (0.5 * im)) return tmp
function code(re, im) tmp = 0.0 if (im <= 4.2e-7) tmp = Float64(sin(re) + Float64(Float64(0.5 * sin(re)) * Float64(im * im))); elseif (im <= 1.9e+154) tmp = Float64(Float64(0.5 * re) * Float64(exp(Float64(-im)) + exp(im))); else tmp = Float64(sin(re) * Float64(im * Float64(0.5 * im))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 4.2e-7) tmp = sin(re) + ((0.5 * sin(re)) * (im * im)); elseif (im <= 1.9e+154) tmp = (0.5 * re) * (exp(-im) + exp(im)); else tmp = sin(re) * (im * (0.5 * im)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 4.2e-7], N[(N[Sin[re], $MachinePrecision] + N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 1.9e+154], N[(N[(0.5 * re), $MachinePrecision] * N[(N[Exp[(-im)], $MachinePrecision] + N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * N[(im * N[(0.5 * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 4.2 \cdot 10^{-7}:\\
\;\;\;\;\sin re + \left(0.5 \cdot \sin re\right) \cdot \left(im \cdot im\right)\\
\mathbf{elif}\;im \leq 1.9 \cdot 10^{+154}:\\
\;\;\;\;\left(0.5 \cdot re\right) \cdot \left(e^{-im} + e^{im}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot \left(im \cdot \left(0.5 \cdot im\right)\right)\\
\end{array}
\end{array}
if im < 4.2e-7Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 77.1%
Simplified77.1%
if 4.2e-7 < im < 1.8999999999999999e154Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 71.9%
Simplified71.9%
if 1.8999999999999999e154 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 100.0%
Simplified100.0%
Taylor expanded in re around inf 100.0%
*-commutative100.0%
associate-*r*100.0%
distribute-rgt1-in100.0%
fma-def100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in im around inf 100.0%
*-commutative100.0%
associate-*r*100.0%
unpow2100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Final simplification79.6%
(FPCore (re im)
:precision binary64
(if (<= im 550.0)
(sin re)
(if (<= im 1.9e+154)
(log1p (expm1 (* (* im im) (* 0.5 re))))
(* (sin re) (* im (* 0.5 im))))))
double code(double re, double im) {
double tmp;
if (im <= 550.0) {
tmp = sin(re);
} else if (im <= 1.9e+154) {
tmp = log1p(expm1(((im * im) * (0.5 * re))));
} else {
tmp = sin(re) * (im * (0.5 * im));
}
return tmp;
}
public static double code(double re, double im) {
double tmp;
if (im <= 550.0) {
tmp = Math.sin(re);
} else if (im <= 1.9e+154) {
tmp = Math.log1p(Math.expm1(((im * im) * (0.5 * re))));
} else {
tmp = Math.sin(re) * (im * (0.5 * im));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 550.0: tmp = math.sin(re) elif im <= 1.9e+154: tmp = math.log1p(math.expm1(((im * im) * (0.5 * re)))) else: tmp = math.sin(re) * (im * (0.5 * im)) return tmp
function code(re, im) tmp = 0.0 if (im <= 550.0) tmp = sin(re); elseif (im <= 1.9e+154) tmp = log1p(expm1(Float64(Float64(im * im) * Float64(0.5 * re)))); else tmp = Float64(sin(re) * Float64(im * Float64(0.5 * im))); end return tmp end
code[re_, im_] := If[LessEqual[im, 550.0], N[Sin[re], $MachinePrecision], If[LessEqual[im, 1.9e+154], N[Log[1 + N[(Exp[N[(N[(im * im), $MachinePrecision] * N[(0.5 * re), $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * N[(im * N[(0.5 * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 550:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 1.9 \cdot 10^{+154}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(\left(im \cdot im\right) \cdot \left(0.5 \cdot re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot \left(im \cdot \left(0.5 \cdot im\right)\right)\\
\end{array}
\end{array}
if im < 550Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 62.8%
if 550 < im < 1.8999999999999999e154Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 4.3%
Simplified4.3%
Taylor expanded in re around 0 21.1%
*-commutative21.1%
unpow221.1%
Simplified21.1%
Taylor expanded in im around inf 21.1%
associate-*r*21.1%
unpow221.1%
Simplified21.1%
log1p-expm1-u42.7%
*-commutative42.7%
Applied egg-rr42.7%
if 1.8999999999999999e154 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 100.0%
Simplified100.0%
Taylor expanded in re around inf 100.0%
*-commutative100.0%
associate-*r*100.0%
distribute-rgt1-in100.0%
fma-def100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in im around inf 100.0%
*-commutative100.0%
associate-*r*100.0%
unpow2100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Final simplification65.6%
(FPCore (re im)
:precision binary64
(if (<= im 580.0)
(* (sin re) (fma 0.5 (* im im) 1.0))
(if (<= im 1.9e+154)
(log1p (expm1 (* (* im im) (* 0.5 re))))
(* (sin re) (* im (* 0.5 im))))))
double code(double re, double im) {
double tmp;
if (im <= 580.0) {
tmp = sin(re) * fma(0.5, (im * im), 1.0);
} else if (im <= 1.9e+154) {
tmp = log1p(expm1(((im * im) * (0.5 * re))));
} else {
tmp = sin(re) * (im * (0.5 * im));
}
return tmp;
}
function code(re, im) tmp = 0.0 if (im <= 580.0) tmp = Float64(sin(re) * fma(0.5, Float64(im * im), 1.0)); elseif (im <= 1.9e+154) tmp = log1p(expm1(Float64(Float64(im * im) * Float64(0.5 * re)))); else tmp = Float64(sin(re) * Float64(im * Float64(0.5 * im))); end return tmp end
code[re_, im_] := If[LessEqual[im, 580.0], N[(N[Sin[re], $MachinePrecision] * N[(0.5 * N[(im * im), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 1.9e+154], N[Log[1 + N[(Exp[N[(N[(im * im), $MachinePrecision] * N[(0.5 * re), $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * N[(im * N[(0.5 * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 580:\\
\;\;\;\;\sin re \cdot \mathsf{fma}\left(0.5, im \cdot im, 1\right)\\
\mathbf{elif}\;im \leq 1.9 \cdot 10^{+154}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(\left(im \cdot im\right) \cdot \left(0.5 \cdot re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot \left(im \cdot \left(0.5 \cdot im\right)\right)\\
\end{array}
\end{array}
if im < 580Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 77.2%
Simplified77.2%
Taylor expanded in re around inf 77.2%
*-commutative77.2%
associate-*r*77.2%
distribute-rgt1-in77.2%
fma-def77.2%
unpow277.2%
Simplified77.2%
if 580 < im < 1.8999999999999999e154Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 4.3%
Simplified4.3%
Taylor expanded in re around 0 21.1%
*-commutative21.1%
unpow221.1%
Simplified21.1%
Taylor expanded in im around inf 21.1%
associate-*r*21.1%
unpow221.1%
Simplified21.1%
log1p-expm1-u42.7%
*-commutative42.7%
Applied egg-rr42.7%
if 1.8999999999999999e154 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 100.0%
Simplified100.0%
Taylor expanded in re around inf 100.0%
*-commutative100.0%
associate-*r*100.0%
distribute-rgt1-in100.0%
fma-def100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in im around inf 100.0%
*-commutative100.0%
associate-*r*100.0%
unpow2100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Final simplification76.2%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (* im im) (* 0.5 re))) (t_1 (* im (* 0.5 im))))
(if (<= im 22000000.0)
(sin re)
(if (<= im 2.3e+56)
(cbrt (* t_0 (* t_0 t_0)))
(if (<= im 1.9e+154)
(/ (* re (- 1.0 (* 0.25 (pow im 4.0)))) (- 1.0 t_1))
(* (sin re) t_1))))))
double code(double re, double im) {
double t_0 = (im * im) * (0.5 * re);
double t_1 = im * (0.5 * im);
double tmp;
if (im <= 22000000.0) {
tmp = sin(re);
} else if (im <= 2.3e+56) {
tmp = cbrt((t_0 * (t_0 * t_0)));
} else if (im <= 1.9e+154) {
tmp = (re * (1.0 - (0.25 * pow(im, 4.0)))) / (1.0 - t_1);
} else {
tmp = sin(re) * t_1;
}
return tmp;
}
public static double code(double re, double im) {
double t_0 = (im * im) * (0.5 * re);
double t_1 = im * (0.5 * im);
double tmp;
if (im <= 22000000.0) {
tmp = Math.sin(re);
} else if (im <= 2.3e+56) {
tmp = Math.cbrt((t_0 * (t_0 * t_0)));
} else if (im <= 1.9e+154) {
tmp = (re * (1.0 - (0.25 * Math.pow(im, 4.0)))) / (1.0 - t_1);
} else {
tmp = Math.sin(re) * t_1;
}
return tmp;
}
function code(re, im) t_0 = Float64(Float64(im * im) * Float64(0.5 * re)) t_1 = Float64(im * Float64(0.5 * im)) tmp = 0.0 if (im <= 22000000.0) tmp = sin(re); elseif (im <= 2.3e+56) tmp = cbrt(Float64(t_0 * Float64(t_0 * t_0))); elseif (im <= 1.9e+154) tmp = Float64(Float64(re * Float64(1.0 - Float64(0.25 * (im ^ 4.0)))) / Float64(1.0 - t_1)); else tmp = Float64(sin(re) * t_1); end return tmp end
code[re_, im_] := Block[{t$95$0 = N[(N[(im * im), $MachinePrecision] * N[(0.5 * re), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(im * N[(0.5 * im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 22000000.0], N[Sin[re], $MachinePrecision], If[LessEqual[im, 2.3e+56], N[Power[N[(t$95$0 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], If[LessEqual[im, 1.9e+154], N[(N[(re * N[(1.0 - N[(0.25 * N[Power[im, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(im \cdot im\right) \cdot \left(0.5 \cdot re\right)\\
t_1 := im \cdot \left(0.5 \cdot im\right)\\
\mathbf{if}\;im \leq 22000000:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 2.3 \cdot 10^{+56}:\\
\;\;\;\;\sqrt[3]{t_0 \cdot \left(t_0 \cdot t_0\right)}\\
\mathbf{elif}\;im \leq 1.9 \cdot 10^{+154}:\\
\;\;\;\;\frac{re \cdot \left(1 - 0.25 \cdot {im}^{4}\right)}{1 - t_1}\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot t_1\\
\end{array}
\end{array}
if im < 2.2e7Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 62.8%
if 2.2e7 < im < 2.30000000000000015e56Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 3.2%
Simplified3.2%
Taylor expanded in re around 0 10.0%
*-commutative10.0%
unpow210.0%
Simplified10.0%
Taylor expanded in im around inf 10.0%
associate-*r*10.0%
unpow210.0%
Simplified10.0%
add-cbrt-cube32.0%
*-commutative32.0%
*-commutative32.0%
*-commutative32.0%
Applied egg-rr32.0%
if 2.30000000000000015e56 < im < 1.8999999999999999e154Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 5.1%
Simplified5.1%
Taylor expanded in re around 0 29.1%
*-commutative29.1%
unpow229.1%
Simplified29.1%
*-commutative29.1%
flip-+50.5%
associate-*l/50.5%
metadata-eval50.5%
swap-sqr50.5%
metadata-eval50.5%
pow250.5%
pow250.5%
pow-prod-up50.5%
metadata-eval50.5%
associate-*r*50.5%
*-commutative50.5%
Applied egg-rr50.5%
if 1.8999999999999999e154 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 100.0%
Simplified100.0%
Taylor expanded in re around inf 100.0%
*-commutative100.0%
associate-*r*100.0%
distribute-rgt1-in100.0%
fma-def100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in im around inf 100.0%
*-commutative100.0%
associate-*r*100.0%
unpow2100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Final simplification65.6%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* 0.016666666666666666 (* re re))) (t_1 (* im (* 0.5 im))))
(if (<= im 560.0)
(sin re)
(if (<= im 2.7e+25)
(+ 0.08333333333333333 (cbrt (* t_0 (* t_0 t_0))))
(if (<= im 1.9e+154)
(/ (* re (- 1.0 (* 0.25 (pow im 4.0)))) (- 1.0 t_1))
(* (sin re) t_1))))))
double code(double re, double im) {
double t_0 = 0.016666666666666666 * (re * re);
double t_1 = im * (0.5 * im);
double tmp;
if (im <= 560.0) {
tmp = sin(re);
} else if (im <= 2.7e+25) {
tmp = 0.08333333333333333 + cbrt((t_0 * (t_0 * t_0)));
} else if (im <= 1.9e+154) {
tmp = (re * (1.0 - (0.25 * pow(im, 4.0)))) / (1.0 - t_1);
} else {
tmp = sin(re) * t_1;
}
return tmp;
}
public static double code(double re, double im) {
double t_0 = 0.016666666666666666 * (re * re);
double t_1 = im * (0.5 * im);
double tmp;
if (im <= 560.0) {
tmp = Math.sin(re);
} else if (im <= 2.7e+25) {
tmp = 0.08333333333333333 + Math.cbrt((t_0 * (t_0 * t_0)));
} else if (im <= 1.9e+154) {
tmp = (re * (1.0 - (0.25 * Math.pow(im, 4.0)))) / (1.0 - t_1);
} else {
tmp = Math.sin(re) * t_1;
}
return tmp;
}
function code(re, im) t_0 = Float64(0.016666666666666666 * Float64(re * re)) t_1 = Float64(im * Float64(0.5 * im)) tmp = 0.0 if (im <= 560.0) tmp = sin(re); elseif (im <= 2.7e+25) tmp = Float64(0.08333333333333333 + cbrt(Float64(t_0 * Float64(t_0 * t_0)))); elseif (im <= 1.9e+154) tmp = Float64(Float64(re * Float64(1.0 - Float64(0.25 * (im ^ 4.0)))) / Float64(1.0 - t_1)); else tmp = Float64(sin(re) * t_1); end return tmp end
code[re_, im_] := Block[{t$95$0 = N[(0.016666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(im * N[(0.5 * im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 560.0], N[Sin[re], $MachinePrecision], If[LessEqual[im, 2.7e+25], N[(0.08333333333333333 + N[Power[N[(t$95$0 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 1.9e+154], N[(N[(re * N[(1.0 - N[(0.25 * N[Power[im, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.016666666666666666 \cdot \left(re \cdot re\right)\\
t_1 := im \cdot \left(0.5 \cdot im\right)\\
\mathbf{if}\;im \leq 560:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 2.7 \cdot 10^{+25}:\\
\;\;\;\;0.08333333333333333 + \sqrt[3]{t_0 \cdot \left(t_0 \cdot t_0\right)}\\
\mathbf{elif}\;im \leq 1.9 \cdot 10^{+154}:\\
\;\;\;\;\frac{re \cdot \left(1 - 0.25 \cdot {im}^{4}\right)}{1 - t_1}\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot t_1\\
\end{array}
\end{array}
if im < 560Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 62.8%
if 560 < im < 2.7e25Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Applied egg-rr4.6%
Taylor expanded in re around 0 6.6%
associate-*r/6.6%
metadata-eval6.6%
unpow26.6%
*-commutative6.6%
unpow26.6%
Simplified6.6%
Taylor expanded in re around inf 5.1%
unpow25.1%
Simplified5.1%
add-cbrt-cube41.9%
Applied egg-rr41.9%
if 2.7e25 < im < 1.8999999999999999e154Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 4.5%
Simplified4.5%
Taylor expanded in re around 0 24.8%
*-commutative24.8%
unpow224.8%
Simplified24.8%
*-commutative24.8%
flip-+39.6%
associate-*l/39.5%
metadata-eval39.5%
swap-sqr39.5%
metadata-eval39.5%
pow239.5%
pow239.5%
pow-prod-up39.5%
metadata-eval39.5%
associate-*r*39.5%
*-commutative39.5%
Applied egg-rr39.5%
if 1.8999999999999999e154 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 100.0%
Simplified100.0%
Taylor expanded in re around inf 100.0%
*-commutative100.0%
associate-*r*100.0%
distribute-rgt1-in100.0%
fma-def100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in im around inf 100.0%
*-commutative100.0%
associate-*r*100.0%
unpow2100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Final simplification65.3%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* im (* 0.5 im))))
(if (<= im 710.0)
(sin re)
(if (<= im 5.4e+70)
(+
0.08333333333333333
(+ (/ 0.25 (* re re)) (* re (* re 0.016666666666666666))))
(if (<= im 1.9e+154)
(/ (* re (- 1.0 (* 0.25 (pow im 4.0)))) (- 1.0 t_0))
(* (sin re) t_0))))))
double code(double re, double im) {
double t_0 = im * (0.5 * im);
double tmp;
if (im <= 710.0) {
tmp = sin(re);
} else if (im <= 5.4e+70) {
tmp = 0.08333333333333333 + ((0.25 / (re * re)) + (re * (re * 0.016666666666666666)));
} else if (im <= 1.9e+154) {
tmp = (re * (1.0 - (0.25 * pow(im, 4.0)))) / (1.0 - t_0);
} else {
tmp = sin(re) * t_0;
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = im * (0.5d0 * im)
if (im <= 710.0d0) then
tmp = sin(re)
else if (im <= 5.4d+70) then
tmp = 0.08333333333333333d0 + ((0.25d0 / (re * re)) + (re * (re * 0.016666666666666666d0)))
else if (im <= 1.9d+154) then
tmp = (re * (1.0d0 - (0.25d0 * (im ** 4.0d0)))) / (1.0d0 - t_0)
else
tmp = sin(re) * t_0
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = im * (0.5 * im);
double tmp;
if (im <= 710.0) {
tmp = Math.sin(re);
} else if (im <= 5.4e+70) {
tmp = 0.08333333333333333 + ((0.25 / (re * re)) + (re * (re * 0.016666666666666666)));
} else if (im <= 1.9e+154) {
tmp = (re * (1.0 - (0.25 * Math.pow(im, 4.0)))) / (1.0 - t_0);
} else {
tmp = Math.sin(re) * t_0;
}
return tmp;
}
def code(re, im): t_0 = im * (0.5 * im) tmp = 0 if im <= 710.0: tmp = math.sin(re) elif im <= 5.4e+70: tmp = 0.08333333333333333 + ((0.25 / (re * re)) + (re * (re * 0.016666666666666666))) elif im <= 1.9e+154: tmp = (re * (1.0 - (0.25 * math.pow(im, 4.0)))) / (1.0 - t_0) else: tmp = math.sin(re) * t_0 return tmp
function code(re, im) t_0 = Float64(im * Float64(0.5 * im)) tmp = 0.0 if (im <= 710.0) tmp = sin(re); elseif (im <= 5.4e+70) tmp = Float64(0.08333333333333333 + Float64(Float64(0.25 / Float64(re * re)) + Float64(re * Float64(re * 0.016666666666666666)))); elseif (im <= 1.9e+154) tmp = Float64(Float64(re * Float64(1.0 - Float64(0.25 * (im ^ 4.0)))) / Float64(1.0 - t_0)); else tmp = Float64(sin(re) * t_0); end return tmp end
function tmp_2 = code(re, im) t_0 = im * (0.5 * im); tmp = 0.0; if (im <= 710.0) tmp = sin(re); elseif (im <= 5.4e+70) tmp = 0.08333333333333333 + ((0.25 / (re * re)) + (re * (re * 0.016666666666666666))); elseif (im <= 1.9e+154) tmp = (re * (1.0 - (0.25 * (im ^ 4.0)))) / (1.0 - t_0); else tmp = sin(re) * t_0; end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(im * N[(0.5 * im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 710.0], N[Sin[re], $MachinePrecision], If[LessEqual[im, 5.4e+70], N[(0.08333333333333333 + N[(N[(0.25 / N[(re * re), $MachinePrecision]), $MachinePrecision] + N[(re * N[(re * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 1.9e+154], N[(N[(re * N[(1.0 - N[(0.25 * N[Power[im, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := im \cdot \left(0.5 \cdot im\right)\\
\mathbf{if}\;im \leq 710:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 5.4 \cdot 10^{+70}:\\
\;\;\;\;0.08333333333333333 + \left(\frac{0.25}{re \cdot re} + re \cdot \left(re \cdot 0.016666666666666666\right)\right)\\
\mathbf{elif}\;im \leq 1.9 \cdot 10^{+154}:\\
\;\;\;\;\frac{re \cdot \left(1 - 0.25 \cdot {im}^{4}\right)}{1 - t_0}\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot t_0\\
\end{array}
\end{array}
if im < 710Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 62.8%
if 710 < im < 5.3999999999999999e70Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Applied egg-rr13.9%
Taylor expanded in re around 0 14.8%
associate-*r/14.8%
metadata-eval14.8%
unpow214.8%
*-commutative14.8%
unpow214.8%
Simplified14.8%
Taylor expanded in re around 0 14.8%
unpow214.8%
*-commutative14.8%
associate-*r*14.8%
Simplified14.8%
if 5.3999999999999999e70 < im < 1.8999999999999999e154Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 5.7%
Simplified5.7%
Taylor expanded in re around 0 32.0%
*-commutative32.0%
unpow232.0%
Simplified32.0%
*-commutative32.0%
flip-+61.5%
associate-*l/61.5%
metadata-eval61.5%
swap-sqr61.5%
metadata-eval61.5%
pow261.5%
pow261.5%
pow-prod-up61.5%
metadata-eval61.5%
associate-*r*61.5%
*-commutative61.5%
Applied egg-rr61.5%
if 1.8999999999999999e154 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 100.0%
Simplified100.0%
Taylor expanded in re around inf 100.0%
*-commutative100.0%
associate-*r*100.0%
distribute-rgt1-in100.0%
fma-def100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in im around inf 100.0%
*-commutative100.0%
associate-*r*100.0%
unpow2100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Final simplification64.6%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* im (* 0.5 im))))
(if (<= im 500.0)
(sin re)
(if (<= im 1.4e+72)
(+
0.08333333333333333
(+ (/ 0.25 (* re re)) (* re (* re 0.016666666666666666))))
(if (<= im 1.9e+154)
(/ (* (pow im 4.0) (* re -0.25)) (- 1.0 t_0))
(* (sin re) t_0))))))
double code(double re, double im) {
double t_0 = im * (0.5 * im);
double tmp;
if (im <= 500.0) {
tmp = sin(re);
} else if (im <= 1.4e+72) {
tmp = 0.08333333333333333 + ((0.25 / (re * re)) + (re * (re * 0.016666666666666666)));
} else if (im <= 1.9e+154) {
tmp = (pow(im, 4.0) * (re * -0.25)) / (1.0 - t_0);
} else {
tmp = sin(re) * t_0;
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = im * (0.5d0 * im)
if (im <= 500.0d0) then
tmp = sin(re)
else if (im <= 1.4d+72) then
tmp = 0.08333333333333333d0 + ((0.25d0 / (re * re)) + (re * (re * 0.016666666666666666d0)))
else if (im <= 1.9d+154) then
tmp = ((im ** 4.0d0) * (re * (-0.25d0))) / (1.0d0 - t_0)
else
tmp = sin(re) * t_0
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = im * (0.5 * im);
double tmp;
if (im <= 500.0) {
tmp = Math.sin(re);
} else if (im <= 1.4e+72) {
tmp = 0.08333333333333333 + ((0.25 / (re * re)) + (re * (re * 0.016666666666666666)));
} else if (im <= 1.9e+154) {
tmp = (Math.pow(im, 4.0) * (re * -0.25)) / (1.0 - t_0);
} else {
tmp = Math.sin(re) * t_0;
}
return tmp;
}
def code(re, im): t_0 = im * (0.5 * im) tmp = 0 if im <= 500.0: tmp = math.sin(re) elif im <= 1.4e+72: tmp = 0.08333333333333333 + ((0.25 / (re * re)) + (re * (re * 0.016666666666666666))) elif im <= 1.9e+154: tmp = (math.pow(im, 4.0) * (re * -0.25)) / (1.0 - t_0) else: tmp = math.sin(re) * t_0 return tmp
function code(re, im) t_0 = Float64(im * Float64(0.5 * im)) tmp = 0.0 if (im <= 500.0) tmp = sin(re); elseif (im <= 1.4e+72) tmp = Float64(0.08333333333333333 + Float64(Float64(0.25 / Float64(re * re)) + Float64(re * Float64(re * 0.016666666666666666)))); elseif (im <= 1.9e+154) tmp = Float64(Float64((im ^ 4.0) * Float64(re * -0.25)) / Float64(1.0 - t_0)); else tmp = Float64(sin(re) * t_0); end return tmp end
function tmp_2 = code(re, im) t_0 = im * (0.5 * im); tmp = 0.0; if (im <= 500.0) tmp = sin(re); elseif (im <= 1.4e+72) tmp = 0.08333333333333333 + ((0.25 / (re * re)) + (re * (re * 0.016666666666666666))); elseif (im <= 1.9e+154) tmp = ((im ^ 4.0) * (re * -0.25)) / (1.0 - t_0); else tmp = sin(re) * t_0; end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(im * N[(0.5 * im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 500.0], N[Sin[re], $MachinePrecision], If[LessEqual[im, 1.4e+72], N[(0.08333333333333333 + N[(N[(0.25 / N[(re * re), $MachinePrecision]), $MachinePrecision] + N[(re * N[(re * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 1.9e+154], N[(N[(N[Power[im, 4.0], $MachinePrecision] * N[(re * -0.25), $MachinePrecision]), $MachinePrecision] / N[(1.0 - t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := im \cdot \left(0.5 \cdot im\right)\\
\mathbf{if}\;im \leq 500:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 1.4 \cdot 10^{+72}:\\
\;\;\;\;0.08333333333333333 + \left(\frac{0.25}{re \cdot re} + re \cdot \left(re \cdot 0.016666666666666666\right)\right)\\
\mathbf{elif}\;im \leq 1.9 \cdot 10^{+154}:\\
\;\;\;\;\frac{{im}^{4} \cdot \left(re \cdot -0.25\right)}{1 - t_0}\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot t_0\\
\end{array}
\end{array}
if im < 500Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 62.8%
if 500 < im < 1.4e72Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Applied egg-rr13.9%
Taylor expanded in re around 0 14.8%
associate-*r/14.8%
metadata-eval14.8%
unpow214.8%
*-commutative14.8%
unpow214.8%
Simplified14.8%
Taylor expanded in re around 0 14.8%
unpow214.8%
*-commutative14.8%
associate-*r*14.8%
Simplified14.8%
if 1.4e72 < im < 1.8999999999999999e154Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 5.7%
Simplified5.7%
Taylor expanded in re around 0 32.0%
*-commutative32.0%
unpow232.0%
Simplified32.0%
*-commutative32.0%
flip-+61.5%
associate-*l/61.5%
metadata-eval61.5%
swap-sqr61.5%
metadata-eval61.5%
pow261.5%
pow261.5%
pow-prod-up61.5%
metadata-eval61.5%
associate-*r*61.5%
*-commutative61.5%
Applied egg-rr61.5%
Taylor expanded in im around inf 61.5%
associate-*r*61.5%
Simplified61.5%
if 1.8999999999999999e154 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 100.0%
Simplified100.0%
Taylor expanded in re around inf 100.0%
*-commutative100.0%
associate-*r*100.0%
distribute-rgt1-in100.0%
fma-def100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in im around inf 100.0%
*-commutative100.0%
associate-*r*100.0%
unpow2100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Final simplification64.6%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* im (* 0.5 im))) (t_1 (* re t_0)))
(if (<= im 680.0)
(sin re)
(if (<= im 1.55e+96)
(+
0.08333333333333333
(+ (/ 0.25 (* re re)) (* re (* re 0.016666666666666666))))
(if (<= im 1.85e+140)
(* re (+ 1.0 (* 0.5 (* im im))))
(if (<= im 1.9e+154)
(/ (* re (- re (* (* 0.5 im) (* im t_1)))) (- re t_1))
(* (sin re) t_0)))))))
double code(double re, double im) {
double t_0 = im * (0.5 * im);
double t_1 = re * t_0;
double tmp;
if (im <= 680.0) {
tmp = sin(re);
} else if (im <= 1.55e+96) {
tmp = 0.08333333333333333 + ((0.25 / (re * re)) + (re * (re * 0.016666666666666666)));
} else if (im <= 1.85e+140) {
tmp = re * (1.0 + (0.5 * (im * im)));
} else if (im <= 1.9e+154) {
tmp = (re * (re - ((0.5 * im) * (im * t_1)))) / (re - t_1);
} else {
tmp = sin(re) * t_0;
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = im * (0.5d0 * im)
t_1 = re * t_0
if (im <= 680.0d0) then
tmp = sin(re)
else if (im <= 1.55d+96) then
tmp = 0.08333333333333333d0 + ((0.25d0 / (re * re)) + (re * (re * 0.016666666666666666d0)))
else if (im <= 1.85d+140) then
tmp = re * (1.0d0 + (0.5d0 * (im * im)))
else if (im <= 1.9d+154) then
tmp = (re * (re - ((0.5d0 * im) * (im * t_1)))) / (re - t_1)
else
tmp = sin(re) * t_0
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = im * (0.5 * im);
double t_1 = re * t_0;
double tmp;
if (im <= 680.0) {
tmp = Math.sin(re);
} else if (im <= 1.55e+96) {
tmp = 0.08333333333333333 + ((0.25 / (re * re)) + (re * (re * 0.016666666666666666)));
} else if (im <= 1.85e+140) {
tmp = re * (1.0 + (0.5 * (im * im)));
} else if (im <= 1.9e+154) {
tmp = (re * (re - ((0.5 * im) * (im * t_1)))) / (re - t_1);
} else {
tmp = Math.sin(re) * t_0;
}
return tmp;
}
def code(re, im): t_0 = im * (0.5 * im) t_1 = re * t_0 tmp = 0 if im <= 680.0: tmp = math.sin(re) elif im <= 1.55e+96: tmp = 0.08333333333333333 + ((0.25 / (re * re)) + (re * (re * 0.016666666666666666))) elif im <= 1.85e+140: tmp = re * (1.0 + (0.5 * (im * im))) elif im <= 1.9e+154: tmp = (re * (re - ((0.5 * im) * (im * t_1)))) / (re - t_1) else: tmp = math.sin(re) * t_0 return tmp
function code(re, im) t_0 = Float64(im * Float64(0.5 * im)) t_1 = Float64(re * t_0) tmp = 0.0 if (im <= 680.0) tmp = sin(re); elseif (im <= 1.55e+96) tmp = Float64(0.08333333333333333 + Float64(Float64(0.25 / Float64(re * re)) + Float64(re * Float64(re * 0.016666666666666666)))); elseif (im <= 1.85e+140) tmp = Float64(re * Float64(1.0 + Float64(0.5 * Float64(im * im)))); elseif (im <= 1.9e+154) tmp = Float64(Float64(re * Float64(re - Float64(Float64(0.5 * im) * Float64(im * t_1)))) / Float64(re - t_1)); else tmp = Float64(sin(re) * t_0); end return tmp end
function tmp_2 = code(re, im) t_0 = im * (0.5 * im); t_1 = re * t_0; tmp = 0.0; if (im <= 680.0) tmp = sin(re); elseif (im <= 1.55e+96) tmp = 0.08333333333333333 + ((0.25 / (re * re)) + (re * (re * 0.016666666666666666))); elseif (im <= 1.85e+140) tmp = re * (1.0 + (0.5 * (im * im))); elseif (im <= 1.9e+154) tmp = (re * (re - ((0.5 * im) * (im * t_1)))) / (re - t_1); else tmp = sin(re) * t_0; end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(im * N[(0.5 * im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(re * t$95$0), $MachinePrecision]}, If[LessEqual[im, 680.0], N[Sin[re], $MachinePrecision], If[LessEqual[im, 1.55e+96], N[(0.08333333333333333 + N[(N[(0.25 / N[(re * re), $MachinePrecision]), $MachinePrecision] + N[(re * N[(re * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 1.85e+140], N[(re * N[(1.0 + N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 1.9e+154], N[(N[(re * N[(re - N[(N[(0.5 * im), $MachinePrecision] * N[(im * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(re - t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := im \cdot \left(0.5 \cdot im\right)\\
t_1 := re \cdot t_0\\
\mathbf{if}\;im \leq 680:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 1.55 \cdot 10^{+96}:\\
\;\;\;\;0.08333333333333333 + \left(\frac{0.25}{re \cdot re} + re \cdot \left(re \cdot 0.016666666666666666\right)\right)\\
\mathbf{elif}\;im \leq 1.85 \cdot 10^{+140}:\\
\;\;\;\;re \cdot \left(1 + 0.5 \cdot \left(im \cdot im\right)\right)\\
\mathbf{elif}\;im \leq 1.9 \cdot 10^{+154}:\\
\;\;\;\;\frac{re \cdot \left(re - \left(0.5 \cdot im\right) \cdot \left(im \cdot t_1\right)\right)}{re - t_1}\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot t_0\\
\end{array}
\end{array}
if im < 680Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 62.8%
if 680 < im < 1.5499999999999999e96Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Applied egg-rr12.1%
Taylor expanded in re around 0 17.5%
associate-*r/17.5%
metadata-eval17.5%
unpow217.5%
*-commutative17.5%
unpow217.5%
Simplified17.5%
Taylor expanded in re around 0 17.5%
unpow217.5%
*-commutative17.5%
associate-*r*17.5%
Simplified17.5%
if 1.5499999999999999e96 < im < 1.85000000000000001e140Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 6.7%
Simplified6.7%
Taylor expanded in re around 0 50.0%
*-commutative50.0%
unpow250.0%
Simplified50.0%
if 1.85000000000000001e140 < im < 1.8999999999999999e154Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 5.1%
Simplified5.1%
Taylor expanded in re around 0 5.1%
*-commutative5.1%
unpow25.1%
Simplified5.1%
distribute-rgt-in5.1%
*-un-lft-identity5.1%
flip-+100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
Applied egg-rr100.0%
associate-*l*100.0%
distribute-lft-out--100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
if 1.8999999999999999e154 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 100.0%
Simplified100.0%
Taylor expanded in re around inf 100.0%
*-commutative100.0%
associate-*r*100.0%
distribute-rgt1-in100.0%
fma-def100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in im around inf 100.0%
*-commutative100.0%
associate-*r*100.0%
unpow2100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Final simplification64.2%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* re (* im (* 0.5 im)))))
(if (<= im 550.0)
(sin re)
(if (<= im 1.65e+97)
(+
0.08333333333333333
(+ (/ 0.25 (* re re)) (* re (* re 0.016666666666666666))))
(if (or (<= im 5.8e+141) (not (<= im 4.4e+153)))
(* re (+ 1.0 (* 0.5 (* im im))))
(/ (* re (- re (* (* 0.5 im) (* im t_0)))) (- re t_0)))))))
double code(double re, double im) {
double t_0 = re * (im * (0.5 * im));
double tmp;
if (im <= 550.0) {
tmp = sin(re);
} else if (im <= 1.65e+97) {
tmp = 0.08333333333333333 + ((0.25 / (re * re)) + (re * (re * 0.016666666666666666)));
} else if ((im <= 5.8e+141) || !(im <= 4.4e+153)) {
tmp = re * (1.0 + (0.5 * (im * im)));
} else {
tmp = (re * (re - ((0.5 * im) * (im * t_0)))) / (re - t_0);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = re * (im * (0.5d0 * im))
if (im <= 550.0d0) then
tmp = sin(re)
else if (im <= 1.65d+97) then
tmp = 0.08333333333333333d0 + ((0.25d0 / (re * re)) + (re * (re * 0.016666666666666666d0)))
else if ((im <= 5.8d+141) .or. (.not. (im <= 4.4d+153))) then
tmp = re * (1.0d0 + (0.5d0 * (im * im)))
else
tmp = (re * (re - ((0.5d0 * im) * (im * t_0)))) / (re - t_0)
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = re * (im * (0.5 * im));
double tmp;
if (im <= 550.0) {
tmp = Math.sin(re);
} else if (im <= 1.65e+97) {
tmp = 0.08333333333333333 + ((0.25 / (re * re)) + (re * (re * 0.016666666666666666)));
} else if ((im <= 5.8e+141) || !(im <= 4.4e+153)) {
tmp = re * (1.0 + (0.5 * (im * im)));
} else {
tmp = (re * (re - ((0.5 * im) * (im * t_0)))) / (re - t_0);
}
return tmp;
}
def code(re, im): t_0 = re * (im * (0.5 * im)) tmp = 0 if im <= 550.0: tmp = math.sin(re) elif im <= 1.65e+97: tmp = 0.08333333333333333 + ((0.25 / (re * re)) + (re * (re * 0.016666666666666666))) elif (im <= 5.8e+141) or not (im <= 4.4e+153): tmp = re * (1.0 + (0.5 * (im * im))) else: tmp = (re * (re - ((0.5 * im) * (im * t_0)))) / (re - t_0) return tmp
function code(re, im) t_0 = Float64(re * Float64(im * Float64(0.5 * im))) tmp = 0.0 if (im <= 550.0) tmp = sin(re); elseif (im <= 1.65e+97) tmp = Float64(0.08333333333333333 + Float64(Float64(0.25 / Float64(re * re)) + Float64(re * Float64(re * 0.016666666666666666)))); elseif ((im <= 5.8e+141) || !(im <= 4.4e+153)) tmp = Float64(re * Float64(1.0 + Float64(0.5 * Float64(im * im)))); else tmp = Float64(Float64(re * Float64(re - Float64(Float64(0.5 * im) * Float64(im * t_0)))) / Float64(re - t_0)); end return tmp end
function tmp_2 = code(re, im) t_0 = re * (im * (0.5 * im)); tmp = 0.0; if (im <= 550.0) tmp = sin(re); elseif (im <= 1.65e+97) tmp = 0.08333333333333333 + ((0.25 / (re * re)) + (re * (re * 0.016666666666666666))); elseif ((im <= 5.8e+141) || ~((im <= 4.4e+153))) tmp = re * (1.0 + (0.5 * (im * im))); else tmp = (re * (re - ((0.5 * im) * (im * t_0)))) / (re - t_0); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(re * N[(im * N[(0.5 * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 550.0], N[Sin[re], $MachinePrecision], If[LessEqual[im, 1.65e+97], N[(0.08333333333333333 + N[(N[(0.25 / N[(re * re), $MachinePrecision]), $MachinePrecision] + N[(re * N[(re * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[im, 5.8e+141], N[Not[LessEqual[im, 4.4e+153]], $MachinePrecision]], N[(re * N[(1.0 + N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(re * N[(re - N[(N[(0.5 * im), $MachinePrecision] * N[(im * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(re - t$95$0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := re \cdot \left(im \cdot \left(0.5 \cdot im\right)\right)\\
\mathbf{if}\;im \leq 550:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 1.65 \cdot 10^{+97}:\\
\;\;\;\;0.08333333333333333 + \left(\frac{0.25}{re \cdot re} + re \cdot \left(re \cdot 0.016666666666666666\right)\right)\\
\mathbf{elif}\;im \leq 5.8 \cdot 10^{+141} \lor \neg \left(im \leq 4.4 \cdot 10^{+153}\right):\\
\;\;\;\;re \cdot \left(1 + 0.5 \cdot \left(im \cdot im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{re \cdot \left(re - \left(0.5 \cdot im\right) \cdot \left(im \cdot t_0\right)\right)}{re - t_0}\\
\end{array}
\end{array}
if im < 550Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 62.8%
if 550 < im < 1.6500000000000001e97Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Applied egg-rr12.1%
Taylor expanded in re around 0 17.5%
associate-*r/17.5%
metadata-eval17.5%
unpow217.5%
*-commutative17.5%
unpow217.5%
Simplified17.5%
Taylor expanded in re around 0 17.5%
unpow217.5%
*-commutative17.5%
associate-*r*17.5%
Simplified17.5%
if 1.6500000000000001e97 < im < 5.80000000000000013e141 or 4.3999999999999999e153 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 83.0%
Simplified83.0%
Taylor expanded in re around 0 72.7%
*-commutative72.7%
unpow272.7%
Simplified72.7%
if 5.80000000000000013e141 < im < 4.3999999999999999e153Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 5.1%
Simplified5.1%
Taylor expanded in re around 0 5.1%
*-commutative5.1%
unpow25.1%
Simplified5.1%
distribute-rgt-in5.1%
*-un-lft-identity5.1%
flip-+100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
Applied egg-rr100.0%
associate-*l*100.0%
distribute-lft-out--100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Final simplification61.1%
(FPCore (re im)
:precision binary64
(if (<= im 390.0)
re
(if (<= im 3.1e+25)
(+ 0.08333333333333333 (* 0.016666666666666666 (* re re)))
(* (* im im) (* 0.5 re)))))
double code(double re, double im) {
double tmp;
if (im <= 390.0) {
tmp = re;
} else if (im <= 3.1e+25) {
tmp = 0.08333333333333333 + (0.016666666666666666 * (re * re));
} else {
tmp = (im * im) * (0.5 * re);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 390.0d0) then
tmp = re
else if (im <= 3.1d+25) then
tmp = 0.08333333333333333d0 + (0.016666666666666666d0 * (re * re))
else
tmp = (im * im) * (0.5d0 * re)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 390.0) {
tmp = re;
} else if (im <= 3.1e+25) {
tmp = 0.08333333333333333 + (0.016666666666666666 * (re * re));
} else {
tmp = (im * im) * (0.5 * re);
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 390.0: tmp = re elif im <= 3.1e+25: tmp = 0.08333333333333333 + (0.016666666666666666 * (re * re)) else: tmp = (im * im) * (0.5 * re) return tmp
function code(re, im) tmp = 0.0 if (im <= 390.0) tmp = re; elseif (im <= 3.1e+25) tmp = Float64(0.08333333333333333 + Float64(0.016666666666666666 * Float64(re * re))); else tmp = Float64(Float64(im * im) * Float64(0.5 * re)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 390.0) tmp = re; elseif (im <= 3.1e+25) tmp = 0.08333333333333333 + (0.016666666666666666 * (re * re)); else tmp = (im * im) * (0.5 * re); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 390.0], re, If[LessEqual[im, 3.1e+25], N[(0.08333333333333333 + N[(0.016666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(im * im), $MachinePrecision] * N[(0.5 * re), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 390:\\
\;\;\;\;re\\
\mathbf{elif}\;im \leq 3.1 \cdot 10^{+25}:\\
\;\;\;\;0.08333333333333333 + 0.016666666666666666 \cdot \left(re \cdot re\right)\\
\mathbf{else}:\\
\;\;\;\;\left(im \cdot im\right) \cdot \left(0.5 \cdot re\right)\\
\end{array}
\end{array}
if im < 390Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 77.2%
Simplified77.2%
Taylor expanded in re around 0 49.4%
*-commutative49.4%
unpow249.4%
Simplified49.4%
Taylor expanded in im around 0 36.2%
if 390 < im < 3.0999999999999998e25Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Applied egg-rr4.6%
Taylor expanded in re around 0 6.6%
associate-*r/6.6%
metadata-eval6.6%
unpow26.6%
*-commutative6.6%
unpow26.6%
Simplified6.6%
Taylor expanded in re around inf 5.1%
unpow25.1%
Simplified5.1%
if 3.0999999999999998e25 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 60.0%
Simplified60.0%
Taylor expanded in re around 0 55.5%
*-commutative55.5%
unpow255.5%
Simplified55.5%
Taylor expanded in im around inf 55.5%
associate-*r*55.5%
unpow255.5%
Simplified55.5%
Final simplification40.3%
(FPCore (re im) :precision binary64 (if (<= im 1.4) re (* (* im im) (* 0.5 re))))
double code(double re, double im) {
double tmp;
if (im <= 1.4) {
tmp = re;
} else {
tmp = (im * im) * (0.5 * re);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 1.4d0) then
tmp = re
else
tmp = (im * im) * (0.5d0 * re)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 1.4) {
tmp = re;
} else {
tmp = (im * im) * (0.5 * re);
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 1.4: tmp = re else: tmp = (im * im) * (0.5 * re) return tmp
function code(re, im) tmp = 0.0 if (im <= 1.4) tmp = re; else tmp = Float64(Float64(im * im) * Float64(0.5 * re)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 1.4) tmp = re; else tmp = (im * im) * (0.5 * re); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 1.4], re, N[(N[(im * im), $MachinePrecision] * N[(0.5 * re), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 1.4:\\
\;\;\;\;re\\
\mathbf{else}:\\
\;\;\;\;\left(im \cdot im\right) \cdot \left(0.5 \cdot re\right)\\
\end{array}
\end{array}
if im < 1.3999999999999999Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 77.2%
Simplified77.2%
Taylor expanded in re around 0 49.4%
*-commutative49.4%
unpow249.4%
Simplified49.4%
Taylor expanded in im around 0 36.2%
if 1.3999999999999999 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 55.7%
Simplified55.7%
Taylor expanded in re around 0 51.6%
*-commutative51.6%
unpow251.6%
Simplified51.6%
Taylor expanded in im around inf 51.6%
associate-*r*51.6%
unpow251.6%
Simplified51.6%
Final simplification40.3%
(FPCore (re im) :precision binary64 (* re (+ 1.0 (* 0.5 (* im im)))))
double code(double re, double im) {
return re * (1.0 + (0.5 * (im * im)));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = re * (1.0d0 + (0.5d0 * (im * im)))
end function
public static double code(double re, double im) {
return re * (1.0 + (0.5 * (im * im)));
}
def code(re, im): return re * (1.0 + (0.5 * (im * im)))
function code(re, im) return Float64(re * Float64(1.0 + Float64(0.5 * Float64(im * im)))) end
function tmp = code(re, im) tmp = re * (1.0 + (0.5 * (im * im))); end
code[re_, im_] := N[(re * N[(1.0 + N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
re \cdot \left(1 + 0.5 \cdot \left(im \cdot im\right)\right)
\end{array}
Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 71.6%
Simplified71.6%
Taylor expanded in re around 0 49.9%
*-commutative49.9%
unpow249.9%
Simplified49.9%
Final simplification49.9%
(FPCore (re im) :precision binary64 (if (<= im 5.4e+35) re (/ 0.25 (* re re))))
double code(double re, double im) {
double tmp;
if (im <= 5.4e+35) {
tmp = re;
} else {
tmp = 0.25 / (re * re);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 5.4d+35) then
tmp = re
else
tmp = 0.25d0 / (re * re)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 5.4e+35) {
tmp = re;
} else {
tmp = 0.25 / (re * re);
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 5.4e+35: tmp = re else: tmp = 0.25 / (re * re) return tmp
function code(re, im) tmp = 0.0 if (im <= 5.4e+35) tmp = re; else tmp = Float64(0.25 / Float64(re * re)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 5.4e+35) tmp = re; else tmp = 0.25 / (re * re); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 5.4e+35], re, N[(0.25 / N[(re * re), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 5.4 \cdot 10^{+35}:\\
\;\;\;\;re\\
\mathbf{else}:\\
\;\;\;\;\frac{0.25}{re \cdot re}\\
\end{array}
\end{array}
if im < 5.40000000000000005e35Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 74.5%
Simplified74.5%
Taylor expanded in re around 0 47.7%
*-commutative47.7%
unpow247.7%
Simplified47.7%
Taylor expanded in im around 0 35.0%
if 5.40000000000000005e35 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Applied egg-rr11.6%
Taylor expanded in re around 0 11.6%
unpow211.6%
Simplified11.6%
Final simplification29.5%
(FPCore (re im) :precision binary64 0.08333333333333333)
double code(double re, double im) {
return 0.08333333333333333;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = 0.08333333333333333d0
end function
public static double code(double re, double im) {
return 0.08333333333333333;
}
def code(re, im): return 0.08333333333333333
function code(re, im) return 0.08333333333333333 end
function tmp = code(re, im) tmp = 0.08333333333333333; end
code[re_, im_] := 0.08333333333333333
\begin{array}{l}
\\
0.08333333333333333
\end{array}
Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Applied egg-rr9.4%
Taylor expanded in re around 0 9.2%
associate-*r/9.2%
metadata-eval9.2%
unpow29.2%
Simplified9.2%
Taylor expanded in re around inf 4.2%
Final simplification4.2%
(FPCore (re im) :precision binary64 re)
double code(double re, double im) {
return re;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = re
end function
public static double code(double re, double im) {
return re;
}
def code(re, im): return re
function code(re, im) return re end
function tmp = code(re, im) tmp = re; end
code[re_, im_] := re
\begin{array}{l}
\\
re
\end{array}
Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 71.6%
Simplified71.6%
Taylor expanded in re around 0 49.9%
*-commutative49.9%
unpow249.9%
Simplified49.9%
Taylor expanded in im around 0 27.5%
Final simplification27.5%
herbie shell --seed 2023257
(FPCore (re im)
:name "math.sin on complex, real part"
:precision binary64
(* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))