
(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 25 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 (fma (/ 0.5 (exp im)) (sin re) (* 0.5 (* (exp im) (sin re)))))
double code(double re, double im) {
return fma((0.5 / exp(im)), sin(re), (0.5 * (exp(im) * sin(re))));
}
function code(re, im) return fma(Float64(0.5 / exp(im)), sin(re), Float64(0.5 * Float64(exp(im) * sin(re)))) end
code[re_, im_] := N[(N[(0.5 / N[Exp[im], $MachinePrecision]), $MachinePrecision] * N[Sin[re], $MachinePrecision] + N[(0.5 * N[(N[Exp[im], $MachinePrecision] * N[Sin[re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{0.5}{e^{im}}, \sin re, 0.5 \cdot \left(e^{im} \cdot \sin re\right)\right)
\end{array}
Initial program 100.0%
distribute-rgt-inN/A
associate-*r*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
exp-diffN/A
associate-*l/N/A
exp-0N/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
sin-lowering-sin.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
exp-lowering-exp.f64100.0%
Applied egg-rr100.0%
Final simplification100.0%
(FPCore (re im) :precision binary64 (+ (* 0.5 (* (exp im) (sin re))) (/ (* 0.5 (sin re)) (exp im))))
double code(double re, double im) {
return (0.5 * (exp(im) * sin(re))) + ((0.5 * sin(re)) / exp(im));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = (0.5d0 * (exp(im) * sin(re))) + ((0.5d0 * sin(re)) / exp(im))
end function
public static double code(double re, double im) {
return (0.5 * (Math.exp(im) * Math.sin(re))) + ((0.5 * Math.sin(re)) / Math.exp(im));
}
def code(re, im): return (0.5 * (math.exp(im) * math.sin(re))) + ((0.5 * math.sin(re)) / math.exp(im))
function code(re, im) return Float64(Float64(0.5 * Float64(exp(im) * sin(re))) + Float64(Float64(0.5 * sin(re)) / exp(im))) end
function tmp = code(re, im) tmp = (0.5 * (exp(im) * sin(re))) + ((0.5 * sin(re)) / exp(im)); end
code[re_, im_] := N[(N[(0.5 * N[(N[Exp[im], $MachinePrecision] * N[Sin[re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] / N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.5 \cdot \left(e^{im} \cdot \sin re\right) + \frac{0.5 \cdot \sin re}{e^{im}}
\end{array}
Initial program 100.0%
distribute-rgt-inN/A
+-lowering-+.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.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
exp-lowering-exp.f64100.0%
Applied egg-rr100.0%
Final simplification100.0%
(FPCore (re im) :precision binary64 (/ (* 0.5 (sin re)) (/ 1.0 (* 2.0 (cosh im)))))
double code(double re, double im) {
return (0.5 * sin(re)) / (1.0 / (2.0 * cosh(im)));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = (0.5d0 * sin(re)) / (1.0d0 / (2.0d0 * cosh(im)))
end function
public static double code(double re, double im) {
return (0.5 * Math.sin(re)) / (1.0 / (2.0 * Math.cosh(im)));
}
def code(re, im): return (0.5 * math.sin(re)) / (1.0 / (2.0 * math.cosh(im)))
function code(re, im) return Float64(Float64(0.5 * sin(re)) / Float64(1.0 / Float64(2.0 * cosh(im)))) end
function tmp = code(re, im) tmp = (0.5 * sin(re)) / (1.0 / (2.0 * cosh(im))); end
code[re_, im_] := N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[(2.0 * N[Cosh[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.5 \cdot \sin re}{\frac{1}{2 \cdot \cosh im}}
\end{array}
Initial program 100.0%
flip3-+N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
clear-numN/A
exp-0N/A
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
(let* ((t_0
(*
(* im im)
(+ 0.08333333333333333 (* (* im im) 0.002777777777777778))))
(t_1 (* (* im im) (- -1.0 t_0))))
(if (<= im 0.45)
(/
(* (* 0.5 (sin re)) (+ 4.0 (* (* (* im im) (+ 1.0 t_0)) t_1)))
(+ 2.0 t_1))
(if (<= im 7e+51)
(* re (cosh im))
(*
(sin re)
(+
1.0
(* (* im im) (* im (* im (* (* im im) 0.001388888888888889))))))))))
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 tmp;
if (im <= 0.45) {
tmp = ((0.5 * sin(re)) * (4.0 + (((im * im) * (1.0 + t_0)) * t_1))) / (2.0 + t_1);
} else if (im <= 7e+51) {
tmp = re * cosh(im);
} else {
tmp = sin(re) * (1.0 + ((im * im) * (im * (im * ((im * im) * 0.001388888888888889)))));
}
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 * im) * (0.08333333333333333d0 + ((im * im) * 0.002777777777777778d0))
t_1 = (im * im) * ((-1.0d0) - t_0)
if (im <= 0.45d0) then
tmp = ((0.5d0 * sin(re)) * (4.0d0 + (((im * im) * (1.0d0 + t_0)) * t_1))) / (2.0d0 + t_1)
else if (im <= 7d+51) then
tmp = re * cosh(im)
else
tmp = sin(re) * (1.0d0 + ((im * im) * (im * (im * ((im * im) * 0.001388888888888889d0)))))
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 tmp;
if (im <= 0.45) {
tmp = ((0.5 * Math.sin(re)) * (4.0 + (((im * im) * (1.0 + t_0)) * t_1))) / (2.0 + t_1);
} else if (im <= 7e+51) {
tmp = re * Math.cosh(im);
} else {
tmp = Math.sin(re) * (1.0 + ((im * im) * (im * (im * ((im * im) * 0.001388888888888889)))));
}
return tmp;
}
def code(re, im): t_0 = (im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778)) t_1 = (im * im) * (-1.0 - t_0) tmp = 0 if im <= 0.45: tmp = ((0.5 * math.sin(re)) * (4.0 + (((im * im) * (1.0 + t_0)) * t_1))) / (2.0 + t_1) elif im <= 7e+51: tmp = re * math.cosh(im) else: tmp = math.sin(re) * (1.0 + ((im * im) * (im * (im * ((im * im) * 0.001388888888888889))))) return tmp
function code(re, im) t_0 = Float64(Float64(im * im) * Float64(0.08333333333333333 + Float64(Float64(im * im) * 0.002777777777777778))) t_1 = Float64(Float64(im * im) * Float64(-1.0 - t_0)) tmp = 0.0 if (im <= 0.45) tmp = Float64(Float64(Float64(0.5 * sin(re)) * Float64(4.0 + Float64(Float64(Float64(im * im) * Float64(1.0 + t_0)) * t_1))) / Float64(2.0 + t_1)); elseif (im <= 7e+51) tmp = Float64(re * cosh(im)); else tmp = Float64(sin(re) * Float64(1.0 + Float64(Float64(im * im) * Float64(im * Float64(im * Float64(Float64(im * im) * 0.001388888888888889)))))); 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); tmp = 0.0; if (im <= 0.45) tmp = ((0.5 * sin(re)) * (4.0 + (((im * im) * (1.0 + t_0)) * t_1))) / (2.0 + t_1); elseif (im <= 7e+51) tmp = re * cosh(im); else tmp = sin(re) * (1.0 + ((im * im) * (im * (im * ((im * im) * 0.001388888888888889))))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[(im * im), $MachinePrecision] * N[(0.08333333333333333 + N[(N[(im * im), $MachinePrecision] * 0.002777777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(im * im), $MachinePrecision] * N[(-1.0 - t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 0.45], N[(N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(4.0 + N[(N[(N[(im * im), $MachinePrecision] * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 7e+51], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(im * N[(im * N[(N[(im * im), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(im \cdot im\right) \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\\
t_1 := \left(im \cdot im\right) \cdot \left(-1 - t\_0\right)\\
\mathbf{if}\;im \leq 0.45:\\
\;\;\;\;\frac{\left(0.5 \cdot \sin re\right) \cdot \left(4 + \left(\left(im \cdot im\right) \cdot \left(1 + t\_0\right)\right) \cdot t\_1\right)}{2 + t\_1}\\
\mathbf{elif}\;im \leq 7 \cdot 10^{+51}:\\
\;\;\;\;re \cdot \cosh im\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\right)\\
\end{array}
\end{array}
if im < 0.450000000000000011Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-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-*.f6494.1%
Simplified94.1%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr62.9%
if 0.450000000000000011 < im < 7e51Initial 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%
Taylor expanded in re around 0
Simplified84.6%
if 7e51 < im 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
*-lowering-*.f64N/A
unpow2N/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%
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0%
Applied egg-rr100.0%
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-*.f64100.0%
Simplified100.0%
Final simplification71.3%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (* im im) 0.001388888888888889)))
(if (<= im 0.62)
(*
(sin re)
(+ 1.0 (* (* im im) (+ 0.5 (* im (* im (+ t_0 0.041666666666666664)))))))
(if (<= im 7e+51)
(* re (cosh im))
(* (sin re) (+ 1.0 (* (* im im) (* im (* im t_0)))))))))
double code(double re, double im) {
double t_0 = (im * im) * 0.001388888888888889;
double tmp;
if (im <= 0.62) {
tmp = sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * (t_0 + 0.041666666666666664))))));
} else if (im <= 7e+51) {
tmp = re * cosh(im);
} else {
tmp = sin(re) * (1.0 + ((im * im) * (im * (im * 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 * im) * 0.001388888888888889d0
if (im <= 0.62d0) then
tmp = sin(re) * (1.0d0 + ((im * im) * (0.5d0 + (im * (im * (t_0 + 0.041666666666666664d0))))))
else if (im <= 7d+51) then
tmp = re * cosh(im)
else
tmp = sin(re) * (1.0d0 + ((im * im) * (im * (im * t_0))))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = (im * im) * 0.001388888888888889;
double tmp;
if (im <= 0.62) {
tmp = Math.sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * (t_0 + 0.041666666666666664))))));
} else if (im <= 7e+51) {
tmp = re * Math.cosh(im);
} else {
tmp = Math.sin(re) * (1.0 + ((im * im) * (im * (im * t_0))));
}
return tmp;
}
def code(re, im): t_0 = (im * im) * 0.001388888888888889 tmp = 0 if im <= 0.62: tmp = math.sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * (t_0 + 0.041666666666666664)))))) elif im <= 7e+51: tmp = re * math.cosh(im) else: tmp = math.sin(re) * (1.0 + ((im * im) * (im * (im * t_0)))) return tmp
function code(re, im) t_0 = Float64(Float64(im * im) * 0.001388888888888889) tmp = 0.0 if (im <= 0.62) tmp = Float64(sin(re) * Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + Float64(im * Float64(im * Float64(t_0 + 0.041666666666666664))))))); elseif (im <= 7e+51) tmp = Float64(re * cosh(im)); else tmp = Float64(sin(re) * Float64(1.0 + Float64(Float64(im * im) * Float64(im * Float64(im * t_0))))); end return tmp end
function tmp_2 = code(re, im) t_0 = (im * im) * 0.001388888888888889; tmp = 0.0; if (im <= 0.62) tmp = sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * (t_0 + 0.041666666666666664)))))); elseif (im <= 7e+51) tmp = re * cosh(im); else tmp = sin(re) * (1.0 + ((im * im) * (im * (im * t_0)))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[(im * im), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]}, If[LessEqual[im, 0.62], N[(N[Sin[re], $MachinePrecision] * N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.5 + N[(im * N[(im * N[(t$95$0 + 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 7e+51], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(im * N[(im * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(im \cdot im\right) \cdot 0.001388888888888889\\
\mathbf{if}\;im \leq 0.62:\\
\;\;\;\;\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + im \cdot \left(im \cdot \left(t\_0 + 0.041666666666666664\right)\right)\right)\right)\\
\mathbf{elif}\;im \leq 7 \cdot 10^{+51}:\\
\;\;\;\;re \cdot \cosh im\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(im \cdot \left(im \cdot t\_0\right)\right)\right)\\
\end{array}
\end{array}
if im < 0.619999999999999996Initial 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
*-lowering-*.f64N/A
unpow2N/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.1%
Simplified94.1%
if 0.619999999999999996 < im < 7e51Initial 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%
Taylor expanded in re around 0
Simplified84.6%
if 7e51 < im 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
*-lowering-*.f64N/A
unpow2N/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%
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0%
Applied egg-rr100.0%
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-*.f64100.0%
Simplified100.0%
Final simplification94.8%
(FPCore (re im)
:precision binary64
(if (<= im 0.12)
(*
(sin re)
(+ 1.0 (* (* im im) (+ 0.5 (* (* im im) 0.041666666666666664)))))
(if (<= im 7e+51)
(* re (cosh im))
(*
(sin re)
(+
1.0
(* (* im im) (* im (* im (* (* im im) 0.001388888888888889)))))))))
double code(double re, double im) {
double tmp;
if (im <= 0.12) {
tmp = sin(re) * (1.0 + ((im * im) * (0.5 + ((im * im) * 0.041666666666666664))));
} else if (im <= 7e+51) {
tmp = re * cosh(im);
} else {
tmp = sin(re) * (1.0 + ((im * im) * (im * (im * ((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 (im <= 0.12d0) then
tmp = sin(re) * (1.0d0 + ((im * im) * (0.5d0 + ((im * im) * 0.041666666666666664d0))))
else if (im <= 7d+51) then
tmp = re * cosh(im)
else
tmp = sin(re) * (1.0d0 + ((im * im) * (im * (im * ((im * im) * 0.001388888888888889d0)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 0.12) {
tmp = Math.sin(re) * (1.0 + ((im * im) * (0.5 + ((im * im) * 0.041666666666666664))));
} else if (im <= 7e+51) {
tmp = re * Math.cosh(im);
} else {
tmp = Math.sin(re) * (1.0 + ((im * im) * (im * (im * ((im * im) * 0.001388888888888889)))));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 0.12: tmp = math.sin(re) * (1.0 + ((im * im) * (0.5 + ((im * im) * 0.041666666666666664)))) elif im <= 7e+51: tmp = re * math.cosh(im) else: tmp = math.sin(re) * (1.0 + ((im * im) * (im * (im * ((im * im) * 0.001388888888888889))))) return tmp
function code(re, im) tmp = 0.0 if (im <= 0.12) tmp = Float64(sin(re) * Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + Float64(Float64(im * im) * 0.041666666666666664))))); elseif (im <= 7e+51) tmp = Float64(re * cosh(im)); else tmp = Float64(sin(re) * Float64(1.0 + Float64(Float64(im * im) * Float64(im * Float64(im * Float64(Float64(im * im) * 0.001388888888888889)))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 0.12) tmp = sin(re) * (1.0 + ((im * im) * (0.5 + ((im * im) * 0.041666666666666664)))); elseif (im <= 7e+51) tmp = re * cosh(im); else tmp = sin(re) * (1.0 + ((im * im) * (im * (im * ((im * im) * 0.001388888888888889))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 0.12], N[(N[Sin[re], $MachinePrecision] * N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.5 + N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 7e+51], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(im * N[(im * N[(N[(im * im), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 0.12:\\
\;\;\;\;\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\\
\mathbf{elif}\;im \leq 7 \cdot 10^{+51}:\\
\;\;\;\;re \cdot \cosh im\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\right)\\
\end{array}
\end{array}
if im < 0.12Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified91.1%
if 0.12 < im < 7e51Initial 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%
Taylor expanded in re around 0
Simplified84.6%
if 7e51 < im 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
*-lowering-*.f64N/A
unpow2N/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%
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0%
Applied egg-rr100.0%
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-*.f64100.0%
Simplified100.0%
Final simplification92.5%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (* 0.5 (sin re)) (+ 2.0 (* im im)))))
(if (<= im 0.041)
t_0
(if (<= im 5e+76)
(* re (cosh im))
(if (<= im 1.35e+154)
(*
(+ 1.0 (* (* im im) (+ 0.5 (* (* im im) 0.041666666666666664))))
(*
re
(+
1.0
(*
re
(*
re
(+
-0.16666666666666666
(*
(* re re)
(+
0.008333333333333333
(* (* re re) -0.0001984126984126984)))))))))
t_0)))))
double code(double re, double im) {
double t_0 = (0.5 * sin(re)) * (2.0 + (im * im));
double tmp;
if (im <= 0.041) {
tmp = t_0;
} else if (im <= 5e+76) {
tmp = re * cosh(im);
} else if (im <= 1.35e+154) {
tmp = (1.0 + ((im * im) * (0.5 + ((im * im) * 0.041666666666666664)))) * (re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * (0.008333333333333333 + ((re * re) * -0.0001984126984126984))))))));
} else {
tmp = 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 = (0.5d0 * sin(re)) * (2.0d0 + (im * im))
if (im <= 0.041d0) then
tmp = t_0
else if (im <= 5d+76) then
tmp = re * cosh(im)
else if (im <= 1.35d+154) then
tmp = (1.0d0 + ((im * im) * (0.5d0 + ((im * im) * 0.041666666666666664d0)))) * (re * (1.0d0 + (re * (re * ((-0.16666666666666666d0) + ((re * re) * (0.008333333333333333d0 + ((re * re) * (-0.0001984126984126984d0)))))))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = (0.5 * Math.sin(re)) * (2.0 + (im * im));
double tmp;
if (im <= 0.041) {
tmp = t_0;
} else if (im <= 5e+76) {
tmp = re * Math.cosh(im);
} else if (im <= 1.35e+154) {
tmp = (1.0 + ((im * im) * (0.5 + ((im * im) * 0.041666666666666664)))) * (re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * (0.008333333333333333 + ((re * re) * -0.0001984126984126984))))))));
} else {
tmp = t_0;
}
return tmp;
}
def code(re, im): t_0 = (0.5 * math.sin(re)) * (2.0 + (im * im)) tmp = 0 if im <= 0.041: tmp = t_0 elif im <= 5e+76: tmp = re * math.cosh(im) elif im <= 1.35e+154: tmp = (1.0 + ((im * im) * (0.5 + ((im * im) * 0.041666666666666664)))) * (re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))) else: tmp = t_0 return tmp
function code(re, im) t_0 = Float64(Float64(0.5 * sin(re)) * Float64(2.0 + Float64(im * im))) tmp = 0.0 if (im <= 0.041) tmp = t_0; elseif (im <= 5e+76) tmp = Float64(re * cosh(im)); elseif (im <= 1.35e+154) tmp = Float64(Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + Float64(Float64(im * im) * 0.041666666666666664)))) * Float64(re * Float64(1.0 + Float64(re * Float64(re * Float64(-0.16666666666666666 + Float64(Float64(re * re) * Float64(0.008333333333333333 + Float64(Float64(re * re) * -0.0001984126984126984))))))))); else tmp = t_0; end return tmp end
function tmp_2 = code(re, im) t_0 = (0.5 * sin(re)) * (2.0 + (im * im)); tmp = 0.0; if (im <= 0.041) tmp = t_0; elseif (im <= 5e+76) tmp = re * cosh(im); elseif (im <= 1.35e+154) tmp = (1.0 + ((im * im) * (0.5 + ((im * im) * 0.041666666666666664)))) * (re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))); else tmp = t_0; end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 0.041], t$95$0, If[LessEqual[im, 5e+76], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 1.35e+154], N[(N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.5 + N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(1.0 + N[(re * N[(re * N[(-0.16666666666666666 + N[(N[(re * re), $MachinePrecision] * N[(0.008333333333333333 + N[(N[(re * re), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(0.5 \cdot \sin re\right) \cdot \left(2 + im \cdot im\right)\\
\mathbf{if}\;im \leq 0.041:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;im \leq 5 \cdot 10^{+76}:\\
\;\;\;\;re \cdot \cosh im\\
\mathbf{elif}\;im \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right) \cdot \left(re \cdot \left(1 + re \cdot \left(re \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot \left(0.008333333333333333 + \left(re \cdot re\right) \cdot -0.0001984126984126984\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if im < 0.0410000000000000017 or 1.35000000000000003e154 < im Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6482.2%
Simplified82.2%
if 0.0410000000000000017 < im < 4.99999999999999991e76Initial 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%
Taylor expanded in re around 0
Simplified85.0%
if 4.99999999999999991e76 < im < 1.35000000000000003e154Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification83.0%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (* im im) 0.041666666666666664)))
(if (<= im 0.18)
(* (sin re) (+ 1.0 (* (* im im) (+ 0.5 t_0))))
(if (<= im 2.6e+77) (* re (cosh im)) (* (sin re) (* im (* im t_0)))))))
double code(double re, double im) {
double t_0 = (im * im) * 0.041666666666666664;
double tmp;
if (im <= 0.18) {
tmp = sin(re) * (1.0 + ((im * im) * (0.5 + t_0)));
} else if (im <= 2.6e+77) {
tmp = re * cosh(im);
} else {
tmp = sin(re) * (im * (im * 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 * im) * 0.041666666666666664d0
if (im <= 0.18d0) then
tmp = sin(re) * (1.0d0 + ((im * im) * (0.5d0 + t_0)))
else if (im <= 2.6d+77) then
tmp = re * cosh(im)
else
tmp = sin(re) * (im * (im * t_0))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = (im * im) * 0.041666666666666664;
double tmp;
if (im <= 0.18) {
tmp = Math.sin(re) * (1.0 + ((im * im) * (0.5 + t_0)));
} else if (im <= 2.6e+77) {
tmp = re * Math.cosh(im);
} else {
tmp = Math.sin(re) * (im * (im * t_0));
}
return tmp;
}
def code(re, im): t_0 = (im * im) * 0.041666666666666664 tmp = 0 if im <= 0.18: tmp = math.sin(re) * (1.0 + ((im * im) * (0.5 + t_0))) elif im <= 2.6e+77: tmp = re * math.cosh(im) else: tmp = math.sin(re) * (im * (im * t_0)) return tmp
function code(re, im) t_0 = Float64(Float64(im * im) * 0.041666666666666664) tmp = 0.0 if (im <= 0.18) tmp = Float64(sin(re) * Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + t_0)))); elseif (im <= 2.6e+77) tmp = Float64(re * cosh(im)); else tmp = Float64(sin(re) * Float64(im * Float64(im * t_0))); end return tmp end
function tmp_2 = code(re, im) t_0 = (im * im) * 0.041666666666666664; tmp = 0.0; if (im <= 0.18) tmp = sin(re) * (1.0 + ((im * im) * (0.5 + t_0))); elseif (im <= 2.6e+77) tmp = re * cosh(im); else tmp = sin(re) * (im * (im * t_0)); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]}, If[LessEqual[im, 0.18], N[(N[Sin[re], $MachinePrecision] * N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.5 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 2.6e+77], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * N[(im * N[(im * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(im \cdot im\right) \cdot 0.041666666666666664\\
\mathbf{if}\;im \leq 0.18:\\
\;\;\;\;\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + t\_0\right)\right)\\
\mathbf{elif}\;im \leq 2.6 \cdot 10^{+77}:\\
\;\;\;\;re \cdot \cosh im\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot \left(im \cdot \left(im \cdot t\_0\right)\right)\\
\end{array}
\end{array}
if im < 0.17999999999999999Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified91.1%
if 0.17999999999999999 < im < 2.6000000000000002e77Initial 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%
Taylor expanded in re around 0
Simplified85.0%
if 2.6000000000000002e77 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/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%
(FPCore (re im)
:precision binary64
(if (<= im 0.1)
(* (* 0.5 (sin re)) (+ 2.0 (* im im)))
(if (<= im 2.6e+77)
(* re (cosh im))
(* (sin re) (* im (* im (* (* im im) 0.041666666666666664)))))))
double code(double re, double im) {
double tmp;
if (im <= 0.1) {
tmp = (0.5 * sin(re)) * (2.0 + (im * im));
} else if (im <= 2.6e+77) {
tmp = re * cosh(im);
} else {
tmp = sin(re) * (im * (im * ((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 (im <= 0.1d0) then
tmp = (0.5d0 * sin(re)) * (2.0d0 + (im * im))
else if (im <= 2.6d+77) then
tmp = re * cosh(im)
else
tmp = sin(re) * (im * (im * ((im * im) * 0.041666666666666664d0)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 0.1) {
tmp = (0.5 * Math.sin(re)) * (2.0 + (im * im));
} else if (im <= 2.6e+77) {
tmp = re * Math.cosh(im);
} else {
tmp = Math.sin(re) * (im * (im * ((im * im) * 0.041666666666666664)));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 0.1: tmp = (0.5 * math.sin(re)) * (2.0 + (im * im)) elif im <= 2.6e+77: tmp = re * math.cosh(im) else: tmp = math.sin(re) * (im * (im * ((im * im) * 0.041666666666666664))) return tmp
function code(re, im) tmp = 0.0 if (im <= 0.1) tmp = Float64(Float64(0.5 * sin(re)) * Float64(2.0 + Float64(im * im))); elseif (im <= 2.6e+77) tmp = Float64(re * cosh(im)); else tmp = Float64(sin(re) * Float64(im * Float64(im * Float64(Float64(im * im) * 0.041666666666666664)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 0.1) tmp = (0.5 * sin(re)) * (2.0 + (im * im)); elseif (im <= 2.6e+77) tmp = re * cosh(im); else tmp = sin(re) * (im * (im * ((im * im) * 0.041666666666666664))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 0.1], N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 2.6e+77], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * N[(im * N[(im * N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 0.1:\\
\;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(2 + im \cdot im\right)\\
\mathbf{elif}\;im \leq 2.6 \cdot 10^{+77}:\\
\;\;\;\;re \cdot \cosh im\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot \left(im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\
\end{array}
\end{array}
if im < 0.10000000000000001Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6479.0%
Simplified79.0%
if 0.10000000000000001 < im < 2.6000000000000002e77Initial 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%
Taylor expanded in re around 0
Simplified85.0%
if 2.6000000000000002e77 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/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%
(FPCore (re im)
:precision binary64
(if (<= im 2.2e-5)
(sin re)
(if (<= im 5e+76)
(* re (cosh im))
(*
(* (* im im) (* im im))
(*
re
(+
0.041666666666666664
(* 0.041666666666666664 (* -0.16666666666666666 (* re re)))))))))
double code(double re, double im) {
double tmp;
if (im <= 2.2e-5) {
tmp = sin(re);
} else if (im <= 5e+76) {
tmp = re * cosh(im);
} else {
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (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 <= 2.2d-5) then
tmp = sin(re)
else if (im <= 5d+76) then
tmp = re * cosh(im)
else
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664d0 + (0.041666666666666664d0 * ((-0.16666666666666666d0) * (re * re)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 2.2e-5) {
tmp = Math.sin(re);
} else if (im <= 5e+76) {
tmp = re * Math.cosh(im);
} else {
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re)))));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 2.2e-5: tmp = math.sin(re) elif im <= 5e+76: tmp = re * math.cosh(im) else: tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re))))) return tmp
function code(re, im) tmp = 0.0 if (im <= 2.2e-5) tmp = sin(re); elseif (im <= 5e+76) tmp = Float64(re * cosh(im)); else tmp = Float64(Float64(Float64(im * im) * Float64(im * im)) * Float64(re * Float64(0.041666666666666664 + Float64(0.041666666666666664 * Float64(-0.16666666666666666 * Float64(re * re)))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 2.2e-5) tmp = sin(re); elseif (im <= 5e+76) tmp = re * cosh(im); else tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 2.2e-5], N[Sin[re], $MachinePrecision], If[LessEqual[im, 5e+76], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], N[(N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision] * N[(re * N[(0.041666666666666664 + N[(0.041666666666666664 * N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 2.2 \cdot 10^{-5}:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 5 \cdot 10^{+76}:\\
\;\;\;\;re \cdot \cosh im\\
\mathbf{else}:\\
\;\;\;\;\left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right) \cdot \left(re \cdot \left(0.041666666666666664 + 0.041666666666666664 \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\right)\\
\end{array}
\end{array}
if im < 2.1999999999999999e-5Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6461.4%
Simplified61.4%
if 2.1999999999999999e-5 < im < 4.99999999999999991e76Initial 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
Simplified85.6%
if 4.99999999999999991e76 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.0%
Simplified86.0%
Taylor expanded in im around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.0%
Simplified86.0%
(FPCore (re im)
:precision binary64
(if (<= im 1.15e-5)
(sin re)
(if (<= im 5e+77)
(*
(* 0.5 re)
(+
2.0
(/
(*
(* im im)
(-
1.0
(*
(* im im)
(*
(* im im)
(+
0.006944444444444444
(*
im
(*
im
(+
0.000462962962962963
(* (* im im) 7.71604938271605e-6)))))))))
(-
1.0
(*
(* im im)
(+ 0.08333333333333333 (* im (* im 0.002777777777777778))))))))
(*
(* (* im im) (* im im))
(*
re
(+
0.041666666666666664
(* 0.041666666666666664 (* -0.16666666666666666 (* re re)))))))))
double code(double re, double im) {
double tmp;
if (im <= 1.15e-5) {
tmp = sin(re);
} else if (im <= 5e+77) {
tmp = (0.5 * re) * (2.0 + (((im * im) * (1.0 - ((im * im) * ((im * im) * (0.006944444444444444 + (im * (im * (0.000462962962962963 + ((im * im) * 7.71604938271605e-6))))))))) / (1.0 - ((im * im) * (0.08333333333333333 + (im * (im * 0.002777777777777778)))))));
} else {
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (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 <= 1.15d-5) then
tmp = sin(re)
else if (im <= 5d+77) then
tmp = (0.5d0 * re) * (2.0d0 + (((im * im) * (1.0d0 - ((im * im) * ((im * im) * (0.006944444444444444d0 + (im * (im * (0.000462962962962963d0 + ((im * im) * 7.71604938271605d-6))))))))) / (1.0d0 - ((im * im) * (0.08333333333333333d0 + (im * (im * 0.002777777777777778d0)))))))
else
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664d0 + (0.041666666666666664d0 * ((-0.16666666666666666d0) * (re * re)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 1.15e-5) {
tmp = Math.sin(re);
} else if (im <= 5e+77) {
tmp = (0.5 * re) * (2.0 + (((im * im) * (1.0 - ((im * im) * ((im * im) * (0.006944444444444444 + (im * (im * (0.000462962962962963 + ((im * im) * 7.71604938271605e-6))))))))) / (1.0 - ((im * im) * (0.08333333333333333 + (im * (im * 0.002777777777777778)))))));
} else {
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re)))));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 1.15e-5: tmp = math.sin(re) elif im <= 5e+77: tmp = (0.5 * re) * (2.0 + (((im * im) * (1.0 - ((im * im) * ((im * im) * (0.006944444444444444 + (im * (im * (0.000462962962962963 + ((im * im) * 7.71604938271605e-6))))))))) / (1.0 - ((im * im) * (0.08333333333333333 + (im * (im * 0.002777777777777778))))))) else: tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re))))) return tmp
function code(re, im) tmp = 0.0 if (im <= 1.15e-5) tmp = sin(re); elseif (im <= 5e+77) tmp = Float64(Float64(0.5 * re) * Float64(2.0 + Float64(Float64(Float64(im * im) * Float64(1.0 - Float64(Float64(im * im) * Float64(Float64(im * im) * Float64(0.006944444444444444 + Float64(im * Float64(im * Float64(0.000462962962962963 + Float64(Float64(im * im) * 7.71604938271605e-6))))))))) / Float64(1.0 - Float64(Float64(im * im) * Float64(0.08333333333333333 + Float64(im * Float64(im * 0.002777777777777778)))))))); else tmp = Float64(Float64(Float64(im * im) * Float64(im * im)) * Float64(re * Float64(0.041666666666666664 + Float64(0.041666666666666664 * Float64(-0.16666666666666666 * Float64(re * re)))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 1.15e-5) tmp = sin(re); elseif (im <= 5e+77) tmp = (0.5 * re) * (2.0 + (((im * im) * (1.0 - ((im * im) * ((im * im) * (0.006944444444444444 + (im * (im * (0.000462962962962963 + ((im * im) * 7.71604938271605e-6))))))))) / (1.0 - ((im * im) * (0.08333333333333333 + (im * (im * 0.002777777777777778))))))); else tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 1.15e-5], N[Sin[re], $MachinePrecision], If[LessEqual[im, 5e+77], N[(N[(0.5 * re), $MachinePrecision] * N[(2.0 + N[(N[(N[(im * im), $MachinePrecision] * N[(1.0 - N[(N[(im * im), $MachinePrecision] * N[(N[(im * im), $MachinePrecision] * N[(0.006944444444444444 + N[(im * N[(im * N[(0.000462962962962963 + N[(N[(im * im), $MachinePrecision] * 7.71604938271605e-6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - N[(N[(im * im), $MachinePrecision] * N[(0.08333333333333333 + N[(im * N[(im * 0.002777777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision] * N[(re * N[(0.041666666666666664 + N[(0.041666666666666664 * N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 1.15 \cdot 10^{-5}:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 5 \cdot 10^{+77}:\\
\;\;\;\;\left(0.5 \cdot re\right) \cdot \left(2 + \frac{\left(im \cdot im\right) \cdot \left(1 - \left(im \cdot im\right) \cdot \left(\left(im \cdot im\right) \cdot \left(0.006944444444444444 + im \cdot \left(im \cdot \left(0.000462962962962963 + \left(im \cdot im\right) \cdot 7.71604938271605 \cdot 10^{-6}\right)\right)\right)\right)\right)}{1 - \left(im \cdot im\right) \cdot \left(0.08333333333333333 + im \cdot \left(im \cdot 0.002777777777777778\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right) \cdot \left(re \cdot \left(0.041666666666666664 + 0.041666666666666664 \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\right)\\
\end{array}
\end{array}
if im < 1.15e-5Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6461.4%
Simplified61.4%
if 1.15e-5 < im < 5.00000000000000004e77Initial program 99.9%
Taylor expanded in im around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-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-*.f6440.5%
Simplified40.5%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6435.5%
Simplified35.5%
*-commutativeN/A
associate-*r*N/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr53.5%
Taylor expanded in im around 0
*-lowering-*.f64N/A
unpow2N/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-*.f6453.5%
Simplified53.5%
if 5.00000000000000004e77 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.0%
Simplified86.0%
Taylor expanded in im around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.0%
Simplified86.0%
Final simplification64.9%
(FPCore (re im)
:precision binary64
(if (<= im 2.5e+77)
(*
(* 0.5 re)
(+
2.0
(/
(*
(* im im)
(-
1.0
(*
(* im im)
(*
(* im im)
(+
0.006944444444444444
(*
im
(*
im
(+ 0.000462962962962963 (* (* im im) 7.71604938271605e-6)))))))))
(-
1.0
(*
(* im im)
(+ 0.08333333333333333 (* im (* im 0.002777777777777778))))))))
(*
(* (* im im) (* im im))
(*
re
(+
0.041666666666666664
(* 0.041666666666666664 (* -0.16666666666666666 (* re re))))))))
double code(double re, double im) {
double tmp;
if (im <= 2.5e+77) {
tmp = (0.5 * re) * (2.0 + (((im * im) * (1.0 - ((im * im) * ((im * im) * (0.006944444444444444 + (im * (im * (0.000462962962962963 + ((im * im) * 7.71604938271605e-6))))))))) / (1.0 - ((im * im) * (0.08333333333333333 + (im * (im * 0.002777777777777778)))))));
} else {
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (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 <= 2.5d+77) then
tmp = (0.5d0 * re) * (2.0d0 + (((im * im) * (1.0d0 - ((im * im) * ((im * im) * (0.006944444444444444d0 + (im * (im * (0.000462962962962963d0 + ((im * im) * 7.71604938271605d-6))))))))) / (1.0d0 - ((im * im) * (0.08333333333333333d0 + (im * (im * 0.002777777777777778d0)))))))
else
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664d0 + (0.041666666666666664d0 * ((-0.16666666666666666d0) * (re * re)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 2.5e+77) {
tmp = (0.5 * re) * (2.0 + (((im * im) * (1.0 - ((im * im) * ((im * im) * (0.006944444444444444 + (im * (im * (0.000462962962962963 + ((im * im) * 7.71604938271605e-6))))))))) / (1.0 - ((im * im) * (0.08333333333333333 + (im * (im * 0.002777777777777778)))))));
} else {
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re)))));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 2.5e+77: tmp = (0.5 * re) * (2.0 + (((im * im) * (1.0 - ((im * im) * ((im * im) * (0.006944444444444444 + (im * (im * (0.000462962962962963 + ((im * im) * 7.71604938271605e-6))))))))) / (1.0 - ((im * im) * (0.08333333333333333 + (im * (im * 0.002777777777777778))))))) else: tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re))))) return tmp
function code(re, im) tmp = 0.0 if (im <= 2.5e+77) tmp = Float64(Float64(0.5 * re) * Float64(2.0 + Float64(Float64(Float64(im * im) * Float64(1.0 - Float64(Float64(im * im) * Float64(Float64(im * im) * Float64(0.006944444444444444 + Float64(im * Float64(im * Float64(0.000462962962962963 + Float64(Float64(im * im) * 7.71604938271605e-6))))))))) / Float64(1.0 - Float64(Float64(im * im) * Float64(0.08333333333333333 + Float64(im * Float64(im * 0.002777777777777778)))))))); else tmp = Float64(Float64(Float64(im * im) * Float64(im * im)) * Float64(re * Float64(0.041666666666666664 + Float64(0.041666666666666664 * Float64(-0.16666666666666666 * Float64(re * re)))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 2.5e+77) tmp = (0.5 * re) * (2.0 + (((im * im) * (1.0 - ((im * im) * ((im * im) * (0.006944444444444444 + (im * (im * (0.000462962962962963 + ((im * im) * 7.71604938271605e-6))))))))) / (1.0 - ((im * im) * (0.08333333333333333 + (im * (im * 0.002777777777777778))))))); else tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 2.5e+77], N[(N[(0.5 * re), $MachinePrecision] * N[(2.0 + N[(N[(N[(im * im), $MachinePrecision] * N[(1.0 - N[(N[(im * im), $MachinePrecision] * N[(N[(im * im), $MachinePrecision] * N[(0.006944444444444444 + N[(im * N[(im * N[(0.000462962962962963 + N[(N[(im * im), $MachinePrecision] * 7.71604938271605e-6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - N[(N[(im * im), $MachinePrecision] * N[(0.08333333333333333 + N[(im * N[(im * 0.002777777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision] * N[(re * N[(0.041666666666666664 + N[(0.041666666666666664 * N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 2.5 \cdot 10^{+77}:\\
\;\;\;\;\left(0.5 \cdot re\right) \cdot \left(2 + \frac{\left(im \cdot im\right) \cdot \left(1 - \left(im \cdot im\right) \cdot \left(\left(im \cdot im\right) \cdot \left(0.006944444444444444 + im \cdot \left(im \cdot \left(0.000462962962962963 + \left(im \cdot im\right) \cdot 7.71604938271605 \cdot 10^{-6}\right)\right)\right)\right)\right)}{1 - \left(im \cdot im\right) \cdot \left(0.08333333333333333 + im \cdot \left(im \cdot 0.002777777777777778\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right) \cdot \left(re \cdot \left(0.041666666666666664 + 0.041666666666666664 \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\right)\\
\end{array}
\end{array}
if im < 2.50000000000000002e77Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-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-*.f6488.8%
Simplified88.8%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6454.1%
Simplified54.1%
*-commutativeN/A
associate-*r*N/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr37.1%
Taylor expanded in im around 0
*-lowering-*.f64N/A
unpow2N/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-*.f6437.1%
Simplified37.1%
if 2.50000000000000002e77 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.0%
Simplified86.0%
Taylor expanded in im around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.0%
Simplified86.0%
Final simplification45.3%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* im (* im im))) (t_1 (* im (* im 0.002777777777777778))))
(if (<= im 2.1e+78)
(*
(* 0.5 re)
(+
2.0
(*
(* im im)
(+
1.0
(/
(*
(* im im)
(+ 0.0005787037037037037 (* t_0 (* t_0 2.1433470507544582e-8))))
(+ 0.006944444444444444 (* t_1 (- t_1 0.08333333333333333))))))))
(*
(* (* im im) (* im im))
(*
re
(+
0.041666666666666664
(* 0.041666666666666664 (* -0.16666666666666666 (* re re)))))))))
double code(double re, double im) {
double t_0 = im * (im * im);
double t_1 = im * (im * 0.002777777777777778);
double tmp;
if (im <= 2.1e+78) {
tmp = (0.5 * re) * (2.0 + ((im * im) * (1.0 + (((im * im) * (0.0005787037037037037 + (t_0 * (t_0 * 2.1433470507544582e-8)))) / (0.006944444444444444 + (t_1 * (t_1 - 0.08333333333333333)))))));
} else {
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re)))));
}
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 * (im * im)
t_1 = im * (im * 0.002777777777777778d0)
if (im <= 2.1d+78) then
tmp = (0.5d0 * re) * (2.0d0 + ((im * im) * (1.0d0 + (((im * im) * (0.0005787037037037037d0 + (t_0 * (t_0 * 2.1433470507544582d-8)))) / (0.006944444444444444d0 + (t_1 * (t_1 - 0.08333333333333333d0)))))))
else
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664d0 + (0.041666666666666664d0 * ((-0.16666666666666666d0) * (re * re)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = im * (im * im);
double t_1 = im * (im * 0.002777777777777778);
double tmp;
if (im <= 2.1e+78) {
tmp = (0.5 * re) * (2.0 + ((im * im) * (1.0 + (((im * im) * (0.0005787037037037037 + (t_0 * (t_0 * 2.1433470507544582e-8)))) / (0.006944444444444444 + (t_1 * (t_1 - 0.08333333333333333)))))));
} else {
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re)))));
}
return tmp;
}
def code(re, im): t_0 = im * (im * im) t_1 = im * (im * 0.002777777777777778) tmp = 0 if im <= 2.1e+78: tmp = (0.5 * re) * (2.0 + ((im * im) * (1.0 + (((im * im) * (0.0005787037037037037 + (t_0 * (t_0 * 2.1433470507544582e-8)))) / (0.006944444444444444 + (t_1 * (t_1 - 0.08333333333333333))))))) else: tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re))))) return tmp
function code(re, im) t_0 = Float64(im * Float64(im * im)) t_1 = Float64(im * Float64(im * 0.002777777777777778)) tmp = 0.0 if (im <= 2.1e+78) tmp = Float64(Float64(0.5 * re) * Float64(2.0 + Float64(Float64(im * im) * Float64(1.0 + Float64(Float64(Float64(im * im) * Float64(0.0005787037037037037 + Float64(t_0 * Float64(t_0 * 2.1433470507544582e-8)))) / Float64(0.006944444444444444 + Float64(t_1 * Float64(t_1 - 0.08333333333333333)))))))); else tmp = Float64(Float64(Float64(im * im) * Float64(im * im)) * Float64(re * Float64(0.041666666666666664 + Float64(0.041666666666666664 * Float64(-0.16666666666666666 * Float64(re * re)))))); end return tmp end
function tmp_2 = code(re, im) t_0 = im * (im * im); t_1 = im * (im * 0.002777777777777778); tmp = 0.0; if (im <= 2.1e+78) tmp = (0.5 * re) * (2.0 + ((im * im) * (1.0 + (((im * im) * (0.0005787037037037037 + (t_0 * (t_0 * 2.1433470507544582e-8)))) / (0.006944444444444444 + (t_1 * (t_1 - 0.08333333333333333))))))); else tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re))))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(im * N[(im * im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(im * N[(im * 0.002777777777777778), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 2.1e+78], N[(N[(0.5 * re), $MachinePrecision] * N[(2.0 + N[(N[(im * im), $MachinePrecision] * N[(1.0 + N[(N[(N[(im * im), $MachinePrecision] * N[(0.0005787037037037037 + N[(t$95$0 * N[(t$95$0 * 2.1433470507544582e-8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.006944444444444444 + N[(t$95$1 * N[(t$95$1 - 0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision] * N[(re * N[(0.041666666666666664 + N[(0.041666666666666664 * N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := im \cdot \left(im \cdot im\right)\\
t_1 := im \cdot \left(im \cdot 0.002777777777777778\right)\\
\mathbf{if}\;im \leq 2.1 \cdot 10^{+78}:\\
\;\;\;\;\left(0.5 \cdot re\right) \cdot \left(2 + \left(im \cdot im\right) \cdot \left(1 + \frac{\left(im \cdot im\right) \cdot \left(0.0005787037037037037 + t\_0 \cdot \left(t\_0 \cdot 2.1433470507544582 \cdot 10^{-8}\right)\right)}{0.006944444444444444 + t\_1 \cdot \left(t\_1 - 0.08333333333333333\right)}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right) \cdot \left(re \cdot \left(0.041666666666666664 + 0.041666666666666664 \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\right)\\
\end{array}
\end{array}
if im < 2.1000000000000001e78Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-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-*.f6488.8%
Simplified88.8%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6454.1%
Simplified54.1%
*-commutativeN/A
flip3-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr36.6%
if 2.1000000000000001e78 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.0%
Simplified86.0%
Taylor expanded in im around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.0%
Simplified86.0%
Final simplification44.9%
(FPCore (re im)
:precision binary64
(if (<= im 3.8e+77)
(*
(* 0.5 re)
(+
2.0
(/
(*
(* im im)
(-
1.0
(*
(* im im)
(*
(* im im)
(+ 0.006944444444444444 (* (* im im) 0.000462962962962963))))))
(-
1.0
(*
(* im im)
(+ 0.08333333333333333 (* im (* im 0.002777777777777778))))))))
(*
(* (* im im) (* im im))
(*
re
(+
0.041666666666666664
(* 0.041666666666666664 (* -0.16666666666666666 (* re re))))))))
double code(double re, double im) {
double tmp;
if (im <= 3.8e+77) {
tmp = (0.5 * re) * (2.0 + (((im * im) * (1.0 - ((im * im) * ((im * im) * (0.006944444444444444 + ((im * im) * 0.000462962962962963)))))) / (1.0 - ((im * im) * (0.08333333333333333 + (im * (im * 0.002777777777777778)))))));
} else {
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (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.8d+77) then
tmp = (0.5d0 * re) * (2.0d0 + (((im * im) * (1.0d0 - ((im * im) * ((im * im) * (0.006944444444444444d0 + ((im * im) * 0.000462962962962963d0)))))) / (1.0d0 - ((im * im) * (0.08333333333333333d0 + (im * (im * 0.002777777777777778d0)))))))
else
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664d0 + (0.041666666666666664d0 * ((-0.16666666666666666d0) * (re * re)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 3.8e+77) {
tmp = (0.5 * re) * (2.0 + (((im * im) * (1.0 - ((im * im) * ((im * im) * (0.006944444444444444 + ((im * im) * 0.000462962962962963)))))) / (1.0 - ((im * im) * (0.08333333333333333 + (im * (im * 0.002777777777777778)))))));
} else {
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re)))));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 3.8e+77: tmp = (0.5 * re) * (2.0 + (((im * im) * (1.0 - ((im * im) * ((im * im) * (0.006944444444444444 + ((im * im) * 0.000462962962962963)))))) / (1.0 - ((im * im) * (0.08333333333333333 + (im * (im * 0.002777777777777778))))))) else: tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re))))) return tmp
function code(re, im) tmp = 0.0 if (im <= 3.8e+77) tmp = Float64(Float64(0.5 * re) * Float64(2.0 + Float64(Float64(Float64(im * im) * Float64(1.0 - Float64(Float64(im * im) * Float64(Float64(im * im) * Float64(0.006944444444444444 + Float64(Float64(im * im) * 0.000462962962962963)))))) / Float64(1.0 - Float64(Float64(im * im) * Float64(0.08333333333333333 + Float64(im * Float64(im * 0.002777777777777778)))))))); else tmp = Float64(Float64(Float64(im * im) * Float64(im * im)) * Float64(re * Float64(0.041666666666666664 + Float64(0.041666666666666664 * Float64(-0.16666666666666666 * Float64(re * re)))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 3.8e+77) tmp = (0.5 * re) * (2.0 + (((im * im) * (1.0 - ((im * im) * ((im * im) * (0.006944444444444444 + ((im * im) * 0.000462962962962963)))))) / (1.0 - ((im * im) * (0.08333333333333333 + (im * (im * 0.002777777777777778))))))); else tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 3.8e+77], N[(N[(0.5 * re), $MachinePrecision] * N[(2.0 + N[(N[(N[(im * im), $MachinePrecision] * N[(1.0 - N[(N[(im * im), $MachinePrecision] * N[(N[(im * im), $MachinePrecision] * N[(0.006944444444444444 + N[(N[(im * im), $MachinePrecision] * 0.000462962962962963), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - N[(N[(im * im), $MachinePrecision] * N[(0.08333333333333333 + N[(im * N[(im * 0.002777777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision] * N[(re * N[(0.041666666666666664 + N[(0.041666666666666664 * N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 3.8 \cdot 10^{+77}:\\
\;\;\;\;\left(0.5 \cdot re\right) \cdot \left(2 + \frac{\left(im \cdot im\right) \cdot \left(1 - \left(im \cdot im\right) \cdot \left(\left(im \cdot im\right) \cdot \left(0.006944444444444444 + \left(im \cdot im\right) \cdot 0.000462962962962963\right)\right)\right)}{1 - \left(im \cdot im\right) \cdot \left(0.08333333333333333 + im \cdot \left(im \cdot 0.002777777777777778\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right) \cdot \left(re \cdot \left(0.041666666666666664 + 0.041666666666666664 \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\right)\\
\end{array}
\end{array}
if im < 3.8000000000000001e77Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-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-*.f6488.8%
Simplified88.8%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6454.1%
Simplified54.1%
*-commutativeN/A
associate-*r*N/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr37.1%
Taylor expanded in im around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.6%
Simplified36.6%
if 3.8000000000000001e77 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.0%
Simplified86.0%
Taylor expanded in im around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.0%
Simplified86.0%
Final simplification44.9%
(FPCore (re im)
:precision binary64
(if (<= im 2e+78)
(*
(*
re
(+
0.5
(*
(* re re)
(+ -0.08333333333333333 (* (* re re) 0.004166666666666667)))))
(+
2.0
(*
(* im im)
(+
1.0
(*
(* im im)
(+ 0.08333333333333333 (* (* im im) 0.002777777777777778)))))))
(*
(* (* im im) (* im im))
(*
re
(+
0.041666666666666664
(* 0.041666666666666664 (* -0.16666666666666666 (* re re))))))))
double code(double re, double im) {
double tmp;
if (im <= 2e+78) {
tmp = (re * (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * 0.004166666666666667))))) * (2.0 + ((im * im) * (1.0 + ((im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778))))));
} else {
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (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 <= 2d+78) then
tmp = (re * (0.5d0 + ((re * re) * ((-0.08333333333333333d0) + ((re * re) * 0.004166666666666667d0))))) * (2.0d0 + ((im * im) * (1.0d0 + ((im * im) * (0.08333333333333333d0 + ((im * im) * 0.002777777777777778d0))))))
else
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664d0 + (0.041666666666666664d0 * ((-0.16666666666666666d0) * (re * re)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 2e+78) {
tmp = (re * (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * 0.004166666666666667))))) * (2.0 + ((im * im) * (1.0 + ((im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778))))));
} else {
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re)))));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 2e+78: tmp = (re * (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * 0.004166666666666667))))) * (2.0 + ((im * im) * (1.0 + ((im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))) else: tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re))))) return tmp
function code(re, im) tmp = 0.0 if (im <= 2e+78) tmp = Float64(Float64(re * Float64(0.5 + Float64(Float64(re * re) * Float64(-0.08333333333333333 + Float64(Float64(re * re) * 0.004166666666666667))))) * Float64(2.0 + Float64(Float64(im * im) * Float64(1.0 + Float64(Float64(im * im) * Float64(0.08333333333333333 + Float64(Float64(im * im) * 0.002777777777777778))))))); else tmp = Float64(Float64(Float64(im * im) * Float64(im * im)) * Float64(re * Float64(0.041666666666666664 + Float64(0.041666666666666664 * Float64(-0.16666666666666666 * Float64(re * re)))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 2e+78) tmp = (re * (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * 0.004166666666666667))))) * (2.0 + ((im * im) * (1.0 + ((im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))); else tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 2e+78], N[(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] * N[(2.0 + N[(N[(im * im), $MachinePrecision] * N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.08333333333333333 + N[(N[(im * im), $MachinePrecision] * 0.002777777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision] * N[(re * N[(0.041666666666666664 + N[(0.041666666666666664 * N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 2 \cdot 10^{+78}:\\
\;\;\;\;\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) \cdot \left(2 + \left(im \cdot im\right) \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right) \cdot \left(re \cdot \left(0.041666666666666664 + 0.041666666666666664 \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\right)\\
\end{array}
\end{array}
if im < 2.00000000000000002e78Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-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-*.f6488.8%
Simplified88.8%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6454.5%
Simplified54.5%
if 2.00000000000000002e78 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.0%
Simplified86.0%
Taylor expanded in im around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.0%
Simplified86.0%
(FPCore (re im)
:precision binary64
(if (<= im 5e+79)
(*
re
(+
1.0
(*
im
(*
im
(+
0.5
(*
im
(*
im
(+ (* (* im im) 0.001388888888888889) 0.041666666666666664))))))))
(*
(* (* im im) (* im im))
(*
re
(+
0.041666666666666664
(* 0.041666666666666664 (* -0.16666666666666666 (* re re))))))))
double code(double re, double im) {
double tmp;
if (im <= 5e+79) {
tmp = re * (1.0 + (im * (im * (0.5 + (im * (im * (((im * im) * 0.001388888888888889) + 0.041666666666666664)))))));
} else {
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (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 <= 5d+79) then
tmp = re * (1.0d0 + (im * (im * (0.5d0 + (im * (im * (((im * im) * 0.001388888888888889d0) + 0.041666666666666664d0)))))))
else
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664d0 + (0.041666666666666664d0 * ((-0.16666666666666666d0) * (re * re)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 5e+79) {
tmp = re * (1.0 + (im * (im * (0.5 + (im * (im * (((im * im) * 0.001388888888888889) + 0.041666666666666664)))))));
} else {
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re)))));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 5e+79: tmp = re * (1.0 + (im * (im * (0.5 + (im * (im * (((im * im) * 0.001388888888888889) + 0.041666666666666664))))))) else: tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re))))) return tmp
function code(re, im) tmp = 0.0 if (im <= 5e+79) tmp = Float64(re * Float64(1.0 + Float64(im * Float64(im * Float64(0.5 + Float64(im * Float64(im * Float64(Float64(Float64(im * im) * 0.001388888888888889) + 0.041666666666666664)))))))); else tmp = Float64(Float64(Float64(im * im) * Float64(im * im)) * Float64(re * Float64(0.041666666666666664 + Float64(0.041666666666666664 * Float64(-0.16666666666666666 * Float64(re * re)))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 5e+79) tmp = re * (1.0 + (im * (im * (0.5 + (im * (im * (((im * im) * 0.001388888888888889) + 0.041666666666666664))))))); else tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 5e+79], N[(re * N[(1.0 + N[(im * N[(im * N[(0.5 + N[(im * N[(im * N[(N[(N[(im * im), $MachinePrecision] * 0.001388888888888889), $MachinePrecision] + 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision] * N[(re * N[(0.041666666666666664 + N[(0.041666666666666664 * N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 5 \cdot 10^{+79}:\\
\;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot \left(0.5 + im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.001388888888888889 + 0.041666666666666664\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right) \cdot \left(re \cdot \left(0.041666666666666664 + 0.041666666666666664 \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\right)\\
\end{array}
\end{array}
if im < 5e79Initial 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
*-lowering-*.f64N/A
unpow2N/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-*.f6488.8%
Simplified88.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
+-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-*.f6454.1%
Simplified54.1%
if 5e79 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.0%
Simplified86.0%
Taylor expanded in im around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.0%
Simplified86.0%
Final simplification59.4%
(FPCore (re im)
:precision binary64
(if (<= im 1.15e+77)
(+ re (* im (* im (* re (+ 0.5 (* im (* im 0.041666666666666664)))))))
(*
(* (* im im) (* im im))
(*
re
(+
0.041666666666666664
(* 0.041666666666666664 (* -0.16666666666666666 (* re re))))))))
double code(double re, double im) {
double tmp;
if (im <= 1.15e+77) {
tmp = re + (im * (im * (re * (0.5 + (im * (im * 0.041666666666666664))))));
} else {
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (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 <= 1.15d+77) then
tmp = re + (im * (im * (re * (0.5d0 + (im * (im * 0.041666666666666664d0))))))
else
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664d0 + (0.041666666666666664d0 * ((-0.16666666666666666d0) * (re * re)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 1.15e+77) {
tmp = re + (im * (im * (re * (0.5 + (im * (im * 0.041666666666666664))))));
} else {
tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re)))));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 1.15e+77: tmp = re + (im * (im * (re * (0.5 + (im * (im * 0.041666666666666664)))))) else: tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re))))) return tmp
function code(re, im) tmp = 0.0 if (im <= 1.15e+77) tmp = Float64(re + Float64(im * Float64(im * Float64(re * Float64(0.5 + Float64(im * Float64(im * 0.041666666666666664))))))); else tmp = Float64(Float64(Float64(im * im) * Float64(im * im)) * Float64(re * Float64(0.041666666666666664 + Float64(0.041666666666666664 * Float64(-0.16666666666666666 * Float64(re * re)))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 1.15e+77) tmp = re + (im * (im * (re * (0.5 + (im * (im * 0.041666666666666664)))))); else tmp = ((im * im) * (im * im)) * (re * (0.041666666666666664 + (0.041666666666666664 * (-0.16666666666666666 * (re * re))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 1.15e+77], N[(re + N[(im * N[(im * N[(re * N[(0.5 + N[(im * N[(im * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision] * N[(re * N[(0.041666666666666664 + N[(0.041666666666666664 * N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 1.15 \cdot 10^{+77}:\\
\;\;\;\;re + im \cdot \left(im \cdot \left(re \cdot \left(0.5 + im \cdot \left(im \cdot 0.041666666666666664\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right) \cdot \left(re \cdot \left(0.041666666666666664 + 0.041666666666666664 \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\right)\\
\end{array}
\end{array}
if im < 1.14999999999999997e77Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-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-*.f6488.8%
Simplified88.8%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6454.1%
Simplified54.1%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6447.3%
Simplified47.3%
if 1.14999999999999997e77 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.0%
Simplified86.0%
Taylor expanded in im around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.0%
Simplified86.0%
(FPCore (re im)
:precision binary64
(if (<= im 1.6e+146)
(* re (+ 1.0 (* im (* im (+ 0.5 (* (* im im) 0.041666666666666664))))))
(*
(+ 1.0 (* 0.5 (* im im)))
(* re (+ 1.0 (* -0.16666666666666666 (* re re)))))))
double code(double re, double im) {
double tmp;
if (im <= 1.6e+146) {
tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664)))));
} else {
tmp = (1.0 + (0.5 * (im * im))) * (re * (1.0 + (-0.16666666666666666 * (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 <= 1.6d+146) then
tmp = re * (1.0d0 + (im * (im * (0.5d0 + ((im * im) * 0.041666666666666664d0)))))
else
tmp = (1.0d0 + (0.5d0 * (im * im))) * (re * (1.0d0 + ((-0.16666666666666666d0) * (re * re))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 1.6e+146) {
tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664)))));
} else {
tmp = (1.0 + (0.5 * (im * im))) * (re * (1.0 + (-0.16666666666666666 * (re * re))));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 1.6e+146: tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664))))) else: tmp = (1.0 + (0.5 * (im * im))) * (re * (1.0 + (-0.16666666666666666 * (re * re)))) return tmp
function code(re, im) tmp = 0.0 if (im <= 1.6e+146) tmp = Float64(re * Float64(1.0 + Float64(im * Float64(im * Float64(0.5 + Float64(Float64(im * im) * 0.041666666666666664)))))); else tmp = Float64(Float64(1.0 + Float64(0.5 * Float64(im * im))) * Float64(re * Float64(1.0 + Float64(-0.16666666666666666 * Float64(re * re))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 1.6e+146) tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664))))); else tmp = (1.0 + (0.5 * (im * im))) * (re * (1.0 + (-0.16666666666666666 * (re * re)))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 1.6e+146], N[(re * N[(1.0 + N[(im * N[(im * N[(0.5 + N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(1.0 + N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 1.6 \cdot 10^{+146}:\\
\;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + 0.5 \cdot \left(im \cdot im\right)\right) \cdot \left(re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\\
\end{array}
\end{array}
if im < 1.6e146Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified83.6%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6452.9%
Simplified52.9%
Taylor expanded in re around 0
*-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-*.f6450.9%
Simplified50.9%
if 1.6e146 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6482.9%
Simplified82.9%
Taylor expanded in im around 0
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6482.9%
Simplified82.9%
(FPCore (re im) :precision binary64 (if (<= im 0.0115) (* (+ 2.0 (* im im)) (* 0.5 re)) (* re (* im (* im (* (* im im) 0.041666666666666664))))))
double code(double re, double im) {
double tmp;
if (im <= 0.0115) {
tmp = (2.0 + (im * im)) * (0.5 * re);
} else {
tmp = re * (im * (im * ((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 (im <= 0.0115d0) then
tmp = (2.0d0 + (im * im)) * (0.5d0 * re)
else
tmp = re * (im * (im * ((im * im) * 0.041666666666666664d0)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 0.0115) {
tmp = (2.0 + (im * im)) * (0.5 * re);
} else {
tmp = re * (im * (im * ((im * im) * 0.041666666666666664)));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 0.0115: tmp = (2.0 + (im * im)) * (0.5 * re) else: tmp = re * (im * (im * ((im * im) * 0.041666666666666664))) return tmp
function code(re, im) tmp = 0.0 if (im <= 0.0115) tmp = Float64(Float64(2.0 + Float64(im * im)) * Float64(0.5 * re)); else tmp = Float64(re * Float64(im * Float64(im * Float64(Float64(im * im) * 0.041666666666666664)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 0.0115) tmp = (2.0 + (im * im)) * (0.5 * re); else tmp = re * (im * (im * ((im * im) * 0.041666666666666664))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 0.0115], N[(N[(2.0 + N[(im * im), $MachinePrecision]), $MachinePrecision] * N[(0.5 * re), $MachinePrecision]), $MachinePrecision], N[(re * N[(im * N[(im * N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 0.0115:\\
\;\;\;\;\left(2 + im \cdot im\right) \cdot \left(0.5 \cdot re\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\
\end{array}
\end{array}
if im < 0.0115Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-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-*.f6494.1%
Simplified94.1%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6456.3%
Simplified56.3%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6445.8%
Simplified45.8%
if 0.0115 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified69.7%
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-*.f6469.7%
Simplified69.7%
Taylor expanded in re around 0
Simplified58.0%
Final simplification48.8%
(FPCore (re im) :precision binary64 (* re (+ 1.0 (* im (* im (+ 0.5 (* (* im im) 0.041666666666666664)))))))
double code(double re, double im) {
return re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664)))));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = re * (1.0d0 + (im * (im * (0.5d0 + ((im * im) * 0.041666666666666664d0)))))
end function
public static double code(double re, double im) {
return re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664)))));
}
def code(re, im): return re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664)))))
function code(re, im) return Float64(re * Float64(1.0 + Float64(im * Float64(im * Float64(0.5 + Float64(Float64(im * im) * 0.041666666666666664)))))) end
function tmp = code(re, im) tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664))))); end
code[re_, im_] := N[(re * N[(1.0 + N[(im * N[(im * N[(0.5 + N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
re \cdot \left(1 + im \cdot \left(im \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)
\end{array}
Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified85.8%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.0%
Simplified57.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
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6454.9%
Simplified54.9%
(FPCore (re im) :precision binary64 (if (<= re 5e+161) (* (+ 2.0 (* im im)) (* 0.5 re)) (* re (* -0.16666666666666666 (* re re)))))
double code(double re, double im) {
double tmp;
if (re <= 5e+161) {
tmp = (2.0 + (im * im)) * (0.5 * re);
} else {
tmp = re * (-0.16666666666666666 * (re * re));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 5d+161) then
tmp = (2.0d0 + (im * im)) * (0.5d0 * re)
else
tmp = re * ((-0.16666666666666666d0) * (re * re))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 5e+161) {
tmp = (2.0 + (im * im)) * (0.5 * re);
} else {
tmp = re * (-0.16666666666666666 * (re * re));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 5e+161: tmp = (2.0 + (im * im)) * (0.5 * re) else: tmp = re * (-0.16666666666666666 * (re * re)) return tmp
function code(re, im) tmp = 0.0 if (re <= 5e+161) tmp = Float64(Float64(2.0 + Float64(im * im)) * Float64(0.5 * re)); else tmp = Float64(re * Float64(-0.16666666666666666 * Float64(re * re))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 5e+161) tmp = (2.0 + (im * im)) * (0.5 * re); else tmp = re * (-0.16666666666666666 * (re * re)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 5e+161], N[(N[(2.0 + N[(im * im), $MachinePrecision]), $MachinePrecision] * N[(0.5 * re), $MachinePrecision]), $MachinePrecision], N[(re * N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 5 \cdot 10^{+161}:\\
\;\;\;\;\left(2 + im \cdot im\right) \cdot \left(0.5 \cdot re\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\\
\end{array}
\end{array}
if re < 4.9999999999999997e161Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-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-*.f6490.9%
Simplified90.9%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6461.4%
Simplified61.4%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6448.7%
Simplified48.7%
if 4.9999999999999997e161 < re Initial program 99.9%
Taylor expanded in im around 0
sin-lowering-sin.f6452.9%
Simplified52.9%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6416.9%
Simplified16.9%
Taylor expanded in re around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6416.9%
Simplified16.9%
Final simplification45.6%
(FPCore (re im) :precision binary64 (if (<= re 1.7e+99) re (* re (* -0.16666666666666666 (* re re)))))
double code(double re, double im) {
double tmp;
if (re <= 1.7e+99) {
tmp = re;
} else {
tmp = re * (-0.16666666666666666 * (re * re));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 1.7d+99) then
tmp = re
else
tmp = re * ((-0.16666666666666666d0) * (re * re))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 1.7e+99) {
tmp = re;
} else {
tmp = re * (-0.16666666666666666 * (re * re));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 1.7e+99: tmp = re else: tmp = re * (-0.16666666666666666 * (re * re)) return tmp
function code(re, im) tmp = 0.0 if (re <= 1.7e+99) tmp = re; else tmp = Float64(re * Float64(-0.16666666666666666 * Float64(re * re))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 1.7e+99) tmp = re; else tmp = re * (-0.16666666666666666 * (re * re)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 1.7e+99], re, N[(re * N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 1.7 \cdot 10^{+99}:\\
\;\;\;\;re\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(-0.16666666666666666 \cdot \left(re \cdot re\right)\right)\\
\end{array}
\end{array}
if re < 1.69999999999999992e99Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6446.3%
Simplified46.3%
Taylor expanded in re around 0
Simplified27.5%
if 1.69999999999999992e99 < re Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6449.9%
Simplified49.9%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6423.9%
Simplified23.9%
Taylor expanded in re around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6423.9%
Simplified23.9%
(FPCore (re im) :precision binary64 (* re (+ 1.0 (* -0.16666666666666666 (* re re)))))
double code(double re, double im) {
return re * (1.0 + (-0.16666666666666666 * (re * re)));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = re * (1.0d0 + ((-0.16666666666666666d0) * (re * re)))
end function
public static double code(double re, double im) {
return re * (1.0 + (-0.16666666666666666 * (re * re)));
}
def code(re, im): return re * (1.0 + (-0.16666666666666666 * (re * re)))
function code(re, im) return Float64(re * Float64(1.0 + Float64(-0.16666666666666666 * Float64(re * re)))) end
function tmp = code(re, im) tmp = re * (1.0 + (-0.16666666666666666 * (re * re))); end
code[re_, im_] := N[(re * N[(1.0 + N[(-0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
re \cdot \left(1 + -0.16666666666666666 \cdot \left(re \cdot re\right)\right)
\end{array}
Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6446.9%
Simplified46.9%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6430.3%
Simplified30.3%
Final simplification30.3%
(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.f6446.9%
Simplified46.9%
Taylor expanded in re around 0
Simplified23.8%
herbie shell --seed 2024140
(FPCore (re im)
:name "math.sin on complex, real part"
:precision binary64
(* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))