
(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 27 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (re im) :precision binary64 (* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))
double code(double re, double im) {
return (0.5 * sin(re)) * (exp((0.0 - im)) + exp(im));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = (0.5d0 * sin(re)) * (exp((0.0d0 - im)) + exp(im))
end function
public static double code(double re, double im) {
return (0.5 * Math.sin(re)) * (Math.exp((0.0 - im)) + Math.exp(im));
}
def code(re, im): return (0.5 * math.sin(re)) * (math.exp((0.0 - im)) + math.exp(im))
function code(re, im) return Float64(Float64(0.5 * sin(re)) * Float64(exp(Float64(0.0 - im)) + exp(im))) end
function tmp = code(re, im) tmp = (0.5 * sin(re)) * (exp((0.0 - im)) + exp(im)); end
code[re_, im_] := N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[Exp[N[(0.0 - im), $MachinePrecision]], $MachinePrecision] + N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right)
\end{array}
(FPCore (re im) :precision binary64 (+ (/ (* 0.5 (sin re)) (exp im)) (* (sin re) (* 0.5 (exp im)))))
double code(double re, double im) {
return ((0.5 * sin(re)) / exp(im)) + (sin(re) * (0.5 * exp(im)));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = ((0.5d0 * sin(re)) / exp(im)) + (sin(re) * (0.5d0 * exp(im)))
end function
public static double code(double re, double im) {
return ((0.5 * Math.sin(re)) / Math.exp(im)) + (Math.sin(re) * (0.5 * Math.exp(im)));
}
def code(re, im): return ((0.5 * math.sin(re)) / math.exp(im)) + (math.sin(re) * (0.5 * math.exp(im)))
function code(re, im) return Float64(Float64(Float64(0.5 * sin(re)) / exp(im)) + Float64(sin(re) * Float64(0.5 * exp(im)))) end
function tmp = code(re, im) tmp = ((0.5 * sin(re)) / exp(im)) + (sin(re) * (0.5 * exp(im))); end
code[re_, im_] := N[(N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] / N[Exp[im], $MachinePrecision]), $MachinePrecision] + N[(N[Sin[re], $MachinePrecision] * N[(0.5 * N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.5 \cdot \sin re}{e^{im}} + \sin re \cdot \left(0.5 \cdot e^{im}\right)
\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
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
exp-lowering-exp.f64100.0%
Applied egg-rr100.0%
(FPCore (re im) :precision binary64 (* (sin re) (cosh im)))
double code(double re, double im) {
return sin(re) * cosh(im);
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = sin(re) * cosh(im)
end function
public static double code(double re, double im) {
return Math.sin(re) * Math.cosh(im);
}
def code(re, im): return math.sin(re) * math.cosh(im)
function code(re, im) return Float64(sin(re) * cosh(im)) end
function tmp = code(re, im) tmp = sin(re) * cosh(im); end
code[re_, im_] := N[(N[Sin[re], $MachinePrecision] * N[Cosh[im], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin re \cdot \cosh im
\end{array}
Initial program 100.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lft-identityN/A
cosh-lowering-cosh.f64100.0%
Applied egg-rr100.0%
(FPCore (re im)
:precision binary64
(let* ((t_0
(*
im
(* im (+ 0.08333333333333333 (* (* im im) 0.002777777777777778)))))
(t_1 (* (* im im) (- -1.0 t_0))))
(if (<= im 1.0)
(*
(* 0.5 (sin re))
(* (+ 4.0 (* (* im im) (* (+ 1.0 t_0) t_1))) (/ 1.0 (+ 2.0 t_1))))
(if (<= im 7.2e+51)
(* (cosh im) (* re (+ 1.0 (* (* re re) -0.16666666666666666))))
(*
(sin 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.0) {
tmp = (0.5 * sin(re)) * ((4.0 + ((im * im) * ((1.0 + t_0) * t_1))) * (1.0 / (2.0 + t_1)));
} else if (im <= 7.2e+51) {
tmp = cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = sin(re) * (1.0 + (im * (im * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: 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.0d0) then
tmp = (0.5d0 * sin(re)) * ((4.0d0 + ((im * im) * ((1.0d0 + t_0) * t_1))) * (1.0d0 / (2.0d0 + t_1)))
else if (im <= 7.2d+51) 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 + ((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.0) {
tmp = (0.5 * Math.sin(re)) * ((4.0 + ((im * im) * ((1.0 + t_0) * t_1))) * (1.0 / (2.0 + t_1)));
} else if (im <= 7.2e+51) {
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 + ((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.0: tmp = (0.5 * math.sin(re)) * ((4.0 + ((im * im) * ((1.0 + t_0) * t_1))) * (1.0 / (2.0 + t_1))) elif im <= 7.2e+51: 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 + ((im * im) * 0.001388888888888889))))))) return tmp
function code(re, im) t_0 = Float64(im * Float64(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 <= 1.0) tmp = Float64(Float64(0.5 * sin(re)) * Float64(Float64(4.0 + Float64(Float64(im * im) * Float64(Float64(1.0 + t_0) * t_1))) * Float64(1.0 / Float64(2.0 + t_1)))); elseif (im <= 7.2e+51) tmp = Float64(cosh(im) * Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666)))); else tmp = Float64(sin(re) * Float64(1.0 + Float64(im * Float64(im * Float64(0.5 + Float64(Float64(im * 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.0) tmp = (0.5 * sin(re)) * ((4.0 + ((im * im) * ((1.0 + t_0) * t_1))) * (1.0 / (2.0 + t_1))); elseif (im <= 7.2e+51) tmp = cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666))); else tmp = sin(re) * (1.0 + (im * (im * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889))))))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(im * N[(im * N[(0.08333333333333333 + N[(N[(im * im), $MachinePrecision] * 0.002777777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(im * im), $MachinePrecision] * N[(-1.0 - t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 1.0], N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[(4.0 + N[(N[(im * im), $MachinePrecision] * N[(N[(1.0 + t$95$0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 7.2e+51], 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[(im * N[(im * N[(0.5 + N[(N[(im * im), $MachinePrecision] * 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 := im \cdot \left(im \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\\
t_1 := \left(im \cdot im\right) \cdot \left(-1 - t\_0\right)\\
\mathbf{if}\;im \leq 1:\\
\;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(\left(4 + \left(im \cdot im\right) \cdot \left(\left(1 + t\_0\right) \cdot t\_1\right)\right) \cdot \frac{1}{2 + t\_1}\right)\\
\mathbf{elif}\;im \leq 7.2 \cdot 10^{+51}:\\
\;\;\;\;\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 + im \cdot \left(im \cdot \left(0.5 + \left(im \cdot im\right) \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\right)\\
\end{array}
\end{array}
if im < 1Initial 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-*.f6491.2%
Simplified91.2%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr91.2%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
Applied egg-rr64.7%
if 1 < im < 7.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-*.f6478.6%
Simplified78.6%
if 7.20000000000000022e51 < 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 im around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/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 simplification72.1%
(FPCore (re im)
:precision binary64
(let* ((t_0
(*
im
(* im (+ 0.08333333333333333 (* (* im im) 0.002777777777777778)))))
(t_1 (- -1.0 t_0)))
(if (<= im 0.99)
(*
(* 0.5 (sin re))
(*
(+ 4.0 (* (* (* im im) (* im im)) (* (+ 1.0 t_0) t_1)))
(/ 1.0 (+ 2.0 (* im (* im t_1))))))
(if (<= im 7.2e+51)
(* (cosh im) (* re (+ 1.0 (* (* re re) -0.16666666666666666))))
(*
(sin 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 = -1.0 - t_0;
double tmp;
if (im <= 0.99) {
tmp = (0.5 * sin(re)) * ((4.0 + (((im * im) * (im * im)) * ((1.0 + t_0) * t_1))) * (1.0 / (2.0 + (im * (im * t_1)))));
} else if (im <= 7.2e+51) {
tmp = cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = sin(re) * (1.0 + (im * (im * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = im * (im * (0.08333333333333333d0 + ((im * im) * 0.002777777777777778d0)))
t_1 = (-1.0d0) - t_0
if (im <= 0.99d0) then
tmp = (0.5d0 * sin(re)) * ((4.0d0 + (((im * im) * (im * im)) * ((1.0d0 + t_0) * t_1))) * (1.0d0 / (2.0d0 + (im * (im * t_1)))))
else if (im <= 7.2d+51) 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 + ((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 = -1.0 - t_0;
double tmp;
if (im <= 0.99) {
tmp = (0.5 * Math.sin(re)) * ((4.0 + (((im * im) * (im * im)) * ((1.0 + t_0) * t_1))) * (1.0 / (2.0 + (im * (im * t_1)))));
} else if (im <= 7.2e+51) {
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 + ((im * im) * 0.001388888888888889)))))));
}
return tmp;
}
def code(re, im): t_0 = im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778))) t_1 = -1.0 - t_0 tmp = 0 if im <= 0.99: tmp = (0.5 * math.sin(re)) * ((4.0 + (((im * im) * (im * im)) * ((1.0 + t_0) * t_1))) * (1.0 / (2.0 + (im * (im * t_1))))) elif im <= 7.2e+51: 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 + ((im * im) * 0.001388888888888889))))))) return tmp
function code(re, im) t_0 = Float64(im * Float64(im * Float64(0.08333333333333333 + Float64(Float64(im * im) * 0.002777777777777778)))) t_1 = Float64(-1.0 - t_0) tmp = 0.0 if (im <= 0.99) tmp = Float64(Float64(0.5 * sin(re)) * Float64(Float64(4.0 + Float64(Float64(Float64(im * im) * Float64(im * im)) * Float64(Float64(1.0 + t_0) * t_1))) * Float64(1.0 / Float64(2.0 + Float64(im * Float64(im * t_1)))))); elseif (im <= 7.2e+51) tmp = Float64(cosh(im) * Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666)))); else tmp = Float64(sin(re) * Float64(1.0 + Float64(im * Float64(im * Float64(0.5 + Float64(Float64(im * 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 = -1.0 - t_0; tmp = 0.0; if (im <= 0.99) tmp = (0.5 * sin(re)) * ((4.0 + (((im * im) * (im * im)) * ((1.0 + t_0) * t_1))) * (1.0 / (2.0 + (im * (im * t_1))))); elseif (im <= 7.2e+51) tmp = cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666))); else tmp = sin(re) * (1.0 + (im * (im * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889))))))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(im * N[(im * N[(0.08333333333333333 + N[(N[(im * im), $MachinePrecision] * 0.002777777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-1.0 - t$95$0), $MachinePrecision]}, If[LessEqual[im, 0.99], N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[(4.0 + N[(N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + t$95$0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(2.0 + N[(im * N[(im * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 7.2e+51], 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[(im * N[(im * N[(0.5 + N[(N[(im * im), $MachinePrecision] * 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 := im \cdot \left(im \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\\
t_1 := -1 - t\_0\\
\mathbf{if}\;im \leq 0.99:\\
\;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(\left(4 + \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right) \cdot \left(\left(1 + t\_0\right) \cdot t\_1\right)\right) \cdot \frac{1}{2 + im \cdot \left(im \cdot t\_1\right)}\right)\\
\mathbf{elif}\;im \leq 7.2 \cdot 10^{+51}:\\
\;\;\;\;\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 + im \cdot \left(im \cdot \left(0.5 + \left(im \cdot im\right) \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\right)\\
\end{array}
\end{array}
if im < 0.98999999999999999Initial 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-*.f6491.2%
Simplified91.2%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
Applied egg-rr64.7%
if 0.98999999999999999 < im < 7.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-*.f6478.6%
Simplified78.6%
if 7.20000000000000022e51 < 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 im around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/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 simplification72.1%
(FPCore (re im)
:precision binary64
(let* ((t_0 (+ 0.041666666666666664 (* (* im im) 0.001388888888888889))))
(if (<= im 1.16)
(* (sin re) (+ (* t_0 (* im (* im (* im im)))) (+ 1.0 (* 0.5 (* im im)))))
(if (<= im 7.2e+51)
(* (cosh im) (* re (+ 1.0 (* (* re re) -0.16666666666666666))))
(* (sin re) (+ 1.0 (* im (* im (+ 0.5 (* (* im im) t_0))))))))))
double code(double re, double im) {
double t_0 = 0.041666666666666664 + ((im * im) * 0.001388888888888889);
double tmp;
if (im <= 1.16) {
tmp = sin(re) * ((t_0 * (im * (im * (im * im)))) + (1.0 + (0.5 * (im * im))));
} else if (im <= 7.2e+51) {
tmp = cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = sin(re) * (1.0 + (im * (im * (0.5 + ((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 = 0.041666666666666664d0 + ((im * im) * 0.001388888888888889d0)
if (im <= 1.16d0) then
tmp = sin(re) * ((t_0 * (im * (im * (im * im)))) + (1.0d0 + (0.5d0 * (im * im))))
else if (im <= 7.2d+51) then
tmp = cosh(im) * (re * (1.0d0 + ((re * re) * (-0.16666666666666666d0))))
else
tmp = sin(re) * (1.0d0 + (im * (im * (0.5d0 + ((im * im) * t_0)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = 0.041666666666666664 + ((im * im) * 0.001388888888888889);
double tmp;
if (im <= 1.16) {
tmp = Math.sin(re) * ((t_0 * (im * (im * (im * im)))) + (1.0 + (0.5 * (im * im))));
} else if (im <= 7.2e+51) {
tmp = Math.cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = Math.sin(re) * (1.0 + (im * (im * (0.5 + ((im * im) * t_0)))));
}
return tmp;
}
def code(re, im): t_0 = 0.041666666666666664 + ((im * im) * 0.001388888888888889) tmp = 0 if im <= 1.16: tmp = math.sin(re) * ((t_0 * (im * (im * (im * im)))) + (1.0 + (0.5 * (im * im)))) elif im <= 7.2e+51: tmp = math.cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666))) else: tmp = math.sin(re) * (1.0 + (im * (im * (0.5 + ((im * im) * t_0))))) return tmp
function code(re, im) t_0 = Float64(0.041666666666666664 + Float64(Float64(im * im) * 0.001388888888888889)) tmp = 0.0 if (im <= 1.16) tmp = Float64(sin(re) * Float64(Float64(t_0 * Float64(im * Float64(im * Float64(im * im)))) + Float64(1.0 + Float64(0.5 * Float64(im * im))))); elseif (im <= 7.2e+51) tmp = Float64(cosh(im) * Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666)))); else tmp = Float64(sin(re) * Float64(1.0 + Float64(im * Float64(im * Float64(0.5 + Float64(Float64(im * im) * t_0)))))); end return tmp end
function tmp_2 = code(re, im) t_0 = 0.041666666666666664 + ((im * im) * 0.001388888888888889); tmp = 0.0; if (im <= 1.16) tmp = sin(re) * ((t_0 * (im * (im * (im * im)))) + (1.0 + (0.5 * (im * im)))); elseif (im <= 7.2e+51) tmp = cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666))); else tmp = sin(re) * (1.0 + (im * (im * (0.5 + ((im * im) * t_0))))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(0.041666666666666664 + N[(N[(im * im), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 1.16], N[(N[Sin[re], $MachinePrecision] * N[(N[(t$95$0 * N[(im * N[(im * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 + N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 7.2e+51], 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[(im * N[(im * N[(0.5 + N[(N[(im * im), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\\
\mathbf{if}\;im \leq 1.16:\\
\;\;\;\;\sin re \cdot \left(t\_0 \cdot \left(im \cdot \left(im \cdot \left(im \cdot im\right)\right)\right) + \left(1 + 0.5 \cdot \left(im \cdot im\right)\right)\right)\\
\mathbf{elif}\;im \leq 7.2 \cdot 10^{+51}:\\
\;\;\;\;\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 + im \cdot \left(im \cdot \left(0.5 + \left(im \cdot im\right) \cdot t\_0\right)\right)\right)\\
\end{array}
\end{array}
if im < 1.15999999999999992Initial program 100.0%
Taylor expanded in im around 0
Simplified91.2%
if 1.15999999999999992 < im < 7.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-*.f6478.6%
Simplified78.6%
if 7.20000000000000022e51 < 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 im around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/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 simplification92.2%
(FPCore (re im)
:precision binary64
(let* ((t_0 (+ 0.041666666666666664 (* (* im im) 0.001388888888888889))))
(if (<= im 2.3)
(* (sin re) (+ 1.0 (* (* im im) (+ 0.5 (* im (* im t_0))))))
(if (<= im 7.2e+51)
(* (cosh im) (* re (+ 1.0 (* (* re re) -0.16666666666666666))))
(* (sin re) (+ 1.0 (* im (* im (+ 0.5 (* (* im im) t_0))))))))))
double code(double re, double im) {
double t_0 = 0.041666666666666664 + ((im * im) * 0.001388888888888889);
double tmp;
if (im <= 2.3) {
tmp = sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * t_0)))));
} else if (im <= 7.2e+51) {
tmp = cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = sin(re) * (1.0 + (im * (im * (0.5 + ((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 = 0.041666666666666664d0 + ((im * im) * 0.001388888888888889d0)
if (im <= 2.3d0) then
tmp = sin(re) * (1.0d0 + ((im * im) * (0.5d0 + (im * (im * t_0)))))
else if (im <= 7.2d+51) then
tmp = cosh(im) * (re * (1.0d0 + ((re * re) * (-0.16666666666666666d0))))
else
tmp = sin(re) * (1.0d0 + (im * (im * (0.5d0 + ((im * im) * t_0)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = 0.041666666666666664 + ((im * im) * 0.001388888888888889);
double tmp;
if (im <= 2.3) {
tmp = Math.sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * t_0)))));
} else if (im <= 7.2e+51) {
tmp = Math.cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = Math.sin(re) * (1.0 + (im * (im * (0.5 + ((im * im) * t_0)))));
}
return tmp;
}
def code(re, im): t_0 = 0.041666666666666664 + ((im * im) * 0.001388888888888889) tmp = 0 if im <= 2.3: tmp = math.sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * t_0))))) elif im <= 7.2e+51: tmp = math.cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666))) else: tmp = math.sin(re) * (1.0 + (im * (im * (0.5 + ((im * im) * t_0))))) return tmp
function code(re, im) t_0 = Float64(0.041666666666666664 + Float64(Float64(im * im) * 0.001388888888888889)) tmp = 0.0 if (im <= 2.3) tmp = Float64(sin(re) * Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + Float64(im * Float64(im * t_0)))))); elseif (im <= 7.2e+51) tmp = Float64(cosh(im) * Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666)))); else tmp = Float64(sin(re) * Float64(1.0 + Float64(im * Float64(im * Float64(0.5 + Float64(Float64(im * im) * t_0)))))); end return tmp end
function tmp_2 = code(re, im) t_0 = 0.041666666666666664 + ((im * im) * 0.001388888888888889); tmp = 0.0; if (im <= 2.3) tmp = sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * t_0))))); elseif (im <= 7.2e+51) tmp = cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666))); else tmp = sin(re) * (1.0 + (im * (im * (0.5 + ((im * im) * t_0))))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(0.041666666666666664 + N[(N[(im * im), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 2.3], N[(N[Sin[re], $MachinePrecision] * N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.5 + N[(im * N[(im * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 7.2e+51], 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[(im * N[(im * N[(0.5 + N[(N[(im * im), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\\
\mathbf{if}\;im \leq 2.3:\\
\;\;\;\;\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + im \cdot \left(im \cdot t\_0\right)\right)\right)\\
\mathbf{elif}\;im \leq 7.2 \cdot 10^{+51}:\\
\;\;\;\;\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 + im \cdot \left(im \cdot \left(0.5 + \left(im \cdot im\right) \cdot t\_0\right)\right)\right)\\
\end{array}
\end{array}
if im < 2.2999999999999998Initial 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-*.f6491.2%
Simplified91.2%
if 2.2999999999999998 < im < 7.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-*.f6478.6%
Simplified78.6%
if 7.20000000000000022e51 < 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 im around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/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 simplification92.2%
(FPCore (re im)
:precision binary64
(let* ((t_0
(*
(sin re)
(+
1.0
(*
im
(*
im
(+
0.5
(*
(* im im)
(+
0.041666666666666664
(* (* im im) 0.001388888888888889))))))))))
(if (<= im 0.98)
t_0
(if (<= im 7.2e+51)
(* (cosh im) (* re (+ 1.0 (* (* re re) -0.16666666666666666))))
t_0))))
double code(double re, double im) {
double t_0 = sin(re) * (1.0 + (im * (im * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))));
double tmp;
if (im <= 0.98) {
tmp = t_0;
} else if (im <= 7.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) * (1.0d0 + (im * (im * (0.5d0 + ((im * im) * (0.041666666666666664d0 + ((im * im) * 0.001388888888888889d0)))))))
if (im <= 0.98d0) then
tmp = t_0
else if (im <= 7.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) * (1.0 + (im * (im * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))));
double tmp;
if (im <= 0.98) {
tmp = t_0;
} else if (im <= 7.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) * (1.0 + (im * (im * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889))))))) tmp = 0 if im <= 0.98: tmp = t_0 elif im <= 7.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(sin(re) * Float64(1.0 + Float64(im * Float64(im * Float64(0.5 + Float64(Float64(im * im) * Float64(0.041666666666666664 + Float64(Float64(im * im) * 0.001388888888888889)))))))) tmp = 0.0 if (im <= 0.98) tmp = t_0; elseif (im <= 7.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) * (1.0 + (im * (im * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889))))))); tmp = 0.0; if (im <= 0.98) tmp = t_0; elseif (im <= 7.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[Sin[re], $MachinePrecision] * N[(1.0 + N[(im * N[(im * N[(0.5 + N[(N[(im * im), $MachinePrecision] * N[(0.041666666666666664 + N[(N[(im * im), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 0.98], t$95$0, If[LessEqual[im, 7.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 := \sin re \cdot \left(1 + im \cdot \left(im \cdot \left(0.5 + \left(im \cdot im\right) \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\right)\\
\mathbf{if}\;im \leq 0.98:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;im \leq 7.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 < 0.97999999999999998 or 7.20000000000000022e51 < 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 im around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/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.0%
Simplified93.0%
if 0.97999999999999998 < im < 7.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-*.f6478.6%
Simplified78.6%
Final simplification92.2%
(FPCore (re im)
:precision binary64
(if (<= im 0.99)
(*
(sin re)
(+
(+ 1.0 (* 0.5 (* im im)))
(* im (* im (* im (* im 0.041666666666666664))))))
(if (<= im 3.2e+71)
(* (cosh im) (* re (+ 1.0 (* (* re re) -0.16666666666666666))))
(* (sin re) (* im (* im (* (* im im) 0.041666666666666664)))))))
double code(double re, double im) {
double tmp;
if (im <= 0.99) {
tmp = sin(re) * ((1.0 + (0.5 * (im * im))) + (im * (im * (im * (im * 0.041666666666666664)))));
} else if (im <= 3.2e+71) {
tmp = cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} 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.99d0) then
tmp = sin(re) * ((1.0d0 + (0.5d0 * (im * im))) + (im * (im * (im * (im * 0.041666666666666664d0)))))
else if (im <= 3.2d+71) then
tmp = cosh(im) * (re * (1.0d0 + ((re * re) * (-0.16666666666666666d0))))
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.99) {
tmp = Math.sin(re) * ((1.0 + (0.5 * (im * im))) + (im * (im * (im * (im * 0.041666666666666664)))));
} else if (im <= 3.2e+71) {
tmp = Math.cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = Math.sin(re) * (im * (im * ((im * im) * 0.041666666666666664)));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 0.99: tmp = math.sin(re) * ((1.0 + (0.5 * (im * im))) + (im * (im * (im * (im * 0.041666666666666664))))) elif im <= 3.2e+71: tmp = math.cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666))) else: tmp = math.sin(re) * (im * (im * ((im * im) * 0.041666666666666664))) return tmp
function code(re, im) tmp = 0.0 if (im <= 0.99) tmp = Float64(sin(re) * Float64(Float64(1.0 + Float64(0.5 * Float64(im * im))) + Float64(im * Float64(im * Float64(im * Float64(im * 0.041666666666666664)))))); elseif (im <= 3.2e+71) tmp = Float64(cosh(im) * Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666)))); 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.99) tmp = sin(re) * ((1.0 + (0.5 * (im * im))) + (im * (im * (im * (im * 0.041666666666666664))))); elseif (im <= 3.2e+71) tmp = cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666))); else tmp = sin(re) * (im * (im * ((im * im) * 0.041666666666666664))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 0.99], N[(N[Sin[re], $MachinePrecision] * N[(N[(1.0 + N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(im * N[(im * N[(im * N[(im * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 3.2e+71], 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[(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.99:\\
\;\;\;\;\sin re \cdot \left(\left(1 + 0.5 \cdot \left(im \cdot im\right)\right) + im \cdot \left(im \cdot \left(im \cdot \left(im \cdot 0.041666666666666664\right)\right)\right)\right)\\
\mathbf{elif}\;im \leq 3.2 \cdot 10^{+71}:\\
\;\;\;\;\cosh im \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)\\
\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.98999999999999999Initial 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
Simplified88.3%
distribute-rgt-inN/A
associate-+r+N/A
*-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6488.3%
Applied egg-rr88.3%
if 0.98999999999999999 < im < 3.20000000000000023e71Initial 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-*.f6485.7%
Simplified85.7%
if 3.20000000000000023e71 < 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
Simplified97.8%
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-*.f6497.8%
Simplified97.8%
Final simplification89.6%
(FPCore (re im)
:precision binary64
(if (<= im 0.98)
(*
(sin re)
(+ 1.0 (* (* im im) (+ 0.5 (* im (* im 0.041666666666666664))))))
(if (<= im 3.2e+71)
(* (cosh im) (* re (+ 1.0 (* (* re re) -0.16666666666666666))))
(* (sin re) (* im (* im (* (* im im) 0.041666666666666664)))))))
double code(double re, double im) {
double tmp;
if (im <= 0.98) {
tmp = sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * 0.041666666666666664)))));
} else if (im <= 3.2e+71) {
tmp = cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} 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.98d0) then
tmp = sin(re) * (1.0d0 + ((im * im) * (0.5d0 + (im * (im * 0.041666666666666664d0)))))
else if (im <= 3.2d+71) then
tmp = cosh(im) * (re * (1.0d0 + ((re * re) * (-0.16666666666666666d0))))
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.98) {
tmp = Math.sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * 0.041666666666666664)))));
} else if (im <= 3.2e+71) {
tmp = Math.cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = Math.sin(re) * (im * (im * ((im * im) * 0.041666666666666664)));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 0.98: tmp = math.sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * 0.041666666666666664))))) elif im <= 3.2e+71: tmp = math.cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666))) else: tmp = math.sin(re) * (im * (im * ((im * im) * 0.041666666666666664))) return tmp
function code(re, im) tmp = 0.0 if (im <= 0.98) tmp = Float64(sin(re) * Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + Float64(im * Float64(im * 0.041666666666666664)))))); elseif (im <= 3.2e+71) tmp = Float64(cosh(im) * Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666)))); 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.98) tmp = sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * 0.041666666666666664))))); elseif (im <= 3.2e+71) tmp = cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666))); else tmp = sin(re) * (im * (im * ((im * im) * 0.041666666666666664))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 0.98], N[(N[Sin[re], $MachinePrecision] * N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.5 + N[(im * N[(im * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 3.2e+71], 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[(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.98:\\
\;\;\;\;\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + im \cdot \left(im \cdot 0.041666666666666664\right)\right)\right)\\
\mathbf{elif}\;im \leq 3.2 \cdot 10^{+71}:\\
\;\;\;\;\cosh im \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)\\
\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.97999999999999998Initial 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
Simplified88.3%
if 0.97999999999999998 < im < 3.20000000000000023e71Initial 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-*.f6485.7%
Simplified85.7%
if 3.20000000000000023e71 < 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
Simplified97.8%
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-*.f6497.8%
Simplified97.8%
Final simplification89.6%
(FPCore (re im)
:precision binary64
(if (<= im 0.98)
(* (* 0.5 (sin re)) (+ (* im im) 2.0))
(if (<= im 3.2e+71)
(* (cosh im) (* re (+ 1.0 (* (* re re) -0.16666666666666666))))
(* (sin re) (* im (* im (* (* im im) 0.041666666666666664)))))))
double code(double re, double im) {
double tmp;
if (im <= 0.98) {
tmp = (0.5 * sin(re)) * ((im * im) + 2.0);
} else if (im <= 3.2e+71) {
tmp = cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} 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.98d0) then
tmp = (0.5d0 * sin(re)) * ((im * im) + 2.0d0)
else if (im <= 3.2d+71) then
tmp = cosh(im) * (re * (1.0d0 + ((re * re) * (-0.16666666666666666d0))))
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.98) {
tmp = (0.5 * Math.sin(re)) * ((im * im) + 2.0);
} else if (im <= 3.2e+71) {
tmp = Math.cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = Math.sin(re) * (im * (im * ((im * im) * 0.041666666666666664)));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 0.98: tmp = (0.5 * math.sin(re)) * ((im * im) + 2.0) elif im <= 3.2e+71: tmp = math.cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666))) else: tmp = math.sin(re) * (im * (im * ((im * im) * 0.041666666666666664))) return tmp
function code(re, im) tmp = 0.0 if (im <= 0.98) tmp = Float64(Float64(0.5 * sin(re)) * Float64(Float64(im * im) + 2.0)); elseif (im <= 3.2e+71) tmp = Float64(cosh(im) * Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666)))); 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.98) tmp = (0.5 * sin(re)) * ((im * im) + 2.0); elseif (im <= 3.2e+71) tmp = cosh(im) * (re * (1.0 + ((re * re) * -0.16666666666666666))); else tmp = sin(re) * (im * (im * ((im * im) * 0.041666666666666664))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 0.98], N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[(im * im), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 3.2e+71], 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[(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.98:\\
\;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im \cdot im + 2\right)\\
\mathbf{elif}\;im \leq 3.2 \cdot 10^{+71}:\\
\;\;\;\;\cosh im \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)\\
\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.97999999999999998Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6479.9%
Simplified79.9%
if 0.97999999999999998 < im < 3.20000000000000023e71Initial 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-*.f6485.7%
Simplified85.7%
if 3.20000000000000023e71 < 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
Simplified97.8%
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-*.f6497.8%
Simplified97.8%
Final simplification83.3%
(FPCore (re im)
:precision binary64
(if (<= im 0.98)
(* (* 0.5 (sin re)) (+ (* im im) 2.0))
(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.98) {
tmp = (0.5 * sin(re)) * ((im * im) + 2.0);
} 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.98d0) then
tmp = (0.5d0 * sin(re)) * ((im * im) + 2.0d0)
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.98) {
tmp = (0.5 * Math.sin(re)) * ((im * im) + 2.0);
} 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.98: tmp = (0.5 * math.sin(re)) * ((im * im) + 2.0) 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.98) tmp = Float64(Float64(0.5 * sin(re)) * Float64(Float64(im * im) + 2.0)); 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.98) tmp = (0.5 * sin(re)) * ((im * im) + 2.0); 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.98], N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[(im * im), $MachinePrecision] + 2.0), $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.98:\\
\;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im \cdot im + 2\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.97999999999999998Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6479.9%
Simplified79.9%
if 0.97999999999999998 < 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
Simplified68.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%
Taylor expanded in im around inf
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification82.1%
(FPCore (re im) :precision binary64 (if (<= im 0.98) (* (* 0.5 (sin re)) (+ (* im im) 2.0)) (if (<= im 4e+153) (* re (cosh im)) (* (sin re) (* 0.5 (* im im))))))
double code(double re, double im) {
double tmp;
if (im <= 0.98) {
tmp = (0.5 * sin(re)) * ((im * im) + 2.0);
} else if (im <= 4e+153) {
tmp = re * cosh(im);
} else {
tmp = sin(re) * (0.5 * (im * im));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 0.98d0) then
tmp = (0.5d0 * sin(re)) * ((im * im) + 2.0d0)
else if (im <= 4d+153) then
tmp = re * cosh(im)
else
tmp = sin(re) * (0.5d0 * (im * im))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 0.98) {
tmp = (0.5 * Math.sin(re)) * ((im * im) + 2.0);
} else if (im <= 4e+153) {
tmp = re * Math.cosh(im);
} else {
tmp = Math.sin(re) * (0.5 * (im * im));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 0.98: tmp = (0.5 * math.sin(re)) * ((im * im) + 2.0) elif im <= 4e+153: tmp = re * math.cosh(im) else: tmp = math.sin(re) * (0.5 * (im * im)) return tmp
function code(re, im) tmp = 0.0 if (im <= 0.98) tmp = Float64(Float64(0.5 * sin(re)) * Float64(Float64(im * im) + 2.0)); elseif (im <= 4e+153) tmp = Float64(re * cosh(im)); else tmp = Float64(sin(re) * Float64(0.5 * Float64(im * im))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 0.98) tmp = (0.5 * sin(re)) * ((im * im) + 2.0); elseif (im <= 4e+153) tmp = re * cosh(im); else tmp = sin(re) * (0.5 * (im * im)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 0.98], N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[(im * im), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 4e+153], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 0.98:\\
\;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im \cdot im + 2\right)\\
\mathbf{elif}\;im \leq 4 \cdot 10^{+153}:\\
\;\;\;\;re \cdot \cosh im\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot \left(0.5 \cdot \left(im \cdot im\right)\right)\\
\end{array}
\end{array}
if im < 0.97999999999999998Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6479.9%
Simplified79.9%
if 0.97999999999999998 < im < 4e153Initial 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
Simplified70.7%
if 4e153 < 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-*.f64100.0%
Simplified100.0%
Taylor expanded in im around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification80.1%
(FPCore (re im) :precision binary64 (if (<= im 0.98) (sin re) (if (<= im 4e+153) (* re (cosh im)) (* (sin re) (* 0.5 (* im im))))))
double code(double re, double im) {
double tmp;
if (im <= 0.98) {
tmp = sin(re);
} else if (im <= 4e+153) {
tmp = re * cosh(im);
} else {
tmp = sin(re) * (0.5 * (im * im));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 0.98d0) then
tmp = sin(re)
else if (im <= 4d+153) then
tmp = re * cosh(im)
else
tmp = sin(re) * (0.5d0 * (im * im))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 0.98) {
tmp = Math.sin(re);
} else if (im <= 4e+153) {
tmp = re * Math.cosh(im);
} else {
tmp = Math.sin(re) * (0.5 * (im * im));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 0.98: tmp = math.sin(re) elif im <= 4e+153: tmp = re * math.cosh(im) else: tmp = math.sin(re) * (0.5 * (im * im)) return tmp
function code(re, im) tmp = 0.0 if (im <= 0.98) tmp = sin(re); elseif (im <= 4e+153) tmp = Float64(re * cosh(im)); else tmp = Float64(sin(re) * Float64(0.5 * Float64(im * im))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 0.98) tmp = sin(re); elseif (im <= 4e+153) tmp = re * cosh(im); else tmp = sin(re) * (0.5 * (im * im)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 0.98], N[Sin[re], $MachinePrecision], If[LessEqual[im, 4e+153], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 0.98:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 4 \cdot 10^{+153}:\\
\;\;\;\;re \cdot \cosh im\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot \left(0.5 \cdot \left(im \cdot im\right)\right)\\
\end{array}
\end{array}
if im < 0.97999999999999998Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6459.8%
Simplified59.8%
if 0.97999999999999998 < im < 4e153Initial 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
Simplified70.7%
if 4e153 < 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-*.f64100.0%
Simplified100.0%
Taylor expanded in im around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification64.9%
(FPCore (re im) :precision binary64 (if (<= im 0.98) (sin re) (* re (cosh im))))
double code(double re, double im) {
double tmp;
if (im <= 0.98) {
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 <= 0.98d0) 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 <= 0.98) {
tmp = Math.sin(re);
} else {
tmp = re * Math.cosh(im);
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 0.98: tmp = math.sin(re) else: tmp = re * math.cosh(im) return tmp
function code(re, im) tmp = 0.0 if (im <= 0.98) tmp = sin(re); else tmp = Float64(re * cosh(im)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 0.98) tmp = sin(re); else tmp = re * cosh(im); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 0.98], N[Sin[re], $MachinePrecision], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 0.98:\\
\;\;\;\;\sin re\\
\mathbf{else}:\\
\;\;\;\;re \cdot \cosh im\\
\end{array}
\end{array}
if im < 0.97999999999999998Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6459.8%
Simplified59.8%
if 0.97999999999999998 < 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.2%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (* im im) 0.041666666666666664)) (t_1 (+ 0.5 t_0)))
(if (<= im 145000.0)
(sin re)
(if (<= im 3.2e+71)
(*
re
(+
(+
1.0
(* (* re re) (* -0.16666666666666666 (+ 1.0 (* im (* im t_1))))))
(* re (* re (/ (* (* im im) t_1) (* re re))))))
(* re (+ 1.0 (* im (* im t_0))))))))
double code(double re, double im) {
double t_0 = (im * im) * 0.041666666666666664;
double t_1 = 0.5 + t_0;
double tmp;
if (im <= 145000.0) {
tmp = sin(re);
} else if (im <= 3.2e+71) {
tmp = re * ((1.0 + ((re * re) * (-0.16666666666666666 * (1.0 + (im * (im * t_1)))))) + (re * (re * (((im * im) * t_1) / (re * re)))));
} else {
tmp = re * (1.0 + (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) :: t_1
real(8) :: tmp
t_0 = (im * im) * 0.041666666666666664d0
t_1 = 0.5d0 + t_0
if (im <= 145000.0d0) then
tmp = sin(re)
else if (im <= 3.2d+71) then
tmp = re * ((1.0d0 + ((re * re) * ((-0.16666666666666666d0) * (1.0d0 + (im * (im * t_1)))))) + (re * (re * (((im * im) * t_1) / (re * re)))))
else
tmp = re * (1.0d0 + (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 t_1 = 0.5 + t_0;
double tmp;
if (im <= 145000.0) {
tmp = Math.sin(re);
} else if (im <= 3.2e+71) {
tmp = re * ((1.0 + ((re * re) * (-0.16666666666666666 * (1.0 + (im * (im * t_1)))))) + (re * (re * (((im * im) * t_1) / (re * re)))));
} else {
tmp = re * (1.0 + (im * (im * t_0)));
}
return tmp;
}
def code(re, im): t_0 = (im * im) * 0.041666666666666664 t_1 = 0.5 + t_0 tmp = 0 if im <= 145000.0: tmp = math.sin(re) elif im <= 3.2e+71: tmp = re * ((1.0 + ((re * re) * (-0.16666666666666666 * (1.0 + (im * (im * t_1)))))) + (re * (re * (((im * im) * t_1) / (re * re))))) else: tmp = re * (1.0 + (im * (im * t_0))) return tmp
function code(re, im) t_0 = Float64(Float64(im * im) * 0.041666666666666664) t_1 = Float64(0.5 + t_0) tmp = 0.0 if (im <= 145000.0) tmp = sin(re); elseif (im <= 3.2e+71) tmp = Float64(re * Float64(Float64(1.0 + Float64(Float64(re * re) * Float64(-0.16666666666666666 * Float64(1.0 + Float64(im * Float64(im * t_1)))))) + Float64(re * Float64(re * Float64(Float64(Float64(im * im) * t_1) / Float64(re * re)))))); else tmp = Float64(re * Float64(1.0 + Float64(im * Float64(im * t_0)))); end return tmp end
function tmp_2 = code(re, im) t_0 = (im * im) * 0.041666666666666664; t_1 = 0.5 + t_0; tmp = 0.0; if (im <= 145000.0) tmp = sin(re); elseif (im <= 3.2e+71) tmp = re * ((1.0 + ((re * re) * (-0.16666666666666666 * (1.0 + (im * (im * t_1)))))) + (re * (re * (((im * im) * t_1) / (re * re))))); else tmp = re * (1.0 + (im * (im * t_0))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 + t$95$0), $MachinePrecision]}, If[LessEqual[im, 145000.0], N[Sin[re], $MachinePrecision], If[LessEqual[im, 3.2e+71], N[(re * N[(N[(1.0 + N[(N[(re * re), $MachinePrecision] * N[(-0.16666666666666666 * N[(1.0 + N[(im * N[(im * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(re * N[(re * N[(N[(N[(im * im), $MachinePrecision] * t$95$1), $MachinePrecision] / N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(1.0 + N[(im * N[(im * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(im \cdot im\right) \cdot 0.041666666666666664\\
t_1 := 0.5 + t\_0\\
\mathbf{if}\;im \leq 145000:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 3.2 \cdot 10^{+71}:\\
\;\;\;\;re \cdot \left(\left(1 + \left(re \cdot re\right) \cdot \left(-0.16666666666666666 \cdot \left(1 + im \cdot \left(im \cdot t\_1\right)\right)\right)\right) + re \cdot \left(re \cdot \frac{\left(im \cdot im\right) \cdot t\_1}{re \cdot re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot t\_0\right)\right)\\
\end{array}
\end{array}
if im < 145000Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6459.6%
Simplified59.6%
if 145000 < im < 3.20000000000000023e71Initial 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
Simplified4.0%
Taylor expanded in re around 0
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
Simplified27.1%
Taylor expanded in re around inf
Simplified20.7%
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-/l/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6470.7%
Applied egg-rr70.7%
if 3.20000000000000023e71 < 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
Simplified97.8%
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-*.f6497.8%
Simplified97.8%
Taylor expanded in re around 0
Simplified78.0%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (* im im) 0.041666666666666664)) (t_1 (+ 0.5 t_0)))
(if (<= im 165000.0)
(*
re
(+
1.0
(*
(* re re)
(+ -0.16666666666666666 (* (* re re) 0.008333333333333333)))))
(if (<= im 3.2e+71)
(*
re
(+
(+
1.0
(* (* re re) (* -0.16666666666666666 (+ 1.0 (* im (* im t_1))))))
(* re (* re (/ (* (* im im) t_1) (* re re))))))
(* re (+ 1.0 (* im (* im t_0))))))))
double code(double re, double im) {
double t_0 = (im * im) * 0.041666666666666664;
double t_1 = 0.5 + t_0;
double tmp;
if (im <= 165000.0) {
tmp = re * (1.0 + ((re * re) * (-0.16666666666666666 + ((re * re) * 0.008333333333333333))));
} else if (im <= 3.2e+71) {
tmp = re * ((1.0 + ((re * re) * (-0.16666666666666666 * (1.0 + (im * (im * t_1)))))) + (re * (re * (((im * im) * t_1) / (re * re)))));
} else {
tmp = re * (1.0 + (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) :: t_1
real(8) :: tmp
t_0 = (im * im) * 0.041666666666666664d0
t_1 = 0.5d0 + t_0
if (im <= 165000.0d0) then
tmp = re * (1.0d0 + ((re * re) * ((-0.16666666666666666d0) + ((re * re) * 0.008333333333333333d0))))
else if (im <= 3.2d+71) then
tmp = re * ((1.0d0 + ((re * re) * ((-0.16666666666666666d0) * (1.0d0 + (im * (im * t_1)))))) + (re * (re * (((im * im) * t_1) / (re * re)))))
else
tmp = re * (1.0d0 + (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 t_1 = 0.5 + t_0;
double tmp;
if (im <= 165000.0) {
tmp = re * (1.0 + ((re * re) * (-0.16666666666666666 + ((re * re) * 0.008333333333333333))));
} else if (im <= 3.2e+71) {
tmp = re * ((1.0 + ((re * re) * (-0.16666666666666666 * (1.0 + (im * (im * t_1)))))) + (re * (re * (((im * im) * t_1) / (re * re)))));
} else {
tmp = re * (1.0 + (im * (im * t_0)));
}
return tmp;
}
def code(re, im): t_0 = (im * im) * 0.041666666666666664 t_1 = 0.5 + t_0 tmp = 0 if im <= 165000.0: tmp = re * (1.0 + ((re * re) * (-0.16666666666666666 + ((re * re) * 0.008333333333333333)))) elif im <= 3.2e+71: tmp = re * ((1.0 + ((re * re) * (-0.16666666666666666 * (1.0 + (im * (im * t_1)))))) + (re * (re * (((im * im) * t_1) / (re * re))))) else: tmp = re * (1.0 + (im * (im * t_0))) return tmp
function code(re, im) t_0 = Float64(Float64(im * im) * 0.041666666666666664) t_1 = Float64(0.5 + t_0) tmp = 0.0 if (im <= 165000.0) tmp = Float64(re * Float64(1.0 + Float64(Float64(re * re) * Float64(-0.16666666666666666 + Float64(Float64(re * re) * 0.008333333333333333))))); elseif (im <= 3.2e+71) tmp = Float64(re * Float64(Float64(1.0 + Float64(Float64(re * re) * Float64(-0.16666666666666666 * Float64(1.0 + Float64(im * Float64(im * t_1)))))) + Float64(re * Float64(re * Float64(Float64(Float64(im * im) * t_1) / Float64(re * re)))))); else tmp = Float64(re * Float64(1.0 + Float64(im * Float64(im * t_0)))); end return tmp end
function tmp_2 = code(re, im) t_0 = (im * im) * 0.041666666666666664; t_1 = 0.5 + t_0; tmp = 0.0; if (im <= 165000.0) tmp = re * (1.0 + ((re * re) * (-0.16666666666666666 + ((re * re) * 0.008333333333333333)))); elseif (im <= 3.2e+71) tmp = re * ((1.0 + ((re * re) * (-0.16666666666666666 * (1.0 + (im * (im * t_1)))))) + (re * (re * (((im * im) * t_1) / (re * re))))); else tmp = re * (1.0 + (im * (im * t_0))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 + t$95$0), $MachinePrecision]}, If[LessEqual[im, 165000.0], N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * N[(-0.16666666666666666 + N[(N[(re * re), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 3.2e+71], N[(re * N[(N[(1.0 + N[(N[(re * re), $MachinePrecision] * N[(-0.16666666666666666 * N[(1.0 + N[(im * N[(im * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(re * N[(re * N[(N[(N[(im * im), $MachinePrecision] * t$95$1), $MachinePrecision] / N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(1.0 + N[(im * N[(im * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(im \cdot im\right) \cdot 0.041666666666666664\\
t_1 := 0.5 + t\_0\\
\mathbf{if}\;im \leq 165000:\\
\;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot 0.008333333333333333\right)\right)\\
\mathbf{elif}\;im \leq 3.2 \cdot 10^{+71}:\\
\;\;\;\;re \cdot \left(\left(1 + \left(re \cdot re\right) \cdot \left(-0.16666666666666666 \cdot \left(1 + im \cdot \left(im \cdot t\_1\right)\right)\right)\right) + re \cdot \left(re \cdot \frac{\left(im \cdot im\right) \cdot t\_1}{re \cdot re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot t\_0\right)\right)\\
\end{array}
\end{array}
if im < 165000Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6459.6%
Simplified59.6%
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-*.f6438.9%
Simplified38.9%
if 165000 < im < 3.20000000000000023e71Initial 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
Simplified4.0%
Taylor expanded in re around 0
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
Simplified27.1%
Taylor expanded in re around inf
Simplified20.7%
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-/l/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6470.7%
Applied egg-rr70.7%
if 3.20000000000000023e71 < 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
Simplified97.8%
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-*.f6497.8%
Simplified97.8%
Taylor expanded in re around 0
Simplified78.0%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (* im im) 0.041666666666666664)) (t_1 (+ 0.5 t_0)))
(if (<= im 3.2e+71)
(*
re
(+
(+ 1.0 (* (* re re) (* -0.16666666666666666 (+ 1.0 (* im (* im t_1))))))
(* re (/ (* (* im im) t_1) re))))
(* re (+ 1.0 (* im (* im t_0)))))))
double code(double re, double im) {
double t_0 = (im * im) * 0.041666666666666664;
double t_1 = 0.5 + t_0;
double tmp;
if (im <= 3.2e+71) {
tmp = re * ((1.0 + ((re * re) * (-0.16666666666666666 * (1.0 + (im * (im * t_1)))))) + (re * (((im * im) * t_1) / re)));
} else {
tmp = re * (1.0 + (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) :: t_1
real(8) :: tmp
t_0 = (im * im) * 0.041666666666666664d0
t_1 = 0.5d0 + t_0
if (im <= 3.2d+71) then
tmp = re * ((1.0d0 + ((re * re) * ((-0.16666666666666666d0) * (1.0d0 + (im * (im * t_1)))))) + (re * (((im * im) * t_1) / re)))
else
tmp = re * (1.0d0 + (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 t_1 = 0.5 + t_0;
double tmp;
if (im <= 3.2e+71) {
tmp = re * ((1.0 + ((re * re) * (-0.16666666666666666 * (1.0 + (im * (im * t_1)))))) + (re * (((im * im) * t_1) / re)));
} else {
tmp = re * (1.0 + (im * (im * t_0)));
}
return tmp;
}
def code(re, im): t_0 = (im * im) * 0.041666666666666664 t_1 = 0.5 + t_0 tmp = 0 if im <= 3.2e+71: tmp = re * ((1.0 + ((re * re) * (-0.16666666666666666 * (1.0 + (im * (im * t_1)))))) + (re * (((im * im) * t_1) / re))) else: tmp = re * (1.0 + (im * (im * t_0))) return tmp
function code(re, im) t_0 = Float64(Float64(im * im) * 0.041666666666666664) t_1 = Float64(0.5 + t_0) tmp = 0.0 if (im <= 3.2e+71) tmp = Float64(re * Float64(Float64(1.0 + Float64(Float64(re * re) * Float64(-0.16666666666666666 * Float64(1.0 + Float64(im * Float64(im * t_1)))))) + Float64(re * Float64(Float64(Float64(im * im) * t_1) / re)))); else tmp = Float64(re * Float64(1.0 + Float64(im * Float64(im * t_0)))); end return tmp end
function tmp_2 = code(re, im) t_0 = (im * im) * 0.041666666666666664; t_1 = 0.5 + t_0; tmp = 0.0; if (im <= 3.2e+71) tmp = re * ((1.0 + ((re * re) * (-0.16666666666666666 * (1.0 + (im * (im * t_1)))))) + (re * (((im * im) * t_1) / re))); else tmp = re * (1.0 + (im * (im * t_0))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 + t$95$0), $MachinePrecision]}, If[LessEqual[im, 3.2e+71], N[(re * N[(N[(1.0 + N[(N[(re * re), $MachinePrecision] * N[(-0.16666666666666666 * N[(1.0 + N[(im * N[(im * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(re * N[(N[(N[(im * im), $MachinePrecision] * t$95$1), $MachinePrecision] / re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(1.0 + N[(im * N[(im * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(im \cdot im\right) \cdot 0.041666666666666664\\
t_1 := 0.5 + t\_0\\
\mathbf{if}\;im \leq 3.2 \cdot 10^{+71}:\\
\;\;\;\;re \cdot \left(\left(1 + \left(re \cdot re\right) \cdot \left(-0.16666666666666666 \cdot \left(1 + im \cdot \left(im \cdot t\_1\right)\right)\right)\right) + re \cdot \frac{\left(im \cdot im\right) \cdot t\_1}{re}\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot t\_0\right)\right)\\
\end{array}
\end{array}
if im < 3.20000000000000023e71Initial 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.1%
Taylor expanded in re around 0
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
Simplified52.9%
Taylor expanded in re around inf
Simplified31.3%
div-invN/A
*-commutativeN/A
associate-*l*N/A
pow2N/A
inv-powN/A
pow-prod-upN/A
metadata-evalN/A
unpow1N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6440.1%
Applied egg-rr40.1%
if 3.20000000000000023e71 < 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
Simplified97.8%
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-*.f6497.8%
Simplified97.8%
Taylor expanded in re around 0
Simplified78.0%
Final simplification46.2%
(FPCore (re im)
:precision binary64
(if (<= re 2.2e+46)
(*
(* 0.5 re)
(+
2.0
(*
(* im im)
(+
1.0
(*
(* im im)
(+ 0.08333333333333333 (* (* im im) 0.002777777777777778)))))))
(*
(+ 1.0 (* im (* im (* (* im im) 0.041666666666666664))))
(*
re
(+
1.0
(*
(* re re)
(+
-0.16666666666666666
(*
re
(*
re
(+
0.008333333333333333
(* (* re re) -0.0001984126984126984)))))))))))
double code(double re, double im) {
double tmp;
if (re <= 2.2e+46) {
tmp = (0.5 * re) * (2.0 + ((im * im) * (1.0 + ((im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778))))));
} else {
tmp = (1.0 + (im * (im * ((im * im) * 0.041666666666666664)))) * (re * (1.0 + ((re * re) * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984))))))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 2.2d+46) then
tmp = (0.5d0 * re) * (2.0d0 + ((im * im) * (1.0d0 + ((im * im) * (0.08333333333333333d0 + ((im * im) * 0.002777777777777778d0))))))
else
tmp = (1.0d0 + (im * (im * ((im * im) * 0.041666666666666664d0)))) * (re * (1.0d0 + ((re * re) * ((-0.16666666666666666d0) + (re * (re * (0.008333333333333333d0 + ((re * re) * (-0.0001984126984126984d0)))))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 2.2e+46) {
tmp = (0.5 * re) * (2.0 + ((im * im) * (1.0 + ((im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778))))));
} else {
tmp = (1.0 + (im * (im * ((im * im) * 0.041666666666666664)))) * (re * (1.0 + ((re * re) * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984))))))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 2.2e+46: tmp = (0.5 * re) * (2.0 + ((im * im) * (1.0 + ((im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))) else: tmp = (1.0 + (im * (im * ((im * im) * 0.041666666666666664)))) * (re * (1.0 + ((re * re) * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))) return tmp
function code(re, im) tmp = 0.0 if (re <= 2.2e+46) tmp = Float64(Float64(0.5 * re) * 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(1.0 + Float64(im * Float64(im * Float64(Float64(im * im) * 0.041666666666666664)))) * Float64(re * Float64(1.0 + Float64(Float64(re * re) * Float64(-0.16666666666666666 + Float64(re * Float64(re * Float64(0.008333333333333333 + Float64(Float64(re * re) * -0.0001984126984126984))))))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 2.2e+46) tmp = (0.5 * re) * (2.0 + ((im * im) * (1.0 + ((im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))); else tmp = (1.0 + (im * (im * ((im * im) * 0.041666666666666664)))) * (re * (1.0 + ((re * re) * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 2.2e+46], N[(N[(0.5 * re), $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[(1.0 + N[(im * N[(im * N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * N[(-0.16666666666666666 + N[(re * N[(re * N[(0.008333333333333333 + N[(N[(re * re), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 2.2 \cdot 10^{+46}:\\
\;\;\;\;\left(0.5 \cdot re\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(1 + im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right) \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot \left(-0.16666666666666666 + re \cdot \left(re \cdot \left(0.008333333333333333 + \left(re \cdot re\right) \cdot -0.0001984126984126984\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if re < 2.2e46Initial 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.6%
Simplified88.6%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6468.7%
Simplified68.7%
if 2.2e46 < re Initial program 99.9%
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
Simplified81.1%
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-*.f6479.6%
Simplified79.6%
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-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6427.0%
Simplified27.0%
Final simplification59.4%
(FPCore (re im)
:precision binary64
(if (<= re 2.2e+46)
(*
(* 0.5 re)
(+
2.0
(*
(* im im)
(+
1.0
(*
(* im im)
(+ 0.08333333333333333 (* (* im im) 0.002777777777777778)))))))
(*
re
(+
1.0
(*
re
(*
re
(+
-0.16666666666666666
(*
re
(*
re
(+
0.008333333333333333
(* (* re re) -0.0001984126984126984)))))))))))
double code(double re, double im) {
double tmp;
if (re <= 2.2e+46) {
tmp = (0.5 * re) * (2.0 + ((im * im) * (1.0 + ((im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778))))));
} else {
tmp = re * (1.0 + (re * (re * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984))))))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 2.2d+46) then
tmp = (0.5d0 * re) * (2.0d0 + ((im * im) * (1.0d0 + ((im * im) * (0.08333333333333333d0 + ((im * im) * 0.002777777777777778d0))))))
else
tmp = re * (1.0d0 + (re * (re * ((-0.16666666666666666d0) + (re * (re * (0.008333333333333333d0 + ((re * re) * (-0.0001984126984126984d0)))))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 2.2e+46) {
tmp = (0.5 * re) * (2.0 + ((im * im) * (1.0 + ((im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778))))));
} else {
tmp = re * (1.0 + (re * (re * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984))))))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 2.2e+46: tmp = (0.5 * re) * (2.0 + ((im * im) * (1.0 + ((im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))) else: tmp = re * (1.0 + (re * (re * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))) return tmp
function code(re, im) tmp = 0.0 if (re <= 2.2e+46) tmp = Float64(Float64(0.5 * re) * 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(re * Float64(1.0 + Float64(re * Float64(re * Float64(-0.16666666666666666 + Float64(re * Float64(re * Float64(0.008333333333333333 + Float64(Float64(re * re) * -0.0001984126984126984))))))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 2.2e+46) tmp = (0.5 * re) * (2.0 + ((im * im) * (1.0 + ((im * im) * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))); else tmp = re * (1.0 + (re * (re * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 2.2e+46], N[(N[(0.5 * re), $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[(re * N[(1.0 + N[(re * N[(re * N[(-0.16666666666666666 + N[(re * N[(re * N[(0.008333333333333333 + N[(N[(re * re), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 2.2 \cdot 10^{+46}:\\
\;\;\;\;\left(0.5 \cdot re\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}:\\
\;\;\;\;re \cdot \left(1 + re \cdot \left(re \cdot \left(-0.16666666666666666 + re \cdot \left(re \cdot \left(0.008333333333333333 + \left(re \cdot re\right) \cdot -0.0001984126984126984\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if re < 2.2e46Initial 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.6%
Simplified88.6%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6468.7%
Simplified68.7%
if 2.2e46 < re Initial program 99.9%
Taylor expanded in im around 0
sin-lowering-sin.f6445.2%
Simplified45.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
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6427.0%
Simplified27.0%
Final simplification59.4%
(FPCore (re im)
:precision binary64
(if (<= re 2.2e+46)
(* re (+ 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)))))))))))
double code(double re, double im) {
double tmp;
if (re <= 2.2e+46) {
tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664)))));
} else {
tmp = re * (1.0 + (re * (re * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984))))))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 2.2d+46) then
tmp = re * (1.0d0 + (im * (im * (0.5d0 + ((im * im) * 0.041666666666666664d0)))))
else
tmp = re * (1.0d0 + (re * (re * ((-0.16666666666666666d0) + (re * (re * (0.008333333333333333d0 + ((re * re) * (-0.0001984126984126984d0)))))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 2.2e+46) {
tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664)))));
} else {
tmp = re * (1.0 + (re * (re * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984))))))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 2.2e+46: tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664))))) else: tmp = re * (1.0 + (re * (re * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))) return tmp
function code(re, im) tmp = 0.0 if (re <= 2.2e+46) tmp = Float64(re * Float64(1.0 + Float64(im * Float64(im * Float64(0.5 + Float64(Float64(im * im) * 0.041666666666666664)))))); else tmp = Float64(re * Float64(1.0 + Float64(re * Float64(re * Float64(-0.16666666666666666 + Float64(re * Float64(re * Float64(0.008333333333333333 + Float64(Float64(re * re) * -0.0001984126984126984))))))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 2.2e+46) tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664))))); else tmp = re * (1.0 + (re * (re * (-0.16666666666666666 + (re * (re * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 2.2e+46], 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[(re * N[(1.0 + N[(re * N[(re * N[(-0.16666666666666666 + N[(re * N[(re * N[(0.008333333333333333 + N[(N[(re * re), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 2.2 \cdot 10^{+46}:\\
\;\;\;\;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}:\\
\;\;\;\;re \cdot \left(1 + re \cdot \left(re \cdot \left(-0.16666666666666666 + re \cdot \left(re \cdot \left(0.008333333333333333 + \left(re \cdot re\right) \cdot -0.0001984126984126984\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if re < 2.2e46Initial 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.5%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6464.2%
Simplified64.2%
if 2.2e46 < re Initial program 99.9%
Taylor expanded in im around 0
sin-lowering-sin.f6445.2%
Simplified45.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
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6427.0%
Simplified27.0%
(FPCore (re im)
:precision binary64
(if (<= re 3.5e+98)
(* re (+ 1.0 (* im (* im (+ 0.5 (* (* im im) 0.041666666666666664))))))
(*
re
(*
(* re re)
(+ -0.16666666666666666 (* (* im im) -0.08333333333333333))))))
double code(double re, double im) {
double tmp;
if (re <= 3.5e+98) {
tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664)))));
} else {
tmp = re * ((re * re) * (-0.16666666666666666 + ((im * im) * -0.08333333333333333)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 3.5d+98) then
tmp = re * (1.0d0 + (im * (im * (0.5d0 + ((im * im) * 0.041666666666666664d0)))))
else
tmp = re * ((re * re) * ((-0.16666666666666666d0) + ((im * im) * (-0.08333333333333333d0))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 3.5e+98) {
tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664)))));
} else {
tmp = re * ((re * re) * (-0.16666666666666666 + ((im * im) * -0.08333333333333333)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 3.5e+98: tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664))))) else: tmp = re * ((re * re) * (-0.16666666666666666 + ((im * im) * -0.08333333333333333))) return tmp
function code(re, im) tmp = 0.0 if (re <= 3.5e+98) tmp = Float64(re * Float64(1.0 + Float64(im * Float64(im * Float64(0.5 + Float64(Float64(im * im) * 0.041666666666666664)))))); else tmp = Float64(re * Float64(Float64(re * re) * Float64(-0.16666666666666666 + Float64(Float64(im * im) * -0.08333333333333333)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 3.5e+98) tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664))))); else tmp = re * ((re * re) * (-0.16666666666666666 + ((im * im) * -0.08333333333333333))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 3.5e+98], 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[(re * N[(N[(re * re), $MachinePrecision] * N[(-0.16666666666666666 + N[(N[(im * im), $MachinePrecision] * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 3.5 \cdot 10^{+98}:\\
\;\;\;\;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}:\\
\;\;\;\;re \cdot \left(\left(re \cdot re\right) \cdot \left(-0.16666666666666666 + \left(im \cdot im\right) \cdot -0.08333333333333333\right)\right)\\
\end{array}
\end{array}
if re < 3.5e98Initial 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.1%
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-*.f6461.8%
Simplified61.8%
if 3.5e98 < re 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
Simplified82.5%
Taylor expanded in re around 0
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
Simplified30.4%
Taylor expanded in re around inf
associate-*r*N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Simplified30.4%
Taylor expanded in im around 0
associate-*r*N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
Simplified30.4%
(FPCore (re im)
:precision binary64
(if (<= re 3.5e+98)
(* re (+ 1.0 (* im (* im (* (* im im) 0.041666666666666664)))))
(*
re
(*
(* re re)
(+ -0.16666666666666666 (* (* im im) -0.08333333333333333))))))
double code(double re, double im) {
double tmp;
if (re <= 3.5e+98) {
tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664))));
} else {
tmp = re * ((re * re) * (-0.16666666666666666 + ((im * im) * -0.08333333333333333)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 3.5d+98) then
tmp = re * (1.0d0 + (im * (im * ((im * im) * 0.041666666666666664d0))))
else
tmp = re * ((re * re) * ((-0.16666666666666666d0) + ((im * im) * (-0.08333333333333333d0))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 3.5e+98) {
tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664))));
} else {
tmp = re * ((re * re) * (-0.16666666666666666 + ((im * im) * -0.08333333333333333)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 3.5e+98: tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664)))) else: tmp = re * ((re * re) * (-0.16666666666666666 + ((im * im) * -0.08333333333333333))) return tmp
function code(re, im) tmp = 0.0 if (re <= 3.5e+98) tmp = Float64(re * Float64(1.0 + Float64(im * Float64(im * Float64(Float64(im * im) * 0.041666666666666664))))); else tmp = Float64(re * Float64(Float64(re * re) * Float64(-0.16666666666666666 + Float64(Float64(im * im) * -0.08333333333333333)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 3.5e+98) tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664)))); else tmp = re * ((re * re) * (-0.16666666666666666 + ((im * im) * -0.08333333333333333))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 3.5e+98], N[(re * N[(1.0 + N[(im * N[(im * N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(N[(re * re), $MachinePrecision] * N[(-0.16666666666666666 + N[(N[(im * im), $MachinePrecision] * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 3.5 \cdot 10^{+98}:\\
\;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(\left(re \cdot re\right) \cdot \left(-0.16666666666666666 + \left(im \cdot im\right) \cdot -0.08333333333333333\right)\right)\\
\end{array}
\end{array}
if re < 3.5e98Initial 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.1%
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-*.f6482.3%
Simplified82.3%
Taylor expanded in re around 0
Simplified61.7%
if 3.5e98 < re 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
Simplified82.5%
Taylor expanded in re around 0
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
Simplified30.4%
Taylor expanded in re around inf
associate-*r*N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Simplified30.4%
Taylor expanded in im around 0
associate-*r*N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
Simplified30.4%
(FPCore (re im)
:precision binary64
(if (<= re 3.5e+98)
(* re (+ 1.0 (* 0.5 (* im im))))
(*
re
(*
(* re re)
(+ -0.16666666666666666 (* (* im im) -0.08333333333333333))))))
double code(double re, double im) {
double tmp;
if (re <= 3.5e+98) {
tmp = re * (1.0 + (0.5 * (im * im)));
} else {
tmp = re * ((re * re) * (-0.16666666666666666 + ((im * im) * -0.08333333333333333)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 3.5d+98) then
tmp = re * (1.0d0 + (0.5d0 * (im * im)))
else
tmp = re * ((re * re) * ((-0.16666666666666666d0) + ((im * im) * (-0.08333333333333333d0))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 3.5e+98) {
tmp = re * (1.0 + (0.5 * (im * im)));
} else {
tmp = re * ((re * re) * (-0.16666666666666666 + ((im * im) * -0.08333333333333333)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 3.5e+98: tmp = re * (1.0 + (0.5 * (im * im))) else: tmp = re * ((re * re) * (-0.16666666666666666 + ((im * im) * -0.08333333333333333))) return tmp
function code(re, im) tmp = 0.0 if (re <= 3.5e+98) tmp = Float64(re * Float64(1.0 + Float64(0.5 * Float64(im * im)))); else tmp = Float64(re * Float64(Float64(re * re) * Float64(-0.16666666666666666 + Float64(Float64(im * im) * -0.08333333333333333)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 3.5e+98) tmp = re * (1.0 + (0.5 * (im * im))); else tmp = re * ((re * re) * (-0.16666666666666666 + ((im * im) * -0.08333333333333333))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 3.5e+98], N[(re * N[(1.0 + N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(N[(re * re), $MachinePrecision] * N[(-0.16666666666666666 + N[(N[(im * im), $MachinePrecision] * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 3.5 \cdot 10^{+98}:\\
\;\;\;\;re \cdot \left(1 + 0.5 \cdot \left(im \cdot im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(\left(re \cdot re\right) \cdot \left(-0.16666666666666666 + \left(im \cdot im\right) \cdot -0.08333333333333333\right)\right)\\
\end{array}
\end{array}
if re < 3.5e98Initial 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-*.f6470.3%
Simplified70.3%
Taylor expanded in re around 0
Simplified51.2%
if 3.5e98 < re 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
Simplified82.5%
Taylor expanded in re around 0
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
Simplified30.4%
Taylor expanded in re around inf
associate-*r*N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Simplified30.4%
Taylor expanded in im around 0
associate-*r*N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
Simplified30.4%
Final simplification47.4%
(FPCore (re im) :precision binary64 (if (<= re 3.5e+98) (* re (+ 1.0 (* 0.5 (* im im)))) (* -0.16666666666666666 (* re (* re re)))))
double code(double re, double im) {
double tmp;
if (re <= 3.5e+98) {
tmp = re * (1.0 + (0.5 * (im * im)));
} else {
tmp = -0.16666666666666666 * (re * (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 <= 3.5d+98) then
tmp = re * (1.0d0 + (0.5d0 * (im * im)))
else
tmp = (-0.16666666666666666d0) * (re * (re * re))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 3.5e+98) {
tmp = re * (1.0 + (0.5 * (im * im)));
} else {
tmp = -0.16666666666666666 * (re * (re * re));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 3.5e+98: tmp = re * (1.0 + (0.5 * (im * im))) else: tmp = -0.16666666666666666 * (re * (re * re)) return tmp
function code(re, im) tmp = 0.0 if (re <= 3.5e+98) tmp = Float64(re * Float64(1.0 + Float64(0.5 * Float64(im * im)))); else tmp = Float64(-0.16666666666666666 * Float64(re * Float64(re * re))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 3.5e+98) tmp = re * (1.0 + (0.5 * (im * im))); else tmp = -0.16666666666666666 * (re * (re * re)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 3.5e+98], N[(re * N[(1.0 + N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.16666666666666666 * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 3.5 \cdot 10^{+98}:\\
\;\;\;\;re \cdot \left(1 + 0.5 \cdot \left(im \cdot im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\\
\end{array}
\end{array}
if re < 3.5e98Initial 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-*.f6470.3%
Simplified70.3%
Taylor expanded in re around 0
Simplified51.2%
if 3.5e98 < re Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6441.4%
Simplified41.4%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6428.5%
Simplified28.5%
Taylor expanded in re around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6428.5%
Simplified28.5%
Final simplification47.0%
(FPCore (re im) :precision binary64 (if (<= re 3.5e+98) re (* -0.16666666666666666 (* re (* re re)))))
double code(double re, double im) {
double tmp;
if (re <= 3.5e+98) {
tmp = re;
} else {
tmp = -0.16666666666666666 * (re * (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 <= 3.5d+98) then
tmp = re
else
tmp = (-0.16666666666666666d0) * (re * (re * re))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 3.5e+98) {
tmp = re;
} else {
tmp = -0.16666666666666666 * (re * (re * re));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 3.5e+98: tmp = re else: tmp = -0.16666666666666666 * (re * (re * re)) return tmp
function code(re, im) tmp = 0.0 if (re <= 3.5e+98) tmp = re; else tmp = Float64(-0.16666666666666666 * Float64(re * Float64(re * re))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 3.5e+98) tmp = re; else tmp = -0.16666666666666666 * (re * (re * re)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 3.5e+98], re, N[(-0.16666666666666666 * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 3.5 \cdot 10^{+98}:\\
\;\;\;\;re\\
\mathbf{else}:\\
\;\;\;\;-0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\\
\end{array}
\end{array}
if re < 3.5e98Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6447.0%
Simplified47.0%
Taylor expanded in re around 0
Simplified29.9%
if 3.5e98 < re Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6441.4%
Simplified41.4%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6428.5%
Simplified28.5%
Taylor expanded in re around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6428.5%
Simplified28.5%
(FPCore (re im) :precision binary64 (* re (+ 1.0 (* re (* re -0.16666666666666666)))))
double code(double re, double im) {
return re * (1.0 + (re * (re * -0.16666666666666666)));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = re * (1.0d0 + (re * (re * (-0.16666666666666666d0))))
end function
public static double code(double re, double im) {
return re * (1.0 + (re * (re * -0.16666666666666666)));
}
def code(re, im): return re * (1.0 + (re * (re * -0.16666666666666666)))
function code(re, im) return Float64(re * Float64(1.0 + Float64(re * Float64(re * -0.16666666666666666)))) end
function tmp = code(re, im) tmp = re * (1.0 + (re * (re * -0.16666666666666666))); end
code[re_, im_] := N[(re * N[(1.0 + N[(re * N[(re * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
re \cdot \left(1 + re \cdot \left(re \cdot -0.16666666666666666\right)\right)
\end{array}
Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6446.0%
Simplified46.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6433.8%
Simplified33.8%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6433.8%
Applied egg-rr33.8%
Final simplification33.8%
(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.0%
Simplified46.0%
Taylor expanded in re around 0
Simplified25.0%
herbie shell --seed 2024155
(FPCore (re im)
:name "math.sin on complex, real part"
:precision binary64
(* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))