
(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 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (re im) :precision binary64 (* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))
double code(double re, double im) {
return (0.5 * sin(re)) * (exp((0.0 - im)) + exp(im));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = (0.5d0 * sin(re)) * (exp((0.0d0 - im)) + exp(im))
end function
public static double code(double re, double im) {
return (0.5 * Math.sin(re)) * (Math.exp((0.0 - im)) + Math.exp(im));
}
def code(re, im): return (0.5 * math.sin(re)) * (math.exp((0.0 - im)) + math.exp(im))
function code(re, im) return Float64(Float64(0.5 * sin(re)) * Float64(exp(Float64(0.0 - im)) + exp(im))) end
function tmp = code(re, im) tmp = (0.5 * sin(re)) * (exp((0.0 - im)) + exp(im)); end
code[re_, im_] := N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[Exp[N[(0.0 - im), $MachinePrecision]], $MachinePrecision] + N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right)
\end{array}
(FPCore (re im) :precision binary64 (+ (/ (* 0.5 (sin re)) (exp im)) (* (sin re) (* 0.5 (exp im)))))
double code(double re, double im) {
return ((0.5 * sin(re)) / exp(im)) + (sin(re) * (0.5 * exp(im)));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = ((0.5d0 * sin(re)) / exp(im)) + (sin(re) * (0.5d0 * exp(im)))
end function
public static double code(double re, double im) {
return ((0.5 * Math.sin(re)) / Math.exp(im)) + (Math.sin(re) * (0.5 * Math.exp(im)));
}
def code(re, im): return ((0.5 * math.sin(re)) / math.exp(im)) + (math.sin(re) * (0.5 * math.exp(im)))
function code(re, im) return Float64(Float64(Float64(0.5 * sin(re)) / exp(im)) + Float64(sin(re) * Float64(0.5 * exp(im)))) end
function tmp = code(re, im) tmp = ((0.5 * sin(re)) / exp(im)) + (sin(re) * (0.5 * exp(im))); end
code[re_, im_] := N[(N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] / N[Exp[im], $MachinePrecision]), $MachinePrecision] + N[(N[Sin[re], $MachinePrecision] * N[(0.5 * N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.5 \cdot \sin re}{e^{im}} + \sin re \cdot \left(0.5 \cdot e^{im}\right)
\end{array}
Initial program 100.0%
distribute-rgt-inN/A
+-lowering-+.f64N/A
*-commutativeN/A
sub0-negN/A
exp-negN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
exp-lowering-exp.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
exp-lowering-exp.f64100.0%
Applied egg-rr100.0%
(FPCore (re im) :precision binary64 (* (sin re) (cosh im)))
double code(double re, double im) {
return sin(re) * cosh(im);
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = sin(re) * cosh(im)
end function
public static double code(double re, double im) {
return Math.sin(re) * Math.cosh(im);
}
def code(re, im): return math.sin(re) * math.cosh(im)
function code(re, im) return Float64(sin(re) * cosh(im)) end
function tmp = code(re, im) tmp = sin(re) * cosh(im); end
code[re_, im_] := N[(N[Sin[re], $MachinePrecision] * N[Cosh[im], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin re \cdot \cosh im
\end{array}
Initial program 100.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lft-identityN/A
cosh-lowering-cosh.f64100.0%
Applied egg-rr100.0%
(FPCore (re im)
:precision binary64
(if (<= re 2e-18)
(* re (cosh im))
(*
(sin re)
(+
1.0
(*
(* im im)
(+
0.5
(*
im
(*
im
(+ 0.041666666666666664 (* (* im im) 0.001388888888888889))))))))))
double code(double re, double im) {
double tmp;
if (re <= 2e-18) {
tmp = re * cosh(im);
} else {
tmp = sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 2d-18) then
tmp = re * cosh(im)
else
tmp = sin(re) * (1.0d0 + ((im * im) * (0.5d0 + (im * (im * (0.041666666666666664d0 + ((im * im) * 0.001388888888888889d0)))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 2e-18) {
tmp = re * Math.cosh(im);
} else {
tmp = Math.sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 2e-18: tmp = re * math.cosh(im) else: tmp = math.sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * (0.041666666666666664 + ((im * im) * 0.001388888888888889))))))) return tmp
function code(re, im) tmp = 0.0 if (re <= 2e-18) tmp = Float64(re * cosh(im)); else tmp = 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)))))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 2e-18) tmp = re * cosh(im); else tmp = sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * (0.041666666666666664 + ((im * im) * 0.001388888888888889))))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 2e-18], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 2 \cdot 10^{-18}:\\
\;\;\;\;re \cdot \cosh im\\
\mathbf{else}:\\
\;\;\;\;\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)\\
\end{array}
\end{array}
if re < 2.0000000000000001e-18Initial program 100.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lft-identityN/A
cosh-lowering-cosh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in re around 0
Simplified76.3%
if 2.0000000000000001e-18 < re Initial 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.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.5%
Simplified96.5%
Final simplification81.1%
(FPCore (re im)
:precision binary64
(if (<= re 1e-18)
(* re (cosh im))
(*
(sin re)
(+
1.0
(* (* im im) (+ 0.5 (* im (* 0.001388888888888889 (* im (* im im))))))))))
double code(double re, double im) {
double tmp;
if (re <= 1e-18) {
tmp = re * cosh(im);
} else {
tmp = sin(re) * (1.0 + ((im * im) * (0.5 + (im * (0.001388888888888889 * (im * (im * im)))))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 1d-18) then
tmp = re * cosh(im)
else
tmp = sin(re) * (1.0d0 + ((im * im) * (0.5d0 + (im * (0.001388888888888889d0 * (im * (im * im)))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 1e-18) {
tmp = re * Math.cosh(im);
} else {
tmp = Math.sin(re) * (1.0 + ((im * im) * (0.5 + (im * (0.001388888888888889 * (im * (im * im)))))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 1e-18: tmp = re * math.cosh(im) else: tmp = math.sin(re) * (1.0 + ((im * im) * (0.5 + (im * (0.001388888888888889 * (im * (im * im))))))) return tmp
function code(re, im) tmp = 0.0 if (re <= 1e-18) tmp = Float64(re * cosh(im)); else tmp = Float64(sin(re) * Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + Float64(im * Float64(0.001388888888888889 * Float64(im * Float64(im * im)))))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 1e-18) tmp = re * cosh(im); else tmp = sin(re) * (1.0 + ((im * im) * (0.5 + (im * (0.001388888888888889 * (im * (im * im))))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 1e-18], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.5 + N[(im * N[(0.001388888888888889 * N[(im * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 10^{-18}:\\
\;\;\;\;re \cdot \cosh im\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + im \cdot \left(0.001388888888888889 \cdot \left(im \cdot \left(im \cdot im\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if re < 1.0000000000000001e-18Initial program 100.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lft-identityN/A
cosh-lowering-cosh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in re around 0
Simplified76.3%
if 1.0000000000000001e-18 < re Initial 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.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.5%
Simplified96.5%
Taylor expanded in im around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6496.0%
Simplified96.0%
Final simplification81.0%
(FPCore (re im)
:precision binary64
(if (<= im 24.0)
(* (* 0.5 (sin re)) (+ (* im im) 2.0))
(if (<= im 2.6e+77)
(* re (cosh im))
(* (sin re) (* im (* im (* (* im im) 0.041666666666666664)))))))
double code(double re, double im) {
double tmp;
if (im <= 24.0) {
tmp = (0.5 * sin(re)) * ((im * im) + 2.0);
} else if (im <= 2.6e+77) {
tmp = re * cosh(im);
} else {
tmp = sin(re) * (im * (im * ((im * im) * 0.041666666666666664)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 24.0d0) then
tmp = (0.5d0 * sin(re)) * ((im * im) + 2.0d0)
else if (im <= 2.6d+77) then
tmp = re * cosh(im)
else
tmp = sin(re) * (im * (im * ((im * im) * 0.041666666666666664d0)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 24.0) {
tmp = (0.5 * Math.sin(re)) * ((im * im) + 2.0);
} else if (im <= 2.6e+77) {
tmp = re * Math.cosh(im);
} else {
tmp = Math.sin(re) * (im * (im * ((im * im) * 0.041666666666666664)));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 24.0: tmp = (0.5 * math.sin(re)) * ((im * im) + 2.0) elif im <= 2.6e+77: tmp = re * math.cosh(im) else: tmp = math.sin(re) * (im * (im * ((im * im) * 0.041666666666666664))) return tmp
function code(re, im) tmp = 0.0 if (im <= 24.0) tmp = Float64(Float64(0.5 * sin(re)) * Float64(Float64(im * im) + 2.0)); elseif (im <= 2.6e+77) tmp = Float64(re * cosh(im)); else tmp = Float64(sin(re) * Float64(im * Float64(im * Float64(Float64(im * im) * 0.041666666666666664)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 24.0) tmp = (0.5 * sin(re)) * ((im * im) + 2.0); elseif (im <= 2.6e+77) tmp = re * cosh(im); else tmp = sin(re) * (im * (im * ((im * im) * 0.041666666666666664))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 24.0], N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[(im * im), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 2.6e+77], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * N[(im * N[(im * N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 24:\\
\;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im \cdot im + 2\right)\\
\mathbf{elif}\;im \leq 2.6 \cdot 10^{+77}:\\
\;\;\;\;re \cdot \cosh im\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot \left(im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\
\end{array}
\end{array}
if im < 24Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6486.8%
Simplified86.8%
if 24 < im < 2.6000000000000002e77Initial program 100.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lft-identityN/A
cosh-lowering-cosh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in re around 0
Simplified70.0%
if 2.6000000000000002e77 < im Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified100.0%
Taylor expanded in im around inf
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification88.5%
(FPCore (re im)
:precision binary64
(if (<= re 2.5e-18)
(* re (cosh im))
(*
(sin re)
(+ 1.0 (* (* im im) (+ 0.5 (* im (* im 0.041666666666666664))))))))
double code(double re, double im) {
double tmp;
if (re <= 2.5e-18) {
tmp = re * cosh(im);
} else {
tmp = sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * 0.041666666666666664)))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 2.5d-18) then
tmp = re * cosh(im)
else
tmp = sin(re) * (1.0d0 + ((im * im) * (0.5d0 + (im * (im * 0.041666666666666664d0)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 2.5e-18) {
tmp = re * Math.cosh(im);
} else {
tmp = Math.sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * 0.041666666666666664)))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 2.5e-18: tmp = re * math.cosh(im) else: tmp = math.sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * 0.041666666666666664))))) return tmp
function code(re, im) tmp = 0.0 if (re <= 2.5e-18) tmp = Float64(re * cosh(im)); else tmp = Float64(sin(re) * Float64(1.0 + Float64(Float64(im * im) * Float64(0.5 + Float64(im * Float64(im * 0.041666666666666664)))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 2.5e-18) tmp = re * cosh(im); else tmp = sin(re) * (1.0 + ((im * im) * (0.5 + (im * (im * 0.041666666666666664))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 2.5e-18], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(0.5 + N[(im * N[(im * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 2.5 \cdot 10^{-18}:\\
\;\;\;\;re \cdot \cosh im\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot \left(1 + \left(im \cdot im\right) \cdot \left(0.5 + im \cdot \left(im \cdot 0.041666666666666664\right)\right)\right)\\
\end{array}
\end{array}
if re < 2.50000000000000018e-18Initial program 100.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lft-identityN/A
cosh-lowering-cosh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in re around 0
Simplified76.3%
if 2.50000000000000018e-18 < re Initial program 99.9%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified93.1%
(FPCore (re im) :precision binary64 (if (<= re 2e-20) (* re (cosh im)) (* (sin re) (+ 1.0 (* im (* im (* (* im im) 0.041666666666666664)))))))
double code(double re, double im) {
double tmp;
if (re <= 2e-20) {
tmp = re * cosh(im);
} else {
tmp = sin(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 (re <= 2d-20) then
tmp = re * cosh(im)
else
tmp = sin(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 (re <= 2e-20) {
tmp = re * Math.cosh(im);
} else {
tmp = Math.sin(re) * (1.0 + (im * (im * ((im * im) * 0.041666666666666664))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 2e-20: tmp = re * math.cosh(im) else: tmp = math.sin(re) * (1.0 + (im * (im * ((im * im) * 0.041666666666666664)))) return tmp
function code(re, im) tmp = 0.0 if (re <= 2e-20) tmp = Float64(re * cosh(im)); else tmp = Float64(sin(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 (re <= 2e-20) tmp = re * cosh(im); else tmp = sin(re) * (1.0 + (im * (im * ((im * im) * 0.041666666666666664)))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 2e-20], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * 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}\;re \leq 2 \cdot 10^{-20}:\\
\;\;\;\;re \cdot \cosh im\\
\mathbf{else}:\\
\;\;\;\;\sin 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 re < 1.99999999999999989e-20Initial program 100.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lft-identityN/A
cosh-lowering-cosh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in re around 0
Simplified76.3%
if 1.99999999999999989e-20 < re Initial program 99.9%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified93.1%
Taylor expanded in im around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6492.3%
Simplified92.3%
(FPCore (re im) :precision binary64 (if (<= im 24.0) (* (* 0.5 (sin re)) (+ (* im im) 2.0)) (if (<= im 1.35e+154) (* re (cosh im)) (* (sin re) (* 0.5 (* im im))))))
double code(double re, double im) {
double tmp;
if (im <= 24.0) {
tmp = (0.5 * sin(re)) * ((im * im) + 2.0);
} else if (im <= 1.35e+154) {
tmp = re * cosh(im);
} else {
tmp = sin(re) * (0.5 * (im * im));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 24.0d0) then
tmp = (0.5d0 * sin(re)) * ((im * im) + 2.0d0)
else if (im <= 1.35d+154) then
tmp = re * cosh(im)
else
tmp = sin(re) * (0.5d0 * (im * im))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 24.0) {
tmp = (0.5 * Math.sin(re)) * ((im * im) + 2.0);
} else if (im <= 1.35e+154) {
tmp = re * Math.cosh(im);
} else {
tmp = Math.sin(re) * (0.5 * (im * im));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 24.0: tmp = (0.5 * math.sin(re)) * ((im * im) + 2.0) elif im <= 1.35e+154: tmp = re * math.cosh(im) else: tmp = math.sin(re) * (0.5 * (im * im)) return tmp
function code(re, im) tmp = 0.0 if (im <= 24.0) tmp = Float64(Float64(0.5 * sin(re)) * Float64(Float64(im * im) + 2.0)); elseif (im <= 1.35e+154) tmp = Float64(re * cosh(im)); else tmp = Float64(sin(re) * Float64(0.5 * Float64(im * im))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 24.0) tmp = (0.5 * sin(re)) * ((im * im) + 2.0); elseif (im <= 1.35e+154) tmp = re * cosh(im); else tmp = sin(re) * (0.5 * (im * im)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 24.0], N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[(im * im), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 1.35e+154], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 24:\\
\;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im \cdot im + 2\right)\\
\mathbf{elif}\;im \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;re \cdot \cosh im\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot \left(0.5 \cdot \left(im \cdot im\right)\right)\\
\end{array}
\end{array}
if im < 24Initial program 100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6486.8%
Simplified86.8%
if 24 < im < 1.35000000000000003e154Initial program 100.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lft-identityN/A
cosh-lowering-cosh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in re around 0
Simplified75.9%
if 1.35000000000000003e154 < im Initial program 100.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in im around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification86.9%
(FPCore (re im) :precision binary64 (if (<= im 0.00015) (sin re) (if (<= im 1.5e+154) (* re (cosh im)) (* (sin re) (* 0.5 (* im im))))))
double code(double re, double im) {
double tmp;
if (im <= 0.00015) {
tmp = sin(re);
} else if (im <= 1.5e+154) {
tmp = re * cosh(im);
} else {
tmp = sin(re) * (0.5 * (im * im));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 0.00015d0) then
tmp = sin(re)
else if (im <= 1.5d+154) then
tmp = re * cosh(im)
else
tmp = sin(re) * (0.5d0 * (im * im))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 0.00015) {
tmp = Math.sin(re);
} else if (im <= 1.5e+154) {
tmp = re * Math.cosh(im);
} else {
tmp = Math.sin(re) * (0.5 * (im * im));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 0.00015: tmp = math.sin(re) elif im <= 1.5e+154: tmp = re * math.cosh(im) else: tmp = math.sin(re) * (0.5 * (im * im)) return tmp
function code(re, im) tmp = 0.0 if (im <= 0.00015) tmp = sin(re); elseif (im <= 1.5e+154) tmp = Float64(re * cosh(im)); else tmp = Float64(sin(re) * Float64(0.5 * Float64(im * im))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 0.00015) tmp = sin(re); elseif (im <= 1.5e+154) tmp = re * cosh(im); else tmp = sin(re) * (0.5 * (im * im)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 0.00015], N[Sin[re], $MachinePrecision], If[LessEqual[im, 1.5e+154], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], N[(N[Sin[re], $MachinePrecision] * N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 0.00015:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 1.5 \cdot 10^{+154}:\\
\;\;\;\;re \cdot \cosh im\\
\mathbf{else}:\\
\;\;\;\;\sin re \cdot \left(0.5 \cdot \left(im \cdot im\right)\right)\\
\end{array}
\end{array}
if im < 1.49999999999999987e-4Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6472.8%
Simplified72.8%
if 1.49999999999999987e-4 < im < 1.50000000000000013e154Initial 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.f64100.0%
Applied egg-rr100.0%
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lft-identityN/A
cosh-lowering-cosh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in re around 0
Simplified71.2%
if 1.50000000000000013e154 < im Initial program 100.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in im around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification75.4%
(FPCore (re im)
:precision binary64
(if (<= im 0.00028)
(sin re)
(if (<= im 6e+260)
(* re (cosh im))
(*
(+ 1.0 (* 0.5 (* im im)))
(* re (+ 1.0 (* (* re re) -0.16666666666666666)))))))
double code(double re, double im) {
double tmp;
if (im <= 0.00028) {
tmp = sin(re);
} else if (im <= 6e+260) {
tmp = re * cosh(im);
} else {
tmp = (1.0 + (0.5 * (im * im))) * (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 (im <= 0.00028d0) then
tmp = sin(re)
else if (im <= 6d+260) then
tmp = re * cosh(im)
else
tmp = (1.0d0 + (0.5d0 * (im * im))) * (re * (1.0d0 + ((re * re) * (-0.16666666666666666d0))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 0.00028) {
tmp = Math.sin(re);
} else if (im <= 6e+260) {
tmp = re * Math.cosh(im);
} else {
tmp = (1.0 + (0.5 * (im * im))) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 0.00028: tmp = math.sin(re) elif im <= 6e+260: tmp = re * math.cosh(im) else: tmp = (1.0 + (0.5 * (im * im))) * (re * (1.0 + ((re * re) * -0.16666666666666666))) return tmp
function code(re, im) tmp = 0.0 if (im <= 0.00028) tmp = sin(re); elseif (im <= 6e+260) tmp = Float64(re * cosh(im)); else tmp = Float64(Float64(1.0 + Float64(0.5 * Float64(im * im))) * 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 (im <= 0.00028) tmp = sin(re); elseif (im <= 6e+260) tmp = re * cosh(im); else tmp = (1.0 + (0.5 * (im * im))) * (re * (1.0 + ((re * re) * -0.16666666666666666))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 0.00028], N[Sin[re], $MachinePrecision], If[LessEqual[im, 6e+260], N[(re * N[Cosh[im], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 0.00028:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 6 \cdot 10^{+260}:\\
\;\;\;\;re \cdot \cosh im\\
\mathbf{else}:\\
\;\;\;\;\left(1 + 0.5 \cdot \left(im \cdot im\right)\right) \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)\\
\end{array}
\end{array}
if im < 2.7999999999999998e-4Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6472.8%
Simplified72.8%
if 2.7999999999999998e-4 < im < 5.9999999999999996e260Initial program 100.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lft-identityN/A
cosh-lowering-cosh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in re around 0
Simplified75.7%
if 5.9999999999999996e260 < im Initial program 100.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
(FPCore (re im)
:precision binary64
(if (<= im 660.0)
(sin re)
(if (<= im 4.8e+53)
(*
re
(+
1.0
(*
re
(*
re
(+
-0.16666666666666666
(*
re
(*
(* re re)
(/
(*
re
(-
3.936759889140842e-8
(/ 6.944444444444444e-5 (* (* re re) (* re re)))))
(-
-0.0001984126984126984
(/ 0.008333333333333333 (* re re)))))))))))
(if (<= im 2e+260)
(*
re
(+
1.0
(*
im
(*
im
(+
0.5
(*
(* im im)
(+ 0.041666666666666664 (* (* im im) 0.001388888888888889))))))))
(*
(+ 1.0 (* 0.5 (* im im)))
(* re (+ 1.0 (* (* re re) -0.16666666666666666))))))))
double code(double re, double im) {
double tmp;
if (im <= 660.0) {
tmp = sin(re);
} else if (im <= 4.8e+53) {
tmp = re * (1.0 + (re * (re * (-0.16666666666666666 + (re * ((re * re) * ((re * (3.936759889140842e-8 - (6.944444444444444e-5 / ((re * re) * (re * re))))) / (-0.0001984126984126984 - (0.008333333333333333 / (re * re))))))))));
} else if (im <= 2e+260) {
tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))));
} else {
tmp = (1.0 + (0.5 * (im * im))) * (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 (im <= 660.0d0) then
tmp = sin(re)
else if (im <= 4.8d+53) then
tmp = re * (1.0d0 + (re * (re * ((-0.16666666666666666d0) + (re * ((re * re) * ((re * (3.936759889140842d-8 - (6.944444444444444d-5 / ((re * re) * (re * re))))) / ((-0.0001984126984126984d0) - (0.008333333333333333d0 / (re * re))))))))))
else if (im <= 2d+260) then
tmp = re * (1.0d0 + (im * (im * (0.5d0 + ((im * im) * (0.041666666666666664d0 + ((im * im) * 0.001388888888888889d0)))))))
else
tmp = (1.0d0 + (0.5d0 * (im * im))) * (re * (1.0d0 + ((re * re) * (-0.16666666666666666d0))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 660.0) {
tmp = Math.sin(re);
} else if (im <= 4.8e+53) {
tmp = re * (1.0 + (re * (re * (-0.16666666666666666 + (re * ((re * re) * ((re * (3.936759889140842e-8 - (6.944444444444444e-5 / ((re * re) * (re * re))))) / (-0.0001984126984126984 - (0.008333333333333333 / (re * re))))))))));
} else if (im <= 2e+260) {
tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))));
} else {
tmp = (1.0 + (0.5 * (im * im))) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 660.0: tmp = math.sin(re) elif im <= 4.8e+53: tmp = re * (1.0 + (re * (re * (-0.16666666666666666 + (re * ((re * re) * ((re * (3.936759889140842e-8 - (6.944444444444444e-5 / ((re * re) * (re * re))))) / (-0.0001984126984126984 - (0.008333333333333333 / (re * re)))))))))) elif im <= 2e+260: tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889))))))) else: tmp = (1.0 + (0.5 * (im * im))) * (re * (1.0 + ((re * re) * -0.16666666666666666))) return tmp
function code(re, im) tmp = 0.0 if (im <= 660.0) tmp = sin(re); elseif (im <= 4.8e+53) tmp = Float64(re * Float64(1.0 + Float64(re * Float64(re * Float64(-0.16666666666666666 + Float64(re * Float64(Float64(re * re) * Float64(Float64(re * Float64(3.936759889140842e-8 - Float64(6.944444444444444e-5 / Float64(Float64(re * re) * Float64(re * re))))) / Float64(-0.0001984126984126984 - Float64(0.008333333333333333 / Float64(re * re))))))))))); elseif (im <= 2e+260) tmp = Float64(re * Float64(1.0 + Float64(im * Float64(im * Float64(0.5 + Float64(Float64(im * im) * Float64(0.041666666666666664 + Float64(Float64(im * im) * 0.001388888888888889)))))))); else tmp = Float64(Float64(1.0 + Float64(0.5 * Float64(im * im))) * 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 (im <= 660.0) tmp = sin(re); elseif (im <= 4.8e+53) tmp = re * (1.0 + (re * (re * (-0.16666666666666666 + (re * ((re * re) * ((re * (3.936759889140842e-8 - (6.944444444444444e-5 / ((re * re) * (re * re))))) / (-0.0001984126984126984 - (0.008333333333333333 / (re * re)))))))))); elseif (im <= 2e+260) tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889))))))); else tmp = (1.0 + (0.5 * (im * im))) * (re * (1.0 + ((re * re) * -0.16666666666666666))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 660.0], N[Sin[re], $MachinePrecision], If[LessEqual[im, 4.8e+53], N[(re * N[(1.0 + N[(re * N[(re * N[(-0.16666666666666666 + N[(re * N[(N[(re * re), $MachinePrecision] * N[(N[(re * N[(3.936759889140842e-8 - N[(6.944444444444444e-5 / N[(N[(re * re), $MachinePrecision] * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-0.0001984126984126984 - N[(0.008333333333333333 / N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 2e+260], N[(re * N[(1.0 + N[(im * N[(im * N[(0.5 + N[(N[(im * im), $MachinePrecision] * N[(0.041666666666666664 + N[(N[(im * im), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 660:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 4.8 \cdot 10^{+53}:\\
\;\;\;\;re \cdot \left(1 + re \cdot \left(re \cdot \left(-0.16666666666666666 + re \cdot \left(\left(re \cdot re\right) \cdot \frac{re \cdot \left(3.936759889140842 \cdot 10^{-8} - \frac{6.944444444444444 \cdot 10^{-5}}{\left(re \cdot re\right) \cdot \left(re \cdot re\right)}\right)}{-0.0001984126984126984 - \frac{0.008333333333333333}{re \cdot re}}\right)\right)\right)\right)\\
\mathbf{elif}\;im \leq 2 \cdot 10^{+260}:\\
\;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot \left(0.5 + \left(im \cdot im\right) \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + 0.5 \cdot \left(im \cdot im\right)\right) \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)\\
\end{array}
\end{array}
if im < 660Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6472.3%
Simplified72.3%
if 660 < im < 4.8e53Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f642.7%
Simplified2.7%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6429.9%
Simplified29.9%
Taylor expanded in re around inf
unpow3N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6429.7%
Simplified29.7%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
frac-timesN/A
/-lowering-/.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6457.6%
Applied egg-rr57.6%
if 4.8e53 < im < 2.00000000000000013e260Initial program 100.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6480.0%
Simplified80.0%
if 2.00000000000000013e260 < im Initial program 100.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification73.9%
(FPCore (re im)
:precision binary64
(let* ((t_0
(*
(+ 1.0 (* 0.5 (* im im)))
(* re (+ 1.0 (* (* re re) -0.16666666666666666))))))
(if (<= im 1.08e+74)
t_0
(if (<= im 2e+260)
(* re (* im (* im (* (* im im) 0.041666666666666664))))
t_0))))
double code(double re, double im) {
double t_0 = (1.0 + (0.5 * (im * im))) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
double tmp;
if (im <= 1.08e+74) {
tmp = t_0;
} else if (im <= 2e+260) {
tmp = re * (im * (im * ((im * im) * 0.041666666666666664)));
} 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 = (1.0d0 + (0.5d0 * (im * im))) * (re * (1.0d0 + ((re * re) * (-0.16666666666666666d0))))
if (im <= 1.08d+74) then
tmp = t_0
else if (im <= 2d+260) then
tmp = re * (im * (im * ((im * im) * 0.041666666666666664d0)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = (1.0 + (0.5 * (im * im))) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
double tmp;
if (im <= 1.08e+74) {
tmp = t_0;
} else if (im <= 2e+260) {
tmp = re * (im * (im * ((im * im) * 0.041666666666666664)));
} else {
tmp = t_0;
}
return tmp;
}
def code(re, im): t_0 = (1.0 + (0.5 * (im * im))) * (re * (1.0 + ((re * re) * -0.16666666666666666))) tmp = 0 if im <= 1.08e+74: tmp = t_0 elif im <= 2e+260: tmp = re * (im * (im * ((im * im) * 0.041666666666666664))) else: tmp = t_0 return tmp
function code(re, im) t_0 = Float64(Float64(1.0 + Float64(0.5 * Float64(im * im))) * Float64(re * Float64(1.0 + Float64(Float64(re * re) * -0.16666666666666666)))) tmp = 0.0 if (im <= 1.08e+74) tmp = t_0; elseif (im <= 2e+260) tmp = Float64(re * Float64(im * Float64(im * Float64(Float64(im * im) * 0.041666666666666664)))); else tmp = t_0; end return tmp end
function tmp_2 = code(re, im) t_0 = (1.0 + (0.5 * (im * im))) * (re * (1.0 + ((re * re) * -0.16666666666666666))); tmp = 0.0; if (im <= 1.08e+74) tmp = t_0; elseif (im <= 2e+260) tmp = re * (im * (im * ((im * im) * 0.041666666666666664))); else tmp = t_0; end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[(1.0 + N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[im, 1.08e+74], t$95$0, If[LessEqual[im, 2e+260], N[(re * N[(im * N[(im * N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 + 0.5 \cdot \left(im \cdot im\right)\right) \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)\\
\mathbf{if}\;im \leq 1.08 \cdot 10^{+74}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;im \leq 2 \cdot 10^{+260}:\\
\;\;\;\;re \cdot \left(im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if im < 1.08e74 or 2.00000000000000013e260 < 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-*.f6483.5%
Simplified83.5%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6456.1%
Simplified56.1%
if 1.08e74 < im < 2.00000000000000013e260Initial 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
Simplified81.1%
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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6481.1%
Simplified81.1%
(FPCore (re im)
:precision binary64
(if (<= re 2.9e+86)
(*
re
(+
1.0
(*
im
(*
im
(+
0.5
(*
(* im im)
(+ 0.041666666666666664 (* (* im im) 0.001388888888888889))))))))
(*
(+ 1.0 (* 0.5 (* im im)))
(* re (+ 1.0 (* (* re re) -0.16666666666666666))))))
double code(double re, double im) {
double tmp;
if (re <= 2.9e+86) {
tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))));
} else {
tmp = (1.0 + (0.5 * (im * im))) * (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 <= 2.9d+86) then
tmp = re * (1.0d0 + (im * (im * (0.5d0 + ((im * im) * (0.041666666666666664d0 + ((im * im) * 0.001388888888888889d0)))))))
else
tmp = (1.0d0 + (0.5d0 * (im * im))) * (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 <= 2.9e+86) {
tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889)))))));
} else {
tmp = (1.0 + (0.5 * (im * im))) * (re * (1.0 + ((re * re) * -0.16666666666666666)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 2.9e+86: tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889))))))) else: tmp = (1.0 + (0.5 * (im * im))) * (re * (1.0 + ((re * re) * -0.16666666666666666))) return tmp
function code(re, im) tmp = 0.0 if (re <= 2.9e+86) tmp = Float64(re * Float64(1.0 + Float64(im * Float64(im * Float64(0.5 + Float64(Float64(im * im) * Float64(0.041666666666666664 + Float64(Float64(im * im) * 0.001388888888888889)))))))); else tmp = Float64(Float64(1.0 + Float64(0.5 * Float64(im * im))) * 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 <= 2.9e+86) tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * (0.041666666666666664 + ((im * im) * 0.001388888888888889))))))); else tmp = (1.0 + (0.5 * (im * im))) * (re * (1.0 + ((re * re) * -0.16666666666666666))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 2.9e+86], N[(re * N[(1.0 + N[(im * N[(im * N[(0.5 + N[(N[(im * im), $MachinePrecision] * N[(0.041666666666666664 + N[(N[(im * im), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(1.0 + N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 2.9 \cdot 10^{+86}:\\
\;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot \left(0.5 + \left(im \cdot im\right) \cdot \left(0.041666666666666664 + \left(im \cdot im\right) \cdot 0.001388888888888889\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + 0.5 \cdot \left(im \cdot im\right)\right) \cdot \left(re \cdot \left(1 + \left(re \cdot re\right) \cdot -0.16666666666666666\right)\right)\\
\end{array}
\end{array}
if re < 2.8999999999999999e86Initial 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.3%
Simplified93.3%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6468.7%
Simplified68.7%
if 2.8999999999999999e86 < re Initial program 100.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
sub0-negN/A
cosh-undefN/A
associate-*r*N/A
metadata-evalN/A
exp-0N/A
*-lowering-*.f64N/A
exp-0N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
Taylor expanded in im around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6475.8%
Simplified75.8%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6425.5%
Simplified25.5%
(FPCore (re im)
:precision binary64
(if (<= re 2.9e+86)
(* re (+ 1.0 (* im (* im (+ 0.5 (* (* im im) 0.041666666666666664))))))
(*
re
(*
(* (* im im) (* im im))
(+ 0.041666666666666664 (* (* re re) -0.006944444444444444))))))
double code(double re, double im) {
double tmp;
if (re <= 2.9e+86) {
tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664)))));
} else {
tmp = re * (((im * im) * (im * im)) * (0.041666666666666664 + ((re * re) * -0.006944444444444444)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 2.9d+86) then
tmp = re * (1.0d0 + (im * (im * (0.5d0 + ((im * im) * 0.041666666666666664d0)))))
else
tmp = re * (((im * im) * (im * im)) * (0.041666666666666664d0 + ((re * re) * (-0.006944444444444444d0))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 2.9e+86) {
tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664)))));
} else {
tmp = re * (((im * im) * (im * im)) * (0.041666666666666664 + ((re * re) * -0.006944444444444444)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 2.9e+86: tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664))))) else: tmp = re * (((im * im) * (im * im)) * (0.041666666666666664 + ((re * re) * -0.006944444444444444))) return tmp
function code(re, im) tmp = 0.0 if (re <= 2.9e+86) tmp = Float64(re * Float64(1.0 + Float64(im * Float64(im * Float64(0.5 + Float64(Float64(im * im) * 0.041666666666666664)))))); else tmp = Float64(re * Float64(Float64(Float64(im * im) * Float64(im * im)) * Float64(0.041666666666666664 + Float64(Float64(re * re) * -0.006944444444444444)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 2.9e+86) tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664))))); else tmp = re * (((im * im) * (im * im)) * (0.041666666666666664 + ((re * re) * -0.006944444444444444))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 2.9e+86], N[(re * N[(1.0 + N[(im * N[(im * N[(0.5 + N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision] * N[(0.041666666666666664 + N[(N[(re * re), $MachinePrecision] * -0.006944444444444444), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 2.9 \cdot 10^{+86}:\\
\;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(\left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right) \cdot \left(0.041666666666666664 + \left(re \cdot re\right) \cdot -0.006944444444444444\right)\right)\\
\end{array}
\end{array}
if re < 2.8999999999999999e86Initial 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
Simplified90.2%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6466.5%
Simplified66.5%
if 2.8999999999999999e86 < re Initial program 100.0%
Taylor expanded in im around 0
*-rgt-identityN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
Simplified92.0%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr62.5%
Taylor expanded in im around inf
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6437.0%
Simplified37.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6425.4%
Simplified25.4%
Final simplification59.9%
(FPCore (re im) :precision binary64 (if (<= re 1.65e+220) (* re (+ 1.0 (* im (* im (+ 0.5 (* (* im im) 0.041666666666666664)))))) (* re (* (* re re) -0.16666666666666666))))
double code(double re, double im) {
double tmp;
if (re <= 1.65e+220) {
tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664)))));
} else {
tmp = re * ((re * re) * -0.16666666666666666);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 1.65d+220) then
tmp = re * (1.0d0 + (im * (im * (0.5d0 + ((im * im) * 0.041666666666666664d0)))))
else
tmp = re * ((re * re) * (-0.16666666666666666d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 1.65e+220) {
tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664)))));
} else {
tmp = re * ((re * re) * -0.16666666666666666);
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 1.65e+220: tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664))))) else: tmp = re * ((re * re) * -0.16666666666666666) return tmp
function code(re, im) tmp = 0.0 if (re <= 1.65e+220) tmp = Float64(re * Float64(1.0 + Float64(im * Float64(im * Float64(0.5 + Float64(Float64(im * im) * 0.041666666666666664)))))); else tmp = Float64(re * Float64(Float64(re * re) * -0.16666666666666666)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 1.65e+220) tmp = re * (1.0 + (im * (im * (0.5 + ((im * im) * 0.041666666666666664))))); else tmp = re * ((re * re) * -0.16666666666666666); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 1.65e+220], N[(re * N[(1.0 + N[(im * N[(im * N[(0.5 + N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 1.65 \cdot 10^{+220}:\\
\;\;\;\;re \cdot \left(1 + im \cdot \left(im \cdot \left(0.5 + \left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(\left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
\end{array}
\end{array}
if re < 1.65000000000000011e220Initial 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
Simplified90.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
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6460.6%
Simplified60.6%
if 1.65000000000000011e220 < re Initial program 99.9%
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
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6419.0%
Simplified19.0%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6419.0%
Simplified19.0%
Taylor expanded in re around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6419.0%
Simplified19.0%
Final simplification58.8%
(FPCore (re im) :precision binary64 (if (<= im 1.6e+74) (+ re (* -0.16666666666666666 (* re (* re re)))) (* re (* im (* im (* (* im im) 0.041666666666666664))))))
double code(double re, double im) {
double tmp;
if (im <= 1.6e+74) {
tmp = re + (-0.16666666666666666 * (re * (re * re)));
} else {
tmp = re * (im * (im * ((im * im) * 0.041666666666666664)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 1.6d+74) then
tmp = re + ((-0.16666666666666666d0) * (re * (re * re)))
else
tmp = re * (im * (im * ((im * im) * 0.041666666666666664d0)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 1.6e+74) {
tmp = re + (-0.16666666666666666 * (re * (re * re)));
} else {
tmp = re * (im * (im * ((im * im) * 0.041666666666666664)));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 1.6e+74: tmp = re + (-0.16666666666666666 * (re * (re * re))) else: tmp = re * (im * (im * ((im * im) * 0.041666666666666664))) return tmp
function code(re, im) tmp = 0.0 if (im <= 1.6e+74) tmp = Float64(re + Float64(-0.16666666666666666 * Float64(re * Float64(re * re)))); else tmp = Float64(re * Float64(im * Float64(im * Float64(Float64(im * im) * 0.041666666666666664)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 1.6e+74) tmp = re + (-0.16666666666666666 * (re * (re * re))); else tmp = re * (im * (im * ((im * im) * 0.041666666666666664))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 1.6e+74], N[(re + N[(-0.16666666666666666 * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(im * N[(im * N[(N[(im * im), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 1.6 \cdot 10^{+74}:\\
\;\;\;\;re + -0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(im \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot 0.041666666666666664\right)\right)\right)\\
\end{array}
\end{array}
if im < 1.59999999999999997e74Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6469.0%
Simplified69.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.8%
Simplified45.8%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6444.1%
Simplified44.1%
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
+-lowering-+.f64N/A
associate-*r*N/A
associate-*r*N/A
cube-unmultN/A
*-lowering-*.f64N/A
cube-unmultN/A
*-lowering-*.f64N/A
*-lowering-*.f6444.1%
Applied egg-rr44.1%
if 1.59999999999999997e74 < 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
Simplified73.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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6473.3%
Simplified73.3%
Final simplification49.2%
(FPCore (re im) :precision binary64 (if (<= im 7.5e+105) (+ re (* -0.16666666666666666 (* re (* re re)))) (* re (+ 1.0 (* 0.5 (* im im))))))
double code(double re, double im) {
double tmp;
if (im <= 7.5e+105) {
tmp = re + (-0.16666666666666666 * (re * (re * re)));
} else {
tmp = re * (1.0 + (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 <= 7.5d+105) then
tmp = re + ((-0.16666666666666666d0) * (re * (re * re)))
else
tmp = re * (1.0d0 + (0.5d0 * (im * im)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 7.5e+105) {
tmp = re + (-0.16666666666666666 * (re * (re * re)));
} else {
tmp = re * (1.0 + (0.5 * (im * im)));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 7.5e+105: tmp = re + (-0.16666666666666666 * (re * (re * re))) else: tmp = re * (1.0 + (0.5 * (im * im))) return tmp
function code(re, im) tmp = 0.0 if (im <= 7.5e+105) tmp = Float64(re + Float64(-0.16666666666666666 * Float64(re * Float64(re * re)))); else tmp = Float64(re * Float64(1.0 + Float64(0.5 * Float64(im * im)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 7.5e+105) tmp = re + (-0.16666666666666666 * (re * (re * re))); else tmp = re * (1.0 + (0.5 * (im * im))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 7.5e+105], N[(re + N[(-0.16666666666666666 * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(1.0 + N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 7.5 \cdot 10^{+105}:\\
\;\;\;\;re + -0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(1 + 0.5 \cdot \left(im \cdot im\right)\right)\\
\end{array}
\end{array}
if im < 7.5000000000000002e105Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6467.1%
Simplified67.1%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.5%
Simplified45.5%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6443.8%
Simplified43.8%
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
+-lowering-+.f64N/A
associate-*r*N/A
associate-*r*N/A
cube-unmultN/A
*-lowering-*.f64N/A
cube-unmultN/A
*-lowering-*.f64N/A
*-lowering-*.f6443.8%
Applied egg-rr43.8%
if 7.5000000000000002e105 < 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-*.f6468.7%
Simplified68.7%
Taylor expanded in re around 0
Simplified57.2%
Final simplification45.9%
(FPCore (re im) :precision binary64 (if (<= im 8e+105) (* re (+ 1.0 (* re (* re -0.16666666666666666)))) (* re (+ 1.0 (* 0.5 (* im im))))))
double code(double re, double im) {
double tmp;
if (im <= 8e+105) {
tmp = re * (1.0 + (re * (re * -0.16666666666666666)));
} else {
tmp = re * (1.0 + (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 <= 8d+105) then
tmp = re * (1.0d0 + (re * (re * (-0.16666666666666666d0))))
else
tmp = re * (1.0d0 + (0.5d0 * (im * im)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 8e+105) {
tmp = re * (1.0 + (re * (re * -0.16666666666666666)));
} else {
tmp = re * (1.0 + (0.5 * (im * im)));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 8e+105: tmp = re * (1.0 + (re * (re * -0.16666666666666666))) else: tmp = re * (1.0 + (0.5 * (im * im))) return tmp
function code(re, im) tmp = 0.0 if (im <= 8e+105) tmp = Float64(re * Float64(1.0 + Float64(re * Float64(re * -0.16666666666666666)))); else tmp = Float64(re * Float64(1.0 + Float64(0.5 * Float64(im * im)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 8e+105) tmp = re * (1.0 + (re * (re * -0.16666666666666666))); else tmp = re * (1.0 + (0.5 * (im * im))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 8e+105], N[(re * N[(1.0 + N[(re * N[(re * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(1.0 + N[(0.5 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 8 \cdot 10^{+105}:\\
\;\;\;\;re \cdot \left(1 + re \cdot \left(re \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(1 + 0.5 \cdot \left(im \cdot im\right)\right)\\
\end{array}
\end{array}
if im < 7.9999999999999995e105Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6467.1%
Simplified67.1%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.5%
Simplified45.5%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6443.8%
Simplified43.8%
if 7.9999999999999995e105 < 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-*.f6468.7%
Simplified68.7%
Taylor expanded in re around 0
Simplified57.2%
Final simplification45.9%
(FPCore (re im) :precision binary64 (if (<= re 2.9e+86) re (* re (* (* re re) -0.16666666666666666))))
double code(double re, double im) {
double tmp;
if (re <= 2.9e+86) {
tmp = re;
} else {
tmp = re * ((re * re) * -0.16666666666666666);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 2.9d+86) then
tmp = re
else
tmp = re * ((re * re) * (-0.16666666666666666d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 2.9e+86) {
tmp = re;
} else {
tmp = re * ((re * re) * -0.16666666666666666);
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 2.9e+86: tmp = re else: tmp = re * ((re * re) * -0.16666666666666666) return tmp
function code(re, im) tmp = 0.0 if (re <= 2.9e+86) tmp = re; else tmp = Float64(re * Float64(Float64(re * re) * -0.16666666666666666)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 2.9e+86) tmp = re; else tmp = re * ((re * re) * -0.16666666666666666); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 2.9e+86], re, N[(re * N[(N[(re * re), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 2.9 \cdot 10^{+86}:\\
\;\;\;\;re\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(\left(re \cdot re\right) \cdot -0.16666666666666666\right)\\
\end{array}
\end{array}
if re < 2.8999999999999999e86Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6457.2%
Simplified57.2%
Taylor expanded in re around 0
Simplified39.1%
if 2.8999999999999999e86 < re Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6458.1%
Simplified58.1%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6425.5%
Simplified25.5%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6423.2%
Simplified23.2%
Taylor expanded in re around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6423.2%
Simplified23.2%
Final simplification36.5%
(FPCore (re im) :precision binary64 (* re (+ 1.0 (* re (* re -0.16666666666666666)))))
double code(double re, double im) {
return re * (1.0 + (re * (re * -0.16666666666666666)));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = re * (1.0d0 + (re * (re * (-0.16666666666666666d0))))
end function
public static double code(double re, double im) {
return re * (1.0 + (re * (re * -0.16666666666666666)));
}
def code(re, im): return re * (1.0 + (re * (re * -0.16666666666666666)))
function code(re, im) return Float64(re * Float64(1.0 + Float64(re * Float64(re * -0.16666666666666666)))) end
function tmp = code(re, im) tmp = re * (1.0 + (re * (re * -0.16666666666666666))); end
code[re_, im_] := N[(re * N[(1.0 + N[(re * N[(re * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
re \cdot \left(1 + re \cdot \left(re \cdot -0.16666666666666666\right)\right)
\end{array}
Initial program 100.0%
Taylor expanded in im around 0
sin-lowering-sin.f6457.3%
Simplified57.3%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6442.2%
Simplified42.2%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6440.5%
Simplified40.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.f6457.3%
Simplified57.3%
Taylor expanded in re around 0
Simplified33.2%
herbie shell --seed 2024156
(FPCore (re im)
:name "math.sin on complex, real part"
:precision binary64
(* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))