
(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 24 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)) (* 0.5 (* (sin re) (exp im)))))
double code(double re, double im) {
return ((0.5 * sin(re)) / exp(im)) + (0.5 * (sin(re) * exp(im)));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = ((0.5d0 * sin(re)) / exp(im)) + (0.5d0 * (sin(re) * exp(im)))
end function
public static double code(double re, double im) {
return ((0.5 * Math.sin(re)) / Math.exp(im)) + (0.5 * (Math.sin(re) * Math.exp(im)));
}
def code(re, im): return ((0.5 * math.sin(re)) / math.exp(im)) + (0.5 * (math.sin(re) * math.exp(im)))
function code(re, im) return Float64(Float64(Float64(0.5 * sin(re)) / exp(im)) + Float64(0.5 * Float64(sin(re) * exp(im)))) end
function tmp = code(re, im) tmp = ((0.5 * sin(re)) / exp(im)) + (0.5 * (sin(re) * exp(im))); end
code[re_, im_] := N[(N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] / N[Exp[im], $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(N[Sin[re], $MachinePrecision] * N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.5 \cdot \sin re}{e^{im}} + 0.5 \cdot \left(\sin re \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
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
exp-lowering-exp.f64100.0%
Applied egg-rr100.0%
(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%
Final simplification100.0%
(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.52) t_0 (if (<= im 7.2e+51) (* re (cosh im)) 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.52) {
tmp = t_0;
} else if (im <= 7.2e+51) {
tmp = re * cosh(im);
} 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.52d0) then
tmp = t_0
else if (im <= 7.2d+51) then
tmp = re * cosh(im)
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.52) {
tmp = t_0;
} else if (im <= 7.2e+51) {
tmp = re * Math.cosh(im);
} 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.52: tmp = t_0 elif im <= 7.2e+51: tmp = re * math.cosh(im) else: tmp = t_0 return tmp
function code(re, im) t_0 = Float64(sin(re) * Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + Float64(im * Float64(im * Float64(0.041666666666666664 + Float64(Float64(im * im) * 0.001388888888888889)))))))) tmp = 0.0 if (im <= 0.52) tmp = t_0; elseif (im <= 7.2e+51) tmp = Float64(re * cosh(im)); 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.52) tmp = t_0; elseif (im <= 7.2e+51) tmp = re * cosh(im); 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[(N[(im * im), $MachinePrecision] * N[(0.5 + N[(im * N[(im * N[(0.041666666666666664 + N[(N[(im * im), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 0.52], t$95$0, If[LessEqual[im, 7.2e+51], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + im \cdot \left(im \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\right)\\
\mathbf{if}\;im \leq 0.52:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;im \leq 7.2 \cdot 10^{+51}:\\
\;\;\;\;re \cdot \cosh im\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if im < 0.52000000000000002 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%
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-*.f6496.9%
Simplified96.9%
if 0.52000000000000002 < 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%
Taylor expanded in re around 0
Simplified72.7%
Final simplification95.8%
(FPCore (re im)
:precision binary64
(let* ((t_0
(*
(sin re)
(+ 1.0 (* (* im im) (+ 0.5 (* (* im im) 0.041666666666666664)))))))
(if (<= im 0.3)
t_0
(if (<= im 5.8e+60)
(* re (cosh im))
(if (<= im 1.12e+77)
(* 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))));
double tmp;
if (im <= 0.3) {
tmp = t_0;
} else if (im <= 5.8e+60) {
tmp = re * cosh(im);
} else if (im <= 1.12e+77) {
tmp = 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))))
if (im <= 0.3d0) then
tmp = t_0
else if (im <= 5.8d+60) then
tmp = re * cosh(im)
else if (im <= 1.12d+77) then
tmp = 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))));
double tmp;
if (im <= 0.3) {
tmp = t_0;
} else if (im <= 5.8e+60) {
tmp = re * Math.cosh(im);
} else if (im <= 1.12e+77) {
tmp = 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)))) tmp = 0 if im <= 0.3: tmp = t_0 elif im <= 5.8e+60: tmp = re * math.cosh(im) elif im <= 1.12e+77: tmp = 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(Float64(im * im) * Float64(0.5 + Float64(Float64(im * im) * 0.041666666666666664))))) tmp = 0.0 if (im <= 0.3) tmp = t_0; elseif (im <= 5.8e+60) tmp = Float64(re * cosh(im)); elseif (im <= 1.12e+77) tmp = 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)))); tmp = 0.0; if (im <= 0.3) tmp = t_0; elseif (im <= 5.8e+60) tmp = re * cosh(im); elseif (im <= 1.12e+77) tmp = 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[(N[(im * im), $MachinePrecision] * N[(0.5 + N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 0.3], t$95$0, If[LessEqual[im, 5.8e+60], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 1.12e+77], N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\\
\mathbf{if}\;im \leq 0.3:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;im \leq 5.8 \cdot 10^{+60}:\\
\;\;\;\;re \cdot \cosh im\\
\mathbf{elif}\;im \leq 1.12 \cdot 10^{+77}:\\
\;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if im < 0.299999999999999989 or 1.1199999999999999e77 < 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
Simplified95.1%
if 0.299999999999999989 < im < 5.79999999999999999e60Initial 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 re around 0
Simplified76.9%
if 5.79999999999999999e60 < im < 1.1199999999999999e77Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f643.1%
Simplified3.1%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification94.3%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (* 0.5 (sin re)) (+ (* im im) 2.0))))
(if (<= im 0.057)
t_0
(if (<= im 5.8e+60)
(* re (cosh im))
(if (<= im 1.35e+154)
(*
(+ 1.0 (* (* im im) (+ 0.5 (* (* im im) 0.041666666666666664))))
(* re (+ 1.0 (* (* re re) -0.16666666666666666))))
t_0)))))
double code(double re, double im) {
double t_0 = (0.5 * sin(re)) * ((im * im) + 2.0);
double tmp;
if (im <= 0.057) {
tmp = t_0;
} else if (im <= 5.8e+60) {
tmp = re * cosh(im);
} else if (im <= 1.35e+154) {
tmp = (1.0 + ((im * im) * (0.5 + ((im * im) * 0.041666666666666664)))) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = (0.5d0 * sin(re)) * ((im * im) + 2.0d0)
if (im <= 0.057d0) then
tmp = t_0
else if (im <= 5.8d+60) then
tmp = re * cosh(im)
else if (im <= 1.35d+154) then
tmp = (1.0d0 + ((im * im) * (0.5d0 + ((im * im) * 0.041666666666666664d0)))) * (re * (1.0d0 + ((re * re) * (-0.16666666666666666d0))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = (0.5 * Math.sin(re)) * ((im * im) + 2.0);
double tmp;
if (im <= 0.057) {
tmp = t_0;
} else if (im <= 5.8e+60) {
tmp = re * Math.cosh(im);
} else if (im <= 1.35e+154) {
tmp = (1.0 + ((im * im) * (0.5 + ((im * im) * 0.041666666666666664)))) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = t_0;
}
return tmp;
}
def code(re, im): t_0 = (0.5 * math.sin(re)) * ((im * im) + 2.0) tmp = 0 if im <= 0.057: tmp = t_0 elif im <= 5.8e+60: tmp = re * math.cosh(im) elif im <= 1.35e+154: tmp = (1.0 + ((im * im) * (0.5 + ((im * im) * 0.041666666666666664)))) * (re * (1.0 + ((re * re) * -0.16666666666666666))) else: tmp = t_0 return tmp
function code(re, im) t_0 = Float64(Float64(0.5 * sin(re)) * Float64(Float64(im * im) + 2.0)) tmp = 0.0 if (im <= 0.057) tmp = t_0; elseif (im <= 5.8e+60) tmp = Float64(re * cosh(im)); elseif (im <= 1.35e+154) tmp = Float64(Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + Float64(Float64(im * im) * 0.041666666666666664)))) * Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666)))); else tmp = t_0; end return tmp end
function tmp_2 = code(re, im) t_0 = (0.5 * sin(re)) * ((im * im) + 2.0); tmp = 0.0; if (im <= 0.057) tmp = t_0; elseif (im <= 5.8e+60) tmp = re * cosh(im); elseif (im <= 1.35e+154) tmp = (1.0 + ((im * im) * (0.5 + ((im * im) * 0.041666666666666664)))) * (re * (1.0 + ((re * re) * -0.16666666666666666))); else tmp = t_0; end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[(im * im), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 0.057], t$95$0, If[LessEqual[im, 5.8e+60], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 1.35e+154], N[(N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.5 + N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(0.5 \cdot \sin re\right) \cdot \left(im \cdot im + 2\right)\\
\mathbf{if}\;im \leq 0.057:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;im \leq 5.8 \cdot 10^{+60}:\\
\;\;\;\;re \cdot \cosh im\\
\mathbf{elif}\;im \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right) \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if im < 0.0570000000000000021 or 1.35000000000000003e154 < im Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6487.1%
Simplified87.1%
if 0.0570000000000000021 < im < 5.79999999999999999e60Initial 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 re around 0
Simplified76.9%
if 5.79999999999999999e60 < im < 1.35000000000000003e154Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified85.3%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6484.0%
Simplified84.0%
Final simplification86.3%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (* im im) 0.041666666666666664)))
(if (<= im 1.18e-7)
(sin re)
(if (<= im 5.8e+60)
(* re (cosh im))
(if (<= im 5.6e+141)
(*
(+ 1.0 (* (* im im) (+ 0.5 t_0)))
(* re (+ 1.0 (* (* re re) -0.16666666666666666))))
(* im (* im (* re t_0))))))))
double code(double re, double im) {
double t_0 = (im * im) * 0.041666666666666664;
double tmp;
if (im <= 1.18e-7) {
tmp = sin(re);
} else if (im <= 5.8e+60) {
tmp = re * cosh(im);
} else if (im <= 5.6e+141) {
tmp = (1.0 + ((im * im) * (0.5 + t_0))) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = im * (im * (re * t_0));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = (im * im) * 0.041666666666666664d0
if (im <= 1.18d-7) then
tmp = sin(re)
else if (im <= 5.8d+60) then
tmp = re * cosh(im)
else if (im <= 5.6d+141) then
tmp = (1.0d0 + ((im * im) * (0.5d0 + t_0))) * (re * (1.0d0 + ((re * re) * (-0.16666666666666666d0))))
else
tmp = im * (im * (re * t_0))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = (im * im) * 0.041666666666666664;
double tmp;
if (im <= 1.18e-7) {
tmp = Math.sin(re);
} else if (im <= 5.8e+60) {
tmp = re * Math.cosh(im);
} else if (im <= 5.6e+141) {
tmp = (1.0 + ((im * im) * (0.5 + t_0))) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = im * (im * (re * t_0));
}
return tmp;
}
def code(re, im): t_0 = (im * im) * 0.041666666666666664 tmp = 0 if im <= 1.18e-7: tmp = math.sin(re) elif im <= 5.8e+60: tmp = re * math.cosh(im) elif im <= 5.6e+141: tmp = (1.0 + ((im * im) * (0.5 + t_0))) * (re * (1.0 + ((re * re) * -0.16666666666666666))) else: tmp = im * (im * (re * t_0)) return tmp
function code(re, im) t_0 = Float64(Float64(im * im) * 0.041666666666666664) tmp = 0.0 if (im <= 1.18e-7) tmp = sin(re); elseif (im <= 5.8e+60) tmp = Float64(re * cosh(im)); elseif (im <= 5.6e+141) tmp = Float64(Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + t_0))) * Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666)))); else tmp = Float64(im * Float64(im * Float64(re * t_0))); end return tmp end
function tmp_2 = code(re, im) t_0 = (im * im) * 0.041666666666666664; tmp = 0.0; if (im <= 1.18e-7) tmp = sin(re); elseif (im <= 5.8e+60) tmp = re * cosh(im); elseif (im <= 5.6e+141) tmp = (1.0 + ((im * im) * (0.5 + t_0))) * (re * (1.0 + ((re * re) * -0.16666666666666666))); else tmp = im * (im * (re * t_0)); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]}, If[LessEqual[im, 1.18e-7], N[Sin[re], $MachinePrecision], If[LessEqual[im, 5.8e+60], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 5.6e+141], N[(N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.5 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(im * N[(re * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(im \cdot im\right) \cdot 0.041666666666666664\\
\mathbf{if}\;im \leq 1.18 \cdot 10^{-7}:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 5.8 \cdot 10^{+60}:\\
\;\;\;\;re \cdot \cosh im\\
\mathbf{elif}\;im \leq 5.6 \cdot 10^{+141}:\\
\;\;\;\;\left(1 + \left(im \cdot im\right) \cdot \left(0.5 + t\_0\right)\right) \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(im \cdot \left(re \cdot t\_0\right)\right)\\
\end{array}
\end{array}
if im < 1.18e-7Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6463.5%
Simplified63.5%
if 1.18e-7 < im < 5.79999999999999999e60Initial program 99.9%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f6499.9%
Applied egg-rr99.9%
Taylor expanded in re around 0
Simplified75.3%
if 5.79999999999999999e60 < im < 5.59999999999999982e141Initial 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
Simplified84.7%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6483.3%
Simplified83.3%
if 5.59999999999999982e141 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in re around 0
Simplified87.5%
Taylor expanded in im around inf
associate-*r*N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.5%
Simplified87.5%
Final simplification69.1%
(FPCore (re im)
:precision binary64
(if (<= im 1.18e-7)
(sin re)
(if (<= im 1.75e+141)
(*
re
(*
re
(*
re
(*
(+
2.0
(*
im
(*
im
(+
1.0
(*
im
(*
im
(+ 0.08333333333333333 (* (* im im) 0.002777777777777778))))))))
(+ -0.08333333333333333 (/ 0.5 (* re re)))))))
(* im (* im (* re (* (* im im) 0.041666666666666664)))))))
double code(double re, double im) {
double tmp;
if (im <= 1.18e-7) {
tmp = sin(re);
} else if (im <= 1.75e+141) {
tmp = re * (re * (re * ((2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (-0.08333333333333333 + (0.5 / (re * re))))));
} else {
tmp = im * (im * (re * ((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 <= 1.18d-7) then
tmp = sin(re)
else if (im <= 1.75d+141) then
tmp = re * (re * (re * ((2.0d0 + (im * (im * (1.0d0 + (im * (im * (0.08333333333333333d0 + ((im * im) * 0.002777777777777778d0)))))))) * ((-0.08333333333333333d0) + (0.5d0 / (re * re))))))
else
tmp = im * (im * (re * ((im * im) * 0.041666666666666664d0)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 1.18e-7) {
tmp = Math.sin(re);
} else if (im <= 1.75e+141) {
tmp = re * (re * (re * ((2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (-0.08333333333333333 + (0.5 / (re * re))))));
} else {
tmp = im * (im * (re * ((im * im) * 0.041666666666666664)));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 1.18e-7: tmp = math.sin(re) elif im <= 1.75e+141: tmp = re * (re * (re * ((2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (-0.08333333333333333 + (0.5 / (re * re)))))) else: tmp = im * (im * (re * ((im * im) * 0.041666666666666664))) return tmp
function code(re, im) tmp = 0.0 if (im <= 1.18e-7) tmp = sin(re); elseif (im <= 1.75e+141) tmp = Float64(re * Float64(re * Float64(re * Float64(Float64(2.0 + Float64(im * Float64(im * Float64(1.0 + Float64(im * Float64(im * Float64(0.08333333333333333 + Float64(Float64(im * im) * 0.002777777777777778)))))))) * Float64(-0.08333333333333333 + Float64(0.5 / Float64(re * re))))))); else tmp = Float64(im * Float64(im * Float64(re * Float64(Float64(im * im) * 0.041666666666666664)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 1.18e-7) tmp = sin(re); elseif (im <= 1.75e+141) tmp = re * (re * (re * ((2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (-0.08333333333333333 + (0.5 / (re * re)))))); else tmp = im * (im * (re * ((im * im) * 0.041666666666666664))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 1.18e-7], N[Sin[re], $MachinePrecision], If[LessEqual[im, 1.75e+141], N[(re * N[(re * N[(re * N[(N[(2.0 + N[(im * N[(im * N[(1.0 + N[(im * N[(im * N[(0.08333333333333333 + N[(N[(im * im), $MachinePrecision] * 0.002777777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-0.08333333333333333 + N[(0.5 / N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(im * N[(re * N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 1.18 \cdot 10^{-7}:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 1.75 \cdot 10^{+141}:\\
\;\;\;\;re \cdot \left(re \cdot \left(re \cdot \left(\left(2 + im \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\right)\right)\right) \cdot \left(-0.08333333333333333 + \frac{0.5}{re \cdot re}\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(im \cdot \left(re \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\
\end{array}
\end{array}
if im < 1.18e-7Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6463.5%
Simplified63.5%
if 1.18e-7 < im < 1.75e141Initial 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-*.f6473.8%
Simplified73.8%
Taylor expanded in re around 0
distribute-lft-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
fma-undefineN/A
distribute-lft-outN/A
Simplified67.7%
Taylor expanded in re around inf
Simplified55.0%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr77.5%
if 1.75e141 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in re around 0
Simplified87.5%
Taylor expanded in im around inf
associate-*r*N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.5%
Simplified87.5%
Final simplification68.7%
(FPCore (re im)
:precision binary64
(let* ((t_0
(*
(* im im)
(+ 0.08333333333333333 (* im (* im 0.002777777777777778)))))
(t_1 (* im (- -1.0 t_0))))
(if (<= im 5.4e+51)
(*
re
(/
(* 0.5 (+ 4.0 (* (* im im) (* (* im (+ 1.0 t_0)) t_1))))
(+ 2.0 (* im t_1))))
(if (<= im 4.4e+142)
(*
re
(*
(+
2.0
(*
im
(*
im
(+
1.0
(*
im
(*
im
(+ 0.08333333333333333 (* (* im im) 0.002777777777777778))))))))
(+ 0.5 (* (* re re) -0.08333333333333333))))
(* im (* im (* re (* (* im im) 0.041666666666666664))))))))
double code(double re, double im) {
double t_0 = (im * im) * (0.08333333333333333 + (im * (im * 0.002777777777777778)));
double t_1 = im * (-1.0 - t_0);
double tmp;
if (im <= 5.4e+51) {
tmp = re * ((0.5 * (4.0 + ((im * im) * ((im * (1.0 + t_0)) * t_1)))) / (2.0 + (im * t_1)));
} else if (im <= 4.4e+142) {
tmp = re * ((2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (0.5 + ((re * re) * -0.08333333333333333)));
} else {
tmp = im * (im * (re * ((im * im) * 0.041666666666666664)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (im * im) * (0.08333333333333333d0 + (im * (im * 0.002777777777777778d0)))
t_1 = im * ((-1.0d0) - t_0)
if (im <= 5.4d+51) then
tmp = re * ((0.5d0 * (4.0d0 + ((im * im) * ((im * (1.0d0 + t_0)) * t_1)))) / (2.0d0 + (im * t_1)))
else if (im <= 4.4d+142) then
tmp = re * ((2.0d0 + (im * (im * (1.0d0 + (im * (im * (0.08333333333333333d0 + ((im * im) * 0.002777777777777778d0)))))))) * (0.5d0 + ((re * re) * (-0.08333333333333333d0))))
else
tmp = im * (im * (re * ((im * im) * 0.041666666666666664d0)))
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 * (-1.0 - t_0);
double tmp;
if (im <= 5.4e+51) {
tmp = re * ((0.5 * (4.0 + ((im * im) * ((im * (1.0 + t_0)) * t_1)))) / (2.0 + (im * t_1)));
} else if (im <= 4.4e+142) {
tmp = re * ((2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (0.5 + ((re * re) * -0.08333333333333333)));
} else {
tmp = im * (im * (re * ((im * im) * 0.041666666666666664)));
}
return tmp;
}
def code(re, im): t_0 = (im * im) * (0.08333333333333333 + (im * (im * 0.002777777777777778))) t_1 = im * (-1.0 - t_0) tmp = 0 if im <= 5.4e+51: tmp = re * ((0.5 * (4.0 + ((im * im) * ((im * (1.0 + t_0)) * t_1)))) / (2.0 + (im * t_1))) elif im <= 4.4e+142: tmp = re * ((2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (0.5 + ((re * re) * -0.08333333333333333))) else: tmp = im * (im * (re * ((im * im) * 0.041666666666666664))) return tmp
function code(re, im) t_0 = Float64(Float64(im * im) * Float64(0.08333333333333333 + Float64(im * Float64(im * 0.002777777777777778)))) t_1 = Float64(im * Float64(-1.0 - t_0)) tmp = 0.0 if (im <= 5.4e+51) tmp = Float64(re * Float64(Float64(0.5 * Float64(4.0 + Float64(Float64(im * im) * Float64(Float64(im * Float64(1.0 + t_0)) * t_1)))) / Float64(2.0 + Float64(im * t_1)))); elseif (im <= 4.4e+142) tmp = Float64(re * Float64(Float64(2.0 + Float64(im * Float64(im * Float64(1.0 + Float64(im * Float64(im * Float64(0.08333333333333333 + Float64(Float64(im * im) * 0.002777777777777778)))))))) * Float64(0.5 + Float64(Float64(re * re) * -0.08333333333333333)))); else tmp = Float64(im * Float64(im * Float64(re * Float64(Float64(im * im) * 0.041666666666666664)))); end return tmp end
function tmp_2 = code(re, im) t_0 = (im * im) * (0.08333333333333333 + (im * (im * 0.002777777777777778))); t_1 = im * (-1.0 - t_0); tmp = 0.0; if (im <= 5.4e+51) tmp = re * ((0.5 * (4.0 + ((im * im) * ((im * (1.0 + t_0)) * t_1)))) / (2.0 + (im * t_1))); elseif (im <= 4.4e+142) tmp = re * ((2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (0.5 + ((re * re) * -0.08333333333333333))); else tmp = im * (im * (re * ((im * im) * 0.041666666666666664))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[(im * im), $MachinePrecision] * N[(0.08333333333333333 + N[(im * N[(im * 0.002777777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(im * N[(-1.0 - t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 5.4e+51], N[(re * N[(N[(0.5 * N[(4.0 + N[(N[(im * im), $MachinePrecision] * N[(N[(im * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[(im * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 4.4e+142], N[(re * N[(N[(2.0 + N[(im * N[(im * N[(1.0 + N[(im * N[(im * N[(0.08333333333333333 + N[(N[(im * im), $MachinePrecision] * 0.002777777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.5 + N[(N[(re * re), $MachinePrecision] * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(im * N[(re * N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(im \cdot im\right) \cdot \left(0.08333333333333333 + im \cdot \left(im \cdot 0.002777777777777778\right)\right)\\
t_1 := im \cdot \left(-1 - t\_0\right)\\
\mathbf{if}\;im \leq 5.4 \cdot 10^{+51}:\\
\;\;\;\;re \cdot \frac{0.5 \cdot \left(4 + \left(im \cdot im\right) \cdot \left(\left(im \cdot \left(1 + t\_0\right)\right) \cdot t\_1\right)\right)}{2 + im \cdot t\_1}\\
\mathbf{elif}\;im \leq 4.4 \cdot 10^{+142}:\\
\;\;\;\;re \cdot \left(\left(2 + im \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\right)\right)\right) \cdot \left(0.5 + \left(re \cdot re\right) \cdot -0.08333333333333333\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(im \cdot \left(re \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\
\end{array}
\end{array}
if im < 5.39999999999999983e51Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6490.8%
Simplified90.8%
Taylor expanded in re around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
distribute-rgt-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
Simplified58.4%
metadata-evalN/A
associate-*l*N/A
associate-*r*N/A
distribute-lft-inN/A
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr37.5%
if 5.39999999999999983e51 < im < 4.39999999999999974e142Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in re around 0
distribute-lft-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
fma-undefineN/A
distribute-lft-outN/A
Simplified84.6%
if 4.39999999999999974e142 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in re around 0
Simplified87.5%
Taylor expanded in im around inf
associate-*r*N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.5%
Simplified87.5%
Final simplification48.6%
(FPCore (re im)
:precision binary64
(if (<= im 132000.0)
(+
re
(*
(+
1.0
(* (* im im) (+ 0.08333333333333333 (* im (* im 0.002777777777777778)))))
(* re (* im (* 0.5 im)))))
(if (<= im 2.06e+142)
(*
re
(*
re
(*
re
(*
(+
2.0
(*
im
(*
im
(+
1.0
(*
im
(*
im
(+ 0.08333333333333333 (* (* im im) 0.002777777777777778))))))))
(+ -0.08333333333333333 (/ 0.5 (* re re)))))))
(* im (* im (* re (* (* im im) 0.041666666666666664)))))))
double code(double re, double im) {
double tmp;
if (im <= 132000.0) {
tmp = re + ((1.0 + ((im * im) * (0.08333333333333333 + (im * (im * 0.002777777777777778))))) * (re * (im * (0.5 * im))));
} else if (im <= 2.06e+142) {
tmp = re * (re * (re * ((2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (-0.08333333333333333 + (0.5 / (re * re))))));
} else {
tmp = im * (im * (re * ((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 <= 132000.0d0) then
tmp = re + ((1.0d0 + ((im * im) * (0.08333333333333333d0 + (im * (im * 0.002777777777777778d0))))) * (re * (im * (0.5d0 * im))))
else if (im <= 2.06d+142) then
tmp = re * (re * (re * ((2.0d0 + (im * (im * (1.0d0 + (im * (im * (0.08333333333333333d0 + ((im * im) * 0.002777777777777778d0)))))))) * ((-0.08333333333333333d0) + (0.5d0 / (re * re))))))
else
tmp = im * (im * (re * ((im * im) * 0.041666666666666664d0)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 132000.0) {
tmp = re + ((1.0 + ((im * im) * (0.08333333333333333 + (im * (im * 0.002777777777777778))))) * (re * (im * (0.5 * im))));
} else if (im <= 2.06e+142) {
tmp = re * (re * (re * ((2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (-0.08333333333333333 + (0.5 / (re * re))))));
} else {
tmp = im * (im * (re * ((im * im) * 0.041666666666666664)));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 132000.0: tmp = re + ((1.0 + ((im * im) * (0.08333333333333333 + (im * (im * 0.002777777777777778))))) * (re * (im * (0.5 * im)))) elif im <= 2.06e+142: tmp = re * (re * (re * ((2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (-0.08333333333333333 + (0.5 / (re * re)))))) else: tmp = im * (im * (re * ((im * im) * 0.041666666666666664))) return tmp
function code(re, im) tmp = 0.0 if (im <= 132000.0) tmp = Float64(re + Float64(Float64(1.0 + Float64(Float64(im * im) * Float64(0.08333333333333333 + Float64(im * Float64(im * 0.002777777777777778))))) * Float64(re * Float64(im * Float64(0.5 * im))))); elseif (im <= 2.06e+142) tmp = Float64(re * Float64(re * Float64(re * Float64(Float64(2.0 + Float64(im * Float64(im * Float64(1.0 + Float64(im * Float64(im * Float64(0.08333333333333333 + Float64(Float64(im * im) * 0.002777777777777778)))))))) * Float64(-0.08333333333333333 + Float64(0.5 / Float64(re * re))))))); else tmp = Float64(im * Float64(im * Float64(re * Float64(Float64(im * im) * 0.041666666666666664)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 132000.0) tmp = re + ((1.0 + ((im * im) * (0.08333333333333333 + (im * (im * 0.002777777777777778))))) * (re * (im * (0.5 * im)))); elseif (im <= 2.06e+142) tmp = re * (re * (re * ((2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (-0.08333333333333333 + (0.5 / (re * re)))))); else tmp = im * (im * (re * ((im * im) * 0.041666666666666664))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 132000.0], N[(re + N[(N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.08333333333333333 + N[(im * N[(im * 0.002777777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(im * N[(0.5 * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 2.06e+142], N[(re * N[(re * N[(re * N[(N[(2.0 + N[(im * N[(im * N[(1.0 + N[(im * N[(im * N[(0.08333333333333333 + N[(N[(im * im), $MachinePrecision] * 0.002777777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-0.08333333333333333 + N[(0.5 / N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(im * N[(re * N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 132000:\\
\;\;\;\;re + \left(1 + \left(im \cdot im\right) \cdot \left(0.08333333333333333 + im \cdot \left(im \cdot 0.002777777777777778\right)\right)\right) \cdot \left(re \cdot \left(im \cdot \left(0.5 \cdot im\right)\right)\right)\\
\mathbf{elif}\;im \leq 2.06 \cdot 10^{+142}:\\
\;\;\;\;re \cdot \left(re \cdot \left(re \cdot \left(\left(2 + im \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\right)\right)\right) \cdot \left(-0.08333333333333333 + \frac{0.5}{re \cdot re}\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(im \cdot \left(re \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\
\end{array}
\end{array}
if im < 132000Initial 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-*.f6495.9%
Simplified95.9%
Taylor expanded in re around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
distribute-rgt-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
Simplified60.7%
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
+-lowering-+.f64N/A
Applied egg-rr60.2%
if 132000 < im < 2.0599999999999999e142Initial 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-*.f6471.7%
Simplified71.7%
Taylor expanded in re around 0
distribute-lft-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
fma-undefineN/A
distribute-lft-outN/A
Simplified67.9%
Taylor expanded in re around inf
Simplified54.1%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr78.4%
if 2.0599999999999999e142 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in re around 0
Simplified87.5%
Taylor expanded in im around inf
associate-*r*N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.5%
Simplified87.5%
Final simplification66.2%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (* im im) 0.041666666666666664)))
(if (<= im 5.8e+51)
(*
(+ 1.0 (* (* im im) (+ 0.5 t_0)))
(*
re
(+
1.0
(*
(* re re)
(+ -0.16666666666666666 (* (* re re) 0.008333333333333333))))))
(if (<= im 4.8e+140)
(*
re
(*
(+
2.0
(*
im
(*
im
(+
1.0
(*
im
(*
im
(+ 0.08333333333333333 (* (* im im) 0.002777777777777778))))))))
(+ 0.5 (* (* re re) -0.08333333333333333))))
(* im (* im (* re t_0)))))))
double code(double re, double im) {
double t_0 = (im * im) * 0.041666666666666664;
double tmp;
if (im <= 5.8e+51) {
tmp = (1.0 + ((im * im) * (0.5 + t_0))) * (re * (1.0 + ((re * re) * (-0.16666666666666666 + ((re * re) * 0.008333333333333333)))));
} else if (im <= 4.8e+140) {
tmp = re * ((2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (0.5 + ((re * re) * -0.08333333333333333)));
} else {
tmp = im * (im * (re * t_0));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = (im * im) * 0.041666666666666664d0
if (im <= 5.8d+51) then
tmp = (1.0d0 + ((im * im) * (0.5d0 + t_0))) * (re * (1.0d0 + ((re * re) * ((-0.16666666666666666d0) + ((re * re) * 0.008333333333333333d0)))))
else if (im <= 4.8d+140) then
tmp = re * ((2.0d0 + (im * (im * (1.0d0 + (im * (im * (0.08333333333333333d0 + ((im * im) * 0.002777777777777778d0)))))))) * (0.5d0 + ((re * re) * (-0.08333333333333333d0))))
else
tmp = im * (im * (re * t_0))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = (im * im) * 0.041666666666666664;
double tmp;
if (im <= 5.8e+51) {
tmp = (1.0 + ((im * im) * (0.5 + t_0))) * (re * (1.0 + ((re * re) * (-0.16666666666666666 + ((re * re) * 0.008333333333333333)))));
} else if (im <= 4.8e+140) {
tmp = re * ((2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (0.5 + ((re * re) * -0.08333333333333333)));
} else {
tmp = im * (im * (re * t_0));
}
return tmp;
}
def code(re, im): t_0 = (im * im) * 0.041666666666666664 tmp = 0 if im <= 5.8e+51: tmp = (1.0 + ((im * im) * (0.5 + t_0))) * (re * (1.0 + ((re * re) * (-0.16666666666666666 + ((re * re) * 0.008333333333333333))))) elif im <= 4.8e+140: tmp = re * ((2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (0.5 + ((re * re) * -0.08333333333333333))) else: tmp = im * (im * (re * t_0)) return tmp
function code(re, im) t_0 = Float64(Float64(im * im) * 0.041666666666666664) tmp = 0.0 if (im <= 5.8e+51) tmp = Float64(Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + t_0))) * Float64(re * Float64(1.0 + Float64(Float64(re * re) * Float64(-0.16666666666666666 + Float64(Float64(re * re) * 0.008333333333333333)))))); elseif (im <= 4.8e+140) tmp = Float64(re * Float64(Float64(2.0 + Float64(im * Float64(im * Float64(1.0 + Float64(im * Float64(im * Float64(0.08333333333333333 + Float64(Float64(im * im) * 0.002777777777777778)))))))) * Float64(0.5 + Float64(Float64(re * re) * -0.08333333333333333)))); else tmp = Float64(im * Float64(im * Float64(re * t_0))); end return tmp end
function tmp_2 = code(re, im) t_0 = (im * im) * 0.041666666666666664; tmp = 0.0; if (im <= 5.8e+51) tmp = (1.0 + ((im * im) * (0.5 + t_0))) * (re * (1.0 + ((re * re) * (-0.16666666666666666 + ((re * re) * 0.008333333333333333))))); elseif (im <= 4.8e+140) tmp = re * ((2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (0.5 + ((re * re) * -0.08333333333333333))); else tmp = im * (im * (re * t_0)); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]}, If[LessEqual[im, 5.8e+51], N[(N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.5 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 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]), $MachinePrecision], If[LessEqual[im, 4.8e+140], N[(re * N[(N[(2.0 + N[(im * N[(im * N[(1.0 + N[(im * N[(im * N[(0.08333333333333333 + N[(N[(im * im), $MachinePrecision] * 0.002777777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.5 + N[(N[(re * re), $MachinePrecision] * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(im * N[(re * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(im \cdot im\right) \cdot 0.041666666666666664\\
\mathbf{if}\;im \leq 5.8 \cdot 10^{+51}:\\
\;\;\;\;\left(1 + \left(im \cdot im\right) \cdot \left(0.5 + t\_0\right)\right) \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot 0.008333333333333333\right)\right)\right)\\
\mathbf{elif}\;im \leq 4.8 \cdot 10^{+140}:\\
\;\;\;\;re \cdot \left(\left(2 + im \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\right)\right)\right) \cdot \left(0.5 + \left(re \cdot re\right) \cdot -0.08333333333333333\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(im \cdot \left(re \cdot t\_0\right)\right)\\
\end{array}
\end{array}
if im < 5.7999999999999997e51Initial 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.8%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.7%
Simplified59.7%
if 5.7999999999999997e51 < im < 4.7999999999999999e140Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in re around 0
distribute-lft-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
fma-undefineN/A
distribute-lft-outN/A
Simplified84.6%
if 4.7999999999999999e140 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in re around 0
Simplified87.5%
Taylor expanded in im around inf
associate-*r*N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.5%
Simplified87.5%
Final simplification65.7%
(FPCore (re im)
:precision binary64
(if (<= im 1.05e+51)
(*
(+ 1.0 (* 0.5 (* im im)))
(*
re
(+
1.0
(*
re
(* re (+ -0.16666666666666666 (* (* re re) 0.008333333333333333)))))))
(if (<= im 7e+140)
(*
re
(*
(+
2.0
(*
im
(*
im
(+
1.0
(*
im
(*
im
(+ 0.08333333333333333 (* (* im im) 0.002777777777777778))))))))
(+ 0.5 (* (* re re) -0.08333333333333333))))
(* im (* im (* re (* (* im im) 0.041666666666666664)))))))
double code(double re, double im) {
double tmp;
if (im <= 1.05e+51) {
tmp = (1.0 + (0.5 * (im * im))) * (re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * 0.008333333333333333))))));
} else if (im <= 7e+140) {
tmp = re * ((2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (0.5 + ((re * re) * -0.08333333333333333)));
} else {
tmp = im * (im * (re * ((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 <= 1.05d+51) then
tmp = (1.0d0 + (0.5d0 * (im * im))) * (re * (1.0d0 + (re * (re * ((-0.16666666666666666d0) + ((re * re) * 0.008333333333333333d0))))))
else if (im <= 7d+140) then
tmp = re * ((2.0d0 + (im * (im * (1.0d0 + (im * (im * (0.08333333333333333d0 + ((im * im) * 0.002777777777777778d0)))))))) * (0.5d0 + ((re * re) * (-0.08333333333333333d0))))
else
tmp = im * (im * (re * ((im * im) * 0.041666666666666664d0)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 1.05e+51) {
tmp = (1.0 + (0.5 * (im * im))) * (re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * 0.008333333333333333))))));
} else if (im <= 7e+140) {
tmp = re * ((2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (0.5 + ((re * re) * -0.08333333333333333)));
} else {
tmp = im * (im * (re * ((im * im) * 0.041666666666666664)));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 1.05e+51: tmp = (1.0 + (0.5 * (im * im))) * (re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * 0.008333333333333333)))))) elif im <= 7e+140: tmp = re * ((2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (0.5 + ((re * re) * -0.08333333333333333))) else: tmp = im * (im * (re * ((im * im) * 0.041666666666666664))) return tmp
function code(re, im) tmp = 0.0 if (im <= 1.05e+51) tmp = Float64(Float64(1.0 + Float64(0.5 * Float64(im * im))) * Float64(re * Float64(1.0 + Float64(re * Float64(re * Float64(-0.16666666666666666 + Float64(Float64(re * re) * 0.008333333333333333))))))); elseif (im <= 7e+140) tmp = Float64(re * Float64(Float64(2.0 + Float64(im * Float64(im * Float64(1.0 + Float64(im * Float64(im * Float64(0.08333333333333333 + Float64(Float64(im * im) * 0.002777777777777778)))))))) * Float64(0.5 + Float64(Float64(re * re) * -0.08333333333333333)))); else tmp = Float64(im * Float64(im * Float64(re * Float64(Float64(im * im) * 0.041666666666666664)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 1.05e+51) tmp = (1.0 + (0.5 * (im * im))) * (re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * 0.008333333333333333)))))); elseif (im <= 7e+140) tmp = re * ((2.0 + (im * (im * (1.0 + (im * (im * (0.08333333333333333 + ((im * im) * 0.002777777777777778)))))))) * (0.5 + ((re * re) * -0.08333333333333333))); else tmp = im * (im * (re * ((im * im) * 0.041666666666666664))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 1.05e+51], N[(N[(1.0 + N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(1.0 + N[(re * N[(re * N[(-0.16666666666666666 + N[(N[(re * re), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 7e+140], N[(re * N[(N[(2.0 + N[(im * N[(im * N[(1.0 + N[(im * N[(im * N[(0.08333333333333333 + N[(N[(im * im), $MachinePrecision] * 0.002777777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.5 + N[(N[(re * re), $MachinePrecision] * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(im * N[(re * N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 1.05 \cdot 10^{+51}:\\
\;\;\;\;\left(1 + 0.5 \cdot \left(im \cdot im\right)\right) \cdot \left(re \cdot \left(1 + re \cdot \left(re \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot 0.008333333333333333\right)\right)\right)\right)\\
\mathbf{elif}\;im \leq 7 \cdot 10^{+140}:\\
\;\;\;\;re \cdot \left(\left(2 + im \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot \left(0.08333333333333333 + \left(im \cdot im\right) \cdot 0.002777777777777778\right)\right)\right)\right)\right) \cdot \left(0.5 + \left(re \cdot re\right) \cdot -0.08333333333333333\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(im \cdot \left(re \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\
\end{array}
\end{array}
if im < 1.0500000000000001e51Initial 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-*.f6480.4%
Simplified80.4%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6453.9%
Simplified53.9%
if 1.0500000000000001e51 < im < 6.99999999999999978e140Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in re around 0
distribute-lft-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
fma-undefineN/A
distribute-lft-outN/A
Simplified84.6%
if 6.99999999999999978e140 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in re around 0
Simplified87.5%
Taylor expanded in im around inf
associate-*r*N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.5%
Simplified87.5%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (* im im) 0.041666666666666664)))
(if (<= im 3.6e+60)
(*
(+ 1.0 (* 0.5 (* im im)))
(*
re
(+
1.0
(*
re
(* re (+ -0.16666666666666666 (* (* re re) 0.008333333333333333)))))))
(if (<= im 1.52e+141)
(*
(+ 1.0 (* (* im im) (+ 0.5 t_0)))
(* re (+ 1.0 (* (* re re) -0.16666666666666666))))
(* im (* im (* re t_0)))))))
double code(double re, double im) {
double t_0 = (im * im) * 0.041666666666666664;
double tmp;
if (im <= 3.6e+60) {
tmp = (1.0 + (0.5 * (im * im))) * (re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * 0.008333333333333333))))));
} else if (im <= 1.52e+141) {
tmp = (1.0 + ((im * im) * (0.5 + t_0))) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = im * (im * (re * t_0));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = (im * im) * 0.041666666666666664d0
if (im <= 3.6d+60) then
tmp = (1.0d0 + (0.5d0 * (im * im))) * (re * (1.0d0 + (re * (re * ((-0.16666666666666666d0) + ((re * re) * 0.008333333333333333d0))))))
else if (im <= 1.52d+141) then
tmp = (1.0d0 + ((im * im) * (0.5d0 + t_0))) * (re * (1.0d0 + ((re * re) * (-0.16666666666666666d0))))
else
tmp = im * (im * (re * t_0))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = (im * im) * 0.041666666666666664;
double tmp;
if (im <= 3.6e+60) {
tmp = (1.0 + (0.5 * (im * im))) * (re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * 0.008333333333333333))))));
} else if (im <= 1.52e+141) {
tmp = (1.0 + ((im * im) * (0.5 + t_0))) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = im * (im * (re * t_0));
}
return tmp;
}
def code(re, im): t_0 = (im * im) * 0.041666666666666664 tmp = 0 if im <= 3.6e+60: tmp = (1.0 + (0.5 * (im * im))) * (re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * 0.008333333333333333)))))) elif im <= 1.52e+141: tmp = (1.0 + ((im * im) * (0.5 + t_0))) * (re * (1.0 + ((re * re) * -0.16666666666666666))) else: tmp = im * (im * (re * t_0)) return tmp
function code(re, im) t_0 = Float64(Float64(im * im) * 0.041666666666666664) tmp = 0.0 if (im <= 3.6e+60) tmp = Float64(Float64(1.0 + Float64(0.5 * Float64(im * im))) * Float64(re * Float64(1.0 + Float64(re * Float64(re * Float64(-0.16666666666666666 + Float64(Float64(re * re) * 0.008333333333333333))))))); elseif (im <= 1.52e+141) tmp = Float64(Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + t_0))) * Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666)))); else tmp = Float64(im * Float64(im * Float64(re * t_0))); end return tmp end
function tmp_2 = code(re, im) t_0 = (im * im) * 0.041666666666666664; tmp = 0.0; if (im <= 3.6e+60) tmp = (1.0 + (0.5 * (im * im))) * (re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * 0.008333333333333333)))))); elseif (im <= 1.52e+141) tmp = (1.0 + ((im * im) * (0.5 + t_0))) * (re * (1.0 + ((re * re) * -0.16666666666666666))); else tmp = im * (im * (re * t_0)); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]}, If[LessEqual[im, 3.6e+60], N[(N[(1.0 + N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(1.0 + N[(re * N[(re * N[(-0.16666666666666666 + N[(N[(re * re), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 1.52e+141], N[(N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.5 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(im * N[(re * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(im \cdot im\right) \cdot 0.041666666666666664\\
\mathbf{if}\;im \leq 3.6 \cdot 10^{+60}:\\
\;\;\;\;\left(1 + 0.5 \cdot \left(im \cdot im\right)\right) \cdot \left(re \cdot \left(1 + re \cdot \left(re \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot 0.008333333333333333\right)\right)\right)\right)\\
\mathbf{elif}\;im \leq 1.52 \cdot 10^{+141}:\\
\;\;\;\;\left(1 + \left(im \cdot im\right) \cdot \left(0.5 + t\_0\right)\right) \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(im \cdot \left(re \cdot t\_0\right)\right)\\
\end{array}
\end{array}
if im < 3.59999999999999968e60Initial 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-*.f6479.6%
Simplified79.6%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6453.4%
Simplified53.4%
if 3.59999999999999968e60 < im < 1.52e141Initial 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
Simplified84.7%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6483.3%
Simplified83.3%
if 1.52e141 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in re around 0
Simplified87.5%
Taylor expanded in im around inf
associate-*r*N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.5%
Simplified87.5%
Final simplification60.5%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (* im im) 0.041666666666666664)))
(if (<= im 5.8e+60)
(*
re
(+
1.0
(*
(* im im)
(+
0.5
(*
(* im im)
(+ 0.041666666666666664 (* (* im im) 0.001388888888888889)))))))
(if (<= im 9.6e+140)
(*
(+ 1.0 (* (* im im) (+ 0.5 t_0)))
(* re (+ 1.0 (* (* re re) -0.16666666666666666))))
(* im (* im (* re t_0)))))))
double code(double re, double im) {
double t_0 = (im * im) * 0.041666666666666664;
double tmp;
if (im <= 5.8e+60) {
tmp = re * (1.0 + ((im * im) * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889))))));
} else if (im <= 9.6e+140) {
tmp = (1.0 + ((im * im) * (0.5 + t_0))) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = im * (im * (re * t_0));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = (im * im) * 0.041666666666666664d0
if (im <= 5.8d+60) then
tmp = re * (1.0d0 + ((im * im) * (0.5d0 + ((im * im) * (0.041666666666666664d0 + ((im * im) * 0.001388888888888889d0))))))
else if (im <= 9.6d+140) then
tmp = (1.0d0 + ((im * im) * (0.5d0 + t_0))) * (re * (1.0d0 + ((re * re) * (-0.16666666666666666d0))))
else
tmp = im * (im * (re * t_0))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = (im * im) * 0.041666666666666664;
double tmp;
if (im <= 5.8e+60) {
tmp = re * (1.0 + ((im * im) * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889))))));
} else if (im <= 9.6e+140) {
tmp = (1.0 + ((im * im) * (0.5 + t_0))) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
} else {
tmp = im * (im * (re * t_0));
}
return tmp;
}
def code(re, im): t_0 = (im * im) * 0.041666666666666664 tmp = 0 if im <= 5.8e+60: tmp = re * (1.0 + ((im * im) * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))) elif im <= 9.6e+140: tmp = (1.0 + ((im * im) * (0.5 + t_0))) * (re * (1.0 + ((re * re) * -0.16666666666666666))) else: tmp = im * (im * (re * t_0)) return tmp
function code(re, im) t_0 = Float64(Float64(im * im) * 0.041666666666666664) tmp = 0.0 if (im <= 5.8e+60) tmp = Float64(re * Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + Float64(Float64(im * im) * Float64(0.041666666666666664 + Float64(Float64(im * im) * 0.001388888888888889))))))); elseif (im <= 9.6e+140) tmp = Float64(Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + t_0))) * Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666)))); else tmp = Float64(im * Float64(im * Float64(re * t_0))); end return tmp end
function tmp_2 = code(re, im) t_0 = (im * im) * 0.041666666666666664; tmp = 0.0; if (im <= 5.8e+60) tmp = re * (1.0 + ((im * im) * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))); elseif (im <= 9.6e+140) tmp = (1.0 + ((im * im) * (0.5 + t_0))) * (re * (1.0 + ((re * re) * -0.16666666666666666))); else tmp = im * (im * (re * t_0)); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]}, If[LessEqual[im, 5.8e+60], N[(re * N[(1.0 + N[(N[(im * im), $MachinePrecision] * 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], If[LessEqual[im, 9.6e+140], N[(N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.5 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(im * N[(re * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(im \cdot im\right) \cdot 0.041666666666666664\\
\mathbf{if}\;im \leq 5.8 \cdot 10^{+60}:\\
\;\;\;\;re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\\
\mathbf{elif}\;im \leq 9.6 \cdot 10^{+140}:\\
\;\;\;\;\left(1 + \left(im \cdot im\right) \cdot \left(0.5 + t\_0\right)\right) \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(im \cdot \left(re \cdot t\_0\right)\right)\\
\end{array}
\end{array}
if im < 5.79999999999999999e60Initial 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-*.f6490.9%
Simplified90.9%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-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-*.f6458.9%
Simplified58.9%
if 5.79999999999999999e60 < im < 9.5999999999999999e140Initial 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
Simplified84.7%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6483.3%
Simplified83.3%
if 9.5999999999999999e140 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in re around 0
Simplified87.5%
Taylor expanded in im around inf
associate-*r*N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.5%
Simplified87.5%
Final simplification64.7%
(FPCore (re im)
:precision binary64
(if (<= re 1.5e+219)
(*
re
(+
1.0
(*
(* im im)
(+
0.5
(*
(* im im)
(+ 0.041666666666666664 (* (* im im) 0.001388888888888889)))))))
(* re (+ 1.0 (* (* re re) -0.16666666666666666)))))
double code(double re, double im) {
double tmp;
if (re <= 1.5e+219) {
tmp = re * (1.0 + ((im * im) * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889))))));
} else {
tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 1.5d+219) then
tmp = re * (1.0d0 + ((im * im) * (0.5d0 + ((im * im) * (0.041666666666666664d0 + ((im * im) * 0.001388888888888889d0))))))
else
tmp = re * (1.0d0 + ((re * re) * (-0.16666666666666666d0)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 1.5e+219) {
tmp = re * (1.0 + ((im * im) * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889))))));
} else {
tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 1.5e+219: tmp = re * (1.0 + ((im * im) * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))) else: tmp = re * (1.0 + ((re * re) * -0.16666666666666666)) return tmp
function code(re, im) tmp = 0.0 if (re <= 1.5e+219) tmp = Float64(re * Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + Float64(Float64(im * im) * Float64(0.041666666666666664 + Float64(Float64(im * im) * 0.001388888888888889))))))); else tmp = Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 1.5e+219) tmp = re * (1.0 + ((im * im) * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))); else tmp = re * (1.0 + ((re * re) * -0.16666666666666666)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 1.5e+219], N[(re * N[(1.0 + N[(N[(im * im), $MachinePrecision] * 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], N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 1.5 \cdot 10^{+219}:\\
\;\;\;\;re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
\end{array}
\end{array}
if re < 1.4999999999999999e219Initial 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-*.f6493.5%
Simplified93.5%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-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-*.f6464.2%
Simplified64.2%
if 1.4999999999999999e219 < re Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6427.3%
Simplified27.3%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6430.5%
Simplified30.5%
(FPCore (re im)
:precision binary64
(if (<= re 1.5e+219)
(*
re
(+
1.0
(*
(* 0.5 (* im im))
(+ 1.0 (* im (* 0.002777777777777778 (* im (* im im))))))))
(* re (+ 1.0 (* (* re re) -0.16666666666666666)))))
double code(double re, double im) {
double tmp;
if (re <= 1.5e+219) {
tmp = re * (1.0 + ((0.5 * (im * im)) * (1.0 + (im * (0.002777777777777778 * (im * (im * im)))))));
} else {
tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 1.5d+219) then
tmp = re * (1.0d0 + ((0.5d0 * (im * im)) * (1.0d0 + (im * (0.002777777777777778d0 * (im * (im * im)))))))
else
tmp = re * (1.0d0 + ((re * re) * (-0.16666666666666666d0)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 1.5e+219) {
tmp = re * (1.0 + ((0.5 * (im * im)) * (1.0 + (im * (0.002777777777777778 * (im * (im * im)))))));
} else {
tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 1.5e+219: tmp = re * (1.0 + ((0.5 * (im * im)) * (1.0 + (im * (0.002777777777777778 * (im * (im * im))))))) else: tmp = re * (1.0 + ((re * re) * -0.16666666666666666)) return tmp
function code(re, im) tmp = 0.0 if (re <= 1.5e+219) tmp = Float64(re * Float64(1.0 + Float64(Float64(0.5 * Float64(im * im)) * Float64(1.0 + Float64(im * Float64(0.002777777777777778 * Float64(im * Float64(im * im)))))))); else tmp = Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 1.5e+219) tmp = re * (1.0 + ((0.5 * (im * im)) * (1.0 + (im * (0.002777777777777778 * (im * (im * im))))))); else tmp = re * (1.0 + ((re * re) * -0.16666666666666666)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 1.5e+219], N[(re * N[(1.0 + N[(N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(im * N[(0.002777777777777778 * N[(im * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 1.5 \cdot 10^{+219}:\\
\;\;\;\;re \cdot \left(1 + \left(0.5 \cdot \left(im \cdot im\right)\right) \cdot \left(1 + im \cdot \left(0.002777777777777778 \cdot \left(im \cdot \left(im \cdot im\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
\end{array}
\end{array}
if re < 1.4999999999999999e219Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.5%
Simplified93.5%
Taylor expanded in re around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
distribute-rgt-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
Simplified64.2%
Taylor expanded in im around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6464.2%
Simplified64.2%
if 1.4999999999999999e219 < re Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6427.3%
Simplified27.3%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6430.5%
Simplified30.5%
(FPCore (re im)
:precision binary64
(if (<= im 4.9e+60)
(*
re
(+
1.0
(*
(* re re)
(+ -0.16666666666666666 (* (* re re) 0.008333333333333333)))))
(if (<= im 2.1e+79)
(* re (* (+ (* im im) 2.0) (+ 0.5 (* re (* re -0.08333333333333333)))))
(* re (+ 1.0 (* im (* im (* (* im im) 0.041666666666666664))))))))
double code(double re, double im) {
double tmp;
if (im <= 4.9e+60) {
tmp = re * (1.0 + ((re * re) * (-0.16666666666666666 + ((re * re) * 0.008333333333333333))));
} else if (im <= 2.1e+79) {
tmp = re * (((im * im) + 2.0) * (0.5 + (re * (re * -0.08333333333333333))));
} else {
tmp = re * (1.0 + (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 <= 4.9d+60) then
tmp = re * (1.0d0 + ((re * re) * ((-0.16666666666666666d0) + ((re * re) * 0.008333333333333333d0))))
else if (im <= 2.1d+79) then
tmp = re * (((im * im) + 2.0d0) * (0.5d0 + (re * (re * (-0.08333333333333333d0)))))
else
tmp = re * (1.0d0 + (im * (im * ((im * im) * 0.041666666666666664d0))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 4.9e+60) {
tmp = re * (1.0 + ((re * re) * (-0.16666666666666666 + ((re * re) * 0.008333333333333333))));
} else if (im <= 2.1e+79) {
tmp = re * (((im * im) + 2.0) * (0.5 + (re * (re * -0.08333333333333333))));
} else {
tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664))));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 4.9e+60: tmp = re * (1.0 + ((re * re) * (-0.16666666666666666 + ((re * re) * 0.008333333333333333)))) elif im <= 2.1e+79: tmp = re * (((im * im) + 2.0) * (0.5 + (re * (re * -0.08333333333333333)))) else: tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664)))) return tmp
function code(re, im) tmp = 0.0 if (im <= 4.9e+60) tmp = Float64(re * Float64(1.0 + Float64(Float64(re * re) * Float64(-0.16666666666666666 + Float64(Float64(re * re) * 0.008333333333333333))))); elseif (im <= 2.1e+79) tmp = Float64(re * Float64(Float64(Float64(im * im) + 2.0) * Float64(0.5 + Float64(re * Float64(re * -0.08333333333333333))))); else tmp = Float64(re * Float64(1.0 + 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 <= 4.9e+60) tmp = re * (1.0 + ((re * re) * (-0.16666666666666666 + ((re * re) * 0.008333333333333333)))); elseif (im <= 2.1e+79) tmp = re * (((im * im) + 2.0) * (0.5 + (re * (re * -0.08333333333333333)))); else tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664)))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 4.9e+60], 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, 2.1e+79], N[(re * N[(N[(N[(im * im), $MachinePrecision] + 2.0), $MachinePrecision] * N[(0.5 + N[(re * N[(re * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(1.0 + N[(im * N[(im * N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 4.9 \cdot 10^{+60}:\\
\;\;\;\;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 2.1 \cdot 10^{+79}:\\
\;\;\;\;re \cdot \left(\left(im \cdot im + 2\right) \cdot \left(0.5 + re \cdot \left(re \cdot -0.08333333333333333\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\
\end{array}
\end{array}
if im < 4.9000000000000003e60Initial 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-*.f6440.9%
Simplified40.9%
if 4.9000000000000003e60 < im < 2.10000000000000008e79Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in re around 0
distribute-lft-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
fma-undefineN/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in im around 0
distribute-rgt-outN/A
associate-*l*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
if 2.10000000000000008e79 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in re around 0
Simplified84.3%
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-*.f6484.3%
Simplified84.3%
Final simplification50.7%
(FPCore (re im) :precision binary64 (if (<= im 2.1e+79) (* re (* (+ (* im im) 2.0) (+ 0.5 (* re (* re -0.08333333333333333))))) (* re (+ 1.0 (* im (* im (* (* im im) 0.041666666666666664)))))))
double code(double re, double im) {
double tmp;
if (im <= 2.1e+79) {
tmp = re * (((im * im) + 2.0) * (0.5 + (re * (re * -0.08333333333333333))));
} else {
tmp = re * (1.0 + (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 <= 2.1d+79) then
tmp = re * (((im * im) + 2.0d0) * (0.5d0 + (re * (re * (-0.08333333333333333d0)))))
else
tmp = re * (1.0d0 + (im * (im * ((im * im) * 0.041666666666666664d0))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 2.1e+79) {
tmp = re * (((im * im) + 2.0) * (0.5 + (re * (re * -0.08333333333333333))));
} else {
tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664))));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 2.1e+79: tmp = re * (((im * im) + 2.0) * (0.5 + (re * (re * -0.08333333333333333)))) else: tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664)))) return tmp
function code(re, im) tmp = 0.0 if (im <= 2.1e+79) tmp = Float64(re * Float64(Float64(Float64(im * im) + 2.0) * Float64(0.5 + Float64(re * Float64(re * -0.08333333333333333))))); else tmp = Float64(re * Float64(1.0 + 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 <= 2.1e+79) tmp = re * (((im * im) + 2.0) * (0.5 + (re * (re * -0.08333333333333333)))); else tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664)))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 2.1e+79], N[(re * N[(N[(N[(im * im), $MachinePrecision] + 2.0), $MachinePrecision] * N[(0.5 + N[(re * N[(re * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(1.0 + N[(im * N[(im * N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 2.1 \cdot 10^{+79}:\\
\;\;\;\;re \cdot \left(\left(im \cdot im + 2\right) \cdot \left(0.5 + re \cdot \left(re \cdot -0.08333333333333333\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\
\end{array}
\end{array}
if im < 2.10000000000000008e79Initial 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.1%
Simplified91.1%
Taylor expanded in re around 0
distribute-lft-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
fma-undefineN/A
distribute-lft-outN/A
Simplified57.9%
Taylor expanded in im around 0
distribute-rgt-outN/A
associate-*l*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6450.4%
Simplified50.4%
if 2.10000000000000008e79 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in re around 0
Simplified84.3%
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-*.f6484.3%
Simplified84.3%
Final simplification57.2%
(FPCore (re im) :precision binary64 (if (<= im 2.1e+79) (* re (+ 1.0 (* (* re re) -0.16666666666666666))) (* re (+ 1.0 (* im (* im (* (* im im) 0.041666666666666664)))))))
double code(double re, double im) {
double tmp;
if (im <= 2.1e+79) {
tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
} else {
tmp = re * (1.0 + (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 <= 2.1d+79) then
tmp = re * (1.0d0 + ((re * re) * (-0.16666666666666666d0)))
else
tmp = re * (1.0d0 + (im * (im * ((im * im) * 0.041666666666666664d0))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 2.1e+79) {
tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
} else {
tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664))));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 2.1e+79: tmp = re * (1.0 + ((re * re) * -0.16666666666666666)) else: tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664)))) return tmp
function code(re, im) tmp = 0.0 if (im <= 2.1e+79) tmp = Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666))); else tmp = Float64(re * Float64(1.0 + 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 <= 2.1e+79) tmp = re * (1.0 + ((re * re) * -0.16666666666666666)); else tmp = re * (1.0 + (im * (im * ((im * im) * 0.041666666666666664)))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 2.1e+79], N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(1.0 + N[(im * N[(im * N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 2.1 \cdot 10^{+79}:\\
\;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\
\end{array}
\end{array}
if im < 2.10000000000000008e79Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6458.2%
Simplified58.2%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6439.2%
Simplified39.2%
if 2.10000000000000008e79 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in re around 0
Simplified84.3%
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-*.f6484.3%
Simplified84.3%
(FPCore (re im) :precision binary64 (if (<= im 2.1e+79) (* re (+ 1.0 (* (* re re) -0.16666666666666666))) (* re (* im (* im (* im (* im 0.041666666666666664)))))))
double code(double re, double im) {
double tmp;
if (im <= 2.1e+79) {
tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
} else {
tmp = re * (im * (im * (im * (im * 0.041666666666666664))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 2.1d+79) then
tmp = re * (1.0d0 + ((re * re) * (-0.16666666666666666d0)))
else
tmp = re * (im * (im * (im * (im * 0.041666666666666664d0))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 2.1e+79) {
tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
} else {
tmp = re * (im * (im * (im * (im * 0.041666666666666664))));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 2.1e+79: tmp = re * (1.0 + ((re * re) * -0.16666666666666666)) else: tmp = re * (im * (im * (im * (im * 0.041666666666666664)))) return tmp
function code(re, im) tmp = 0.0 if (im <= 2.1e+79) tmp = Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666))); else tmp = Float64(re * Float64(im * Float64(im * Float64(im * Float64(im * 0.041666666666666664))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 2.1e+79) tmp = re * (1.0 + ((re * re) * -0.16666666666666666)); else tmp = re * (im * (im * (im * (im * 0.041666666666666664)))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 2.1e+79], N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(im * N[(im * N[(im * N[(im * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 2.1 \cdot 10^{+79}:\\
\;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(im \cdot \left(im \cdot \left(im \cdot \left(im \cdot 0.041666666666666664\right)\right)\right)\right)\\
\end{array}
\end{array}
if im < 2.10000000000000008e79Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6458.2%
Simplified58.2%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6439.2%
Simplified39.2%
if 2.10000000000000008e79 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in re around 0
Simplified84.3%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6484.3%
Applied egg-rr84.3%
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
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6484.3%
Simplified84.3%
(FPCore (re im) :precision binary64 (if (<= im 2.1e+79) (* re (+ 1.0 (* (* re re) -0.16666666666666666))) (* im (* im (* re (* (* im im) 0.041666666666666664))))))
double code(double re, double im) {
double tmp;
if (im <= 2.1e+79) {
tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
} else {
tmp = im * (im * (re * ((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 <= 2.1d+79) then
tmp = re * (1.0d0 + ((re * re) * (-0.16666666666666666d0)))
else
tmp = im * (im * (re * ((im * im) * 0.041666666666666664d0)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 2.1e+79) {
tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
} else {
tmp = im * (im * (re * ((im * im) * 0.041666666666666664)));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 2.1e+79: tmp = re * (1.0 + ((re * re) * -0.16666666666666666)) else: tmp = im * (im * (re * ((im * im) * 0.041666666666666664))) return tmp
function code(re, im) tmp = 0.0 if (im <= 2.1e+79) tmp = Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666))); else tmp = Float64(im * Float64(im * Float64(re * Float64(Float64(im * im) * 0.041666666666666664)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 2.1e+79) tmp = re * (1.0 + ((re * re) * -0.16666666666666666)); else tmp = im * (im * (re * ((im * im) * 0.041666666666666664))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 2.1e+79], N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(im * N[(re * N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 2.1 \cdot 10^{+79}:\\
\;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(im \cdot \left(re \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\
\end{array}
\end{array}
if im < 2.10000000000000008e79Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6458.2%
Simplified58.2%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6439.2%
Simplified39.2%
if 2.10000000000000008e79 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in re around 0
Simplified84.3%
Taylor expanded in im around inf
associate-*r*N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6467.8%
Simplified67.8%
(FPCore (re im) :precision binary64 (if (<= im 1.55e+140) (* re (+ 1.0 (* (* re re) -0.16666666666666666))) (* re (* 0.5 (* im im)))))
double code(double re, double im) {
double tmp;
if (im <= 1.55e+140) {
tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
} else {
tmp = 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 <= 1.55d+140) then
tmp = re * (1.0d0 + ((re * re) * (-0.16666666666666666d0)))
else
tmp = re * (0.5d0 * (im * im))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 1.55e+140) {
tmp = re * (1.0 + ((re * re) * -0.16666666666666666));
} else {
tmp = re * (0.5 * (im * im));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 1.55e+140: tmp = re * (1.0 + ((re * re) * -0.16666666666666666)) else: tmp = re * (0.5 * (im * im)) return tmp
function code(re, im) tmp = 0.0 if (im <= 1.55e+140) tmp = Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666))); else tmp = Float64(re * Float64(0.5 * Float64(im * im))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 1.55e+140) tmp = re * (1.0 + ((re * re) * -0.16666666666666666)); else tmp = re * (0.5 * (im * im)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 1.55e+140], N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 1.55 \cdot 10^{+140}:\\
\;\;\;\;re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(0.5 \cdot \left(im \cdot im\right)\right)\\
\end{array}
\end{array}
if im < 1.55e140Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6453.5%
Simplified53.5%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6437.8%
Simplified37.8%
if 1.55e140 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in re around 0
Simplified87.5%
Taylor expanded in im around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6484.6%
Simplified84.6%
Taylor expanded in im around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6484.6%
Simplified84.6%
(FPCore (re im) :precision binary64 (if (<= im 0.0185) re (* re (* 0.5 (* im im)))))
double code(double re, double im) {
double tmp;
if (im <= 0.0185) {
tmp = re;
} else {
tmp = 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.0185d0) then
tmp = re
else
tmp = re * (0.5d0 * (im * im))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 0.0185) {
tmp = re;
} else {
tmp = re * (0.5 * (im * im));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 0.0185: tmp = re else: tmp = re * (0.5 * (im * im)) return tmp
function code(re, im) tmp = 0.0 if (im <= 0.0185) tmp = re; else tmp = Float64(re * Float64(0.5 * Float64(im * im))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 0.0185) tmp = re; else tmp = re * (0.5 * (im * im)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 0.0185], re, N[(re * N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 0.0185:\\
\;\;\;\;re\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(0.5 \cdot \left(im \cdot im\right)\right)\\
\end{array}
\end{array}
if im < 0.0184999999999999991Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6463.7%
Simplified63.7%
Taylor expanded in re around 0
Simplified34.7%
if 0.0184999999999999991 < 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
Simplified76.7%
Taylor expanded in re around 0
Simplified64.8%
Taylor expanded in im around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.7%
Simplified45.7%
Taylor expanded in im around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.7%
Simplified45.7%
(FPCore (re im) :precision binary64 (* re (+ 1.0 (* 0.5 (* im im)))))
double code(double re, double im) {
return re * (1.0 + (0.5 * (im * im)));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = re * (1.0d0 + (0.5d0 * (im * im)))
end function
public static double code(double re, double im) {
return re * (1.0 + (0.5 * (im * im)));
}
def code(re, im): return re * (1.0 + (0.5 * (im * im)))
function code(re, im) return Float64(re * Float64(1.0 + Float64(0.5 * Float64(im * im)))) end
function tmp = code(re, im) tmp = re * (1.0 + (0.5 * (im * im))); end
code[re_, im_] := N[(re * N[(1.0 + N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
re \cdot \left(1 + 0.5 \cdot \left(im \cdot im\right)\right)
\end{array}
Initial program 100.0%
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
Simplified89.1%
Taylor expanded in re around 0
Simplified61.2%
Taylor expanded in im around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.5%
Simplified51.5%
(FPCore (re im) :precision binary64 re)
double code(double re, double im) {
return re;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = re
end function
public static double code(double re, double im) {
return re;
}
def code(re, im): return re
function code(re, im) return re end
function tmp = code(re, im) tmp = re; end
code[re_, im_] := re
\begin{array}{l}
\\
re
\end{array}
Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6447.1%
Simplified47.1%
Taylor expanded in re around 0
Simplified26.0%
herbie shell --seed 2024144
(FPCore (re im)
:name "math.sin on complex, real part"
:precision binary64
(* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))