
(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 19 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 (let* ((t_0 (* 0.5 (sin re)))) (fma t_0 (exp im) (/ t_0 (exp im)))))
double code(double re, double im) {
double t_0 = 0.5 * sin(re);
return fma(t_0, exp(im), (t_0 / exp(im)));
}
function code(re, im) t_0 = Float64(0.5 * sin(re)) return fma(t_0, exp(im), Float64(t_0 / exp(im))) end
code[re_, im_] := Block[{t$95$0 = N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision]}, N[(t$95$0 * N[Exp[im], $MachinePrecision] + N[(t$95$0 / N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 \cdot \sin re\\
\mathsf{fma}\left(t\_0, e^{im}, \frac{t\_0}{e^{im}}\right)
\end{array}
\end{array}
Initial program 100.0%
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
sub0-negN/A
exp-negN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
exp-lowering-exp.f64100.0%
Applied egg-rr100.0%
(FPCore (re im) :precision binary64 (/ (sin re) (/ 1.0 (cosh im))))
double code(double re, double im) {
return sin(re) / (1.0 / cosh(im));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = sin(re) / (1.0d0 / cosh(im))
end function
public static double code(double re, double im) {
return Math.sin(re) / (1.0 / Math.cosh(im));
}
def code(re, im): return math.sin(re) / (1.0 / math.cosh(im))
function code(re, im) return Float64(sin(re) / Float64(1.0 / cosh(im))) end
function tmp = code(re, im) tmp = sin(re) / (1.0 / cosh(im)); end
code[re_, im_] := N[(N[Sin[re], $MachinePrecision] / N[(1.0 / N[Cosh[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sin re}{\frac{1}{\cosh im}}
\end{array}
Initial program 100.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
*-commutativeN/A
*-lft-identityN/A
cosh-defN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
clear-numN/A
cosh-defN/A
*-lft-identityN/A
/-lowering-/.f64N/A
*-lft-identityN/A
cosh-lowering-cosh.f64100.0%
Applied egg-rr100.0%
(FPCore (re im) :precision binary64 (* (sin re) (cosh im)))
double code(double re, double im) {
return sin(re) * cosh(im);
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = sin(re) * cosh(im)
end function
public static double code(double re, double im) {
return Math.sin(re) * Math.cosh(im);
}
def code(re, im): return math.sin(re) * math.cosh(im)
function code(re, im) return Float64(sin(re) * cosh(im)) end
function tmp = code(re, im) tmp = sin(re) * cosh(im); end
code[re_, im_] := N[(N[Sin[re], $MachinePrecision] * N[Cosh[im], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin re \cdot \cosh im
\end{array}
Initial program 100.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lft-identityN/A
cosh-lowering-cosh.f64100.0%
Applied egg-rr100.0%
(FPCore (re im)
:precision binary64
(if (<= re 7.6e-7)
(/ re (/ 1.0 (cosh im)))
(*
(sin re)
(+
1.0
(*
im
(*
im
(+
0.5
(*
im
(*
im
(+ 0.041666666666666664 (* (* im im) 0.001388888888888889)))))))))))
double code(double re, double im) {
double tmp;
if (re <= 7.6e-7) {
tmp = re / (1.0 / cosh(im));
} else {
tmp = sin(re) * (1.0 + (im * (im * (0.5 + (im * (im * (0.041666666666666664 + ((im * im) * 0.001388888888888889))))))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 7.6d-7) then
tmp = re / (1.0d0 / cosh(im))
else
tmp = sin(re) * (1.0d0 + (im * (im * (0.5d0 + (im * (im * (0.041666666666666664d0 + ((im * im) * 0.001388888888888889d0))))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 7.6e-7) {
tmp = re / (1.0 / Math.cosh(im));
} else {
tmp = Math.sin(re) * (1.0 + (im * (im * (0.5 + (im * (im * (0.041666666666666664 + ((im * im) * 0.001388888888888889))))))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 7.6e-7: tmp = re / (1.0 / math.cosh(im)) else: tmp = math.sin(re) * (1.0 + (im * (im * (0.5 + (im * (im * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))))) return tmp
function code(re, im) tmp = 0.0 if (re <= 7.6e-7) tmp = Float64(re / Float64(1.0 / cosh(im))); else tmp = Float64(sin(re) * Float64(1.0 + Float64(im * Float64(im * Float64(0.5 + Float64(im * Float64(im * Float64(0.041666666666666664 + Float64(Float64(im * im) * 0.001388888888888889))))))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 7.6e-7) tmp = re / (1.0 / cosh(im)); else tmp = sin(re) * (1.0 + (im * (im * (0.5 + (im * (im * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 7.6e-7], N[(re / N[(1.0 / N[Cosh[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * N[(1.0 + N[(im * N[(im * N[(0.5 + N[(im * N[(im * N[(0.041666666666666664 + N[(N[(im * im), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 7.6 \cdot 10^{-7}:\\
\;\;\;\;\frac{re}{\frac{1}{\cosh im}}\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot \left(1 + im \cdot \left(im \cdot \left(0.5 + im \cdot \left(im \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if re < 7.60000000000000029e-7Initial program 100.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
*-commutativeN/A
*-lft-identityN/A
cosh-defN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
clear-numN/A
cosh-defN/A
*-lft-identityN/A
/-lowering-/.f64N/A
*-lft-identityN/A
cosh-lowering-cosh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in re around 0
Simplified76.5%
if 7.60000000000000029e-7 < re Initial program 100.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6495.3%
Simplified95.3%
Final simplification80.8%
(FPCore (re im)
:precision binary64
(if (<= im 2.05e-5)
(sin re)
(if (<= im 2.5e+77)
(/ re (/ 1.0 (cosh im)))
(* (sin re) (* im (* im (* 0.041666666666666664 (* im im))))))))
double code(double re, double im) {
double tmp;
if (im <= 2.05e-5) {
tmp = sin(re);
} else if (im <= 2.5e+77) {
tmp = re / (1.0 / cosh(im));
} else {
tmp = sin(re) * (im * (im * (0.041666666666666664 * (im * im))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 2.05d-5) then
tmp = sin(re)
else if (im <= 2.5d+77) then
tmp = re / (1.0d0 / cosh(im))
else
tmp = sin(re) * (im * (im * (0.041666666666666664d0 * (im * im))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 2.05e-5) {
tmp = Math.sin(re);
} else if (im <= 2.5e+77) {
tmp = re / (1.0 / Math.cosh(im));
} else {
tmp = Math.sin(re) * (im * (im * (0.041666666666666664 * (im * im))));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 2.05e-5: tmp = math.sin(re) elif im <= 2.5e+77: tmp = re / (1.0 / math.cosh(im)) else: tmp = math.sin(re) * (im * (im * (0.041666666666666664 * (im * im)))) return tmp
function code(re, im) tmp = 0.0 if (im <= 2.05e-5) tmp = sin(re); elseif (im <= 2.5e+77) tmp = Float64(re / Float64(1.0 / cosh(im))); else tmp = Float64(sin(re) * Float64(im * Float64(im * Float64(0.041666666666666664 * Float64(im * im))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 2.05e-5) tmp = sin(re); elseif (im <= 2.5e+77) tmp = re / (1.0 / cosh(im)); else tmp = sin(re) * (im * (im * (0.041666666666666664 * (im * im)))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 2.05e-5], N[Sin[re], $MachinePrecision], If[LessEqual[im, 2.5e+77], N[(re / N[(1.0 / N[Cosh[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * N[(im * N[(im * N[(0.041666666666666664 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 2.05 \cdot 10^{-5}:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 2.5 \cdot 10^{+77}:\\
\;\;\;\;\frac{re}{\frac{1}{\cosh im}}\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot \left(im \cdot \left(im \cdot \left(0.041666666666666664 \cdot \left(im \cdot im\right)\right)\right)\right)\\
\end{array}
\end{array}
if im < 2.05000000000000002e-5Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6471.5%
Simplified71.5%
if 2.05000000000000002e-5 < im < 2.50000000000000002e77Initial program 99.8%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f6499.8%
Applied egg-rr99.8%
*-commutativeN/A
*-lft-identityN/A
cosh-defN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
clear-numN/A
cosh-defN/A
*-lft-identityN/A
/-lowering-/.f64N/A
*-lft-identityN/A
cosh-lowering-cosh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in re around 0
Simplified75.0%
if 2.50000000000000002e77 < im Initial program 100.0%
Taylor expanded in im around 0
+-commutativeN/A
distribute-lft-inN/A
associate-+l+N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft1-inN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
Simplified100.0%
Taylor expanded in im around inf
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification76.7%
(FPCore (re im)
:precision binary64
(if (<= re 4.1e-7)
(/ re (/ 1.0 (cosh im)))
(*
(sin re)
(+ 1.0 (* (* im im) (+ 0.5 (* im (* im 0.041666666666666664))))))))
double code(double re, double im) {
double tmp;
if (re <= 4.1e-7) {
tmp = re / (1.0 / cosh(im));
} else {
tmp = sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * 0.041666666666666664)))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 4.1d-7) then
tmp = re / (1.0d0 / cosh(im))
else
tmp = sin(re) * (1.0d0 + ((im * im) * (0.5d0 + (im * (im * 0.041666666666666664d0)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 4.1e-7) {
tmp = re / (1.0 / Math.cosh(im));
} else {
tmp = Math.sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * 0.041666666666666664)))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 4.1e-7: tmp = re / (1.0 / math.cosh(im)) else: tmp = math.sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * 0.041666666666666664))))) return tmp
function code(re, im) tmp = 0.0 if (re <= 4.1e-7) tmp = Float64(re / Float64(1.0 / cosh(im))); else tmp = Float64(sin(re) * Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + Float64(im * Float64(im * 0.041666666666666664)))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 4.1e-7) tmp = re / (1.0 / cosh(im)); else tmp = sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * 0.041666666666666664))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 4.1e-7], N[(re / N[(1.0 / N[Cosh[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.5 + N[(im * N[(im * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 4.1 \cdot 10^{-7}:\\
\;\;\;\;\frac{re}{\frac{1}{\cosh im}}\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + im \cdot \left(im \cdot 0.041666666666666664\right)\right)\right)\\
\end{array}
\end{array}
if re < 4.0999999999999999e-7Initial program 100.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
*-commutativeN/A
*-lft-identityN/A
cosh-defN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
clear-numN/A
cosh-defN/A
*-lft-identityN/A
/-lowering-/.f64N/A
*-lft-identityN/A
cosh-lowering-cosh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in re around 0
Simplified76.5%
if 4.0999999999999999e-7 < re Initial program 100.0%
Taylor expanded in im around 0
+-commutativeN/A
distribute-lft-inN/A
associate-+l+N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft1-inN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
Simplified90.4%
Final simplification79.7%
(FPCore (re im)
:precision binary64
(if (<= im 2.05e-5)
(sin re)
(if (<= im 1.4e+154)
(/ re (/ 1.0 (cosh im)))
(* (* 0.5 (sin re)) (+ (* im im) 2.0)))))
double code(double re, double im) {
double tmp;
if (im <= 2.05e-5) {
tmp = sin(re);
} else if (im <= 1.4e+154) {
tmp = re / (1.0 / cosh(im));
} else {
tmp = (0.5 * sin(re)) * ((im * im) + 2.0);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 2.05d-5) then
tmp = sin(re)
else if (im <= 1.4d+154) then
tmp = re / (1.0d0 / cosh(im))
else
tmp = (0.5d0 * sin(re)) * ((im * im) + 2.0d0)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 2.05e-5) {
tmp = Math.sin(re);
} else if (im <= 1.4e+154) {
tmp = re / (1.0 / Math.cosh(im));
} else {
tmp = (0.5 * Math.sin(re)) * ((im * im) + 2.0);
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 2.05e-5: tmp = math.sin(re) elif im <= 1.4e+154: tmp = re / (1.0 / math.cosh(im)) else: tmp = (0.5 * math.sin(re)) * ((im * im) + 2.0) return tmp
function code(re, im) tmp = 0.0 if (im <= 2.05e-5) tmp = sin(re); elseif (im <= 1.4e+154) tmp = Float64(re / Float64(1.0 / cosh(im))); else tmp = Float64(Float64(0.5 * sin(re)) * Float64(Float64(im * im) + 2.0)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 2.05e-5) tmp = sin(re); elseif (im <= 1.4e+154) tmp = re / (1.0 / cosh(im)); else tmp = (0.5 * sin(re)) * ((im * im) + 2.0); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 2.05e-5], N[Sin[re], $MachinePrecision], If[LessEqual[im, 1.4e+154], N[(re / N[(1.0 / N[Cosh[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[(im * im), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 2.05 \cdot 10^{-5}:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 1.4 \cdot 10^{+154}:\\
\;\;\;\;\frac{re}{\frac{1}{\cosh im}}\\
\mathbf{else}:\\
\;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im \cdot im + 2\right)\\
\end{array}
\end{array}
if im < 2.05000000000000002e-5Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6471.5%
Simplified71.5%
if 2.05000000000000002e-5 < im < 1.4e154Initial program 99.9%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f6499.9%
Applied egg-rr99.9%
*-commutativeN/A
*-lft-identityN/A
cosh-defN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
clear-numN/A
cosh-defN/A
*-lft-identityN/A
/-lowering-/.f64N/A
*-lft-identityN/A
cosh-lowering-cosh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in re around 0
Simplified79.2%
if 1.4e154 < im Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification75.5%
(FPCore (re im) :precision binary64 (if (<= re 1.5e-7) (/ re (/ 1.0 (cosh im))) (* (sin re) (+ 1.0 (* im (* im (* 0.041666666666666664 (* im im))))))))
double code(double re, double im) {
double tmp;
if (re <= 1.5e-7) {
tmp = re / (1.0 / cosh(im));
} else {
tmp = sin(re) * (1.0 + (im * (im * (0.041666666666666664 * (im * im)))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 1.5d-7) then
tmp = re / (1.0d0 / cosh(im))
else
tmp = sin(re) * (1.0d0 + (im * (im * (0.041666666666666664d0 * (im * im)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 1.5e-7) {
tmp = re / (1.0 / Math.cosh(im));
} else {
tmp = Math.sin(re) * (1.0 + (im * (im * (0.041666666666666664 * (im * im)))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 1.5e-7: tmp = re / (1.0 / math.cosh(im)) else: tmp = math.sin(re) * (1.0 + (im * (im * (0.041666666666666664 * (im * im))))) return tmp
function code(re, im) tmp = 0.0 if (re <= 1.5e-7) tmp = Float64(re / Float64(1.0 / cosh(im))); else tmp = Float64(sin(re) * Float64(1.0 + Float64(im * Float64(im * Float64(0.041666666666666664 * Float64(im * im)))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 1.5e-7) tmp = re / (1.0 / cosh(im)); else tmp = sin(re) * (1.0 + (im * (im * (0.041666666666666664 * (im * im))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 1.5e-7], N[(re / N[(1.0 / N[Cosh[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * N[(1.0 + N[(im * N[(im * N[(0.041666666666666664 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 1.5 \cdot 10^{-7}:\\
\;\;\;\;\frac{re}{\frac{1}{\cosh im}}\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot \left(1 + im \cdot \left(im \cdot \left(0.041666666666666664 \cdot \left(im \cdot im\right)\right)\right)\right)\\
\end{array}
\end{array}
if re < 1.4999999999999999e-7Initial program 100.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
*-commutativeN/A
*-lft-identityN/A
cosh-defN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
clear-numN/A
cosh-defN/A
*-lft-identityN/A
/-lowering-/.f64N/A
*-lft-identityN/A
cosh-lowering-cosh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in re around 0
Simplified76.5%
if 1.4999999999999999e-7 < re Initial program 100.0%
Taylor expanded in im around 0
+-commutativeN/A
distribute-lft-inN/A
associate-+l+N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft1-inN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
Simplified90.4%
Taylor expanded in im around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6490.4%
Simplified90.4%
Final simplification79.7%
(FPCore (re im)
:precision binary64
(if (<= im 4.9e-5)
(sin re)
(if (<= im 5e+154)
(/ re (/ 1.0 (cosh im)))
(* (+ (* im im) 2.0) (* re (+ 0.5 (* -0.08333333333333333 (* re re))))))))
double code(double re, double im) {
double tmp;
if (im <= 4.9e-5) {
tmp = sin(re);
} else if (im <= 5e+154) {
tmp = re / (1.0 / cosh(im));
} else {
tmp = ((im * im) + 2.0) * (re * (0.5 + (-0.08333333333333333 * (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 <= 4.9d-5) then
tmp = sin(re)
else if (im <= 5d+154) then
tmp = re / (1.0d0 / cosh(im))
else
tmp = ((im * im) + 2.0d0) * (re * (0.5d0 + ((-0.08333333333333333d0) * (re * re))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 4.9e-5) {
tmp = Math.sin(re);
} else if (im <= 5e+154) {
tmp = re / (1.0 / Math.cosh(im));
} else {
tmp = ((im * im) + 2.0) * (re * (0.5 + (-0.08333333333333333 * (re * re))));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 4.9e-5: tmp = math.sin(re) elif im <= 5e+154: tmp = re / (1.0 / math.cosh(im)) else: tmp = ((im * im) + 2.0) * (re * (0.5 + (-0.08333333333333333 * (re * re)))) return tmp
function code(re, im) tmp = 0.0 if (im <= 4.9e-5) tmp = sin(re); elseif (im <= 5e+154) tmp = Float64(re / Float64(1.0 / cosh(im))); else tmp = Float64(Float64(Float64(im * im) + 2.0) * Float64(re * Float64(0.5 + Float64(-0.08333333333333333 * Float64(re * re))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 4.9e-5) tmp = sin(re); elseif (im <= 5e+154) tmp = re / (1.0 / cosh(im)); else tmp = ((im * im) + 2.0) * (re * (0.5 + (-0.08333333333333333 * (re * re)))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 4.9e-5], N[Sin[re], $MachinePrecision], If[LessEqual[im, 5e+154], N[(re / N[(1.0 / N[Cosh[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(im * im), $MachinePrecision] + 2.0), $MachinePrecision] * N[(re * N[(0.5 + N[(-0.08333333333333333 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 4.9 \cdot 10^{-5}:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 5 \cdot 10^{+154}:\\
\;\;\;\;\frac{re}{\frac{1}{\cosh im}}\\
\mathbf{else}:\\
\;\;\;\;\left(im \cdot im + 2\right) \cdot \left(re \cdot \left(0.5 + -0.08333333333333333 \cdot \left(re \cdot re\right)\right)\right)\\
\end{array}
\end{array}
if im < 4.9e-5Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6471.5%
Simplified71.5%
if 4.9e-5 < im < 5.00000000000000004e154Initial program 99.9%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f6499.9%
Applied egg-rr99.9%
*-commutativeN/A
*-lft-identityN/A
cosh-defN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
clear-numN/A
cosh-defN/A
*-lft-identityN/A
/-lowering-/.f64N/A
*-lft-identityN/A
cosh-lowering-cosh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in re around 0
Simplified79.2%
if 5.00000000000000004e154 < im Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6473.3%
Simplified73.3%
Taylor expanded in im around 0
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
Simplified73.3%
Taylor expanded in re around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
*-commutativeN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6473.3%
Simplified73.3%
Final simplification72.4%
(FPCore (re im)
:precision binary64
(if (<= im 3.5e-5)
(sin re)
(if (<= im 1.02e+155)
(* re (cosh im))
(* (+ (* im im) 2.0) (* re (+ 0.5 (* -0.08333333333333333 (* re re))))))))
double code(double re, double im) {
double tmp;
if (im <= 3.5e-5) {
tmp = sin(re);
} else if (im <= 1.02e+155) {
tmp = re * cosh(im);
} else {
tmp = ((im * im) + 2.0) * (re * (0.5 + (-0.08333333333333333 * (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 <= 3.5d-5) then
tmp = sin(re)
else if (im <= 1.02d+155) then
tmp = re * cosh(im)
else
tmp = ((im * im) + 2.0d0) * (re * (0.5d0 + ((-0.08333333333333333d0) * (re * re))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 3.5e-5) {
tmp = Math.sin(re);
} else if (im <= 1.02e+155) {
tmp = re * Math.cosh(im);
} else {
tmp = ((im * im) + 2.0) * (re * (0.5 + (-0.08333333333333333 * (re * re))));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 3.5e-5: tmp = math.sin(re) elif im <= 1.02e+155: tmp = re * math.cosh(im) else: tmp = ((im * im) + 2.0) * (re * (0.5 + (-0.08333333333333333 * (re * re)))) return tmp
function code(re, im) tmp = 0.0 if (im <= 3.5e-5) tmp = sin(re); elseif (im <= 1.02e+155) tmp = Float64(re * cosh(im)); else tmp = Float64(Float64(Float64(im * im) + 2.0) * Float64(re * Float64(0.5 + Float64(-0.08333333333333333 * Float64(re * re))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 3.5e-5) tmp = sin(re); elseif (im <= 1.02e+155) tmp = re * cosh(im); else tmp = ((im * im) + 2.0) * (re * (0.5 + (-0.08333333333333333 * (re * re)))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 3.5e-5], N[Sin[re], $MachinePrecision], If[LessEqual[im, 1.02e+155], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], N[(N[(N[(im * im), $MachinePrecision] + 2.0), $MachinePrecision] * N[(re * N[(0.5 + N[(-0.08333333333333333 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 3.5 \cdot 10^{-5}:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 1.02 \cdot 10^{+155}:\\
\;\;\;\;re \cdot \cosh im\\
\mathbf{else}:\\
\;\;\;\;\left(im \cdot im + 2\right) \cdot \left(re \cdot \left(0.5 + -0.08333333333333333 \cdot \left(re \cdot re\right)\right)\right)\\
\end{array}
\end{array}
if im < 3.4999999999999997e-5Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6471.5%
Simplified71.5%
if 3.4999999999999997e-5 < im < 1.02e155Initial program 99.9%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f6499.9%
Applied egg-rr99.9%
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lft-identityN/A
cosh-lowering-cosh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in re around 0
Simplified79.1%
if 1.02e155 < im Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6473.3%
Simplified73.3%
Taylor expanded in im around 0
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
Simplified73.3%
Taylor expanded in re around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
*-commutativeN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6473.3%
Simplified73.3%
Final simplification72.4%
(FPCore (re im)
:precision binary64
(let* ((t_0
(*
im
(* im (+ 0.08333333333333333 (* (* im im) 0.002777777777777778)))))
(t_1 (* im (* im (+ 1.0 t_0))))
(t_2 (* im (* im (- -1.0 t_0)))))
(if (<= im 4.8e-5)
(sin re)
(if (<= im 6.5e+51)
(/
(*
(+ 4.0 (* t_1 t_2))
(*
re
(+
0.5
(*
(* re re)
(+ -0.08333333333333333 (* (* re re) 0.004166666666666667))))))
(+ 2.0 t_2))
(* (+ 2.0 t_1) (* re (+ 0.5 (* re (* re -0.08333333333333333)))))))))
double code(double re, double im) {
double t_0 = im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)));
double t_1 = im * (im * (1.0 + t_0));
double t_2 = im * (im * (-1.0 - t_0));
double tmp;
if (im <= 4.8e-5) {
tmp = sin(re);
} else if (im <= 6.5e+51) {
tmp = ((4.0 + (t_1 * t_2)) * (re * (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * 0.004166666666666667)))))) / (2.0 + t_2);
} else {
tmp = (2.0 + t_1) * (re * (0.5 + (re * (re * -0.08333333333333333))));
}
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) :: t_2
real(8) :: tmp
t_0 = im * (im * (0.08333333333333333d0 + ((im * im) * 0.002777777777777778d0)))
t_1 = im * (im * (1.0d0 + t_0))
t_2 = im * (im * ((-1.0d0) - t_0))
if (im <= 4.8d-5) then
tmp = sin(re)
else if (im <= 6.5d+51) then
tmp = ((4.0d0 + (t_1 * t_2)) * (re * (0.5d0 + ((re * re) * ((-0.08333333333333333d0) + ((re * re) * 0.004166666666666667d0)))))) / (2.0d0 + t_2)
else
tmp = (2.0d0 + t_1) * (re * (0.5d0 + (re * (re * (-0.08333333333333333d0)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)));
double t_1 = im * (im * (1.0 + t_0));
double t_2 = im * (im * (-1.0 - t_0));
double tmp;
if (im <= 4.8e-5) {
tmp = Math.sin(re);
} else if (im <= 6.5e+51) {
tmp = ((4.0 + (t_1 * t_2)) * (re * (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * 0.004166666666666667)))))) / (2.0 + t_2);
} else {
tmp = (2.0 + t_1) * (re * (0.5 + (re * (re * -0.08333333333333333))));
}
return tmp;
}
def code(re, im): t_0 = im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778))) t_1 = im * (im * (1.0 + t_0)) t_2 = im * (im * (-1.0 - t_0)) tmp = 0 if im <= 4.8e-5: tmp = math.sin(re) elif im <= 6.5e+51: tmp = ((4.0 + (t_1 * t_2)) * (re * (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * 0.004166666666666667)))))) / (2.0 + t_2) else: tmp = (2.0 + t_1) * (re * (0.5 + (re * (re * -0.08333333333333333)))) return tmp
function code(re, im) t_0 = Float64(im * Float64(im * Float64(0.08333333333333333 + Float64(Float64(im * im) * 0.002777777777777778)))) t_1 = Float64(im * Float64(im * Float64(1.0 + t_0))) t_2 = Float64(im * Float64(im * Float64(-1.0 - t_0))) tmp = 0.0 if (im <= 4.8e-5) tmp = sin(re); elseif (im <= 6.5e+51) tmp = Float64(Float64(Float64(4.0 + Float64(t_1 * t_2)) * Float64(re * Float64(0.5 + Float64(Float64(re * re) * Float64(-0.08333333333333333 + Float64(Float64(re * re) * 0.004166666666666667)))))) / Float64(2.0 + t_2)); else tmp = Float64(Float64(2.0 + t_1) * Float64(re * Float64(0.5 + Float64(re * Float64(re * -0.08333333333333333))))); end return tmp end
function tmp_2 = code(re, im) t_0 = im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778))); t_1 = im * (im * (1.0 + t_0)); t_2 = im * (im * (-1.0 - t_0)); tmp = 0.0; if (im <= 4.8e-5) tmp = sin(re); elseif (im <= 6.5e+51) tmp = ((4.0 + (t_1 * t_2)) * (re * (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * 0.004166666666666667)))))) / (2.0 + t_2); else tmp = (2.0 + t_1) * (re * (0.5 + (re * (re * -0.08333333333333333)))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(im * N[(im * N[(0.08333333333333333 + N[(N[(im * im), $MachinePrecision] * 0.002777777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(im * N[(im * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(im * N[(im * N[(-1.0 - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 4.8e-5], N[Sin[re], $MachinePrecision], If[LessEqual[im, 6.5e+51], N[(N[(N[(4.0 + N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision] * N[(re * N[(0.5 + N[(N[(re * re), $MachinePrecision] * N[(-0.08333333333333333 + N[(N[(re * re), $MachinePrecision] * 0.004166666666666667), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 + t$95$1), $MachinePrecision] * N[(re * N[(0.5 + N[(re * N[(re * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := im \cdot \left(im \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\\
t_1 := im \cdot \left(im \cdot \left(1 + t\_0\right)\right)\\
t_2 := im \cdot \left(im \cdot \left(-1 - t\_0\right)\right)\\
\mathbf{if}\;im \leq 4.8 \cdot 10^{-5}:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 6.5 \cdot 10^{+51}:\\
\;\;\;\;\frac{\left(4 + t\_1 \cdot t\_2\right) \cdot \left(re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + \left(re \cdot re\right) \cdot 0.004166666666666667\right)\right)\right)}{2 + t\_2}\\
\mathbf{else}:\\
\;\;\;\;\left(2 + t\_1\right) \cdot \left(re \cdot \left(0.5 + re \cdot \left(re \cdot -0.08333333333333333\right)\right)\right)\\
\end{array}
\end{array}
if im < 4.8000000000000001e-5Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6471.5%
Simplified71.5%
if 4.8000000000000001e-5 < im < 6.5e51Initial program 99.7%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f647.6%
Simplified7.6%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6422.5%
Simplified22.5%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr54.6%
if 6.5e51 < im Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6475.0%
Simplified75.0%
Taylor expanded in re around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Simplified77.1%
Final simplification72.1%
(FPCore (re im)
:precision binary64
(let* ((t_0
(*
im
(* im (+ 0.08333333333333333 (* (* im im) 0.002777777777777778)))))
(t_1 (* im (* im (- -1.0 t_0))))
(t_2 (* im (* im (+ 1.0 t_0)))))
(if (<= im 6.5e+51)
(/
(*
(+ 4.0 (* t_2 t_1))
(*
re
(+
0.5
(*
(* re re)
(+ -0.08333333333333333 (* (* re re) 0.004166666666666667))))))
(+ 2.0 t_1))
(* (+ 2.0 t_2) (* re (+ 0.5 (* re (* re -0.08333333333333333))))))))
double code(double re, double im) {
double t_0 = im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)));
double t_1 = im * (im * (-1.0 - t_0));
double t_2 = im * (im * (1.0 + t_0));
double tmp;
if (im <= 6.5e+51) {
tmp = ((4.0 + (t_2 * t_1)) * (re * (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * 0.004166666666666667)))))) / (2.0 + t_1);
} else {
tmp = (2.0 + t_2) * (re * (0.5 + (re * (re * -0.08333333333333333))));
}
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) :: t_2
real(8) :: tmp
t_0 = im * (im * (0.08333333333333333d0 + ((im * im) * 0.002777777777777778d0)))
t_1 = im * (im * ((-1.0d0) - t_0))
t_2 = im * (im * (1.0d0 + t_0))
if (im <= 6.5d+51) then
tmp = ((4.0d0 + (t_2 * t_1)) * (re * (0.5d0 + ((re * re) * ((-0.08333333333333333d0) + ((re * re) * 0.004166666666666667d0)))))) / (2.0d0 + t_1)
else
tmp = (2.0d0 + t_2) * (re * (0.5d0 + (re * (re * (-0.08333333333333333d0)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)));
double t_1 = im * (im * (-1.0 - t_0));
double t_2 = im * (im * (1.0 + t_0));
double tmp;
if (im <= 6.5e+51) {
tmp = ((4.0 + (t_2 * t_1)) * (re * (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * 0.004166666666666667)))))) / (2.0 + t_1);
} else {
tmp = (2.0 + t_2) * (re * (0.5 + (re * (re * -0.08333333333333333))));
}
return tmp;
}
def code(re, im): t_0 = im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778))) t_1 = im * (im * (-1.0 - t_0)) t_2 = im * (im * (1.0 + t_0)) tmp = 0 if im <= 6.5e+51: tmp = ((4.0 + (t_2 * t_1)) * (re * (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * 0.004166666666666667)))))) / (2.0 + t_1) else: tmp = (2.0 + t_2) * (re * (0.5 + (re * (re * -0.08333333333333333)))) return tmp
function code(re, im) t_0 = Float64(im * Float64(im * Float64(0.08333333333333333 + Float64(Float64(im * im) * 0.002777777777777778)))) t_1 = Float64(im * Float64(im * Float64(-1.0 - t_0))) t_2 = Float64(im * Float64(im * Float64(1.0 + t_0))) tmp = 0.0 if (im <= 6.5e+51) tmp = Float64(Float64(Float64(4.0 + Float64(t_2 * t_1)) * Float64(re * Float64(0.5 + Float64(Float64(re * re) * Float64(-0.08333333333333333 + Float64(Float64(re * re) * 0.004166666666666667)))))) / Float64(2.0 + t_1)); else tmp = Float64(Float64(2.0 + t_2) * Float64(re * Float64(0.5 + Float64(re * Float64(re * -0.08333333333333333))))); end return tmp end
function tmp_2 = code(re, im) t_0 = im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778))); t_1 = im * (im * (-1.0 - t_0)); t_2 = im * (im * (1.0 + t_0)); tmp = 0.0; if (im <= 6.5e+51) tmp = ((4.0 + (t_2 * t_1)) * (re * (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * 0.004166666666666667)))))) / (2.0 + t_1); else tmp = (2.0 + t_2) * (re * (0.5 + (re * (re * -0.08333333333333333)))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(im * N[(im * N[(0.08333333333333333 + N[(N[(im * im), $MachinePrecision] * 0.002777777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(im * N[(im * N[(-1.0 - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(im * N[(im * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 6.5e+51], N[(N[(N[(4.0 + N[(t$95$2 * t$95$1), $MachinePrecision]), $MachinePrecision] * N[(re * N[(0.5 + N[(N[(re * re), $MachinePrecision] * N[(-0.08333333333333333 + N[(N[(re * re), $MachinePrecision] * 0.004166666666666667), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 + t$95$2), $MachinePrecision] * N[(re * N[(0.5 + N[(re * N[(re * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := im \cdot \left(im \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\\
t_1 := im \cdot \left(im \cdot \left(-1 - t\_0\right)\right)\\
t_2 := im \cdot \left(im \cdot \left(1 + t\_0\right)\right)\\
\mathbf{if}\;im \leq 6.5 \cdot 10^{+51}:\\
\;\;\;\;\frac{\left(4 + t\_2 \cdot t\_1\right) \cdot \left(re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + \left(re \cdot re\right) \cdot 0.004166666666666667\right)\right)\right)}{2 + t\_1}\\
\mathbf{else}:\\
\;\;\;\;\left(2 + t\_2\right) \cdot \left(re \cdot \left(0.5 + re \cdot \left(re \cdot -0.08333333333333333\right)\right)\right)\\
\end{array}
\end{array}
if im < 6.5e51Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6494.2%
Simplified94.2%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.5%
Simplified58.5%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr44.0%
if 6.5e51 < im Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6475.0%
Simplified75.0%
Taylor expanded in re around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Simplified77.1%
Final simplification50.2%
(FPCore (re im)
:precision binary64
(if (<= re 1.1e+70)
(*
(+
2.0
(*
im
(*
im
(+
1.0
(*
im
(* im (+ 0.08333333333333333 (* (* im im) 0.002777777777777778))))))))
(* re (+ 0.5 (* re (* re -0.08333333333333333)))))
(if (<= re 1.6e+251)
(*
(+
0.5
(*
(* re re)
(+ -0.08333333333333333 (* (* re re) 0.004166666666666667))))
(* re (+ (* im im) 2.0)))
(* re (* (* re re) -0.16666666666666666)))))
double code(double re, double im) {
double tmp;
if (re <= 1.1e+70) {
tmp = (2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (re * (0.5 + (re * (re * -0.08333333333333333))));
} else if (re <= 1.6e+251) {
tmp = (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * 0.004166666666666667)))) * (re * ((im * im) + 2.0));
} else {
tmp = re * ((re * re) * -0.16666666666666666);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 1.1d+70) then
tmp = (2.0d0 + (im * (im * (1.0d0 + (im * (im * (0.08333333333333333d0 + ((im * im) * 0.002777777777777778d0)))))))) * (re * (0.5d0 + (re * (re * (-0.08333333333333333d0)))))
else if (re <= 1.6d+251) then
tmp = (0.5d0 + ((re * re) * ((-0.08333333333333333d0) + ((re * re) * 0.004166666666666667d0)))) * (re * ((im * im) + 2.0d0))
else
tmp = re * ((re * re) * (-0.16666666666666666d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 1.1e+70) {
tmp = (2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (re * (0.5 + (re * (re * -0.08333333333333333))));
} else if (re <= 1.6e+251) {
tmp = (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * 0.004166666666666667)))) * (re * ((im * im) + 2.0));
} else {
tmp = re * ((re * re) * -0.16666666666666666);
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 1.1e+70: tmp = (2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (re * (0.5 + (re * (re * -0.08333333333333333)))) elif re <= 1.6e+251: tmp = (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * 0.004166666666666667)))) * (re * ((im * im) + 2.0)) else: tmp = re * ((re * re) * -0.16666666666666666) return tmp
function code(re, im) tmp = 0.0 if (re <= 1.1e+70) tmp = Float64(Float64(2.0 + Float64(im * Float64(im * Float64(1.0 + Float64(im * Float64(im * Float64(0.08333333333333333 + Float64(Float64(im * im) * 0.002777777777777778)))))))) * Float64(re * Float64(0.5 + Float64(re * Float64(re * -0.08333333333333333))))); elseif (re <= 1.6e+251) tmp = Float64(Float64(0.5 + Float64(Float64(re * re) * Float64(-0.08333333333333333 + Float64(Float64(re * re) * 0.004166666666666667)))) * Float64(re * Float64(Float64(im * im) + 2.0))); else tmp = Float64(re * Float64(Float64(re * re) * -0.16666666666666666)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 1.1e+70) tmp = (2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (re * (0.5 + (re * (re * -0.08333333333333333)))); elseif (re <= 1.6e+251) tmp = (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * 0.004166666666666667)))) * (re * ((im * im) + 2.0)); else tmp = re * ((re * re) * -0.16666666666666666); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 1.1e+70], N[(N[(2.0 + N[(im * N[(im * N[(1.0 + N[(im * N[(im * N[(0.08333333333333333 + N[(N[(im * im), $MachinePrecision] * 0.002777777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(0.5 + N[(re * N[(re * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.6e+251], N[(N[(0.5 + N[(N[(re * re), $MachinePrecision] * N[(-0.08333333333333333 + N[(N[(re * re), $MachinePrecision] * 0.004166666666666667), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(N[(im * im), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 1.1 \cdot 10^{+70}:\\
\;\;\;\;\left(2 + im \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\right)\right)\right) \cdot \left(re \cdot \left(0.5 + re \cdot \left(re \cdot -0.08333333333333333\right)\right)\right)\\
\mathbf{elif}\;re \leq 1.6 \cdot 10^{+251}:\\
\;\;\;\;\left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + \left(re \cdot re\right) \cdot 0.004166666666666667\right)\right) \cdot \left(re \cdot \left(im \cdot im + 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(\left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
\end{array}
\end{array}
if re < 1.1e70Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6495.0%
Simplified95.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6471.4%
Simplified71.4%
Taylor expanded in re around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Simplified72.8%
if 1.1e70 < re < 1.5999999999999999e251Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6497.8%
Simplified97.8%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6422.4%
Simplified22.4%
Taylor expanded in im around 0
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
Simplified22.4%
if 1.5999999999999999e251 < re Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6456.9%
Simplified56.9%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.6%
Simplified45.6%
Taylor expanded in re around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.6%
Simplified45.6%
Final simplification64.4%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (* re re) -0.16666666666666666)))
(if (<= re 1.1e+70)
(*
re
(*
(+ 1.0 t_0)
(+ 1.0 (* (* im im) (+ 0.5 (* 0.041666666666666664 (* im im)))))))
(if (<= re 1.6e+251)
(*
(+
0.5
(*
(* re re)
(+ -0.08333333333333333 (* (* re re) 0.004166666666666667))))
(* re (+ (* im im) 2.0)))
(* re t_0)))))
double code(double re, double im) {
double t_0 = (re * re) * -0.16666666666666666;
double tmp;
if (re <= 1.1e+70) {
tmp = re * ((1.0 + t_0) * (1.0 + ((im * im) * (0.5 + (0.041666666666666664 * (im * im))))));
} else if (re <= 1.6e+251) {
tmp = (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * 0.004166666666666667)))) * (re * ((im * im) + 2.0));
} else {
tmp = 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 * re) * (-0.16666666666666666d0)
if (re <= 1.1d+70) then
tmp = re * ((1.0d0 + t_0) * (1.0d0 + ((im * im) * (0.5d0 + (0.041666666666666664d0 * (im * im))))))
else if (re <= 1.6d+251) then
tmp = (0.5d0 + ((re * re) * ((-0.08333333333333333d0) + ((re * re) * 0.004166666666666667d0)))) * (re * ((im * im) + 2.0d0))
else
tmp = re * t_0
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = (re * re) * -0.16666666666666666;
double tmp;
if (re <= 1.1e+70) {
tmp = re * ((1.0 + t_0) * (1.0 + ((im * im) * (0.5 + (0.041666666666666664 * (im * im))))));
} else if (re <= 1.6e+251) {
tmp = (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * 0.004166666666666667)))) * (re * ((im * im) + 2.0));
} else {
tmp = re * t_0;
}
return tmp;
}
def code(re, im): t_0 = (re * re) * -0.16666666666666666 tmp = 0 if re <= 1.1e+70: tmp = re * ((1.0 + t_0) * (1.0 + ((im * im) * (0.5 + (0.041666666666666664 * (im * im)))))) elif re <= 1.6e+251: tmp = (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * 0.004166666666666667)))) * (re * ((im * im) + 2.0)) else: tmp = re * t_0 return tmp
function code(re, im) t_0 = Float64(Float64(re * re) * -0.16666666666666666) tmp = 0.0 if (re <= 1.1e+70) tmp = Float64(re * Float64(Float64(1.0 + t_0) * Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + Float64(0.041666666666666664 * Float64(im * im))))))); elseif (re <= 1.6e+251) tmp = Float64(Float64(0.5 + Float64(Float64(re * re) * Float64(-0.08333333333333333 + Float64(Float64(re * re) * 0.004166666666666667)))) * Float64(re * Float64(Float64(im * im) + 2.0))); else tmp = Float64(re * t_0); end return tmp end
function tmp_2 = code(re, im) t_0 = (re * re) * -0.16666666666666666; tmp = 0.0; if (re <= 1.1e+70) tmp = re * ((1.0 + t_0) * (1.0 + ((im * im) * (0.5 + (0.041666666666666664 * (im * im)))))); elseif (re <= 1.6e+251) tmp = (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * 0.004166666666666667)))) * (re * ((im * im) + 2.0)); else tmp = re * t_0; end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]}, If[LessEqual[re, 1.1e+70], N[(re * N[(N[(1.0 + t$95$0), $MachinePrecision] * N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.5 + N[(0.041666666666666664 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.6e+251], N[(N[(0.5 + N[(N[(re * re), $MachinePrecision] * N[(-0.08333333333333333 + N[(N[(re * re), $MachinePrecision] * 0.004166666666666667), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(N[(im * im), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(re \cdot re\right) \cdot -0.16666666666666666\\
\mathbf{if}\;re \leq 1.1 \cdot 10^{+70}:\\
\;\;\;\;re \cdot \left(\left(1 + t\_0\right) \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + 0.041666666666666664 \cdot \left(im \cdot im\right)\right)\right)\right)\\
\mathbf{elif}\;re \leq 1.6 \cdot 10^{+251}:\\
\;\;\;\;\left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + \left(re \cdot re\right) \cdot 0.004166666666666667\right)\right) \cdot \left(re \cdot \left(im \cdot im + 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot t\_0\\
\end{array}
\end{array}
if re < 1.1e70Initial program 100.0%
Taylor expanded in im around 0
+-commutativeN/A
distribute-lft-inN/A
associate-+l+N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft1-inN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
Simplified92.3%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified70.5%
if 1.1e70 < re < 1.5999999999999999e251Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6497.8%
Simplified97.8%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6422.4%
Simplified22.4%
Taylor expanded in im around 0
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
Simplified22.4%
if 1.5999999999999999e251 < re Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6456.9%
Simplified56.9%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.6%
Simplified45.6%
Taylor expanded in re around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.6%
Simplified45.6%
Final simplification62.5%
(FPCore (re im)
:precision binary64
(if (<= re 1.6e+251)
(*
re
(+
1.0
(*
(* im im)
(*
0.5
(+
1.0
(*
im
(*
im
(+ 0.08333333333333333 (* (* im im) 0.002777777777777778)))))))))
(* re (* (* re re) -0.16666666666666666))))
double code(double re, double im) {
double tmp;
if (re <= 1.6e+251) {
tmp = re * (1.0 + ((im * im) * (0.5 * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778))))))));
} else {
tmp = re * ((re * re) * -0.16666666666666666);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 1.6d+251) then
tmp = re * (1.0d0 + ((im * im) * (0.5d0 * (1.0d0 + (im * (im * (0.08333333333333333d0 + ((im * im) * 0.002777777777777778d0))))))))
else
tmp = re * ((re * re) * (-0.16666666666666666d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 1.6e+251) {
tmp = re * (1.0 + ((im * im) * (0.5 * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778))))))));
} else {
tmp = re * ((re * re) * -0.16666666666666666);
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 1.6e+251: tmp = re * (1.0 + ((im * im) * (0.5 * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) else: tmp = re * ((re * re) * -0.16666666666666666) return tmp
function code(re, im) tmp = 0.0 if (re <= 1.6e+251) tmp = Float64(re * Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 * Float64(1.0 + Float64(im * Float64(im * Float64(0.08333333333333333 + Float64(Float64(im * im) * 0.002777777777777778))))))))); else tmp = Float64(re * Float64(Float64(re * re) * -0.16666666666666666)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 1.6e+251) tmp = re * (1.0 + ((im * im) * (0.5 * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))); else tmp = re * ((re * re) * -0.16666666666666666); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 1.6e+251], N[(re * N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.5 * N[(1.0 + N[(im * N[(im * N[(0.08333333333333333 + N[(N[(im * im), $MachinePrecision] * 0.002777777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 1.6 \cdot 10^{+251}:\\
\;\;\;\;re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 \cdot \left(1 + im \cdot \left(im \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(\left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
\end{array}
\end{array}
if re < 1.5999999999999999e251Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6495.5%
Simplified95.5%
Taylor expanded in re around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
distribute-rgt-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
Simplified63.4%
if 1.5999999999999999e251 < re Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6456.9%
Simplified56.9%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.6%
Simplified45.6%
Taylor expanded in re around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.6%
Simplified45.6%
Final simplification62.7%
(FPCore (re im) :precision binary64 (if (<= re 1.6e+251) (* re (+ 1.0 (* (* im im) (+ 0.5 (* 0.041666666666666664 (* im im)))))) (* re (* (* re re) -0.16666666666666666))))
double code(double re, double im) {
double tmp;
if (re <= 1.6e+251) {
tmp = re * (1.0 + ((im * im) * (0.5 + (0.041666666666666664 * (im * im)))));
} else {
tmp = re * ((re * re) * -0.16666666666666666);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 1.6d+251) then
tmp = re * (1.0d0 + ((im * im) * (0.5d0 + (0.041666666666666664d0 * (im * im)))))
else
tmp = re * ((re * re) * (-0.16666666666666666d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 1.6e+251) {
tmp = re * (1.0 + ((im * im) * (0.5 + (0.041666666666666664 * (im * im)))));
} else {
tmp = re * ((re * re) * -0.16666666666666666);
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 1.6e+251: tmp = re * (1.0 + ((im * im) * (0.5 + (0.041666666666666664 * (im * im))))) else: tmp = re * ((re * re) * -0.16666666666666666) return tmp
function code(re, im) tmp = 0.0 if (re <= 1.6e+251) tmp = Float64(re * Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + Float64(0.041666666666666664 * Float64(im * im)))))); else tmp = Float64(re * Float64(Float64(re * re) * -0.16666666666666666)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 1.6e+251) tmp = re * (1.0 + ((im * im) * (0.5 + (0.041666666666666664 * (im * im))))); else tmp = re * ((re * re) * -0.16666666666666666); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 1.6e+251], N[(re * N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.5 + N[(0.041666666666666664 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 1.6 \cdot 10^{+251}:\\
\;\;\;\;re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + 0.041666666666666664 \cdot \left(im \cdot im\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(\left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
\end{array}
\end{array}
if re < 1.5999999999999999e251Initial program 100.0%
Taylor expanded in im around 0
+-commutativeN/A
distribute-lft-inN/A
associate-+l+N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft1-inN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
Simplified92.7%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6461.8%
Simplified61.8%
if 1.5999999999999999e251 < re Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6456.9%
Simplified56.9%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.6%
Simplified45.6%
Taylor expanded in re around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.6%
Simplified45.6%
Final simplification61.2%
(FPCore (re im) :precision binary64 (if (<= re 1.6e+251) (* 0.5 (* re (+ (* im im) 2.0))) (* re (* (* re re) -0.16666666666666666))))
double code(double re, double im) {
double tmp;
if (re <= 1.6e+251) {
tmp = 0.5 * (re * ((im * im) + 2.0));
} else {
tmp = re * ((re * re) * -0.16666666666666666);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 1.6d+251) then
tmp = 0.5d0 * (re * ((im * im) + 2.0d0))
else
tmp = re * ((re * re) * (-0.16666666666666666d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 1.6e+251) {
tmp = 0.5 * (re * ((im * im) + 2.0));
} else {
tmp = re * ((re * re) * -0.16666666666666666);
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 1.6e+251: tmp = 0.5 * (re * ((im * im) + 2.0)) else: tmp = re * ((re * re) * -0.16666666666666666) return tmp
function code(re, im) tmp = 0.0 if (re <= 1.6e+251) tmp = Float64(0.5 * Float64(re * Float64(Float64(im * im) + 2.0))); else tmp = Float64(re * Float64(Float64(re * re) * -0.16666666666666666)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 1.6e+251) tmp = 0.5 * (re * ((im * im) + 2.0)); else tmp = re * ((re * re) * -0.16666666666666666); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 1.6e+251], N[(0.5 * N[(re * N[(N[(im * im), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 1.6 \cdot 10^{+251}:\\
\;\;\;\;0.5 \cdot \left(re \cdot \left(im \cdot im + 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(\left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
\end{array}
\end{array}
if re < 1.5999999999999999e251Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6495.5%
Simplified95.5%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6463.8%
Simplified63.8%
Taylor expanded in im around 0
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
Simplified55.6%
Taylor expanded in re around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6453.3%
Simplified53.3%
if 1.5999999999999999e251 < re Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6456.9%
Simplified56.9%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.6%
Simplified45.6%
Taylor expanded in re around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.6%
Simplified45.6%
Final simplification53.0%
(FPCore (re im) :precision binary64 (if (<= re 250000000000.0) re (* re (* (* re re) -0.16666666666666666))))
double code(double re, double im) {
double tmp;
if (re <= 250000000000.0) {
tmp = re;
} else {
tmp = re * ((re * re) * -0.16666666666666666);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 250000000000.0d0) then
tmp = re
else
tmp = re * ((re * re) * (-0.16666666666666666d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 250000000000.0) {
tmp = re;
} else {
tmp = re * ((re * re) * -0.16666666666666666);
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 250000000000.0: tmp = re else: tmp = re * ((re * re) * -0.16666666666666666) return tmp
function code(re, im) tmp = 0.0 if (re <= 250000000000.0) tmp = re; else tmp = Float64(re * Float64(Float64(re * re) * -0.16666666666666666)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 250000000000.0) tmp = re; else tmp = re * ((re * re) * -0.16666666666666666); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 250000000000.0], re, N[(re * N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 250000000000:\\
\;\;\;\;re\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(\left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
\end{array}
\end{array}
if re < 2.5e11Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6457.5%
Simplified57.5%
Taylor expanded in re around 0
Simplified42.4%
if 2.5e11 < re Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6455.2%
Simplified55.2%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6415.9%
Simplified15.9%
Taylor expanded in re around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6415.9%
Simplified15.9%
(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%
Taylor expanded in im around 0
sin-lowering-sin.f6457.0%
Simplified57.0%
Taylor expanded in re around 0
Simplified33.7%
herbie shell --seed 2024191
(FPCore (re im)
:name "math.sin on complex, real part"
:precision binary64
(* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))