
(FPCore (re im) :precision binary64 (* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))
double code(double re, double im) {
return (0.5 * sin(re)) * (exp((0.0 - im)) + exp(im));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = (0.5d0 * sin(re)) * (exp((0.0d0 - im)) + exp(im))
end function
public static double code(double re, double im) {
return (0.5 * Math.sin(re)) * (Math.exp((0.0 - im)) + Math.exp(im));
}
def code(re, im): return (0.5 * math.sin(re)) * (math.exp((0.0 - im)) + math.exp(im))
function code(re, im) return Float64(Float64(0.5 * sin(re)) * Float64(exp(Float64(0.0 - im)) + exp(im))) end
function tmp = code(re, im) tmp = (0.5 * sin(re)) * (exp((0.0 - im)) + exp(im)); end
code[re_, im_] := N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[Exp[N[(0.0 - im), $MachinePrecision]], $MachinePrecision] + N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (re im) :precision binary64 (* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))
double code(double re, double im) {
return (0.5 * sin(re)) * (exp((0.0 - im)) + exp(im));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = (0.5d0 * sin(re)) * (exp((0.0d0 - im)) + exp(im))
end function
public static double code(double re, double im) {
return (0.5 * Math.sin(re)) * (Math.exp((0.0 - im)) + Math.exp(im));
}
def code(re, im): return (0.5 * math.sin(re)) * (math.exp((0.0 - im)) + math.exp(im))
function code(re, im) return Float64(Float64(0.5 * sin(re)) * Float64(exp(Float64(0.0 - im)) + exp(im))) end
function tmp = code(re, im) tmp = (0.5 * sin(re)) * (exp((0.0 - im)) + exp(im)); end
code[re_, im_] := N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[Exp[N[(0.0 - im), $MachinePrecision]], $MachinePrecision] + N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right)
\end{array}
(FPCore (re im) :precision binary64 (* (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 (* (sin re) 0.5))
(t_1
(*
(* im im)
(+ 0.08333333333333333 (* (* im im) 0.002777777777777778))))
(t_2 (* (* im im) (- -1.0 t_1)))
(t_3 (* (* im im) (+ 1.0 t_1))))
(if (<= im 760000.0)
(/ (* (+ 4.0 (* t_3 t_2)) t_0) (+ 2.0 t_2))
(if (<= im 6.2e+51)
(* (cosh im) (* re (+ 1.0 (* (* re re) -0.16666666666666666))))
(* t_0 (+ t_3 2.0))))))
double code(double re, double im) {
double t_0 = sin(re) * 0.5;
double t_1 = (im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778));
double t_2 = (im * im) * (-1.0 - t_1);
double t_3 = (im * im) * (1.0 + t_1);
double tmp;
if (im <= 760000.0) {
tmp = ((4.0 + (t_3 * t_2)) * t_0) / (2.0 + t_2);
} else if (im <= 6.2e+51) {
tmp = cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = t_0 * (t_3 + 2.0);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = sin(re) * 0.5d0
t_1 = (im * im) * (0.08333333333333333d0 + ((im * im) * 0.002777777777777778d0))
t_2 = (im * im) * ((-1.0d0) - t_1)
t_3 = (im * im) * (1.0d0 + t_1)
if (im <= 760000.0d0) then
tmp = ((4.0d0 + (t_3 * t_2)) * t_0) / (2.0d0 + t_2)
else if (im <= 6.2d+51) then
tmp = cosh(im) * (re * (1.0d0 + ((re * re) * (-0.16666666666666666d0))))
else
tmp = t_0 * (t_3 + 2.0d0)
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = Math.sin(re) * 0.5;
double t_1 = (im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778));
double t_2 = (im * im) * (-1.0 - t_1);
double t_3 = (im * im) * (1.0 + t_1);
double tmp;
if (im <= 760000.0) {
tmp = ((4.0 + (t_3 * t_2)) * t_0) / (2.0 + t_2);
} else if (im <= 6.2e+51) {
tmp = Math.cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = t_0 * (t_3 + 2.0);
}
return tmp;
}
def code(re, im): t_0 = math.sin(re) * 0.5 t_1 = (im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778)) t_2 = (im * im) * (-1.0 - t_1) t_3 = (im * im) * (1.0 + t_1) tmp = 0 if im <= 760000.0: tmp = ((4.0 + (t_3 * t_2)) * t_0) / (2.0 + t_2) elif im <= 6.2e+51: tmp = math.cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666))) else: tmp = t_0 * (t_3 + 2.0) return tmp
function code(re, im) t_0 = Float64(sin(re) * 0.5) t_1 = Float64(Float64(im * im) * Float64(0.08333333333333333 + Float64(Float64(im * im) * 0.002777777777777778))) t_2 = Float64(Float64(im * im) * Float64(-1.0 - t_1)) t_3 = Float64(Float64(im * im) * Float64(1.0 + t_1)) tmp = 0.0 if (im <= 760000.0) tmp = Float64(Float64(Float64(4.0 + Float64(t_3 * t_2)) * t_0) / Float64(2.0 + t_2)); elseif (im <= 6.2e+51) tmp = Float64(cosh(im) * Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666)))); else tmp = Float64(t_0 * Float64(t_3 + 2.0)); end return tmp end
function tmp_2 = code(re, im) t_0 = sin(re) * 0.5; t_1 = (im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778)); t_2 = (im * im) * (-1.0 - t_1); t_3 = (im * im) * (1.0 + t_1); tmp = 0.0; if (im <= 760000.0) tmp = ((4.0 + (t_3 * t_2)) * t_0) / (2.0 + t_2); elseif (im <= 6.2e+51) tmp = cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666))); else tmp = t_0 * (t_3 + 2.0); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[Sin[re], $MachinePrecision] * 0.5), $MachinePrecision]}, Block[{t$95$1 = N[(N[(im * im), $MachinePrecision] * N[(0.08333333333333333 + N[(N[(im * im), $MachinePrecision] * 0.002777777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(im * im), $MachinePrecision] * N[(-1.0 - t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(im * im), $MachinePrecision] * N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 760000.0], N[(N[(N[(4.0 + N[(t$95$3 * t$95$2), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] / N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 6.2e+51], N[(N[Cosh[im], $MachinePrecision] * N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(t$95$3 + 2.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin re \cdot 0.5\\
t_1 := \left(im \cdot im\right) \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\\
t_2 := \left(im \cdot im\right) \cdot \left(-1 - t\_1\right)\\
t_3 := \left(im \cdot im\right) \cdot \left(1 + t\_1\right)\\
\mathbf{if}\;im \leq 760000:\\
\;\;\;\;\frac{\left(4 + t\_3 \cdot t\_2\right) \cdot t\_0}{2 + t\_2}\\
\mathbf{elif}\;im \leq 6.2 \cdot 10^{+51}:\\
\;\;\;\;\cosh im \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(t\_3 + 2\right)\\
\end{array}
\end{array}
if im < 7.6e5Initial 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-*.f6493.1%
Simplified93.1%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr66.3%
if 7.6e5 < im < 6.20000000000000022e51Initial 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
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6473.3%
Simplified73.3%
if 6.20000000000000022e51 < im Initial 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-*.f64100.0%
Simplified100.0%
Final simplification73.2%
(FPCore (re im)
:precision binary64
(let* ((t_0
(*
(* (sin re) 0.5)
(+
(*
(* im im)
(+
1.0
(*
(* im im)
(+ 0.08333333333333333 (* (* im im) 0.002777777777777778)))))
2.0))))
(if (<= im 760000.0)
t_0
(if (<= im 6.2e+51)
(* (cosh im) (* re (+ 1.0 (* (* re re) -0.16666666666666666))))
t_0))))
double code(double re, double im) {
double t_0 = (sin(re) * 0.5) * (((im * im) * (1.0 + ((im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778))))) + 2.0);
double tmp;
if (im <= 760000.0) {
tmp = t_0;
} else if (im <= 6.2e+51) {
tmp = cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} 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 = (sin(re) * 0.5d0) * (((im * im) * (1.0d0 + ((im * im) * (0.08333333333333333d0 + ((im * im) * 0.002777777777777778d0))))) + 2.0d0)
if (im <= 760000.0d0) then
tmp = t_0
else if (im <= 6.2d+51) then
tmp = cosh(im) * (re * (1.0d0 + ((re * re) * (-0.16666666666666666d0))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = (Math.sin(re) * 0.5) * (((im * im) * (1.0 + ((im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778))))) + 2.0);
double tmp;
if (im <= 760000.0) {
tmp = t_0;
} else if (im <= 6.2e+51) {
tmp = Math.cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = t_0;
}
return tmp;
}
def code(re, im): t_0 = (math.sin(re) * 0.5) * (((im * im) * (1.0 + ((im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778))))) + 2.0) tmp = 0 if im <= 760000.0: tmp = t_0 elif im <= 6.2e+51: tmp = math.cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666))) else: tmp = t_0 return tmp
function code(re, im) t_0 = Float64(Float64(sin(re) * 0.5) * Float64(Float64(Float64(im * im) * Float64(1.0 + Float64(Float64(im * im) * Float64(0.08333333333333333 + Float64(Float64(im * im) * 0.002777777777777778))))) + 2.0)) tmp = 0.0 if (im <= 760000.0) tmp = t_0; elseif (im <= 6.2e+51) tmp = Float64(cosh(im) * Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666)))); else tmp = t_0; end return tmp end
function tmp_2 = code(re, im) t_0 = (sin(re) * 0.5) * (((im * im) * (1.0 + ((im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778))))) + 2.0); tmp = 0.0; if (im <= 760000.0) tmp = t_0; elseif (im <= 6.2e+51) tmp = cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666))); else tmp = t_0; end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[(N[Sin[re], $MachinePrecision] * 0.5), $MachinePrecision] * N[(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] + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 760000.0], t$95$0, If[LessEqual[im, 6.2e+51], N[(N[Cosh[im], $MachinePrecision] * N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\sin re \cdot 0.5\right) \cdot \left(\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) + 2\right)\\
\mathbf{if}\;im \leq 760000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;im \leq 6.2 \cdot 10^{+51}:\\
\;\;\;\;\cosh im \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if im < 7.6e5 or 6.20000000000000022e51 < im Initial 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.5%
Simplified94.5%
if 7.6e5 < im < 6.20000000000000022e51Initial 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
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6473.3%
Simplified73.3%
Final simplification93.3%
(FPCore (re im)
:precision binary64
(if (<= im 3.7e-9)
(sin re)
(if (<= im 2.6e+77)
(* (cosh im) (* re (+ 1.0 (* (* re re) -0.16666666666666666))))
(*
(sin re)
(+ 1.0 (* (* im im) (+ 0.5 (* (* im im) 0.041666666666666664))))))))
double code(double re, double im) {
double tmp;
if (im <= 3.7e-9) {
tmp = sin(re);
} else if (im <= 2.6e+77) {
tmp = cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = sin(re) * (1.0 + ((im * im) * (0.5 + ((im * im) * 0.041666666666666664))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 3.7d-9) then
tmp = sin(re)
else if (im <= 2.6d+77) then
tmp = cosh(im) * (re * (1.0d0 + ((re * re) * (-0.16666666666666666d0))))
else
tmp = sin(re) * (1.0d0 + ((im * im) * (0.5d0 + ((im * im) * 0.041666666666666664d0))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 3.7e-9) {
tmp = Math.sin(re);
} else if (im <= 2.6e+77) {
tmp = Math.cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = Math.sin(re) * (1.0 + ((im * im) * (0.5 + ((im * im) * 0.041666666666666664))));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 3.7e-9: tmp = math.sin(re) elif im <= 2.6e+77: tmp = math.cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666))) else: tmp = math.sin(re) * (1.0 + ((im * im) * (0.5 + ((im * im) * 0.041666666666666664)))) return tmp
function code(re, im) tmp = 0.0 if (im <= 3.7e-9) tmp = sin(re); elseif (im <= 2.6e+77) tmp = Float64(cosh(im) * Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666)))); else tmp = Float64(sin(re) * Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + Float64(Float64(im * im) * 0.041666666666666664))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 3.7e-9) tmp = sin(re); elseif (im <= 2.6e+77) tmp = cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666))); else tmp = sin(re) * (1.0 + ((im * im) * (0.5 + ((im * im) * 0.041666666666666664)))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 3.7e-9], N[Sin[re], $MachinePrecision], If[LessEqual[im, 2.6e+77], N[(N[Cosh[im], $MachinePrecision] * N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 3.7 \cdot 10^{-9}:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 2.6 \cdot 10^{+77}:\\
\;\;\;\;\cosh im \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\\
\end{array}
\end{array}
if im < 3.7e-9Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6462.9%
Simplified62.9%
if 3.7e-9 < 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
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.2%
Simplified69.2%
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%
Final simplification69.4%
(FPCore (re im)
:precision binary64
(if (<= im 3.7e-9)
(sin re)
(if (<= im 1.2e+67)
(* re (cosh im))
(if (<= im 1.35e+154)
(*
(+
2.0
(*
im
(*
im
(+
1.0
(*
im
(*
im
(+ 0.08333333333333333 (* (* im im) 0.002777777777777778))))))))
(* re (+ 0.5 (* (* re re) -0.08333333333333333))))
(* (* (sin re) 0.5) (+ (* im im) 2.0))))))
double code(double re, double im) {
double tmp;
if (im <= 3.7e-9) {
tmp = sin(re);
} else if (im <= 1.2e+67) {
tmp = re * cosh(im);
} else if (im <= 1.35e+154) {
tmp = (2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (re * (0.5 + ((re * re) * -0.08333333333333333)));
} else {
tmp = (sin(re) * 0.5) * ((im * im) + 2.0);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 3.7d-9) then
tmp = sin(re)
else if (im <= 1.2d+67) then
tmp = re * cosh(im)
else if (im <= 1.35d+154) then
tmp = (2.0d0 + (im * (im * (1.0d0 + (im * (im * (0.08333333333333333d0 + ((im * im) * 0.002777777777777778d0)))))))) * (re * (0.5d0 + ((re * re) * (-0.08333333333333333d0))))
else
tmp = (sin(re) * 0.5d0) * ((im * im) + 2.0d0)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 3.7e-9) {
tmp = Math.sin(re);
} else if (im <= 1.2e+67) {
tmp = re * Math.cosh(im);
} else if (im <= 1.35e+154) {
tmp = (2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (re * (0.5 + ((re * re) * -0.08333333333333333)));
} else {
tmp = (Math.sin(re) * 0.5) * ((im * im) + 2.0);
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 3.7e-9: tmp = math.sin(re) elif im <= 1.2e+67: tmp = re * math.cosh(im) elif im <= 1.35e+154: tmp = (2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (re * (0.5 + ((re * re) * -0.08333333333333333))) else: tmp = (math.sin(re) * 0.5) * ((im * im) + 2.0) return tmp
function code(re, im) tmp = 0.0 if (im <= 3.7e-9) tmp = sin(re); elseif (im <= 1.2e+67) tmp = Float64(re * cosh(im)); elseif (im <= 1.35e+154) tmp = Float64(Float64(2.0 + Float64(im * Float64(im * Float64(1.0 + Float64(im * Float64(im * Float64(0.08333333333333333 + Float64(Float64(im * im) * 0.002777777777777778)))))))) * Float64(re * Float64(0.5 + Float64(Float64(re * re) * -0.08333333333333333)))); else tmp = Float64(Float64(sin(re) * 0.5) * Float64(Float64(im * im) + 2.0)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 3.7e-9) tmp = sin(re); elseif (im <= 1.2e+67) tmp = re * cosh(im); elseif (im <= 1.35e+154) tmp = (2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (re * (0.5 + ((re * re) * -0.08333333333333333))); else tmp = (sin(re) * 0.5) * ((im * im) + 2.0); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 3.7e-9], N[Sin[re], $MachinePrecision], If[LessEqual[im, 1.2e+67], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 1.35e+154], N[(N[(2.0 + N[(im * N[(im * N[(1.0 + N[(im * N[(im * N[(0.08333333333333333 + N[(N[(im * im), $MachinePrecision] * 0.002777777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(0.5 + N[(N[(re * re), $MachinePrecision] * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sin[re], $MachinePrecision] * 0.5), $MachinePrecision] * N[(N[(im * im), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 3.7 \cdot 10^{-9}:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 1.2 \cdot 10^{+67}:\\
\;\;\;\;re \cdot \cosh im\\
\mathbf{elif}\;im \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\left(2 + im \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\right)\right)\right) \cdot \left(re \cdot \left(0.5 + \left(re \cdot re\right) \cdot -0.08333333333333333\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\sin re \cdot 0.5\right) \cdot \left(im \cdot im + 2\right)\\
\end{array}
\end{array}
if im < 3.7e-9Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6462.9%
Simplified62.9%
if 3.7e-9 < im < 1.20000000000000001e67Initial 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
Simplified76.4%
if 1.20000000000000001e67 < im < 1.35000000000000003e154Initial 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-*.f64100.0%
Simplified100.0%
Taylor expanded in re around 0
Simplified82.4%
if 1.35000000000000003e154 < im Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification69.4%
(FPCore (re im)
:precision binary64
(if (<= im 3.7e-9)
(sin re)
(if (<= im 1.35e+154)
(* (cosh im) (* re (+ 1.0 (* (* re re) -0.16666666666666666))))
(* (* (sin re) 0.5) (+ (* im im) 2.0)))))
double code(double re, double im) {
double tmp;
if (im <= 3.7e-9) {
tmp = sin(re);
} else if (im <= 1.35e+154) {
tmp = cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = (sin(re) * 0.5) * ((im * im) + 2.0);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 3.7d-9) then
tmp = sin(re)
else if (im <= 1.35d+154) then
tmp = cosh(im) * (re * (1.0d0 + ((re * re) * (-0.16666666666666666d0))))
else
tmp = (sin(re) * 0.5d0) * ((im * im) + 2.0d0)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 3.7e-9) {
tmp = Math.sin(re);
} else if (im <= 1.35e+154) {
tmp = Math.cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = (Math.sin(re) * 0.5) * ((im * im) + 2.0);
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 3.7e-9: tmp = math.sin(re) elif im <= 1.35e+154: tmp = math.cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666))) else: tmp = (math.sin(re) * 0.5) * ((im * im) + 2.0) return tmp
function code(re, im) tmp = 0.0 if (im <= 3.7e-9) tmp = sin(re); elseif (im <= 1.35e+154) tmp = Float64(cosh(im) * Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666)))); else tmp = Float64(Float64(sin(re) * 0.5) * Float64(Float64(im * im) + 2.0)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 3.7e-9) tmp = sin(re); elseif (im <= 1.35e+154) tmp = cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666))); else tmp = (sin(re) * 0.5) * ((im * im) + 2.0); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 3.7e-9], N[Sin[re], $MachinePrecision], If[LessEqual[im, 1.35e+154], N[(N[Cosh[im], $MachinePrecision] * N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sin[re], $MachinePrecision] * 0.5), $MachinePrecision] * N[(N[(im * im), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 3.7 \cdot 10^{-9}:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\cosh im \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\sin re \cdot 0.5\right) \cdot \left(im \cdot im + 2\right)\\
\end{array}
\end{array}
if im < 3.7e-9Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6462.9%
Simplified62.9%
if 3.7e-9 < im < 1.35000000000000003e154Initial 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
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6471.1%
Simplified71.1%
if 1.35000000000000003e154 < im Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification68.2%
(FPCore (re im) :precision binary64 (if (<= im 3.7e-9) (sin re) (* re (cosh im))))
double code(double re, double im) {
double tmp;
if (im <= 3.7e-9) {
tmp = sin(re);
} else {
tmp = re * cosh(im);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 3.7d-9) then
tmp = sin(re)
else
tmp = re * cosh(im)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 3.7e-9) {
tmp = Math.sin(re);
} else {
tmp = re * Math.cosh(im);
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 3.7e-9: tmp = math.sin(re) else: tmp = re * math.cosh(im) return tmp
function code(re, im) tmp = 0.0 if (im <= 3.7e-9) tmp = sin(re); else tmp = Float64(re * cosh(im)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 3.7e-9) tmp = sin(re); else tmp = re * cosh(im); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 3.7e-9], N[Sin[re], $MachinePrecision], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 3.7 \cdot 10^{-9}:\\
\;\;\;\;\sin re\\
\mathbf{else}:\\
\;\;\;\;re \cdot \cosh im\\
\end{array}
\end{array}
if im < 3.7e-9Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6462.9%
Simplified62.9%
if 3.7e-9 < 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%
*-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
Simplified74.3%
(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 3.7e-9)
(sin re)
(if (<= im 1.02e+51)
(/
(*
(+ 4.0 (* (* im (* im (+ 1.0 t_0))) t_1))
(*
re
(+
0.5
(*
(* re re)
(+
-0.08333333333333333
(*
re
(*
re
(+
0.004166666666666667
(* (* re re) -9.92063492063492e-5)))))))))
(+ 2.0 t_1))
(*
re
(+
1.0
(*
(* im im)
(+
0.5
(*
im
(*
im
(+
0.041666666666666664
(* (* 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 <= 3.7e-9) {
tmp = sin(re);
} else if (im <= 1.02e+51) {
tmp = ((4.0 + ((im * (im * (1.0 + t_0))) * t_1)) * (re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5))))))))) / (2.0 + t_1);
} else {
tmp = re * (1.0 + ((im * im) * (0.5 + (im * (im * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: 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 <= 3.7d-9) then
tmp = sin(re)
else if (im <= 1.02d+51) then
tmp = ((4.0d0 + ((im * (im * (1.0d0 + t_0))) * t_1)) * (re * (0.5d0 + ((re * re) * ((-0.08333333333333333d0) + (re * (re * (0.004166666666666667d0 + ((re * re) * (-9.92063492063492d-5)))))))))) / (2.0d0 + t_1)
else
tmp = re * (1.0d0 + ((im * im) * (0.5d0 + (im * (im * (0.041666666666666664d0 + ((im * im) * 0.001388888888888889d0)))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = (im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778));
double t_1 = im * (im * (-1.0 - t_0));
double tmp;
if (im <= 3.7e-9) {
tmp = Math.sin(re);
} else if (im <= 1.02e+51) {
tmp = ((4.0 + ((im * (im * (1.0 + t_0))) * t_1)) * (re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5))))))))) / (2.0 + t_1);
} else {
tmp = re * (1.0 + ((im * im) * (0.5 + (im * (im * (0.041666666666666664 + ((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 <= 3.7e-9: tmp = math.sin(re) elif im <= 1.02e+51: tmp = ((4.0 + ((im * (im * (1.0 + t_0))) * t_1)) * (re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5))))))))) / (2.0 + t_1) else: tmp = re * (1.0 + ((im * im) * (0.5 + (im * (im * (0.041666666666666664 + ((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(im * Float64(im * Float64(-1.0 - t_0))) tmp = 0.0 if (im <= 3.7e-9) tmp = sin(re); elseif (im <= 1.02e+51) tmp = Float64(Float64(Float64(4.0 + Float64(Float64(im * Float64(im * Float64(1.0 + t_0))) * t_1)) * Float64(re * Float64(0.5 + Float64(Float64(re * re) * Float64(-0.08333333333333333 + Float64(re * Float64(re * Float64(0.004166666666666667 + Float64(Float64(re * re) * -9.92063492063492e-5))))))))) / Float64(2.0 + t_1)); else tmp = Float64(re * Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + Float64(im * Float64(im * Float64(0.041666666666666664 + Float64(Float64(im * im) * 0.001388888888888889)))))))); end return tmp end
function tmp_2 = code(re, im) t_0 = (im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778)); t_1 = im * (im * (-1.0 - t_0)); tmp = 0.0; if (im <= 3.7e-9) tmp = sin(re); elseif (im <= 1.02e+51) tmp = ((4.0 + ((im * (im * (1.0 + t_0))) * t_1)) * (re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5))))))))) / (2.0 + t_1); else tmp = re * (1.0 + ((im * im) * (0.5 + (im * (im * (0.041666666666666664 + ((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[(im * N[(im * N[(-1.0 - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 3.7e-9], N[Sin[re], $MachinePrecision], If[LessEqual[im, 1.02e+51], N[(N[(N[(4.0 + N[(N[(im * N[(im * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] * N[(re * N[(0.5 + N[(N[(re * re), $MachinePrecision] * N[(-0.08333333333333333 + N[(re * N[(re * N[(0.004166666666666667 + N[(N[(re * re), $MachinePrecision] * -9.92063492063492e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(re * N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.5 + N[(im * N[(im * N[(0.041666666666666664 + N[(N[(im * im), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\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 := im \cdot \left(im \cdot \left(-1 - t\_0\right)\right)\\
\mathbf{if}\;im \leq 3.7 \cdot 10^{-9}:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 1.02 \cdot 10^{+51}:\\
\;\;\;\;\frac{\left(4 + \left(im \cdot \left(im \cdot \left(1 + t\_0\right)\right)\right) \cdot t\_1\right) \cdot \left(re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot \left(0.004166666666666667 + \left(re \cdot re\right) \cdot -9.92063492063492 \cdot 10^{-5}\right)\right)\right)\right)\right)}{2 + t\_1}\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + im \cdot \left(im \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\right)\\
\end{array}
\end{array}
if im < 3.7e-9Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6462.9%
Simplified62.9%
if 3.7e-9 < im < 1.02e51Initial 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-*.f6410.2%
Simplified10.2%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6425.4%
Simplified25.4%
Applied egg-rr47.9%
if 1.02e51 < 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%
*-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
Simplified75.5%
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-*.f6475.5%
Simplified75.5%
Final simplification64.3%
(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 1.02e+51)
(/
(*
(+ 4.0 (* (* im (* im (+ 1.0 t_0))) t_1))
(*
re
(+
0.5
(*
(* re re)
(+
-0.08333333333333333
(*
re
(*
re
(+ 0.004166666666666667 (* (* re re) -9.92063492063492e-5)))))))))
(+ 2.0 t_1))
(*
re
(+
1.0
(*
(* im im)
(+
0.5
(*
im
(*
im
(+ 0.041666666666666664 (* (* 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 <= 1.02e+51) {
tmp = ((4.0 + ((im * (im * (1.0 + t_0))) * t_1)) * (re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5))))))))) / (2.0 + t_1);
} else {
tmp = re * (1.0 + ((im * im) * (0.5 + (im * (im * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: 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 <= 1.02d+51) then
tmp = ((4.0d0 + ((im * (im * (1.0d0 + t_0))) * t_1)) * (re * (0.5d0 + ((re * re) * ((-0.08333333333333333d0) + (re * (re * (0.004166666666666667d0 + ((re * re) * (-9.92063492063492d-5)))))))))) / (2.0d0 + t_1)
else
tmp = re * (1.0d0 + ((im * im) * (0.5d0 + (im * (im * (0.041666666666666664d0 + ((im * im) * 0.001388888888888889d0)))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = (im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778));
double t_1 = im * (im * (-1.0 - t_0));
double tmp;
if (im <= 1.02e+51) {
tmp = ((4.0 + ((im * (im * (1.0 + t_0))) * t_1)) * (re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5))))))))) / (2.0 + t_1);
} else {
tmp = re * (1.0 + ((im * im) * (0.5 + (im * (im * (0.041666666666666664 + ((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 <= 1.02e+51: tmp = ((4.0 + ((im * (im * (1.0 + t_0))) * t_1)) * (re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5))))))))) / (2.0 + t_1) else: tmp = re * (1.0 + ((im * im) * (0.5 + (im * (im * (0.041666666666666664 + ((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(im * Float64(im * Float64(-1.0 - t_0))) tmp = 0.0 if (im <= 1.02e+51) tmp = Float64(Float64(Float64(4.0 + Float64(Float64(im * Float64(im * Float64(1.0 + t_0))) * t_1)) * Float64(re * Float64(0.5 + Float64(Float64(re * re) * Float64(-0.08333333333333333 + Float64(re * Float64(re * Float64(0.004166666666666667 + Float64(Float64(re * re) * -9.92063492063492e-5))))))))) / Float64(2.0 + t_1)); else tmp = Float64(re * Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + Float64(im * Float64(im * Float64(0.041666666666666664 + Float64(Float64(im * im) * 0.001388888888888889)))))))); end return tmp end
function tmp_2 = code(re, im) t_0 = (im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778)); t_1 = im * (im * (-1.0 - t_0)); tmp = 0.0; if (im <= 1.02e+51) tmp = ((4.0 + ((im * (im * (1.0 + t_0))) * t_1)) * (re * (0.5 + ((re * re) * (-0.08333333333333333 + (re * (re * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5))))))))) / (2.0 + t_1); else tmp = re * (1.0 + ((im * im) * (0.5 + (im * (im * (0.041666666666666664 + ((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[(im * N[(im * N[(-1.0 - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 1.02e+51], N[(N[(N[(4.0 + N[(N[(im * N[(im * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] * N[(re * N[(0.5 + N[(N[(re * re), $MachinePrecision] * N[(-0.08333333333333333 + N[(re * N[(re * N[(0.004166666666666667 + N[(N[(re * re), $MachinePrecision] * -9.92063492063492e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(re * N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.5 + N[(im * N[(im * N[(0.041666666666666664 + N[(N[(im * im), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\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 := im \cdot \left(im \cdot \left(-1 - t\_0\right)\right)\\
\mathbf{if}\;im \leq 1.02 \cdot 10^{+51}:\\
\;\;\;\;\frac{\left(4 + \left(im \cdot \left(im \cdot \left(1 + t\_0\right)\right)\right) \cdot t\_1\right) \cdot \left(re \cdot \left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + re \cdot \left(re \cdot \left(0.004166666666666667 + \left(re \cdot re\right) \cdot -9.92063492063492 \cdot 10^{-5}\right)\right)\right)\right)\right)}{2 + t\_1}\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + im \cdot \left(im \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\right)\\
\end{array}
\end{array}
if im < 1.02e51Initial 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-*.f6486.7%
Simplified86.7%
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-*.f6457.4%
Simplified57.4%
Applied egg-rr37.9%
if 1.02e51 < 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%
*-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
Simplified75.5%
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-*.f6475.5%
Simplified75.5%
Final simplification45.1%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* im (* im im))) (t_1 (* (* im im) 0.002777777777777778)))
(if (<= im 6.4e+77)
(*
(*
re
(+
0.5
(*
re
(*
re
(+
-0.08333333333333333
(*
(* re re)
(+ 0.004166666666666667 (* (* re re) -9.92063492063492e-5))))))))
(+
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))))))))
(+
re
(*
(* im im)
(+
(* re 0.5)
(*
(+ 0.041666666666666664 (* (* im im) 0.001388888888888889))
(* re (* im im)))))))))
double code(double re, double im) {
double t_0 = im * (im * im);
double t_1 = (im * im) * 0.002777777777777778;
double tmp;
if (im <= 6.4e+77) {
tmp = (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (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 = re + ((im * im) * ((re * 0.5) + ((0.041666666666666664 + ((im * im) * 0.001388888888888889)) * (re * (im * im)))));
}
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 <= 6.4d+77) then
tmp = (re * (0.5d0 + (re * (re * ((-0.08333333333333333d0) + ((re * re) * (0.004166666666666667d0 + ((re * re) * (-9.92063492063492d-5))))))))) * (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 = re + ((im * im) * ((re * 0.5d0) + ((0.041666666666666664d0 + ((im * im) * 0.001388888888888889d0)) * (re * (im * im)))))
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 <= 6.4e+77) {
tmp = (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (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 = re + ((im * im) * ((re * 0.5) + ((0.041666666666666664 + ((im * im) * 0.001388888888888889)) * (re * (im * im)))));
}
return tmp;
}
def code(re, im): t_0 = im * (im * im) t_1 = (im * im) * 0.002777777777777778 tmp = 0 if im <= 6.4e+77: tmp = (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (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 = re + ((im * im) * ((re * 0.5) + ((0.041666666666666664 + ((im * im) * 0.001388888888888889)) * (re * (im * im))))) return tmp
function code(re, im) t_0 = Float64(im * Float64(im * im)) t_1 = Float64(Float64(im * im) * 0.002777777777777778) tmp = 0.0 if (im <= 6.4e+77) tmp = Float64(Float64(re * Float64(0.5 + Float64(re * Float64(re * Float64(-0.08333333333333333 + Float64(Float64(re * re) * Float64(0.004166666666666667 + Float64(Float64(re * re) * -9.92063492063492e-5)))))))) * 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(re + Float64(Float64(im * im) * Float64(Float64(re * 0.5) + Float64(Float64(0.041666666666666664 + Float64(Float64(im * im) * 0.001388888888888889)) * Float64(re * Float64(im * im)))))); 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 <= 6.4e+77) tmp = (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (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 = re + ((im * im) * ((re * 0.5) + ((0.041666666666666664 + ((im * im) * 0.001388888888888889)) * (re * (im * im))))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(im * N[(im * im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(im * im), $MachinePrecision] * 0.002777777777777778), $MachinePrecision]}, If[LessEqual[im, 6.4e+77], N[(N[(re * N[(0.5 + N[(re * N[(re * N[(-0.08333333333333333 + N[(N[(re * re), $MachinePrecision] * N[(0.004166666666666667 + N[(N[(re * re), $MachinePrecision] * -9.92063492063492e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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[(re + N[(N[(im * im), $MachinePrecision] * N[(N[(re * 0.5), $MachinePrecision] + N[(N[(0.041666666666666664 + N[(N[(im * im), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision] * N[(re * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := im \cdot \left(im \cdot im\right)\\
t_1 := \left(im \cdot im\right) \cdot 0.002777777777777778\\
\mathbf{if}\;im \leq 6.4 \cdot 10^{+77}:\\
\;\;\;\;\left(re \cdot \left(0.5 + re \cdot \left(re \cdot \left(-0.08333333333333333 + \left(re \cdot re\right) \cdot \left(0.004166666666666667 + \left(re \cdot re\right) \cdot -9.92063492063492 \cdot 10^{-5}\right)\right)\right)\right)\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}:\\
\;\;\;\;re + \left(im \cdot im\right) \cdot \left(re \cdot 0.5 + \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right) \cdot \left(re \cdot \left(im \cdot im\right)\right)\right)\\
\end{array}
\end{array}
if im < 6.4000000000000003e77Initial 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-*.f6487.2%
Simplified87.2%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.8%
Simplified57.8%
*-commutativeN/A
flip3-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr43.8%
if 6.4000000000000003e77 < 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%
*-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
Simplified80.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
Simplified80.0%
Final simplification49.4%
(FPCore (re im)
:precision binary64
(let* ((t_0 (+ 0.5 (* (* im im) 0.041666666666666664)))
(t_1 (* (* im im) t_0)))
(if (<= im 1.2e+67)
(/
(*
(- 1.0 (* (* im im) (* t_0 t_1)))
(*
re
(+
1.0
(*
re
(*
re
(+ -0.16666666666666666 (* (* re re) 0.008333333333333333)))))))
(- 1.0 t_1))
(if (<= im 1.9e+130)
(*
(*
re
(+
0.5
(*
re
(*
re
(+
-0.08333333333333333
(*
(* re re)
(+ 0.004166666666666667 (* (* re re) -9.92063492063492e-5))))))))
(+
2.0
(*
(* im im)
(+
1.0
(*
(* (* im im) (* im im))
(+ 0.002777777777777778 (/ 0.08333333333333333 (* im im))))))))
(+
re
(* im (* im (* re (+ 0.5 (* im (* im 0.041666666666666664)))))))))))
double code(double re, double im) {
double t_0 = 0.5 + ((im * im) * 0.041666666666666664);
double t_1 = (im * im) * t_0;
double tmp;
if (im <= 1.2e+67) {
tmp = ((1.0 - ((im * im) * (t_0 * t_1))) * (re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * 0.008333333333333333))))))) / (1.0 - t_1);
} else if (im <= 1.9e+130) {
tmp = (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (2.0 + ((im * im) * (1.0 + (((im * im) * (im * im)) * (0.002777777777777778 + (0.08333333333333333 / (im * im)))))));
} else {
tmp = re + (im * (im * (re * (0.5 + (im * (im * 0.041666666666666664))))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 0.5d0 + ((im * im) * 0.041666666666666664d0)
t_1 = (im * im) * t_0
if (im <= 1.2d+67) then
tmp = ((1.0d0 - ((im * im) * (t_0 * t_1))) * (re * (1.0d0 + (re * (re * ((-0.16666666666666666d0) + ((re * re) * 0.008333333333333333d0))))))) / (1.0d0 - t_1)
else if (im <= 1.9d+130) then
tmp = (re * (0.5d0 + (re * (re * ((-0.08333333333333333d0) + ((re * re) * (0.004166666666666667d0 + ((re * re) * (-9.92063492063492d-5))))))))) * (2.0d0 + ((im * im) * (1.0d0 + (((im * im) * (im * im)) * (0.002777777777777778d0 + (0.08333333333333333d0 / (im * im)))))))
else
tmp = re + (im * (im * (re * (0.5d0 + (im * (im * 0.041666666666666664d0))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = 0.5 + ((im * im) * 0.041666666666666664);
double t_1 = (im * im) * t_0;
double tmp;
if (im <= 1.2e+67) {
tmp = ((1.0 - ((im * im) * (t_0 * t_1))) * (re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * 0.008333333333333333))))))) / (1.0 - t_1);
} else if (im <= 1.9e+130) {
tmp = (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (2.0 + ((im * im) * (1.0 + (((im * im) * (im * im)) * (0.002777777777777778 + (0.08333333333333333 / (im * im)))))));
} else {
tmp = re + (im * (im * (re * (0.5 + (im * (im * 0.041666666666666664))))));
}
return tmp;
}
def code(re, im): t_0 = 0.5 + ((im * im) * 0.041666666666666664) t_1 = (im * im) * t_0 tmp = 0 if im <= 1.2e+67: tmp = ((1.0 - ((im * im) * (t_0 * t_1))) * (re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * 0.008333333333333333))))))) / (1.0 - t_1) elif im <= 1.9e+130: tmp = (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (2.0 + ((im * im) * (1.0 + (((im * im) * (im * im)) * (0.002777777777777778 + (0.08333333333333333 / (im * im))))))) else: tmp = re + (im * (im * (re * (0.5 + (im * (im * 0.041666666666666664)))))) return tmp
function code(re, im) t_0 = Float64(0.5 + Float64(Float64(im * im) * 0.041666666666666664)) t_1 = Float64(Float64(im * im) * t_0) tmp = 0.0 if (im <= 1.2e+67) tmp = Float64(Float64(Float64(1.0 - Float64(Float64(im * im) * Float64(t_0 * t_1))) * Float64(re * Float64(1.0 + Float64(re * Float64(re * Float64(-0.16666666666666666 + Float64(Float64(re * re) * 0.008333333333333333))))))) / Float64(1.0 - t_1)); elseif (im <= 1.9e+130) tmp = Float64(Float64(re * Float64(0.5 + Float64(re * Float64(re * Float64(-0.08333333333333333 + Float64(Float64(re * re) * Float64(0.004166666666666667 + Float64(Float64(re * re) * -9.92063492063492e-5)))))))) * Float64(2.0 + Float64(Float64(im * im) * Float64(1.0 + Float64(Float64(Float64(im * im) * Float64(im * im)) * Float64(0.002777777777777778 + Float64(0.08333333333333333 / Float64(im * im)))))))); else tmp = Float64(re + Float64(im * Float64(im * Float64(re * Float64(0.5 + Float64(im * Float64(im * 0.041666666666666664))))))); end return tmp end
function tmp_2 = code(re, im) t_0 = 0.5 + ((im * im) * 0.041666666666666664); t_1 = (im * im) * t_0; tmp = 0.0; if (im <= 1.2e+67) tmp = ((1.0 - ((im * im) * (t_0 * t_1))) * (re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * 0.008333333333333333))))))) / (1.0 - t_1); elseif (im <= 1.9e+130) tmp = (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (2.0 + ((im * im) * (1.0 + (((im * im) * (im * im)) * (0.002777777777777778 + (0.08333333333333333 / (im * im))))))); else tmp = re + (im * (im * (re * (0.5 + (im * (im * 0.041666666666666664)))))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(0.5 + N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(im * im), $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[im, 1.2e+67], N[(N[(N[(1.0 - N[(N[(im * im), $MachinePrecision] * N[(t$95$0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(1.0 + N[(re * N[(re * N[(-0.16666666666666666 + N[(N[(re * re), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 1.9e+130], N[(N[(re * N[(0.5 + N[(re * N[(re * N[(-0.08333333333333333 + N[(N[(re * re), $MachinePrecision] * N[(0.004166666666666667 + N[(N[(re * re), $MachinePrecision] * -9.92063492063492e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(im * im), $MachinePrecision] * N[(1.0 + N[(N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision] * N[(0.002777777777777778 + N[(0.08333333333333333 / N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re + N[(im * N[(im * N[(re * N[(0.5 + N[(im * N[(im * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\\
t_1 := \left(im \cdot im\right) \cdot t\_0\\
\mathbf{if}\;im \leq 1.2 \cdot 10^{+67}:\\
\;\;\;\;\frac{\left(1 - \left(im \cdot im\right) \cdot \left(t\_0 \cdot t\_1\right)\right) \cdot \left(re \cdot \left(1 + re \cdot \left(re \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot 0.008333333333333333\right)\right)\right)\right)}{1 - t\_1}\\
\mathbf{elif}\;im \leq 1.9 \cdot 10^{+130}:\\
\;\;\;\;\left(re \cdot \left(0.5 + re \cdot \left(re \cdot \left(-0.08333333333333333 + \left(re \cdot re\right) \cdot \left(0.004166666666666667 + \left(re \cdot re\right) \cdot -9.92063492063492 \cdot 10^{-5}\right)\right)\right)\right)\right) \cdot \left(2 + \left(im \cdot im\right) \cdot \left(1 + \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right) \cdot \left(0.002777777777777778 + \frac{0.08333333333333333}{im \cdot im}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re + im \cdot \left(im \cdot \left(re \cdot \left(0.5 + im \cdot \left(im \cdot 0.041666666666666664\right)\right)\right)\right)\\
\end{array}
\end{array}
if im < 1.20000000000000001e67Initial 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
Simplified78.2%
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
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6451.1%
Simplified51.1%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr42.2%
if 1.20000000000000001e67 < im < 1.9000000000000001e130Initial 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-*.f64100.0%
Simplified100.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6480.0%
Simplified80.0%
Taylor expanded in im around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6480.0%
Simplified80.0%
if 1.9000000000000001e130 < 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%
*-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
Simplified86.7%
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
*-lowering-*.f64N/A
*-lowering-*.f6486.7%
Simplified86.7%
(FPCore (re im)
:precision binary64
(if (<= im 2e+155)
(*
(+
2.0
(*
im
(*
im
(+
1.0
(*
im
(* im (+ 0.08333333333333333 (* (* im im) 0.002777777777777778))))))))
(* re (+ 0.5 (* (* re re) -0.08333333333333333))))
(* re (+ 1.0 (* (* im im) 0.5)))))
double code(double re, double im) {
double tmp;
if (im <= 2e+155) {
tmp = (2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (re * (0.5 + ((re * re) * -0.08333333333333333)));
} else {
tmp = re * (1.0 + ((im * im) * 0.5));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 2d+155) then
tmp = (2.0d0 + (im * (im * (1.0d0 + (im * (im * (0.08333333333333333d0 + ((im * im) * 0.002777777777777778d0)))))))) * (re * (0.5d0 + ((re * re) * (-0.08333333333333333d0))))
else
tmp = re * (1.0d0 + ((im * im) * 0.5d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 2e+155) {
tmp = (2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (re * (0.5 + ((re * re) * -0.08333333333333333)));
} else {
tmp = re * (1.0 + ((im * im) * 0.5));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 2e+155: tmp = (2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (re * (0.5 + ((re * re) * -0.08333333333333333))) else: tmp = re * (1.0 + ((im * im) * 0.5)) return tmp
function code(re, im) tmp = 0.0 if (im <= 2e+155) tmp = Float64(Float64(2.0 + Float64(im * Float64(im * Float64(1.0 + Float64(im * Float64(im * Float64(0.08333333333333333 + Float64(Float64(im * im) * 0.002777777777777778)))))))) * Float64(re * Float64(0.5 + Float64(Float64(re * re) * -0.08333333333333333)))); else tmp = Float64(re * Float64(1.0 + Float64(Float64(im * im) * 0.5))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 2e+155) tmp = (2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (re * (0.5 + ((re * re) * -0.08333333333333333))); else tmp = re * (1.0 + ((im * im) * 0.5)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 2e+155], N[(N[(2.0 + N[(im * N[(im * N[(1.0 + N[(im * N[(im * N[(0.08333333333333333 + N[(N[(im * im), $MachinePrecision] * 0.002777777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(0.5 + N[(N[(re * re), $MachinePrecision] * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(1.0 + N[(N[(im * im), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 2 \cdot 10^{+155}:\\
\;\;\;\;\left(2 + im \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\right)\right)\right) \cdot \left(re \cdot \left(0.5 + \left(re \cdot re\right) \cdot -0.08333333333333333\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(1 + \left(im \cdot im\right) \cdot 0.5\right)\\
\end{array}
\end{array}
if im < 2.00000000000000001e155Initial 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-*.f6487.9%
Simplified87.9%
Taylor expanded in re around 0
Simplified58.7%
if 2.00000000000000001e155 < 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%
*-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
Simplified89.3%
Taylor expanded in im around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
metadata-evalN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6489.3%
Simplified89.3%
Final simplification62.1%
(FPCore (re im)
:precision binary64
(if (<= re 1.9e+111)
(*
re
(+
1.0
(*
(* im im)
(+
0.5
(*
im
(* im (+ 0.041666666666666664 (* (* im im) 0.001388888888888889))))))))
(* re (* (* re re) -0.16666666666666666))))
double code(double re, double im) {
double tmp;
if (re <= 1.9e+111) {
tmp = re * (1.0 + ((im * im) * (0.5 + (im * (im * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))));
} else {
tmp = re * ((re * re) * -0.16666666666666666);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 1.9d+111) then
tmp = re * (1.0d0 + ((im * im) * (0.5d0 + (im * (im * (0.041666666666666664d0 + ((im * im) * 0.001388888888888889d0)))))))
else
tmp = re * ((re * re) * (-0.16666666666666666d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 1.9e+111) {
tmp = re * (1.0 + ((im * im) * (0.5 + (im * (im * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))));
} else {
tmp = re * ((re * re) * -0.16666666666666666);
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 1.9e+111: tmp = re * (1.0 + ((im * im) * (0.5 + (im * (im * (0.041666666666666664 + ((im * im) * 0.001388888888888889))))))) else: tmp = re * ((re * re) * -0.16666666666666666) return tmp
function code(re, im) tmp = 0.0 if (re <= 1.9e+111) tmp = Float64(re * Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + Float64(im * Float64(im * Float64(0.041666666666666664 + Float64(Float64(im * im) * 0.001388888888888889)))))))); else tmp = Float64(re * Float64(Float64(re * re) * -0.16666666666666666)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 1.9e+111) tmp = re * (1.0 + ((im * im) * (0.5 + (im * (im * (0.041666666666666664 + ((im * im) * 0.001388888888888889))))))); else tmp = re * ((re * re) * -0.16666666666666666); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 1.9e+111], N[(re * N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.5 + N[(im * N[(im * N[(0.041666666666666664 + N[(N[(im * im), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 1.9 \cdot 10^{+111}:\\
\;\;\;\;re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + im \cdot \left(im \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(\left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
\end{array}
\end{array}
if re < 1.89999999999999988e111Initial 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
Simplified72.3%
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-*.f6465.4%
Simplified65.4%
if 1.89999999999999988e111 < re Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6459.7%
Simplified59.7%
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-*.f6429.1%
Simplified29.1%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6429.1%
Simplified29.1%
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-*.f6429.1%
Simplified29.1%
Final simplification60.3%
(FPCore (re im) :precision binary64 (if (<= re 1.9e+111) (* re (+ 1.0 (* (* im im) (+ 0.5 (* (* im im) 0.041666666666666664))))) (* re (* (* re re) -0.16666666666666666))))
double code(double re, double im) {
double tmp;
if (re <= 1.9e+111) {
tmp = re * (1.0 + ((im * im) * (0.5 + ((im * im) * 0.041666666666666664))));
} else {
tmp = re * ((re * re) * -0.16666666666666666);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 1.9d+111) then
tmp = re * (1.0d0 + ((im * im) * (0.5d0 + ((im * im) * 0.041666666666666664d0))))
else
tmp = re * ((re * re) * (-0.16666666666666666d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 1.9e+111) {
tmp = re * (1.0 + ((im * im) * (0.5 + ((im * im) * 0.041666666666666664))));
} else {
tmp = re * ((re * re) * -0.16666666666666666);
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 1.9e+111: tmp = re * (1.0 + ((im * im) * (0.5 + ((im * im) * 0.041666666666666664)))) else: tmp = re * ((re * re) * -0.16666666666666666) return tmp
function code(re, im) tmp = 0.0 if (re <= 1.9e+111) tmp = Float64(re * Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + Float64(Float64(im * im) * 0.041666666666666664))))); else tmp = Float64(re * Float64(Float64(re * re) * -0.16666666666666666)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 1.9e+111) tmp = re * (1.0 + ((im * im) * (0.5 + ((im * im) * 0.041666666666666664)))); else tmp = re * ((re * re) * -0.16666666666666666); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 1.9e+111], N[(re * N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.5 + N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 1.9 \cdot 10^{+111}:\\
\;\;\;\;re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(\left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
\end{array}
\end{array}
if re < 1.89999999999999988e111Initial 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
Simplified80.0%
Taylor expanded in re around 0
Simplified59.2%
if 1.89999999999999988e111 < re Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6459.7%
Simplified59.7%
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-*.f6429.1%
Simplified29.1%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6429.1%
Simplified29.1%
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-*.f6429.1%
Simplified29.1%
Final simplification54.9%
(FPCore (re im) :precision binary64 (if (<= im 4.1e+147) (* re (* (+ (* im im) 2.0) (+ 0.5 (* (* re re) -0.08333333333333333)))) (* re (+ 1.0 (* (* im im) 0.5)))))
double code(double re, double im) {
double tmp;
if (im <= 4.1e+147) {
tmp = re * (((im * im) + 2.0) * (0.5 + ((re * re) * -0.08333333333333333)));
} else {
tmp = re * (1.0 + ((im * im) * 0.5));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 4.1d+147) then
tmp = re * (((im * im) + 2.0d0) * (0.5d0 + ((re * re) * (-0.08333333333333333d0))))
else
tmp = re * (1.0d0 + ((im * im) * 0.5d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 4.1e+147) {
tmp = re * (((im * im) + 2.0) * (0.5 + ((re * re) * -0.08333333333333333)));
} else {
tmp = re * (1.0 + ((im * im) * 0.5));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 4.1e+147: tmp = re * (((im * im) + 2.0) * (0.5 + ((re * re) * -0.08333333333333333))) else: tmp = re * (1.0 + ((im * im) * 0.5)) return tmp
function code(re, im) tmp = 0.0 if (im <= 4.1e+147) tmp = Float64(re * Float64(Float64(Float64(im * im) + 2.0) * Float64(0.5 + Float64(Float64(re * re) * -0.08333333333333333)))); else tmp = Float64(re * Float64(1.0 + Float64(Float64(im * im) * 0.5))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 4.1e+147) tmp = re * (((im * im) + 2.0) * (0.5 + ((re * re) * -0.08333333333333333))); else tmp = re * (1.0 + ((im * im) * 0.5)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 4.1e+147], N[(re * N[(N[(N[(im * im), $MachinePrecision] + 2.0), $MachinePrecision] * N[(0.5 + N[(N[(re * re), $MachinePrecision] * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(1.0 + N[(N[(im * im), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 4.1 \cdot 10^{+147}:\\
\;\;\;\;re \cdot \left(\left(im \cdot im + 2\right) \cdot \left(0.5 + \left(re \cdot re\right) \cdot -0.08333333333333333\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(1 + \left(im \cdot im\right) \cdot 0.5\right)\\
\end{array}
\end{array}
if im < 4.09999999999999966e147Initial 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-*.f6487.9%
Simplified87.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
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-*.f6458.7%
Simplified58.7%
Taylor expanded in im around 0
+-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
Simplified47.7%
Taylor expanded in re around 0
distribute-lft-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
fma-undefineN/A
distribute-lft-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
Simplified47.0%
if 4.09999999999999966e147 < 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%
*-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
Simplified89.3%
Taylor expanded in im around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
metadata-evalN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6489.3%
Simplified89.3%
Final simplification51.6%
(FPCore (re im) :precision binary64 (if (<= im 6.4e+124) (* re (+ 1.0 (* re (* re -0.16666666666666666)))) (* re (+ 1.0 (* (* im im) 0.5)))))
double code(double re, double im) {
double tmp;
if (im <= 6.4e+124) {
tmp = re * (1.0 + (re * (re * -0.16666666666666666)));
} else {
tmp = re * (1.0 + ((im * im) * 0.5));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 6.4d+124) then
tmp = re * (1.0d0 + (re * (re * (-0.16666666666666666d0))))
else
tmp = re * (1.0d0 + ((im * im) * 0.5d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 6.4e+124) {
tmp = re * (1.0 + (re * (re * -0.16666666666666666)));
} else {
tmp = re * (1.0 + ((im * im) * 0.5));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 6.4e+124: tmp = re * (1.0 + (re * (re * -0.16666666666666666))) else: tmp = re * (1.0 + ((im * im) * 0.5)) return tmp
function code(re, im) tmp = 0.0 if (im <= 6.4e+124) tmp = Float64(re * Float64(1.0 + Float64(re * Float64(re * -0.16666666666666666)))); else tmp = Float64(re * Float64(1.0 + Float64(Float64(im * im) * 0.5))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 6.4e+124) tmp = re * (1.0 + (re * (re * -0.16666666666666666))); else tmp = re * (1.0 + ((im * im) * 0.5)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 6.4e+124], N[(re * N[(1.0 + N[(re * N[(re * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(1.0 + N[(N[(im * im), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 6.4 \cdot 10^{+124}:\\
\;\;\;\;re \cdot \left(1 + re \cdot \left(re \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(1 + \left(im \cdot im\right) \cdot 0.5\right)\\
\end{array}
\end{array}
if im < 6.39999999999999986e124Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6453.7%
Simplified53.7%
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-*.f6438.5%
Simplified38.5%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6435.2%
Simplified35.2%
if 6.39999999999999986e124 < 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%
*-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
Simplified86.7%
Taylor expanded in im around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
metadata-evalN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6483.5%
Simplified83.5%
Final simplification40.9%
(FPCore (re im) :precision binary64 (if (<= re 1.9e+111) (* re (+ 1.0 (* (* im im) 0.5))) (* re (* (* re re) -0.16666666666666666))))
double code(double re, double im) {
double tmp;
if (re <= 1.9e+111) {
tmp = re * (1.0 + ((im * im) * 0.5));
} else {
tmp = re * ((re * re) * -0.16666666666666666);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 1.9d+111) then
tmp = re * (1.0d0 + ((im * im) * 0.5d0))
else
tmp = re * ((re * re) * (-0.16666666666666666d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 1.9e+111) {
tmp = re * (1.0 + ((im * im) * 0.5));
} else {
tmp = re * ((re * re) * -0.16666666666666666);
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 1.9e+111: tmp = re * (1.0 + ((im * im) * 0.5)) else: tmp = re * ((re * re) * -0.16666666666666666) return tmp
function code(re, im) tmp = 0.0 if (re <= 1.9e+111) tmp = Float64(re * Float64(1.0 + Float64(Float64(im * im) * 0.5))); else tmp = Float64(re * Float64(Float64(re * re) * -0.16666666666666666)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 1.9e+111) tmp = re * (1.0 + ((im * im) * 0.5)); else tmp = re * ((re * re) * -0.16666666666666666); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 1.9e+111], N[(re * N[(1.0 + N[(N[(im * im), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 1.9 \cdot 10^{+111}:\\
\;\;\;\;re \cdot \left(1 + \left(im \cdot im\right) \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(\left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
\end{array}
\end{array}
if re < 1.89999999999999988e111Initial 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
Simplified72.3%
Taylor expanded in im around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
metadata-evalN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.0%
Simplified51.0%
if 1.89999999999999988e111 < re Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6459.7%
Simplified59.7%
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-*.f6429.1%
Simplified29.1%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6429.1%
Simplified29.1%
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-*.f6429.1%
Simplified29.1%
Final simplification47.9%
(FPCore (re im) :precision binary64 (if (<= re 1.6e+62) re (* re (* (* re re) -0.16666666666666666))))
double code(double re, double im) {
double tmp;
if (re <= 1.6e+62) {
tmp = re;
} else {
tmp = re * ((re * re) * -0.16666666666666666);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 1.6d+62) then
tmp = re
else
tmp = re * ((re * re) * (-0.16666666666666666d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 1.6e+62) {
tmp = re;
} else {
tmp = re * ((re * re) * -0.16666666666666666);
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 1.6e+62: tmp = re else: tmp = re * ((re * re) * -0.16666666666666666) return tmp
function code(re, im) tmp = 0.0 if (re <= 1.6e+62) tmp = re; else tmp = Float64(re * Float64(Float64(re * re) * -0.16666666666666666)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 1.6e+62) tmp = re; else tmp = re * ((re * re) * -0.16666666666666666); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 1.6e+62], re, N[(re * N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 1.6 \cdot 10^{+62}:\\
\;\;\;\;re\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(\left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
\end{array}
\end{array}
if re < 1.59999999999999992e62Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6445.6%
Simplified45.6%
Taylor expanded in re around 0
Simplified29.8%
if 1.59999999999999992e62 < re Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6456.8%
Simplified56.8%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6424.7%
Simplified24.7%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6422.8%
Simplified22.8%
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-*.f6422.8%
Simplified22.8%
Final simplification28.5%
(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.f6447.7%
Simplified47.7%
Taylor expanded in re around 0
Simplified24.8%
herbie shell --seed 2024139
(FPCore (re im)
:name "math.sin on complex, real part"
:precision binary64
(* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))