
(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 22 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 2.5)
(*
(* 0.5 (sin re))
(+ (+ 2.0 (* im im)) (* (pow im 4.0) 0.08333333333333333)))
(if (<= im 1.2e+77)
(* (* 0.5 re) (+ (exp (- im)) (exp im)))
(* 0.041666666666666664 (* (sin re) (pow im 4.0))))))
double code(double re, double im) {
double tmp;
if (im <= 2.5) {
tmp = (0.5 * sin(re)) * ((2.0 + (im * im)) + (pow(im, 4.0) * 0.08333333333333333));
} else if (im <= 1.2e+77) {
tmp = (0.5 * re) * (exp(-im) + exp(im));
} else {
tmp = 0.041666666666666664 * (sin(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 <= 2.5d0) then
tmp = (0.5d0 * sin(re)) * ((2.0d0 + (im * im)) + ((im ** 4.0d0) * 0.08333333333333333d0))
else if (im <= 1.2d+77) then
tmp = (0.5d0 * re) * (exp(-im) + exp(im))
else
tmp = 0.041666666666666664d0 * (sin(re) * (im ** 4.0d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 2.5) {
tmp = (0.5 * Math.sin(re)) * ((2.0 + (im * im)) + (Math.pow(im, 4.0) * 0.08333333333333333));
} else if (im <= 1.2e+77) {
tmp = (0.5 * re) * (Math.exp(-im) + Math.exp(im));
} else {
tmp = 0.041666666666666664 * (Math.sin(re) * Math.pow(im, 4.0));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 2.5: tmp = (0.5 * math.sin(re)) * ((2.0 + (im * im)) + (math.pow(im, 4.0) * 0.08333333333333333)) elif im <= 1.2e+77: tmp = (0.5 * re) * (math.exp(-im) + math.exp(im)) else: tmp = 0.041666666666666664 * (math.sin(re) * math.pow(im, 4.0)) return tmp
function code(re, im) tmp = 0.0 if (im <= 2.5) tmp = Float64(Float64(0.5 * sin(re)) * Float64(Float64(2.0 + Float64(im * im)) + Float64((im ^ 4.0) * 0.08333333333333333))); elseif (im <= 1.2e+77) tmp = Float64(Float64(0.5 * re) * Float64(exp(Float64(-im)) + exp(im))); else tmp = Float64(0.041666666666666664 * Float64(sin(re) * (im ^ 4.0))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 2.5) tmp = (0.5 * sin(re)) * ((2.0 + (im * im)) + ((im ^ 4.0) * 0.08333333333333333)); elseif (im <= 1.2e+77) tmp = (0.5 * re) * (exp(-im) + exp(im)); else tmp = 0.041666666666666664 * (sin(re) * (im ^ 4.0)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 2.5], N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 + N[(im * im), $MachinePrecision]), $MachinePrecision] + N[(N[Power[im, 4.0], $MachinePrecision] * 0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 1.2e+77], N[(N[(0.5 * re), $MachinePrecision] * N[(N[Exp[(-im)], $MachinePrecision] + N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.041666666666666664 * N[(N[Sin[re], $MachinePrecision] * N[Power[im, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 2.5:\\
\;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(\left(2 + im \cdot im\right) + {im}^{4} \cdot 0.08333333333333333\right)\\
\mathbf{elif}\;im \leq 1.2 \cdot 10^{+77}:\\
\;\;\;\;\left(0.5 \cdot re\right) \cdot \left(e^{-im} + e^{im}\right)\\
\mathbf{else}:\\
\;\;\;\;0.041666666666666664 \cdot \left(\sin re \cdot {im}^{4}\right)\\
\end{array}
\end{array}
if im < 2.5Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 87.7%
Simplified87.7%
if 2.5 < im < 1.1999999999999999e77Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 76.9%
Simplified76.9%
if 1.1999999999999999e77 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 100.0%
Simplified100.0%
Taylor expanded in im around inf 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification89.1%
(FPCore (re im)
:precision binary64
(if (<= im 2.5)
(* (* 0.5 (sin re)) (+ 2.0 (* im im)))
(if (<= im 1.2e+77)
(* (* 0.5 re) (+ (exp (- im)) (exp im)))
(* 0.041666666666666664 (* (sin re) (pow im 4.0))))))
double code(double re, double im) {
double tmp;
if (im <= 2.5) {
tmp = (0.5 * sin(re)) * (2.0 + (im * im));
} else if (im <= 1.2e+77) {
tmp = (0.5 * re) * (exp(-im) + exp(im));
} else {
tmp = 0.041666666666666664 * (sin(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 <= 2.5d0) then
tmp = (0.5d0 * sin(re)) * (2.0d0 + (im * im))
else if (im <= 1.2d+77) then
tmp = (0.5d0 * re) * (exp(-im) + exp(im))
else
tmp = 0.041666666666666664d0 * (sin(re) * (im ** 4.0d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 2.5) {
tmp = (0.5 * Math.sin(re)) * (2.0 + (im * im));
} else if (im <= 1.2e+77) {
tmp = (0.5 * re) * (Math.exp(-im) + Math.exp(im));
} else {
tmp = 0.041666666666666664 * (Math.sin(re) * Math.pow(im, 4.0));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 2.5: tmp = (0.5 * math.sin(re)) * (2.0 + (im * im)) elif im <= 1.2e+77: tmp = (0.5 * re) * (math.exp(-im) + math.exp(im)) else: tmp = 0.041666666666666664 * (math.sin(re) * math.pow(im, 4.0)) return tmp
function code(re, im) tmp = 0.0 if (im <= 2.5) tmp = Float64(Float64(0.5 * sin(re)) * Float64(2.0 + Float64(im * im))); elseif (im <= 1.2e+77) tmp = Float64(Float64(0.5 * re) * Float64(exp(Float64(-im)) + exp(im))); else tmp = Float64(0.041666666666666664 * Float64(sin(re) * (im ^ 4.0))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 2.5) tmp = (0.5 * sin(re)) * (2.0 + (im * im)); elseif (im <= 1.2e+77) tmp = (0.5 * re) * (exp(-im) + exp(im)); else tmp = 0.041666666666666664 * (sin(re) * (im ^ 4.0)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 2.5], N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 1.2e+77], N[(N[(0.5 * re), $MachinePrecision] * N[(N[Exp[(-im)], $MachinePrecision] + N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.041666666666666664 * N[(N[Sin[re], $MachinePrecision] * N[Power[im, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 2.5:\\
\;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(2 + im \cdot im\right)\\
\mathbf{elif}\;im \leq 1.2 \cdot 10^{+77}:\\
\;\;\;\;\left(0.5 \cdot re\right) \cdot \left(e^{-im} + e^{im}\right)\\
\mathbf{else}:\\
\;\;\;\;0.041666666666666664 \cdot \left(\sin re \cdot {im}^{4}\right)\\
\end{array}
\end{array}
if im < 2.5Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 82.3%
Simplified82.3%
if 2.5 < im < 1.1999999999999999e77Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 76.9%
Simplified76.9%
if 1.1999999999999999e77 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 100.0%
Simplified100.0%
Taylor expanded in im around inf 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification84.8%
(FPCore (re im)
:precision binary64
(if (<= im 2.5)
(+ (sin re) (* (* 0.5 (sin re)) (* im im)))
(if (<= im 1.2e+77)
(* (* 0.5 re) (+ (exp (- im)) (exp im)))
(* 0.041666666666666664 (* (sin re) (pow im 4.0))))))
double code(double re, double im) {
double tmp;
if (im <= 2.5) {
tmp = sin(re) + ((0.5 * sin(re)) * (im * im));
} else if (im <= 1.2e+77) {
tmp = (0.5 * re) * (exp(-im) + exp(im));
} else {
tmp = 0.041666666666666664 * (sin(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 <= 2.5d0) then
tmp = sin(re) + ((0.5d0 * sin(re)) * (im * im))
else if (im <= 1.2d+77) then
tmp = (0.5d0 * re) * (exp(-im) + exp(im))
else
tmp = 0.041666666666666664d0 * (sin(re) * (im ** 4.0d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 2.5) {
tmp = Math.sin(re) + ((0.5 * Math.sin(re)) * (im * im));
} else if (im <= 1.2e+77) {
tmp = (0.5 * re) * (Math.exp(-im) + Math.exp(im));
} else {
tmp = 0.041666666666666664 * (Math.sin(re) * Math.pow(im, 4.0));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 2.5: tmp = math.sin(re) + ((0.5 * math.sin(re)) * (im * im)) elif im <= 1.2e+77: tmp = (0.5 * re) * (math.exp(-im) + math.exp(im)) else: tmp = 0.041666666666666664 * (math.sin(re) * math.pow(im, 4.0)) return tmp
function code(re, im) tmp = 0.0 if (im <= 2.5) tmp = Float64(sin(re) + Float64(Float64(0.5 * sin(re)) * Float64(im * im))); elseif (im <= 1.2e+77) tmp = Float64(Float64(0.5 * re) * Float64(exp(Float64(-im)) + exp(im))); else tmp = Float64(0.041666666666666664 * Float64(sin(re) * (im ^ 4.0))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 2.5) tmp = sin(re) + ((0.5 * sin(re)) * (im * im)); elseif (im <= 1.2e+77) tmp = (0.5 * re) * (exp(-im) + exp(im)); else tmp = 0.041666666666666664 * (sin(re) * (im ^ 4.0)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 2.5], N[(N[Sin[re], $MachinePrecision] + N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 1.2e+77], N[(N[(0.5 * re), $MachinePrecision] * N[(N[Exp[(-im)], $MachinePrecision] + N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.041666666666666664 * N[(N[Sin[re], $MachinePrecision] * N[Power[im, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 2.5:\\
\;\;\;\;\sin re + \left(0.5 \cdot \sin re\right) \cdot \left(im \cdot im\right)\\
\mathbf{elif}\;im \leq 1.2 \cdot 10^{+77}:\\
\;\;\;\;\left(0.5 \cdot re\right) \cdot \left(e^{-im} + e^{im}\right)\\
\mathbf{else}:\\
\;\;\;\;0.041666666666666664 \cdot \left(\sin re \cdot {im}^{4}\right)\\
\end{array}
\end{array}
if im < 2.5Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 82.3%
Simplified82.3%
if 2.5 < im < 1.1999999999999999e77Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 76.9%
Simplified76.9%
if 1.1999999999999999e77 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 100.0%
Simplified100.0%
Taylor expanded in im around inf 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification84.8%
(FPCore (re im)
:precision binary64
(if (<= im 95000.0)
(* (* 0.5 (sin re)) (+ 2.0 (* im im)))
(if (<= im 2.15e+59)
(pow (* (sin re) 1.9380669946781485e-10) -512.0)
(* 0.041666666666666664 (* (sin re) (pow im 4.0))))))
double code(double re, double im) {
double tmp;
if (im <= 95000.0) {
tmp = (0.5 * sin(re)) * (2.0 + (im * im));
} else if (im <= 2.15e+59) {
tmp = pow((sin(re) * 1.9380669946781485e-10), -512.0);
} else {
tmp = 0.041666666666666664 * (sin(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 <= 95000.0d0) then
tmp = (0.5d0 * sin(re)) * (2.0d0 + (im * im))
else if (im <= 2.15d+59) then
tmp = (sin(re) * 1.9380669946781485d-10) ** (-512.0d0)
else
tmp = 0.041666666666666664d0 * (sin(re) * (im ** 4.0d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 95000.0) {
tmp = (0.5 * Math.sin(re)) * (2.0 + (im * im));
} else if (im <= 2.15e+59) {
tmp = Math.pow((Math.sin(re) * 1.9380669946781485e-10), -512.0);
} else {
tmp = 0.041666666666666664 * (Math.sin(re) * Math.pow(im, 4.0));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 95000.0: tmp = (0.5 * math.sin(re)) * (2.0 + (im * im)) elif im <= 2.15e+59: tmp = math.pow((math.sin(re) * 1.9380669946781485e-10), -512.0) else: tmp = 0.041666666666666664 * (math.sin(re) * math.pow(im, 4.0)) return tmp
function code(re, im) tmp = 0.0 if (im <= 95000.0) tmp = Float64(Float64(0.5 * sin(re)) * Float64(2.0 + Float64(im * im))); elseif (im <= 2.15e+59) tmp = Float64(sin(re) * 1.9380669946781485e-10) ^ -512.0; else tmp = Float64(0.041666666666666664 * Float64(sin(re) * (im ^ 4.0))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 95000.0) tmp = (0.5 * sin(re)) * (2.0 + (im * im)); elseif (im <= 2.15e+59) tmp = (sin(re) * 1.9380669946781485e-10) ^ -512.0; else tmp = 0.041666666666666664 * (sin(re) * (im ^ 4.0)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 95000.0], N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 2.15e+59], N[Power[N[(N[Sin[re], $MachinePrecision] * 1.9380669946781485e-10), $MachinePrecision], -512.0], $MachinePrecision], N[(0.041666666666666664 * N[(N[Sin[re], $MachinePrecision] * N[Power[im, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 95000:\\
\;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(2 + im \cdot im\right)\\
\mathbf{elif}\;im \leq 2.15 \cdot 10^{+59}:\\
\;\;\;\;{\left(\sin re \cdot 1.9380669946781485 \cdot 10^{-10}\right)}^{-512}\\
\mathbf{else}:\\
\;\;\;\;0.041666666666666664 \cdot \left(\sin re \cdot {im}^{4}\right)\\
\end{array}
\end{array}
if im < 95000Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 81.1%
Simplified81.1%
if 95000 < im < 2.15000000000000012e59Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 3.3%
Simplified3.3%
Applied egg-rr50.0%
if 2.15000000000000012e59 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 95.6%
Simplified95.6%
Taylor expanded in im around inf 95.6%
*-commutative95.6%
Simplified95.6%
Final simplification82.5%
(FPCore (re im) :precision binary64 (if (or (<= im 95000.0) (not (<= im 1.22e+150))) (* (* 0.5 (sin re)) (+ 2.0 (* im im))) (pow (* (sin re) 1.9380669946781485e-10) -512.0)))
double code(double re, double im) {
double tmp;
if ((im <= 95000.0) || !(im <= 1.22e+150)) {
tmp = (0.5 * sin(re)) * (2.0 + (im * im));
} else {
tmp = pow((sin(re) * 1.9380669946781485e-10), -512.0);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if ((im <= 95000.0d0) .or. (.not. (im <= 1.22d+150))) then
tmp = (0.5d0 * sin(re)) * (2.0d0 + (im * im))
else
tmp = (sin(re) * 1.9380669946781485d-10) ** (-512.0d0)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if ((im <= 95000.0) || !(im <= 1.22e+150)) {
tmp = (0.5 * Math.sin(re)) * (2.0 + (im * im));
} else {
tmp = Math.pow((Math.sin(re) * 1.9380669946781485e-10), -512.0);
}
return tmp;
}
def code(re, im): tmp = 0 if (im <= 95000.0) or not (im <= 1.22e+150): tmp = (0.5 * math.sin(re)) * (2.0 + (im * im)) else: tmp = math.pow((math.sin(re) * 1.9380669946781485e-10), -512.0) return tmp
function code(re, im) tmp = 0.0 if ((im <= 95000.0) || !(im <= 1.22e+150)) tmp = Float64(Float64(0.5 * sin(re)) * Float64(2.0 + Float64(im * im))); else tmp = Float64(sin(re) * 1.9380669946781485e-10) ^ -512.0; end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if ((im <= 95000.0) || ~((im <= 1.22e+150))) tmp = (0.5 * sin(re)) * (2.0 + (im * im)); else tmp = (sin(re) * 1.9380669946781485e-10) ^ -512.0; end tmp_2 = tmp; end
code[re_, im_] := If[Or[LessEqual[im, 95000.0], N[Not[LessEqual[im, 1.22e+150]], $MachinePrecision]], N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[Sin[re], $MachinePrecision] * 1.9380669946781485e-10), $MachinePrecision], -512.0], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 95000 \lor \neg \left(im \leq 1.22 \cdot 10^{+150}\right):\\
\;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(2 + im \cdot im\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\sin re \cdot 1.9380669946781485 \cdot 10^{-10}\right)}^{-512}\\
\end{array}
\end{array}
if im < 95000 or 1.22e150 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 82.1%
Simplified82.1%
if 95000 < im < 1.22e150Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 58.3%
Simplified58.3%
Applied egg-rr60.9%
Final simplification80.2%
(FPCore (re im) :precision binary64 (if (or (<= im 95000.0) (not (<= im 2.05e+136))) (* (* 0.5 (sin re)) (+ 2.0 (* im im))) (pow (sin re) -512.0)))
double code(double re, double im) {
double tmp;
if ((im <= 95000.0) || !(im <= 2.05e+136)) {
tmp = (0.5 * sin(re)) * (2.0 + (im * im));
} else {
tmp = pow(sin(re), -512.0);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if ((im <= 95000.0d0) .or. (.not. (im <= 2.05d+136))) then
tmp = (0.5d0 * sin(re)) * (2.0d0 + (im * im))
else
tmp = sin(re) ** (-512.0d0)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if ((im <= 95000.0) || !(im <= 2.05e+136)) {
tmp = (0.5 * Math.sin(re)) * (2.0 + (im * im));
} else {
tmp = Math.pow(Math.sin(re), -512.0);
}
return tmp;
}
def code(re, im): tmp = 0 if (im <= 95000.0) or not (im <= 2.05e+136): tmp = (0.5 * math.sin(re)) * (2.0 + (im * im)) else: tmp = math.pow(math.sin(re), -512.0) return tmp
function code(re, im) tmp = 0.0 if ((im <= 95000.0) || !(im <= 2.05e+136)) tmp = Float64(Float64(0.5 * sin(re)) * Float64(2.0 + Float64(im * im))); else tmp = sin(re) ^ -512.0; end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if ((im <= 95000.0) || ~((im <= 2.05e+136))) tmp = (0.5 * sin(re)) * (2.0 + (im * im)); else tmp = sin(re) ^ -512.0; end tmp_2 = tmp; end
code[re_, im_] := If[Or[LessEqual[im, 95000.0], N[Not[LessEqual[im, 2.05e+136]], $MachinePrecision]], N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[Sin[re], $MachinePrecision], -512.0], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 95000 \lor \neg \left(im \leq 2.05 \cdot 10^{+136}\right):\\
\;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(2 + im \cdot im\right)\\
\mathbf{else}:\\
\;\;\;\;{\sin re}^{-512}\\
\end{array}
\end{array}
if im < 95000 or 2.0499999999999999e136 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 81.8%
Simplified81.8%
if 95000 < im < 2.0499999999999999e136Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 4.3%
Simplified4.3%
Applied egg-rr28.9%
Final simplification77.2%
(FPCore (re im)
:precision binary64
(if (<= im 95000.0)
(sin re)
(if (<= im 3.7e+118)
(pow re -512.0)
(if (<= im 3.9e+218)
(* 0.5 (* re (+ 2.0 (* im im))))
(* im (* 0.5 (* (sin re) im)))))))
double code(double re, double im) {
double tmp;
if (im <= 95000.0) {
tmp = sin(re);
} else if (im <= 3.7e+118) {
tmp = pow(re, -512.0);
} else if (im <= 3.9e+218) {
tmp = 0.5 * (re * (2.0 + (im * 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 <= 95000.0d0) then
tmp = sin(re)
else if (im <= 3.7d+118) then
tmp = re ** (-512.0d0)
else if (im <= 3.9d+218) then
tmp = 0.5d0 * (re * (2.0d0 + (im * 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 <= 95000.0) {
tmp = Math.sin(re);
} else if (im <= 3.7e+118) {
tmp = Math.pow(re, -512.0);
} else if (im <= 3.9e+218) {
tmp = 0.5 * (re * (2.0 + (im * im)));
} else {
tmp = im * (0.5 * (Math.sin(re) * im));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 95000.0: tmp = math.sin(re) elif im <= 3.7e+118: tmp = math.pow(re, -512.0) elif im <= 3.9e+218: tmp = 0.5 * (re * (2.0 + (im * im))) else: tmp = im * (0.5 * (math.sin(re) * im)) return tmp
function code(re, im) tmp = 0.0 if (im <= 95000.0) tmp = sin(re); elseif (im <= 3.7e+118) tmp = re ^ -512.0; elseif (im <= 3.9e+218) tmp = Float64(0.5 * Float64(re * Float64(2.0 + Float64(im * im)))); else tmp = Float64(im * Float64(0.5 * Float64(sin(re) * im))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 95000.0) tmp = sin(re); elseif (im <= 3.7e+118) tmp = re ^ -512.0; elseif (im <= 3.9e+218) tmp = 0.5 * (re * (2.0 + (im * im))); else tmp = im * (0.5 * (sin(re) * im)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 95000.0], N[Sin[re], $MachinePrecision], If[LessEqual[im, 3.7e+118], N[Power[re, -512.0], $MachinePrecision], If[LessEqual[im, 3.9e+218], N[(0.5 * N[(re * N[(2.0 + N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(0.5 * N[(N[Sin[re], $MachinePrecision] * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 95000:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 3.7 \cdot 10^{+118}:\\
\;\;\;\;{re}^{-512}\\
\mathbf{elif}\;im \leq 3.9 \cdot 10^{+218}:\\
\;\;\;\;0.5 \cdot \left(re \cdot \left(2 + im \cdot im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(0.5 \cdot \left(\sin re \cdot im\right)\right)\\
\end{array}
\end{array}
if im < 95000Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 69.1%
if 95000 < im < 3.69999999999999987e118Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 73.7%
Simplified73.7%
Applied egg-rr32.2%
if 3.69999999999999987e118 < im < 3.9000000000000002e218Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 68.8%
Simplified68.8%
Taylor expanded in re around 0 67.2%
*-commutative67.2%
unpow267.2%
Simplified67.2%
if 3.9000000000000002e218 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 100.0%
Simplified100.0%
Taylor expanded in im around inf 100.0%
associate-*r*100.0%
unpow2100.0%
associate-*r*90.8%
*-commutative90.8%
associate-*l*90.8%
*-commutative90.8%
Simplified90.8%
Final simplification67.0%
(FPCore (re im)
:precision binary64
(if (or (<= im 95000.0) (not (<= im 1.22e+150)))
(* (* 0.5 (sin re)) (+ 2.0 (* im im)))
(+
0.08333333333333333
(+ (/ 0.25 (* re re)) (* (* re re) 0.016666666666666666)))))
double code(double re, double im) {
double tmp;
if ((im <= 95000.0) || !(im <= 1.22e+150)) {
tmp = (0.5 * sin(re)) * (2.0 + (im * im));
} else {
tmp = 0.08333333333333333 + ((0.25 / (re * re)) + ((re * re) * 0.016666666666666666));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if ((im <= 95000.0d0) .or. (.not. (im <= 1.22d+150))) then
tmp = (0.5d0 * sin(re)) * (2.0d0 + (im * im))
else
tmp = 0.08333333333333333d0 + ((0.25d0 / (re * re)) + ((re * re) * 0.016666666666666666d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if ((im <= 95000.0) || !(im <= 1.22e+150)) {
tmp = (0.5 * Math.sin(re)) * (2.0 + (im * im));
} else {
tmp = 0.08333333333333333 + ((0.25 / (re * re)) + ((re * re) * 0.016666666666666666));
}
return tmp;
}
def code(re, im): tmp = 0 if (im <= 95000.0) or not (im <= 1.22e+150): tmp = (0.5 * math.sin(re)) * (2.0 + (im * im)) else: tmp = 0.08333333333333333 + ((0.25 / (re * re)) + ((re * re) * 0.016666666666666666)) return tmp
function code(re, im) tmp = 0.0 if ((im <= 95000.0) || !(im <= 1.22e+150)) tmp = Float64(Float64(0.5 * sin(re)) * Float64(2.0 + Float64(im * im))); else tmp = Float64(0.08333333333333333 + Float64(Float64(0.25 / Float64(re * re)) + Float64(Float64(re * re) * 0.016666666666666666))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if ((im <= 95000.0) || ~((im <= 1.22e+150))) tmp = (0.5 * sin(re)) * (2.0 + (im * im)); else tmp = 0.08333333333333333 + ((0.25 / (re * re)) + ((re * re) * 0.016666666666666666)); end tmp_2 = tmp; end
code[re_, im_] := If[Or[LessEqual[im, 95000.0], N[Not[LessEqual[im, 1.22e+150]], $MachinePrecision]], N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.08333333333333333 + N[(N[(0.25 / N[(re * re), $MachinePrecision]), $MachinePrecision] + N[(N[(re * re), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 95000 \lor \neg \left(im \leq 1.22 \cdot 10^{+150}\right):\\
\;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(2 + im \cdot im\right)\\
\mathbf{else}:\\
\;\;\;\;0.08333333333333333 + \left(\frac{0.25}{re \cdot re} + \left(re \cdot re\right) \cdot 0.016666666666666666\right)\\
\end{array}
\end{array}
if im < 95000 or 1.22e150 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 82.1%
Simplified82.1%
if 95000 < im < 1.22e150Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Applied egg-rr19.0%
Taylor expanded in re around 0 32.0%
associate-*r/32.0%
metadata-eval32.0%
unpow232.0%
*-commutative32.0%
unpow232.0%
Simplified32.0%
Final simplification77.6%
(FPCore (re im) :precision binary64 (if (<= im 95000.0) (sin re) (if (<= im 6.2e+118) (pow re -512.0) (* 0.5 (* re (+ 2.0 (* im im)))))))
double code(double re, double im) {
double tmp;
if (im <= 95000.0) {
tmp = sin(re);
} else if (im <= 6.2e+118) {
tmp = pow(re, -512.0);
} else {
tmp = 0.5 * (re * (2.0 + (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 <= 95000.0d0) then
tmp = sin(re)
else if (im <= 6.2d+118) then
tmp = re ** (-512.0d0)
else
tmp = 0.5d0 * (re * (2.0d0 + (im * im)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 95000.0) {
tmp = Math.sin(re);
} else if (im <= 6.2e+118) {
tmp = Math.pow(re, -512.0);
} else {
tmp = 0.5 * (re * (2.0 + (im * im)));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 95000.0: tmp = math.sin(re) elif im <= 6.2e+118: tmp = math.pow(re, -512.0) else: tmp = 0.5 * (re * (2.0 + (im * im))) return tmp
function code(re, im) tmp = 0.0 if (im <= 95000.0) tmp = sin(re); elseif (im <= 6.2e+118) tmp = re ^ -512.0; else tmp = Float64(0.5 * Float64(re * Float64(2.0 + Float64(im * im)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 95000.0) tmp = sin(re); elseif (im <= 6.2e+118) tmp = re ^ -512.0; else tmp = 0.5 * (re * (2.0 + (im * im))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 95000.0], N[Sin[re], $MachinePrecision], If[LessEqual[im, 6.2e+118], N[Power[re, -512.0], $MachinePrecision], N[(0.5 * N[(re * N[(2.0 + N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 95000:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 6.2 \cdot 10^{+118}:\\
\;\;\;\;{re}^{-512}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(re \cdot \left(2 + im \cdot im\right)\right)\\
\end{array}
\end{array}
if im < 95000Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 69.1%
if 95000 < im < 6.19999999999999973e118Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 73.7%
Simplified73.7%
Applied egg-rr32.2%
if 6.19999999999999973e118 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 78.9%
Simplified78.9%
Taylor expanded in re around 0 61.7%
*-commutative61.7%
unpow261.7%
Simplified61.7%
Final simplification65.4%
(FPCore (re im)
:precision binary64
(if (<= im 1300000.0)
(sin re)
(if (<= im 4.5e+120)
(+
0.08333333333333333
(+ (/ 0.25 (* re re)) (* (* re re) 0.016666666666666666)))
(* 0.5 (* re (+ 2.0 (* im im)))))))
double code(double re, double im) {
double tmp;
if (im <= 1300000.0) {
tmp = sin(re);
} else if (im <= 4.5e+120) {
tmp = 0.08333333333333333 + ((0.25 / (re * re)) + ((re * re) * 0.016666666666666666));
} else {
tmp = 0.5 * (re * (2.0 + (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 <= 1300000.0d0) then
tmp = sin(re)
else if (im <= 4.5d+120) then
tmp = 0.08333333333333333d0 + ((0.25d0 / (re * re)) + ((re * re) * 0.016666666666666666d0))
else
tmp = 0.5d0 * (re * (2.0d0 + (im * im)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 1300000.0) {
tmp = Math.sin(re);
} else if (im <= 4.5e+120) {
tmp = 0.08333333333333333 + ((0.25 / (re * re)) + ((re * re) * 0.016666666666666666));
} else {
tmp = 0.5 * (re * (2.0 + (im * im)));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 1300000.0: tmp = math.sin(re) elif im <= 4.5e+120: tmp = 0.08333333333333333 + ((0.25 / (re * re)) + ((re * re) * 0.016666666666666666)) else: tmp = 0.5 * (re * (2.0 + (im * im))) return tmp
function code(re, im) tmp = 0.0 if (im <= 1300000.0) tmp = sin(re); elseif (im <= 4.5e+120) tmp = Float64(0.08333333333333333 + Float64(Float64(0.25 / Float64(re * re)) + Float64(Float64(re * re) * 0.016666666666666666))); else tmp = Float64(0.5 * Float64(re * Float64(2.0 + Float64(im * im)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 1300000.0) tmp = sin(re); elseif (im <= 4.5e+120) tmp = 0.08333333333333333 + ((0.25 / (re * re)) + ((re * re) * 0.016666666666666666)); else tmp = 0.5 * (re * (2.0 + (im * im))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 1300000.0], N[Sin[re], $MachinePrecision], If[LessEqual[im, 4.5e+120], N[(0.08333333333333333 + N[(N[(0.25 / N[(re * re), $MachinePrecision]), $MachinePrecision] + N[(N[(re * re), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(re * N[(2.0 + N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 1300000:\\
\;\;\;\;\sin re\\
\mathbf{elif}\;im \leq 4.5 \cdot 10^{+120}:\\
\;\;\;\;0.08333333333333333 + \left(\frac{0.25}{re \cdot re} + \left(re \cdot re\right) \cdot 0.016666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(re \cdot \left(2 + im \cdot im\right)\right)\\
\end{array}
\end{array}
if im < 1.3e6Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 69.1%
if 1.3e6 < im < 4.49999999999999977e120Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Applied egg-rr22.7%
Taylor expanded in re around 0 33.2%
associate-*r/33.2%
metadata-eval33.2%
unpow233.2%
*-commutative33.2%
unpow233.2%
Simplified33.2%
if 4.49999999999999977e120 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 78.9%
Simplified78.9%
Taylor expanded in re around 0 61.7%
*-commutative61.7%
unpow261.7%
Simplified61.7%
Final simplification65.5%
(FPCore (re im)
:precision binary64
(if (<= im 95000.0)
(+ re (* 0.5 (* re (* im im))))
(if (<= im 7.8e+121)
(+
0.08333333333333333
(+ (/ 0.25 (* re re)) (* (* re re) 0.016666666666666666)))
(* 0.5 (* re (+ 2.0 (* im im)))))))
double code(double re, double im) {
double tmp;
if (im <= 95000.0) {
tmp = re + (0.5 * (re * (im * im)));
} else if (im <= 7.8e+121) {
tmp = 0.08333333333333333 + ((0.25 / (re * re)) + ((re * re) * 0.016666666666666666));
} else {
tmp = 0.5 * (re * (2.0 + (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 <= 95000.0d0) then
tmp = re + (0.5d0 * (re * (im * im)))
else if (im <= 7.8d+121) then
tmp = 0.08333333333333333d0 + ((0.25d0 / (re * re)) + ((re * re) * 0.016666666666666666d0))
else
tmp = 0.5d0 * (re * (2.0d0 + (im * im)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 95000.0) {
tmp = re + (0.5 * (re * (im * im)));
} else if (im <= 7.8e+121) {
tmp = 0.08333333333333333 + ((0.25 / (re * re)) + ((re * re) * 0.016666666666666666));
} else {
tmp = 0.5 * (re * (2.0 + (im * im)));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 95000.0: tmp = re + (0.5 * (re * (im * im))) elif im <= 7.8e+121: tmp = 0.08333333333333333 + ((0.25 / (re * re)) + ((re * re) * 0.016666666666666666)) else: tmp = 0.5 * (re * (2.0 + (im * im))) return tmp
function code(re, im) tmp = 0.0 if (im <= 95000.0) tmp = Float64(re + Float64(0.5 * Float64(re * Float64(im * im)))); elseif (im <= 7.8e+121) tmp = Float64(0.08333333333333333 + Float64(Float64(0.25 / Float64(re * re)) + Float64(Float64(re * re) * 0.016666666666666666))); else tmp = Float64(0.5 * Float64(re * Float64(2.0 + Float64(im * im)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 95000.0) tmp = re + (0.5 * (re * (im * im))); elseif (im <= 7.8e+121) tmp = 0.08333333333333333 + ((0.25 / (re * re)) + ((re * re) * 0.016666666666666666)); else tmp = 0.5 * (re * (2.0 + (im * im))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 95000.0], N[(re + N[(0.5 * N[(re * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 7.8e+121], N[(0.08333333333333333 + N[(N[(0.25 / N[(re * re), $MachinePrecision]), $MachinePrecision] + N[(N[(re * re), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(re * N[(2.0 + N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 95000:\\
\;\;\;\;re + 0.5 \cdot \left(re \cdot \left(im \cdot im\right)\right)\\
\mathbf{elif}\;im \leq 7.8 \cdot 10^{+121}:\\
\;\;\;\;0.08333333333333333 + \left(\frac{0.25}{re \cdot re} + \left(re \cdot re\right) \cdot 0.016666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(re \cdot \left(2 + im \cdot im\right)\right)\\
\end{array}
\end{array}
if im < 95000Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 81.1%
Simplified81.1%
Taylor expanded in re around 0 51.5%
associate-*r*51.5%
*-commutative51.5%
+-commutative51.5%
distribute-rgt-in51.5%
metadata-eval51.5%
distribute-lft-in51.5%
*-rgt-identity51.5%
fma-def51.5%
unpow251.5%
associate-*l*51.5%
Simplified51.5%
fma-udef51.5%
associate-*r*51.5%
associate-*r*51.5%
Applied egg-rr51.5%
if 95000 < im < 7.79999999999999967e121Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Applied egg-rr22.7%
Taylor expanded in re around 0 33.2%
associate-*r/33.2%
metadata-eval33.2%
unpow233.2%
*-commutative33.2%
unpow233.2%
Simplified33.2%
if 7.79999999999999967e121 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 78.9%
Simplified78.9%
Taylor expanded in re around 0 61.7%
*-commutative61.7%
unpow261.7%
Simplified61.7%
Final simplification51.4%
(FPCore (re im) :precision binary64 (if (or (<= im 0.032) (not (<= im 1.9e+100))) (* 0.5 (* re (+ 2.0 (* im im)))) (+ 0.08333333333333333 (/ (/ 0.25 re) re))))
double code(double re, double im) {
double tmp;
if ((im <= 0.032) || !(im <= 1.9e+100)) {
tmp = 0.5 * (re * (2.0 + (im * im)));
} else {
tmp = 0.08333333333333333 + ((0.25 / 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 <= 0.032d0) .or. (.not. (im <= 1.9d+100))) then
tmp = 0.5d0 * (re * (2.0d0 + (im * im)))
else
tmp = 0.08333333333333333d0 + ((0.25d0 / re) / re)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if ((im <= 0.032) || !(im <= 1.9e+100)) {
tmp = 0.5 * (re * (2.0 + (im * im)));
} else {
tmp = 0.08333333333333333 + ((0.25 / re) / re);
}
return tmp;
}
def code(re, im): tmp = 0 if (im <= 0.032) or not (im <= 1.9e+100): tmp = 0.5 * (re * (2.0 + (im * im))) else: tmp = 0.08333333333333333 + ((0.25 / re) / re) return tmp
function code(re, im) tmp = 0.0 if ((im <= 0.032) || !(im <= 1.9e+100)) tmp = Float64(0.5 * Float64(re * Float64(2.0 + Float64(im * im)))); else tmp = Float64(0.08333333333333333 + Float64(Float64(0.25 / re) / re)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if ((im <= 0.032) || ~((im <= 1.9e+100))) tmp = 0.5 * (re * (2.0 + (im * im))); else tmp = 0.08333333333333333 + ((0.25 / re) / re); end tmp_2 = tmp; end
code[re_, im_] := If[Or[LessEqual[im, 0.032], N[Not[LessEqual[im, 1.9e+100]], $MachinePrecision]], N[(0.5 * N[(re * N[(2.0 + N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.08333333333333333 + N[(N[(0.25 / re), $MachinePrecision] / re), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 0.032 \lor \neg \left(im \leq 1.9 \cdot 10^{+100}\right):\\
\;\;\;\;0.5 \cdot \left(re \cdot \left(2 + im \cdot im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.08333333333333333 + \frac{\frac{0.25}{re}}{re}\\
\end{array}
\end{array}
if im < 0.032000000000000001 or 1.89999999999999982e100 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 80.9%
Simplified80.9%
Taylor expanded in re around 0 53.4%
*-commutative53.4%
unpow253.4%
Simplified53.4%
if 0.032000000000000001 < im < 1.89999999999999982e100Initial program 99.9%
sub0-neg99.9%
Simplified99.9%
Applied egg-rr23.2%
Taylor expanded in re around 0 22.5%
associate-*r/22.5%
metadata-eval22.5%
unpow222.5%
associate-/r*22.5%
Simplified22.5%
Final simplification51.0%
(FPCore (re im)
:precision binary64
(if (<= im 0.032)
(+ re (* 0.5 (* re (* im im))))
(if (<= im 1.4e+103)
(+ 0.08333333333333333 (/ (/ 0.25 re) re))
(* 0.5 (* re (+ 2.0 (* im im)))))))
double code(double re, double im) {
double tmp;
if (im <= 0.032) {
tmp = re + (0.5 * (re * (im * im)));
} else if (im <= 1.4e+103) {
tmp = 0.08333333333333333 + ((0.25 / re) / re);
} else {
tmp = 0.5 * (re * (2.0 + (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.032d0) then
tmp = re + (0.5d0 * (re * (im * im)))
else if (im <= 1.4d+103) then
tmp = 0.08333333333333333d0 + ((0.25d0 / re) / re)
else
tmp = 0.5d0 * (re * (2.0d0 + (im * im)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 0.032) {
tmp = re + (0.5 * (re * (im * im)));
} else if (im <= 1.4e+103) {
tmp = 0.08333333333333333 + ((0.25 / re) / re);
} else {
tmp = 0.5 * (re * (2.0 + (im * im)));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 0.032: tmp = re + (0.5 * (re * (im * im))) elif im <= 1.4e+103: tmp = 0.08333333333333333 + ((0.25 / re) / re) else: tmp = 0.5 * (re * (2.0 + (im * im))) return tmp
function code(re, im) tmp = 0.0 if (im <= 0.032) tmp = Float64(re + Float64(0.5 * Float64(re * Float64(im * im)))); elseif (im <= 1.4e+103) tmp = Float64(0.08333333333333333 + Float64(Float64(0.25 / re) / re)); else tmp = Float64(0.5 * Float64(re * Float64(2.0 + Float64(im * im)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 0.032) tmp = re + (0.5 * (re * (im * im))); elseif (im <= 1.4e+103) tmp = 0.08333333333333333 + ((0.25 / re) / re); else tmp = 0.5 * (re * (2.0 + (im * im))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 0.032], N[(re + N[(0.5 * N[(re * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 1.4e+103], N[(0.08333333333333333 + N[(N[(0.25 / re), $MachinePrecision] / re), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(re * N[(2.0 + N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 0.032:\\
\;\;\;\;re + 0.5 \cdot \left(re \cdot \left(im \cdot im\right)\right)\\
\mathbf{elif}\;im \leq 1.4 \cdot 10^{+103}:\\
\;\;\;\;0.08333333333333333 + \frac{\frac{0.25}{re}}{re}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(re \cdot \left(2 + im \cdot im\right)\right)\\
\end{array}
\end{array}
if im < 0.032000000000000001Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 82.7%
Simplified82.7%
Taylor expanded in re around 0 52.7%
associate-*r*52.7%
*-commutative52.7%
+-commutative52.7%
distribute-rgt-in52.7%
metadata-eval52.7%
distribute-lft-in52.7%
*-rgt-identity52.7%
fma-def52.7%
unpow252.7%
associate-*l*52.7%
Simplified52.7%
fma-udef52.7%
associate-*r*52.7%
associate-*r*52.7%
Applied egg-rr52.7%
if 0.032000000000000001 < im < 1.40000000000000004e103Initial program 99.9%
sub0-neg99.9%
Simplified99.9%
Applied egg-rr23.2%
Taylor expanded in re around 0 22.5%
associate-*r/22.5%
metadata-eval22.5%
unpow222.5%
associate-/r*22.5%
Simplified22.5%
if 1.40000000000000004e103 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 70.5%
Simplified70.5%
Taylor expanded in re around 0 57.6%
*-commutative57.6%
unpow257.6%
Simplified57.6%
Final simplification51.0%
(FPCore (re im) :precision binary64 (if (<= im 60000.0) re (if (<= im 1.06e+102) (/ 0.25 (* re re)) (* 0.5 (* im (* re im))))))
double code(double re, double im) {
double tmp;
if (im <= 60000.0) {
tmp = re;
} else if (im <= 1.06e+102) {
tmp = 0.25 / (re * re);
} else {
tmp = 0.5 * (im * (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 <= 60000.0d0) then
tmp = re
else if (im <= 1.06d+102) then
tmp = 0.25d0 / (re * re)
else
tmp = 0.5d0 * (im * (re * im))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 60000.0) {
tmp = re;
} else if (im <= 1.06e+102) {
tmp = 0.25 / (re * re);
} else {
tmp = 0.5 * (im * (re * im));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 60000.0: tmp = re elif im <= 1.06e+102: tmp = 0.25 / (re * re) else: tmp = 0.5 * (im * (re * im)) return tmp
function code(re, im) tmp = 0.0 if (im <= 60000.0) tmp = re; elseif (im <= 1.06e+102) tmp = Float64(0.25 / Float64(re * re)); else tmp = Float64(0.5 * Float64(im * Float64(re * im))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 60000.0) tmp = re; elseif (im <= 1.06e+102) tmp = 0.25 / (re * re); else tmp = 0.5 * (im * (re * im)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 60000.0], re, If[LessEqual[im, 1.06e+102], N[(0.25 / N[(re * re), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(im * N[(re * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 60000:\\
\;\;\;\;re\\
\mathbf{elif}\;im \leq 1.06 \cdot 10^{+102}:\\
\;\;\;\;\frac{0.25}{re \cdot re}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(im \cdot \left(re \cdot im\right)\right)\\
\end{array}
\end{array}
if im < 6e4Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 65.8%
Simplified65.8%
Taylor expanded in im around 0 41.3%
if 6e4 < im < 1.06000000000000001e102Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Applied egg-rr26.1%
Taylor expanded in re around 0 26.0%
unpow226.0%
Simplified26.0%
if 1.06000000000000001e102 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 70.5%
Simplified70.5%
Taylor expanded in re around 0 57.6%
associate-*r*57.6%
*-commutative57.6%
+-commutative57.6%
distribute-rgt-in57.6%
metadata-eval57.6%
distribute-lft-in57.6%
*-rgt-identity57.6%
fma-def57.6%
unpow257.6%
associate-*l*57.6%
Simplified57.6%
Taylor expanded in im around inf 57.6%
*-commutative57.6%
unpow257.6%
associate-*l*39.1%
Simplified39.1%
Final simplification40.0%
(FPCore (re im) :precision binary64 (if (<= im 60000.0) re (if (<= im 1.25e+104) (/ 0.25 (* re re)) (* (* im im) (* 0.5 re)))))
double code(double re, double im) {
double tmp;
if (im <= 60000.0) {
tmp = re;
} else if (im <= 1.25e+104) {
tmp = 0.25 / (re * re);
} else {
tmp = (im * im) * (0.5 * re);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 60000.0d0) then
tmp = re
else if (im <= 1.25d+104) then
tmp = 0.25d0 / (re * re)
else
tmp = (im * im) * (0.5d0 * re)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 60000.0) {
tmp = re;
} else if (im <= 1.25e+104) {
tmp = 0.25 / (re * re);
} else {
tmp = (im * im) * (0.5 * re);
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 60000.0: tmp = re elif im <= 1.25e+104: tmp = 0.25 / (re * re) else: tmp = (im * im) * (0.5 * re) return tmp
function code(re, im) tmp = 0.0 if (im <= 60000.0) tmp = re; elseif (im <= 1.25e+104) tmp = Float64(0.25 / Float64(re * re)); else tmp = Float64(Float64(im * im) * Float64(0.5 * re)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 60000.0) tmp = re; elseif (im <= 1.25e+104) tmp = 0.25 / (re * re); else tmp = (im * im) * (0.5 * re); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 60000.0], re, If[LessEqual[im, 1.25e+104], N[(0.25 / N[(re * re), $MachinePrecision]), $MachinePrecision], N[(N[(im * im), $MachinePrecision] * N[(0.5 * re), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 60000:\\
\;\;\;\;re\\
\mathbf{elif}\;im \leq 1.25 \cdot 10^{+104}:\\
\;\;\;\;\frac{0.25}{re \cdot re}\\
\mathbf{else}:\\
\;\;\;\;\left(im \cdot im\right) \cdot \left(0.5 \cdot re\right)\\
\end{array}
\end{array}
if im < 6e4Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 65.8%
Simplified65.8%
Taylor expanded in im around 0 41.3%
if 6e4 < im < 1.2499999999999999e104Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Applied egg-rr26.1%
Taylor expanded in re around 0 26.0%
unpow226.0%
Simplified26.0%
if 1.2499999999999999e104 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 70.5%
Simplified70.5%
Taylor expanded in re around 0 57.6%
associate-*r*57.6%
*-commutative57.6%
+-commutative57.6%
distribute-rgt-in57.6%
metadata-eval57.6%
distribute-lft-in57.6%
*-rgt-identity57.6%
fma-def57.6%
unpow257.6%
associate-*l*57.6%
Simplified57.6%
Taylor expanded in im around inf 57.6%
associate-*r*57.6%
*-commutative57.6%
unpow257.6%
Simplified57.6%
Final simplification42.5%
(FPCore (re im)
:precision binary64
(if (<= im 0.032)
re
(if (<= im 1.95e+100)
(+ 0.08333333333333333 (/ (/ 0.25 re) re))
(* (* im im) (* 0.5 re)))))
double code(double re, double im) {
double tmp;
if (im <= 0.032) {
tmp = re;
} else if (im <= 1.95e+100) {
tmp = 0.08333333333333333 + ((0.25 / re) / re);
} else {
tmp = (im * im) * (0.5 * re);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 0.032d0) then
tmp = re
else if (im <= 1.95d+100) then
tmp = 0.08333333333333333d0 + ((0.25d0 / re) / re)
else
tmp = (im * im) * (0.5d0 * re)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 0.032) {
tmp = re;
} else if (im <= 1.95e+100) {
tmp = 0.08333333333333333 + ((0.25 / re) / re);
} else {
tmp = (im * im) * (0.5 * re);
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 0.032: tmp = re elif im <= 1.95e+100: tmp = 0.08333333333333333 + ((0.25 / re) / re) else: tmp = (im * im) * (0.5 * re) return tmp
function code(re, im) tmp = 0.0 if (im <= 0.032) tmp = re; elseif (im <= 1.95e+100) tmp = Float64(0.08333333333333333 + Float64(Float64(0.25 / re) / re)); else tmp = Float64(Float64(im * im) * Float64(0.5 * re)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 0.032) tmp = re; elseif (im <= 1.95e+100) tmp = 0.08333333333333333 + ((0.25 / re) / re); else tmp = (im * im) * (0.5 * re); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 0.032], re, If[LessEqual[im, 1.95e+100], N[(0.08333333333333333 + N[(N[(0.25 / re), $MachinePrecision] / re), $MachinePrecision]), $MachinePrecision], N[(N[(im * im), $MachinePrecision] * N[(0.5 * re), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 0.032:\\
\;\;\;\;re\\
\mathbf{elif}\;im \leq 1.95 \cdot 10^{+100}:\\
\;\;\;\;0.08333333333333333 + \frac{\frac{0.25}{re}}{re}\\
\mathbf{else}:\\
\;\;\;\;\left(im \cdot im\right) \cdot \left(0.5 \cdot re\right)\\
\end{array}
\end{array}
if im < 0.032000000000000001Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 66.1%
Simplified66.1%
Taylor expanded in im around 0 42.0%
if 0.032000000000000001 < im < 1.95e100Initial program 99.9%
sub0-neg99.9%
Simplified99.9%
Applied egg-rr23.2%
Taylor expanded in re around 0 22.5%
associate-*r/22.5%
metadata-eval22.5%
unpow222.5%
associate-/r*22.5%
Simplified22.5%
if 1.95e100 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 70.5%
Simplified70.5%
Taylor expanded in re around 0 57.6%
associate-*r*57.6%
*-commutative57.6%
+-commutative57.6%
distribute-rgt-in57.6%
metadata-eval57.6%
distribute-lft-in57.6%
*-rgt-identity57.6%
fma-def57.6%
unpow257.6%
associate-*l*57.6%
Simplified57.6%
Taylor expanded in im around inf 57.6%
associate-*r*57.6%
*-commutative57.6%
unpow257.6%
Simplified57.6%
Final simplification42.6%
(FPCore (re im) :precision binary64 (if (<= im 75000.0) re (/ 0.25 (* re re))))
double code(double re, double im) {
double tmp;
if (im <= 75000.0) {
tmp = re;
} else {
tmp = 0.25 / (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 <= 75000.0d0) then
tmp = re
else
tmp = 0.25d0 / (re * re)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 75000.0) {
tmp = re;
} else {
tmp = 0.25 / (re * re);
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 75000.0: tmp = re else: tmp = 0.25 / (re * re) return tmp
function code(re, im) tmp = 0.0 if (im <= 75000.0) tmp = re; else tmp = Float64(0.25 / Float64(re * re)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 75000.0) tmp = re; else tmp = 0.25 / (re * re); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 75000.0], re, N[(0.25 / N[(re * re), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 75000:\\
\;\;\;\;re\\
\mathbf{else}:\\
\;\;\;\;\frac{0.25}{re \cdot re}\\
\end{array}
\end{array}
if im < 75000Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 65.8%
Simplified65.8%
Taylor expanded in im around 0 41.3%
if 75000 < im Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Applied egg-rr11.6%
Taylor expanded in re around 0 11.5%
unpow211.5%
Simplified11.5%
Final simplification35.3%
(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 85.4%
Simplified85.4%
Applied egg-rr3.5%
+-inverses3.5%
+-rgt-identity3.5%
associate-*l/3.5%
*-inverses3.5%
metadata-eval3.5%
Simplified3.5%
Final simplification3.5%
(FPCore (re im) :precision binary64 0.08333333333333333)
double code(double re, double im) {
return 0.08333333333333333;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = 0.08333333333333333d0
end function
public static double code(double re, double im) {
return 0.08333333333333333;
}
def code(re, im): return 0.08333333333333333
function code(re, im) return 0.08333333333333333 end
function tmp = code(re, im) tmp = 0.08333333333333333; end
code[re_, im_] := 0.08333333333333333
\begin{array}{l}
\\
0.08333333333333333
\end{array}
Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Applied egg-rr9.2%
Taylor expanded in re around 0 8.9%
associate-*r/8.9%
metadata-eval8.9%
unpow28.9%
associate-/r*8.9%
Simplified8.9%
Taylor expanded in re around inf 4.0%
Final simplification4.0%
(FPCore (re im) :precision binary64 1.0)
double code(double re, double im) {
return 1.0;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = 1.0d0
end function
public static double code(double re, double im) {
return 1.0;
}
def code(re, im): return 1.0
function code(re, im) return 1.0 end
function tmp = code(re, im) tmp = 1.0; end
code[re_, im_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 100.0%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in im around 0 85.4%
Simplified85.4%
Applied egg-rr4.5%
*-inverses4.5%
Simplified4.5%
Final simplification4.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%
sub0-neg100.0%
Simplified100.0%
Taylor expanded in re around 0 66.8%
Simplified66.8%
Taylor expanded in im around 0 33.5%
Final simplification33.5%
herbie shell --seed 2023199
(FPCore (re im)
:name "math.sin on complex, real part"
:precision binary64
(* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))