
(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 17 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)) (exp im))))
double code(double re, double im) {
return (0.5 * sin(re)) * (exp(-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(-im) + exp(im))
end function
public static double code(double re, double im) {
return (0.5 * Math.sin(re)) * (Math.exp(-im) + Math.exp(im));
}
def code(re, im): return (0.5 * math.sin(re)) * (math.exp(-im) + math.exp(im))
function code(re, im) return Float64(Float64(0.5 * sin(re)) * Float64(exp(Float64(-im)) + exp(im))) end
function tmp = code(re, im) tmp = (0.5 * sin(re)) * (exp(-im) + exp(im)); end
code[re_, im_] := N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[Exp[(-im)], $MachinePrecision] + N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} + e^{im}\right)
\end{array}
Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (re im)
:precision binary64
(if (<= im 0.058)
(* (* 0.5 (sin re)) (+ (* im im) 2.0))
(if (<= im 1.15e+77)
(* 0.5 (+ (/ re (exp im)) (* re (exp im))))
(* (pow im 4.0) (* (sin re) 0.041666666666666664)))))
double code(double re, double im) {
double tmp;
if (im <= 0.058) {
tmp = (0.5 * sin(re)) * ((im * im) + 2.0);
} else if (im <= 1.15e+77) {
tmp = 0.5 * ((re / exp(im)) + (re * exp(im)));
} else {
tmp = pow(im, 4.0) * (sin(re) * 0.041666666666666664);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 0.058d0) then
tmp = (0.5d0 * sin(re)) * ((im * im) + 2.0d0)
else if (im <= 1.15d+77) then
tmp = 0.5d0 * ((re / exp(im)) + (re * exp(im)))
else
tmp = (im ** 4.0d0) * (sin(re) * 0.041666666666666664d0)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 0.058) {
tmp = (0.5 * Math.sin(re)) * ((im * im) + 2.0);
} else if (im <= 1.15e+77) {
tmp = 0.5 * ((re / Math.exp(im)) + (re * Math.exp(im)));
} else {
tmp = Math.pow(im, 4.0) * (Math.sin(re) * 0.041666666666666664);
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 0.058: tmp = (0.5 * math.sin(re)) * ((im * im) + 2.0) elif im <= 1.15e+77: tmp = 0.5 * ((re / math.exp(im)) + (re * math.exp(im))) else: tmp = math.pow(im, 4.0) * (math.sin(re) * 0.041666666666666664) return tmp
function code(re, im) tmp = 0.0 if (im <= 0.058) tmp = Float64(Float64(0.5 * sin(re)) * Float64(Float64(im * im) + 2.0)); elseif (im <= 1.15e+77) tmp = Float64(0.5 * Float64(Float64(re / exp(im)) + Float64(re * exp(im)))); else tmp = Float64((im ^ 4.0) * Float64(sin(re) * 0.041666666666666664)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 0.058) tmp = (0.5 * sin(re)) * ((im * im) + 2.0); elseif (im <= 1.15e+77) tmp = 0.5 * ((re / exp(im)) + (re * exp(im))); else tmp = (im ^ 4.0) * (sin(re) * 0.041666666666666664); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 0.058], N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[(im * im), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 1.15e+77], N[(0.5 * N[(N[(re / N[Exp[im], $MachinePrecision]), $MachinePrecision] + N[(re * N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[im, 4.0], $MachinePrecision] * N[(N[Sin[re], $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 0.058:\\
\;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im \cdot im + 2\right)\\
\mathbf{elif}\;im \leq 1.15 \cdot 10^{+77}:\\
\;\;\;\;0.5 \cdot \left(\frac{re}{e^{im}} + re \cdot e^{im}\right)\\
\mathbf{else}:\\
\;\;\;\;{im}^{4} \cdot \left(\sin re \cdot 0.041666666666666664\right)\\
\end{array}
\end{array}
if im < 0.0580000000000000029Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 86.3%
unpow286.3%
Simplified86.3%
if 0.0580000000000000029 < im < 1.14999999999999997e77Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 92.6%
distribute-rgt-in92.6%
fma-def92.6%
exp-neg92.6%
associate-*l/92.6%
*-lft-identity92.6%
Simplified92.6%
Taylor expanded in im around inf 92.6%
if 1.14999999999999997e77 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 100.0%
associate-+r+100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in im around inf 100.0%
*-commutative100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Final simplification89.2%
(FPCore (re im)
:precision binary64
(if (<= im 0.105)
(+ (sin re) (* 0.5 (* (sin re) (* im im))))
(if (<= im 1.15e+77)
(* 0.5 (+ (/ re (exp im)) (* re (exp im))))
(* (pow im 4.0) (* (sin re) 0.041666666666666664)))))
double code(double re, double im) {
double tmp;
if (im <= 0.105) {
tmp = sin(re) + (0.5 * (sin(re) * (im * im)));
} else if (im <= 1.15e+77) {
tmp = 0.5 * ((re / exp(im)) + (re * exp(im)));
} else {
tmp = pow(im, 4.0) * (sin(re) * 0.041666666666666664);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 0.105d0) then
tmp = sin(re) + (0.5d0 * (sin(re) * (im * im)))
else if (im <= 1.15d+77) then
tmp = 0.5d0 * ((re / exp(im)) + (re * exp(im)))
else
tmp = (im ** 4.0d0) * (sin(re) * 0.041666666666666664d0)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 0.105) {
tmp = Math.sin(re) + (0.5 * (Math.sin(re) * (im * im)));
} else if (im <= 1.15e+77) {
tmp = 0.5 * ((re / Math.exp(im)) + (re * Math.exp(im)));
} else {
tmp = Math.pow(im, 4.0) * (Math.sin(re) * 0.041666666666666664);
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 0.105: tmp = math.sin(re) + (0.5 * (math.sin(re) * (im * im))) elif im <= 1.15e+77: tmp = 0.5 * ((re / math.exp(im)) + (re * math.exp(im))) else: tmp = math.pow(im, 4.0) * (math.sin(re) * 0.041666666666666664) return tmp
function code(re, im) tmp = 0.0 if (im <= 0.105) tmp = Float64(sin(re) + Float64(0.5 * Float64(sin(re) * Float64(im * im)))); elseif (im <= 1.15e+77) tmp = Float64(0.5 * Float64(Float64(re / exp(im)) + Float64(re * exp(im)))); else tmp = Float64((im ^ 4.0) * Float64(sin(re) * 0.041666666666666664)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 0.105) tmp = sin(re) + (0.5 * (sin(re) * (im * im))); elseif (im <= 1.15e+77) tmp = 0.5 * ((re / exp(im)) + (re * exp(im))); else tmp = (im ^ 4.0) * (sin(re) * 0.041666666666666664); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 0.105], N[(N[Sin[re], $MachinePrecision] + N[(0.5 * N[(N[Sin[re], $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 1.15e+77], N[(0.5 * N[(N[(re / N[Exp[im], $MachinePrecision]), $MachinePrecision] + N[(re * N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[im, 4.0], $MachinePrecision] * N[(N[Sin[re], $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 0.105:\\
\;\;\;\;\sin re + 0.5 \cdot \left(\sin re \cdot \left(im \cdot im\right)\right)\\
\mathbf{elif}\;im \leq 1.15 \cdot 10^{+77}:\\
\;\;\;\;0.5 \cdot \left(\frac{re}{e^{im}} + re \cdot e^{im}\right)\\
\mathbf{else}:\\
\;\;\;\;{im}^{4} \cdot \left(\sin re \cdot 0.041666666666666664\right)\\
\end{array}
\end{array}
if im < 0.104999999999999996Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 86.3%
*-commutative86.3%
unpow286.3%
Simplified86.3%
if 0.104999999999999996 < im < 1.14999999999999997e77Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 92.6%
distribute-rgt-in92.6%
fma-def92.6%
exp-neg92.6%
associate-*l/92.6%
*-lft-identity92.6%
Simplified92.6%
Taylor expanded in im around inf 92.6%
if 1.14999999999999997e77 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 100.0%
associate-+r+100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in im around inf 100.0%
*-commutative100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Final simplification89.2%
(FPCore (re im)
:precision binary64
(if (<= im 0.06)
(* (* 0.5 (sin re)) (+ (* im im) 2.0))
(if (<= im 1.15e+77)
(* 0.5 (* re (* 2.0 (cosh im))))
(* (pow im 4.0) (* (sin re) 0.041666666666666664)))))
double code(double re, double im) {
double tmp;
if (im <= 0.06) {
tmp = (0.5 * sin(re)) * ((im * im) + 2.0);
} else if (im <= 1.15e+77) {
tmp = 0.5 * (re * (2.0 * cosh(im)));
} else {
tmp = pow(im, 4.0) * (sin(re) * 0.041666666666666664);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 0.06d0) then
tmp = (0.5d0 * sin(re)) * ((im * im) + 2.0d0)
else if (im <= 1.15d+77) then
tmp = 0.5d0 * (re * (2.0d0 * cosh(im)))
else
tmp = (im ** 4.0d0) * (sin(re) * 0.041666666666666664d0)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 0.06) {
tmp = (0.5 * Math.sin(re)) * ((im * im) + 2.0);
} else if (im <= 1.15e+77) {
tmp = 0.5 * (re * (2.0 * Math.cosh(im)));
} else {
tmp = Math.pow(im, 4.0) * (Math.sin(re) * 0.041666666666666664);
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 0.06: tmp = (0.5 * math.sin(re)) * ((im * im) + 2.0) elif im <= 1.15e+77: tmp = 0.5 * (re * (2.0 * math.cosh(im))) else: tmp = math.pow(im, 4.0) * (math.sin(re) * 0.041666666666666664) return tmp
function code(re, im) tmp = 0.0 if (im <= 0.06) tmp = Float64(Float64(0.5 * sin(re)) * Float64(Float64(im * im) + 2.0)); elseif (im <= 1.15e+77) tmp = Float64(0.5 * Float64(re * Float64(2.0 * cosh(im)))); else tmp = Float64((im ^ 4.0) * Float64(sin(re) * 0.041666666666666664)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 0.06) tmp = (0.5 * sin(re)) * ((im * im) + 2.0); elseif (im <= 1.15e+77) tmp = 0.5 * (re * (2.0 * cosh(im))); else tmp = (im ^ 4.0) * (sin(re) * 0.041666666666666664); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 0.06], N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[(im * im), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 1.15e+77], N[(0.5 * N[(re * N[(2.0 * N[Cosh[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[im, 4.0], $MachinePrecision] * N[(N[Sin[re], $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 0.06:\\
\;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im \cdot im + 2\right)\\
\mathbf{elif}\;im \leq 1.15 \cdot 10^{+77}:\\
\;\;\;\;0.5 \cdot \left(re \cdot \left(2 \cdot \cosh im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{im}^{4} \cdot \left(\sin re \cdot 0.041666666666666664\right)\\
\end{array}
\end{array}
if im < 0.059999999999999998Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 86.3%
unpow286.3%
Simplified86.3%
if 0.059999999999999998 < im < 1.14999999999999997e77Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 92.6%
distribute-rgt-in92.6%
fma-def92.6%
exp-neg92.6%
associate-*l/92.6%
*-lft-identity92.6%
Simplified92.6%
Taylor expanded in im around inf 92.6%
expm1-log1p-u46.2%
expm1-udef46.2%
+-commutative46.2%
*-commutative46.2%
div-inv46.2%
distribute-lft-out46.2%
rec-exp46.2%
cosh-undef46.2%
Applied egg-rr46.2%
expm1-def46.2%
expm1-log1p92.6%
Simplified92.6%
if 1.14999999999999997e77 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 100.0%
associate-+r+100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in im around inf 100.0%
*-commutative100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Final simplification89.2%
(FPCore (re im) :precision binary64 (if (or (<= im 0.044) (not (<= im 2.6e+152))) (* (* 0.5 (sin re)) (+ (* im im) 2.0)) (* 0.5 (* re (* 2.0 (cosh im))))))
double code(double re, double im) {
double tmp;
if ((im <= 0.044) || !(im <= 2.6e+152)) {
tmp = (0.5 * sin(re)) * ((im * im) + 2.0);
} else {
tmp = 0.5 * (re * (2.0 * cosh(im)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if ((im <= 0.044d0) .or. (.not. (im <= 2.6d+152))) then
tmp = (0.5d0 * sin(re)) * ((im * im) + 2.0d0)
else
tmp = 0.5d0 * (re * (2.0d0 * cosh(im)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if ((im <= 0.044) || !(im <= 2.6e+152)) {
tmp = (0.5 * Math.sin(re)) * ((im * im) + 2.0);
} else {
tmp = 0.5 * (re * (2.0 * Math.cosh(im)));
}
return tmp;
}
def code(re, im): tmp = 0 if (im <= 0.044) or not (im <= 2.6e+152): tmp = (0.5 * math.sin(re)) * ((im * im) + 2.0) else: tmp = 0.5 * (re * (2.0 * math.cosh(im))) return tmp
function code(re, im) tmp = 0.0 if ((im <= 0.044) || !(im <= 2.6e+152)) tmp = Float64(Float64(0.5 * sin(re)) * Float64(Float64(im * im) + 2.0)); else tmp = Float64(0.5 * Float64(re * Float64(2.0 * cosh(im)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if ((im <= 0.044) || ~((im <= 2.6e+152))) tmp = (0.5 * sin(re)) * ((im * im) + 2.0); else tmp = 0.5 * (re * (2.0 * cosh(im))); end tmp_2 = tmp; end
code[re_, im_] := If[Or[LessEqual[im, 0.044], N[Not[LessEqual[im, 2.6e+152]], $MachinePrecision]], N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[(im * im), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(re * N[(2.0 * N[Cosh[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 0.044 \lor \neg \left(im \leq 2.6 \cdot 10^{+152}\right):\\
\;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(im \cdot im + 2\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(re \cdot \left(2 \cdot \cosh im\right)\right)\\
\end{array}
\end{array}
if im < 0.043999999999999997 or 2.6000000000000001e152 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 88.1%
unpow288.1%
Simplified88.1%
if 0.043999999999999997 < im < 2.6000000000000001e152Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 81.4%
distribute-rgt-in81.4%
fma-def81.4%
exp-neg81.4%
associate-*l/81.4%
*-lft-identity81.4%
Simplified81.4%
Taylor expanded in im around inf 81.4%
expm1-log1p-u40.6%
expm1-udef40.6%
+-commutative40.6%
*-commutative40.6%
div-inv40.6%
distribute-lft-out40.6%
rec-exp40.6%
cosh-undef40.6%
Applied egg-rr40.6%
expm1-def40.6%
expm1-log1p81.4%
Simplified81.4%
Final simplification87.3%
(FPCore (re im)
:precision binary64
(if (<= im 0.01)
(sin re)
(if (<= im 7e+215)
(* 0.5 (* re (* 2.0 (cosh im))))
(* im (* (* 0.5 (sin re)) im)))))
double code(double re, double im) {
double tmp;
if (im <= 0.01) {
tmp = sin(re);
} else if (im <= 7e+215) {
tmp = 0.5 * (re * (2.0 * cosh(im)));
} else {
tmp = im * ((0.5 * sin(re)) * 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.01d0) then
tmp = sin(re)
else if (im <= 7d+215) then
tmp = 0.5d0 * (re * (2.0d0 * cosh(im)))
else
tmp = im * ((0.5d0 * sin(re)) * im)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 0.01) {
tmp = Math.sin(re);
} else if (im <= 7e+215) {
tmp = 0.5 * (re * (2.0 * Math.cosh(im)));
} else {
tmp = im * ((0.5 * Math.sin(re)) * im);
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 0.01: tmp = math.sin(re) elif im <= 7e+215: tmp = 0.5 * (re * (2.0 * math.cosh(im))) else: tmp = im * ((0.5 * math.sin(re)) * im) return tmp
function code(re, im) tmp = 0.0 if (im <= 0.01) tmp = sin(re); elseif (im <= 7e+215) tmp = Float64(0.5 * Float64(re * Float64(2.0 * cosh(im)))); else tmp = Float64(im * Float64(Float64(0.5 * sin(re)) * im)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 0.01) tmp = sin(re); elseif (im <= 7e+215) tmp = 0.5 * (re * (2.0 * cosh(im))); else tmp = im * ((0.5 * sin(re)) * im); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 0.01], N[Sin[re], $MachinePrecision], If[LessEqual[im, 7e+215], N[(0.5 * N[(re * N[(2.0 * N[Cosh[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * im), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 0.01:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 7 \cdot 10^{+215}:\\
\;\;\;\;0.5 \cdot \left(re \cdot \left(2 \cdot \cosh im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(\left(0.5 \cdot \sin re\right) \cdot im\right)\\
\end{array}
\end{array}
if im < 0.0100000000000000002Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 67.9%
if 0.0100000000000000002 < im < 6.99999999999999954e215Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 81.5%
distribute-rgt-in81.5%
fma-def81.5%
exp-neg81.5%
associate-*l/81.5%
*-lft-identity81.5%
Simplified81.5%
Taylor expanded in im around inf 81.5%
expm1-log1p-u37.2%
expm1-udef37.2%
+-commutative37.2%
*-commutative37.2%
div-inv37.2%
distribute-lft-out37.2%
rec-exp37.2%
cosh-undef37.2%
Applied egg-rr37.2%
expm1-def37.2%
expm1-log1p81.5%
Simplified81.5%
if 6.99999999999999954e215 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in im around inf 100.0%
associate-*r*100.0%
*-commutative100.0%
unpow2100.0%
associate-*l*85.8%
Simplified85.8%
Final simplification71.5%
(FPCore (re im) :precision binary64 (if (<= im 0.018) (sin re) (* 0.5 (* re (* 2.0 (cosh im))))))
double code(double re, double im) {
double tmp;
if (im <= 0.018) {
tmp = sin(re);
} else {
tmp = 0.5 * (re * (2.0 * cosh(im)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 0.018d0) then
tmp = sin(re)
else
tmp = 0.5d0 * (re * (2.0d0 * cosh(im)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 0.018) {
tmp = Math.sin(re);
} else {
tmp = 0.5 * (re * (2.0 * Math.cosh(im)));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 0.018: tmp = math.sin(re) else: tmp = 0.5 * (re * (2.0 * math.cosh(im))) return tmp
function code(re, im) tmp = 0.0 if (im <= 0.018) tmp = sin(re); else tmp = Float64(0.5 * Float64(re * Float64(2.0 * cosh(im)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 0.018) tmp = sin(re); else tmp = 0.5 * (re * (2.0 * cosh(im))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 0.018], N[Sin[re], $MachinePrecision], N[(0.5 * N[(re * N[(2.0 * N[Cosh[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 0.018:\\
\;\;\;\;\sin re\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(re \cdot \left(2 \cdot \cosh im\right)\right)\\
\end{array}
\end{array}
if im < 0.0179999999999999986Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 67.9%
if 0.0179999999999999986 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 80.7%
distribute-rgt-in80.7%
fma-def80.7%
exp-neg80.7%
associate-*l/80.7%
*-lft-identity80.7%
Simplified80.7%
Taylor expanded in im around inf 80.7%
expm1-log1p-u41.9%
expm1-udef41.9%
+-commutative41.9%
*-commutative41.9%
div-inv41.9%
distribute-lft-out41.9%
rec-exp41.9%
cosh-undef41.9%
Applied egg-rr41.9%
expm1-def41.9%
expm1-log1p80.7%
Simplified80.7%
Final simplification71.0%
(FPCore (re im) :precision binary64 (if (<= im 8.2e+15) (sin re) (* 0.041666666666666664 (* re (pow im 4.0)))))
double code(double re, double im) {
double tmp;
if (im <= 8.2e+15) {
tmp = sin(re);
} else {
tmp = 0.041666666666666664 * (re * pow(im, 4.0));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 8.2d+15) then
tmp = sin(re)
else
tmp = 0.041666666666666664d0 * (re * (im ** 4.0d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 8.2e+15) {
tmp = Math.sin(re);
} else {
tmp = 0.041666666666666664 * (re * Math.pow(im, 4.0));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 8.2e+15: tmp = math.sin(re) else: tmp = 0.041666666666666664 * (re * math.pow(im, 4.0)) return tmp
function code(re, im) tmp = 0.0 if (im <= 8.2e+15) tmp = sin(re); else tmp = Float64(0.041666666666666664 * Float64(re * (im ^ 4.0))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 8.2e+15) tmp = sin(re); else tmp = 0.041666666666666664 * (re * (im ^ 4.0)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 8.2e+15], N[Sin[re], $MachinePrecision], N[(0.041666666666666664 * N[(re * N[Power[im, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 8.2 \cdot 10^{+15}:\\
\;\;\;\;\sin re\\
\mathbf{else}:\\
\;\;\;\;0.041666666666666664 \cdot \left(re \cdot {im}^{4}\right)\\
\end{array}
\end{array}
if im < 8.2e15Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 67.3%
if 8.2e15 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 82.6%
associate-+r+82.6%
unpow282.6%
Simplified82.6%
Taylor expanded in im around inf 82.6%
*-commutative82.6%
*-commutative82.6%
associate-*l*82.6%
Simplified82.6%
Taylor expanded in re around 0 68.9%
Final simplification67.7%
(FPCore (re im) :precision binary64 (if (<= im 1.2e+25) (sin re) (* 0.5 (* re (+ (* im im) 2.0)))))
double code(double re, double im) {
double tmp;
if (im <= 1.2e+25) {
tmp = sin(re);
} else {
tmp = 0.5 * (re * ((im * im) + 2.0));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 1.2d+25) then
tmp = sin(re)
else
tmp = 0.5d0 * (re * ((im * im) + 2.0d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 1.2e+25) {
tmp = Math.sin(re);
} else {
tmp = 0.5 * (re * ((im * im) + 2.0));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 1.2e+25: tmp = math.sin(re) else: tmp = 0.5 * (re * ((im * im) + 2.0)) return tmp
function code(re, im) tmp = 0.0 if (im <= 1.2e+25) tmp = sin(re); else tmp = Float64(0.5 * Float64(re * Float64(Float64(im * im) + 2.0))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 1.2e+25) tmp = sin(re); else tmp = 0.5 * (re * ((im * im) + 2.0)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 1.2e+25], N[Sin[re], $MachinePrecision], N[(0.5 * N[(re * N[(N[(im * im), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 1.2 \cdot 10^{+25}:\\
\;\;\;\;\sin re\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(re \cdot \left(im \cdot im + 2\right)\right)\\
\end{array}
\end{array}
if im < 1.19999999999999998e25Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 66.3%
if 1.19999999999999998e25 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 54.8%
unpow254.8%
Simplified54.8%
Taylor expanded in re around 0 55.4%
*-commutative55.4%
unpow255.4%
Simplified55.4%
Final simplification63.9%
(FPCore (re im) :precision binary64 (if (<= im 1900000000000.0) (* 0.5 (+ re re)) (* 0.5 (* 4.0 (* re re)))))
double code(double re, double im) {
double tmp;
if (im <= 1900000000000.0) {
tmp = 0.5 * (re + re);
} else {
tmp = 0.5 * (4.0 * (re * re));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 1900000000000.0d0) then
tmp = 0.5d0 * (re + re)
else
tmp = 0.5d0 * (4.0d0 * (re * re))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 1900000000000.0) {
tmp = 0.5 * (re + re);
} else {
tmp = 0.5 * (4.0 * (re * re));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 1900000000000.0: tmp = 0.5 * (re + re) else: tmp = 0.5 * (4.0 * (re * re)) return tmp
function code(re, im) tmp = 0.0 if (im <= 1900000000000.0) tmp = Float64(0.5 * Float64(re + re)); else tmp = Float64(0.5 * Float64(4.0 * Float64(re * re))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 1900000000000.0) tmp = 0.5 * (re + re); else tmp = 0.5 * (4.0 * (re * re)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 1900000000000.0], N[(0.5 * N[(re + re), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(4.0 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 1900000000000:\\
\;\;\;\;0.5 \cdot \left(re + re\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(4 \cdot \left(re \cdot re\right)\right)\\
\end{array}
\end{array}
if im < 1.9e12Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 58.1%
distribute-rgt-in58.1%
fma-def58.1%
exp-neg58.1%
associate-*l/58.1%
*-lft-identity58.1%
Simplified58.1%
Taylor expanded in im around 0 34.4%
count-234.4%
Simplified34.4%
if 1.9e12 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 81.7%
distribute-rgt-in81.7%
fma-def81.7%
exp-neg81.7%
associate-*l/81.7%
*-lft-identity81.7%
Simplified81.7%
Applied egg-rr18.4%
distribute-lft-in18.4%
count-218.4%
count-218.4%
swap-sqr18.4%
metadata-eval18.4%
Simplified18.4%
Final simplification30.6%
(FPCore (re im) :precision binary64 (if (<= re -7e+133) (* 0.5 (* 4.0 (* re re))) (* 0.5 (* re (+ im 2.0)))))
double code(double re, double im) {
double tmp;
if (re <= -7e+133) {
tmp = 0.5 * (4.0 * (re * re));
} else {
tmp = 0.5 * (re * (im + 2.0));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= (-7d+133)) then
tmp = 0.5d0 * (4.0d0 * (re * re))
else
tmp = 0.5d0 * (re * (im + 2.0d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -7e+133) {
tmp = 0.5 * (4.0 * (re * re));
} else {
tmp = 0.5 * (re * (im + 2.0));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -7e+133: tmp = 0.5 * (4.0 * (re * re)) else: tmp = 0.5 * (re * (im + 2.0)) return tmp
function code(re, im) tmp = 0.0 if (re <= -7e+133) tmp = Float64(0.5 * Float64(4.0 * Float64(re * re))); else tmp = Float64(0.5 * Float64(re * Float64(im + 2.0))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -7e+133) tmp = 0.5 * (4.0 * (re * re)); else tmp = 0.5 * (re * (im + 2.0)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -7e+133], N[(0.5 * N[(4.0 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(re * N[(im + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -7 \cdot 10^{+133}:\\
\;\;\;\;0.5 \cdot \left(4 \cdot \left(re \cdot re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(re \cdot \left(im + 2\right)\right)\\
\end{array}
\end{array}
if re < -6.9999999999999997e133Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 19.1%
distribute-rgt-in19.1%
fma-def19.1%
exp-neg19.1%
associate-*l/19.1%
*-lft-identity19.1%
Simplified19.1%
Applied egg-rr26.2%
distribute-lft-in26.2%
count-226.2%
count-226.2%
swap-sqr26.2%
metadata-eval26.2%
Simplified26.2%
if -6.9999999999999997e133 < re Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 71.8%
distribute-rgt-in71.8%
fma-def71.8%
exp-neg71.8%
associate-*l/71.8%
*-lft-identity71.8%
Simplified71.8%
Taylor expanded in im around 0 51.1%
Taylor expanded in im around 0 37.4%
+-commutative37.4%
*-commutative37.4%
distribute-lft-out37.4%
Simplified37.4%
Final simplification35.7%
(FPCore (re im) :precision binary64 (* 0.5 (* re (+ (* im im) 2.0))))
double code(double re, double im) {
return 0.5 * (re * ((im * im) + 2.0));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = 0.5d0 * (re * ((im * im) + 2.0d0))
end function
public static double code(double re, double im) {
return 0.5 * (re * ((im * im) + 2.0));
}
def code(re, im): return 0.5 * (re * ((im * im) + 2.0))
function code(re, im) return Float64(0.5 * Float64(re * Float64(Float64(im * im) + 2.0))) end
function tmp = code(re, im) tmp = 0.5 * (re * ((im * im) + 2.0)); end
code[re_, im_] := N[(0.5 * N[(re * N[(N[(im * im), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.5 \cdot \left(re \cdot \left(im \cdot im + 2\right)\right)
\end{array}
Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 77.7%
unpow277.7%
Simplified77.7%
Taylor expanded in re around 0 49.0%
*-commutative49.0%
unpow249.0%
Simplified49.0%
Final simplification49.0%
(FPCore (re im) :precision binary64 (if (<= im 890.0) (* 0.5 (+ re re)) (/ 0.125 (* re re))))
double code(double re, double im) {
double tmp;
if (im <= 890.0) {
tmp = 0.5 * (re + re);
} else {
tmp = 0.125 / (re * re);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 890.0d0) then
tmp = 0.5d0 * (re + re)
else
tmp = 0.125d0 / (re * re)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 890.0) {
tmp = 0.5 * (re + re);
} else {
tmp = 0.125 / (re * re);
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 890.0: tmp = 0.5 * (re + re) else: tmp = 0.125 / (re * re) return tmp
function code(re, im) tmp = 0.0 if (im <= 890.0) tmp = Float64(0.5 * Float64(re + re)); else tmp = Float64(0.125 / Float64(re * re)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 890.0) tmp = 0.5 * (re + re); else tmp = 0.125 / (re * re); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 890.0], N[(0.5 * N[(re + re), $MachinePrecision]), $MachinePrecision], N[(0.125 / N[(re * re), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 890:\\
\;\;\;\;0.5 \cdot \left(re + re\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{0.125}{re \cdot re}\\
\end{array}
\end{array}
if im < 890Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 57.8%
distribute-rgt-in57.8%
fma-def57.8%
exp-neg57.8%
associate-*l/57.8%
*-lft-identity57.8%
Simplified57.8%
Taylor expanded in im around 0 34.6%
count-234.6%
Simplified34.6%
if 890 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 82.0%
distribute-rgt-in82.0%
fma-def82.0%
exp-neg82.0%
associate-*l/82.0%
*-lft-identity82.0%
Simplified82.0%
Applied egg-rr11.7%
Taylor expanded in re around 0 11.7%
unpow211.7%
Simplified11.7%
Final simplification29.1%
(FPCore (re im) :precision binary64 (* 0.001953125 (* 0.5 re)))
double code(double re, double im) {
return 0.001953125 * (0.5 * re);
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = 0.001953125d0 * (0.5d0 * re)
end function
public static double code(double re, double im) {
return 0.001953125 * (0.5 * re);
}
def code(re, im): return 0.001953125 * (0.5 * re)
function code(re, im) return Float64(0.001953125 * Float64(0.5 * re)) end
function tmp = code(re, im) tmp = 0.001953125 * (0.5 * re); end
code[re_, im_] := N[(0.001953125 * N[(0.5 * re), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.001953125 \cdot \left(0.5 \cdot re\right)
\end{array}
Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 63.6%
associate-*r*63.6%
*-commutative63.6%
Simplified63.6%
Applied egg-rr5.6%
Final simplification5.6%
(FPCore (re im) :precision binary64 (* 0.5 (+ re re)))
double code(double re, double im) {
return 0.5 * (re + re);
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = 0.5d0 * (re + re)
end function
public static double code(double re, double im) {
return 0.5 * (re + re);
}
def code(re, im): return 0.5 * (re + re)
function code(re, im) return Float64(0.5 * Float64(re + re)) end
function tmp = code(re, im) tmp = 0.5 * (re + re); end
code[re_, im_] := N[(0.5 * N[(re + re), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.5 \cdot \left(re + re\right)
\end{array}
Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 63.6%
distribute-rgt-in63.6%
fma-def63.6%
exp-neg63.6%
associate-*l/63.6%
*-lft-identity63.6%
Simplified63.6%
Taylor expanded in im around 0 27.0%
count-227.0%
Simplified27.0%
Final simplification27.0%
(FPCore (re im) :precision binary64 1.9380669946781485e-10)
double code(double re, double im) {
return 1.9380669946781485e-10;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = 1.9380669946781485d-10
end function
public static double code(double re, double im) {
return 1.9380669946781485e-10;
}
def code(re, im): return 1.9380669946781485e-10
function code(re, im) return 1.9380669946781485e-10 end
function tmp = code(re, im) tmp = 1.9380669946781485e-10; end
code[re_, im_] := 1.9380669946781485e-10
\begin{array}{l}
\\
1.9380669946781485 \cdot 10^{-10}
\end{array}
Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 90.3%
associate-+r+90.3%
unpow290.3%
Simplified90.3%
Applied egg-rr3.3%
*-commutative3.3%
+-inverses3.3%
+-rgt-identity3.3%
associate-/l*3.3%
*-inverses3.3%
metadata-eval3.3%
Simplified3.3%
Final simplification3.3%
(FPCore (re im) :precision binary64 0.5)
double code(double re, double im) {
return 0.5;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = 0.5d0
end function
public static double code(double re, double im) {
return 0.5;
}
def code(re, im): return 0.5
function code(re, im) return 0.5 end
function tmp = code(re, im) tmp = 0.5; end
code[re_, im_] := 0.5
\begin{array}{l}
\\
0.5
\end{array}
Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 63.6%
distribute-rgt-in63.6%
fma-def63.6%
exp-neg63.6%
associate-*l/63.6%
*-lft-identity63.6%
Simplified63.6%
Applied egg-rr8.1%
sqr-pow8.1%
pow-prod-down8.1%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
associate-*r/0.0%
difference-of-squares0.0%
flip-+3.6%
metadata-eval3.6%
flip-+0.0%
clear-num0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+27.0%
unpow-127.0%
metadata-eval27.0%
sqrt-pow114.0%
metadata-eval14.0%
pow-prod-up7.9%
Applied egg-rr4.1%
Final simplification4.1%
herbie shell --seed 2023224
(FPCore (re im)
:name "math.sin on complex, real part"
:precision binary64
(* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))