
(FPCore (re im) :precision binary64 (* (exp re) (sin im)))
double code(double re, double im) {
return exp(re) * sin(im);
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = exp(re) * sin(im)
end function
public static double code(double re, double im) {
return Math.exp(re) * Math.sin(im);
}
def code(re, im): return math.exp(re) * math.sin(im)
function code(re, im) return Float64(exp(re) * sin(im)) end
function tmp = code(re, im) tmp = exp(re) * sin(im); end
code[re_, im_] := N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
e^{re} \cdot \sin im
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 26 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (re im) :precision binary64 (* (exp re) (sin im)))
double code(double re, double im) {
return exp(re) * sin(im);
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = exp(re) * sin(im)
end function
public static double code(double re, double im) {
return Math.exp(re) * Math.sin(im);
}
def code(re, im): return math.exp(re) * math.sin(im)
function code(re, im) return Float64(exp(re) * sin(im)) end
function tmp = code(re, im) tmp = exp(re) * sin(im); end
code[re_, im_] := N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
e^{re} \cdot \sin im
\end{array}
(FPCore (re im) :precision binary64 (* (exp re) (sin im)))
double code(double re, double im) {
return exp(re) * sin(im);
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = exp(re) * sin(im)
end function
public static double code(double re, double im) {
return Math.exp(re) * Math.sin(im);
}
def code(re, im): return math.exp(re) * math.sin(im)
function code(re, im) return Float64(exp(re) * sin(im)) end
function tmp = code(re, im) tmp = exp(re) * sin(im); end
code[re_, im_] := N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
e^{re} \cdot \sin im
\end{array}
Initial program 100.0%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (exp re) im)))
(if (<= (exp re) 0.0)
t_0
(if (<= (exp re) 1.0) (* (sin im) (+ re 1.0)) t_0))))
double code(double re, double im) {
double t_0 = exp(re) * im;
double tmp;
if (exp(re) <= 0.0) {
tmp = t_0;
} else if (exp(re) <= 1.0) {
tmp = sin(im) * (re + 1.0);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = exp(re) * im
if (exp(re) <= 0.0d0) then
tmp = t_0
else if (exp(re) <= 1.0d0) then
tmp = sin(im) * (re + 1.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = Math.exp(re) * im;
double tmp;
if (Math.exp(re) <= 0.0) {
tmp = t_0;
} else if (Math.exp(re) <= 1.0) {
tmp = Math.sin(im) * (re + 1.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(re, im): t_0 = math.exp(re) * im tmp = 0 if math.exp(re) <= 0.0: tmp = t_0 elif math.exp(re) <= 1.0: tmp = math.sin(im) * (re + 1.0) else: tmp = t_0 return tmp
function code(re, im) t_0 = Float64(exp(re) * im) tmp = 0.0 if (exp(re) <= 0.0) tmp = t_0; elseif (exp(re) <= 1.0) tmp = Float64(sin(im) * Float64(re + 1.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(re, im) t_0 = exp(re) * im; tmp = 0.0; if (exp(re) <= 0.0) tmp = t_0; elseif (exp(re) <= 1.0) tmp = sin(im) * (re + 1.0); else tmp = t_0; end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, If[LessEqual[N[Exp[re], $MachinePrecision], 0.0], t$95$0, If[LessEqual[N[Exp[re], $MachinePrecision], 1.0], N[(N[Sin[im], $MachinePrecision] * N[(re + 1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{re} \cdot im\\
\mathbf{if}\;e^{re} \leq 0:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;e^{re} \leq 1:\\
\;\;\;\;\sin im \cdot \left(re + 1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (exp.f64 re) < 0.0 or 1 < (exp.f64 re) Initial program 100.0%
Taylor expanded in im around 0
Simplified84.7%
if 0.0 < (exp.f64 re) < 1Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6499.3%
Simplified99.3%
Final simplification92.2%
(FPCore (re im) :precision binary64 (let* ((t_0 (* (exp re) im))) (if (<= (exp re) 0.0) t_0 (if (<= (exp re) 1.0) (sin im) t_0))))
double code(double re, double im) {
double t_0 = exp(re) * im;
double tmp;
if (exp(re) <= 0.0) {
tmp = t_0;
} else if (exp(re) <= 1.0) {
tmp = sin(im);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = exp(re) * im
if (exp(re) <= 0.0d0) then
tmp = t_0
else if (exp(re) <= 1.0d0) then
tmp = sin(im)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = Math.exp(re) * im;
double tmp;
if (Math.exp(re) <= 0.0) {
tmp = t_0;
} else if (Math.exp(re) <= 1.0) {
tmp = Math.sin(im);
} else {
tmp = t_0;
}
return tmp;
}
def code(re, im): t_0 = math.exp(re) * im tmp = 0 if math.exp(re) <= 0.0: tmp = t_0 elif math.exp(re) <= 1.0: tmp = math.sin(im) else: tmp = t_0 return tmp
function code(re, im) t_0 = Float64(exp(re) * im) tmp = 0.0 if (exp(re) <= 0.0) tmp = t_0; elseif (exp(re) <= 1.0) tmp = sin(im); else tmp = t_0; end return tmp end
function tmp_2 = code(re, im) t_0 = exp(re) * im; tmp = 0.0; if (exp(re) <= 0.0) tmp = t_0; elseif (exp(re) <= 1.0) tmp = sin(im); else tmp = t_0; end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, If[LessEqual[N[Exp[re], $MachinePrecision], 0.0], t$95$0, If[LessEqual[N[Exp[re], $MachinePrecision], 1.0], N[Sin[im], $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{re} \cdot im\\
\mathbf{if}\;e^{re} \leq 0:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;e^{re} \leq 1:\\
\;\;\;\;\sin im\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (exp.f64 re) < 0.0 or 1 < (exp.f64 re) Initial program 100.0%
Taylor expanded in im around 0
Simplified84.7%
if 0.0 < (exp.f64 re) < 1Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6498.6%
Simplified98.6%
(FPCore (re im)
:precision binary64
(if (<= re -0.04)
(* (exp re) im)
(if (<= re 1.3e-8)
(/
(sin im)
(+ 1.0 (* re (+ (* re (+ 0.5 (* re -0.16666666666666666))) -1.0))))
(if (<= re 1.05e+103)
(* (exp re) (* im (+ 1.0 (* -0.16666666666666666 (* im im)))))
(* (sin im) (* re (* re (* re 0.16666666666666666))))))))
double code(double re, double im) {
double tmp;
if (re <= -0.04) {
tmp = exp(re) * im;
} else if (re <= 1.3e-8) {
tmp = sin(im) / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0)));
} else if (re <= 1.05e+103) {
tmp = exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
} else {
tmp = sin(im) * (re * (re * (re * 0.16666666666666666)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= (-0.04d0)) then
tmp = exp(re) * im
else if (re <= 1.3d-8) then
tmp = sin(im) / (1.0d0 + (re * ((re * (0.5d0 + (re * (-0.16666666666666666d0)))) + (-1.0d0))))
else if (re <= 1.05d+103) then
tmp = exp(re) * (im * (1.0d0 + ((-0.16666666666666666d0) * (im * im))))
else
tmp = sin(im) * (re * (re * (re * 0.16666666666666666d0)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -0.04) {
tmp = Math.exp(re) * im;
} else if (re <= 1.3e-8) {
tmp = Math.sin(im) / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0)));
} else if (re <= 1.05e+103) {
tmp = Math.exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
} else {
tmp = Math.sin(im) * (re * (re * (re * 0.16666666666666666)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -0.04: tmp = math.exp(re) * im elif re <= 1.3e-8: tmp = math.sin(im) / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0))) elif re <= 1.05e+103: tmp = math.exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im)))) else: tmp = math.sin(im) * (re * (re * (re * 0.16666666666666666))) return tmp
function code(re, im) tmp = 0.0 if (re <= -0.04) tmp = Float64(exp(re) * im); elseif (re <= 1.3e-8) tmp = Float64(sin(im) / Float64(1.0 + Float64(re * Float64(Float64(re * Float64(0.5 + Float64(re * -0.16666666666666666))) + -1.0)))); elseif (re <= 1.05e+103) tmp = Float64(exp(re) * Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im))))); else tmp = Float64(sin(im) * Float64(re * Float64(re * Float64(re * 0.16666666666666666)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -0.04) tmp = exp(re) * im; elseif (re <= 1.3e-8) tmp = sin(im) / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0))); elseif (re <= 1.05e+103) tmp = exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im)))); else tmp = sin(im) * (re * (re * (re * 0.16666666666666666))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -0.04], N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision], If[LessEqual[re, 1.3e-8], N[(N[Sin[im], $MachinePrecision] / N[(1.0 + N[(re * N[(N[(re * N[(0.5 + N[(re * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.05e+103], N[(N[Exp[re], $MachinePrecision] * N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[im], $MachinePrecision] * N[(re * N[(re * N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -0.04:\\
\;\;\;\;e^{re} \cdot im\\
\mathbf{elif}\;re \leq 1.3 \cdot 10^{-8}:\\
\;\;\;\;\frac{\sin im}{1 + re \cdot \left(re \cdot \left(0.5 + re \cdot -0.16666666666666666\right) + -1\right)}\\
\mathbf{elif}\;re \leq 1.05 \cdot 10^{+103}:\\
\;\;\;\;e^{re} \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin im \cdot \left(re \cdot \left(re \cdot \left(re \cdot 0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if re < -0.0400000000000000008Initial program 100.0%
Taylor expanded in im around 0
Simplified100.0%
if -0.0400000000000000008 < re < 1.3000000000000001e-8Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.9%
Simplified99.9%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
Applied egg-rr99.9%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in im around inf
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.9%
Simplified99.9%
if 1.3000000000000001e-8 < re < 1.0500000000000001e103Initial program 99.9%
Taylor expanded in im around 0
+-commutativeN/A
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6475.2%
Simplified75.2%
if 1.0500000000000001e103 < re Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in re around inf
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification97.6%
(FPCore (re im)
:precision binary64
(if (<= re -0.0074)
(* (exp re) im)
(if (<= re 1.3e-8)
(*
(sin im)
(+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666)))))))
(if (<= re 1.05e+103)
(* (exp re) (* im (+ 1.0 (* -0.16666666666666666 (* im im)))))
(* (sin im) (* re (* re (* re 0.16666666666666666))))))))
double code(double re, double im) {
double tmp;
if (re <= -0.0074) {
tmp = exp(re) * im;
} else if (re <= 1.3e-8) {
tmp = sin(im) * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
} else if (re <= 1.05e+103) {
tmp = exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
} else {
tmp = sin(im) * (re * (re * (re * 0.16666666666666666)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= (-0.0074d0)) then
tmp = exp(re) * im
else if (re <= 1.3d-8) then
tmp = sin(im) * (1.0d0 + (re * (1.0d0 + (re * (0.5d0 + (re * 0.16666666666666666d0))))))
else if (re <= 1.05d+103) then
tmp = exp(re) * (im * (1.0d0 + ((-0.16666666666666666d0) * (im * im))))
else
tmp = sin(im) * (re * (re * (re * 0.16666666666666666d0)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -0.0074) {
tmp = Math.exp(re) * im;
} else if (re <= 1.3e-8) {
tmp = Math.sin(im) * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
} else if (re <= 1.05e+103) {
tmp = Math.exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
} else {
tmp = Math.sin(im) * (re * (re * (re * 0.16666666666666666)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -0.0074: tmp = math.exp(re) * im elif re <= 1.3e-8: tmp = math.sin(im) * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) elif re <= 1.05e+103: tmp = math.exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im)))) else: tmp = math.sin(im) * (re * (re * (re * 0.16666666666666666))) return tmp
function code(re, im) tmp = 0.0 if (re <= -0.0074) tmp = Float64(exp(re) * im); elseif (re <= 1.3e-8) tmp = Float64(sin(im) * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666))))))); elseif (re <= 1.05e+103) tmp = Float64(exp(re) * Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im))))); else tmp = Float64(sin(im) * Float64(re * Float64(re * Float64(re * 0.16666666666666666)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -0.0074) tmp = exp(re) * im; elseif (re <= 1.3e-8) tmp = sin(im) * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))); elseif (re <= 1.05e+103) tmp = exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im)))); else tmp = sin(im) * (re * (re * (re * 0.16666666666666666))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -0.0074], N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision], If[LessEqual[re, 1.3e-8], N[(N[Sin[im], $MachinePrecision] * N[(1.0 + N[(re * N[(1.0 + N[(re * N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.05e+103], N[(N[Exp[re], $MachinePrecision] * N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[im], $MachinePrecision] * N[(re * N[(re * N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -0.0074:\\
\;\;\;\;e^{re} \cdot im\\
\mathbf{elif}\;re \leq 1.3 \cdot 10^{-8}:\\
\;\;\;\;\sin im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\
\mathbf{elif}\;re \leq 1.05 \cdot 10^{+103}:\\
\;\;\;\;e^{re} \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin im \cdot \left(re \cdot \left(re \cdot \left(re \cdot 0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if re < -0.0074000000000000003Initial program 100.0%
Taylor expanded in im around 0
Simplified100.0%
if -0.0074000000000000003 < re < 1.3000000000000001e-8Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.9%
Simplified99.9%
if 1.3000000000000001e-8 < re < 1.0500000000000001e103Initial program 99.9%
Taylor expanded in im around 0
+-commutativeN/A
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6475.2%
Simplified75.2%
if 1.0500000000000001e103 < re Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in re around inf
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification97.6%
(FPCore (re im)
:precision binary64
(if (<= re -0.018)
(* (exp re) im)
(if (<= re 1.3e-8)
(* (sin im) (/ 1.0 (+ 1.0 (* re (+ -1.0 (* re 0.5))))))
(if (<= re 1e+103)
(* (exp re) (* im (+ 1.0 (* -0.16666666666666666 (* im im)))))
(* (sin im) (* re (* re (* re 0.16666666666666666))))))))
double code(double re, double im) {
double tmp;
if (re <= -0.018) {
tmp = exp(re) * im;
} else if (re <= 1.3e-8) {
tmp = sin(im) * (1.0 / (1.0 + (re * (-1.0 + (re * 0.5)))));
} else if (re <= 1e+103) {
tmp = exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
} else {
tmp = sin(im) * (re * (re * (re * 0.16666666666666666)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= (-0.018d0)) then
tmp = exp(re) * im
else if (re <= 1.3d-8) then
tmp = sin(im) * (1.0d0 / (1.0d0 + (re * ((-1.0d0) + (re * 0.5d0)))))
else if (re <= 1d+103) then
tmp = exp(re) * (im * (1.0d0 + ((-0.16666666666666666d0) * (im * im))))
else
tmp = sin(im) * (re * (re * (re * 0.16666666666666666d0)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -0.018) {
tmp = Math.exp(re) * im;
} else if (re <= 1.3e-8) {
tmp = Math.sin(im) * (1.0 / (1.0 + (re * (-1.0 + (re * 0.5)))));
} else if (re <= 1e+103) {
tmp = Math.exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
} else {
tmp = Math.sin(im) * (re * (re * (re * 0.16666666666666666)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -0.018: tmp = math.exp(re) * im elif re <= 1.3e-8: tmp = math.sin(im) * (1.0 / (1.0 + (re * (-1.0 + (re * 0.5))))) elif re <= 1e+103: tmp = math.exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im)))) else: tmp = math.sin(im) * (re * (re * (re * 0.16666666666666666))) return tmp
function code(re, im) tmp = 0.0 if (re <= -0.018) tmp = Float64(exp(re) * im); elseif (re <= 1.3e-8) tmp = Float64(sin(im) * Float64(1.0 / Float64(1.0 + Float64(re * Float64(-1.0 + Float64(re * 0.5)))))); elseif (re <= 1e+103) tmp = Float64(exp(re) * Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im))))); else tmp = Float64(sin(im) * Float64(re * Float64(re * Float64(re * 0.16666666666666666)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -0.018) tmp = exp(re) * im; elseif (re <= 1.3e-8) tmp = sin(im) * (1.0 / (1.0 + (re * (-1.0 + (re * 0.5))))); elseif (re <= 1e+103) tmp = exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im)))); else tmp = sin(im) * (re * (re * (re * 0.16666666666666666))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -0.018], N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision], If[LessEqual[re, 1.3e-8], N[(N[Sin[im], $MachinePrecision] * N[(1.0 / N[(1.0 + N[(re * N[(-1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1e+103], N[(N[Exp[re], $MachinePrecision] * N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[im], $MachinePrecision] * N[(re * N[(re * N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -0.018:\\
\;\;\;\;e^{re} \cdot im\\
\mathbf{elif}\;re \leq 1.3 \cdot 10^{-8}:\\
\;\;\;\;\sin im \cdot \frac{1}{1 + re \cdot \left(-1 + re \cdot 0.5\right)}\\
\mathbf{elif}\;re \leq 10^{+103}:\\
\;\;\;\;e^{re} \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin im \cdot \left(re \cdot \left(re \cdot \left(re \cdot 0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if re < -0.0179999999999999986Initial program 100.0%
Taylor expanded in im around 0
Simplified100.0%
if -0.0179999999999999986 < re < 1.3000000000000001e-8Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.9%
Simplified99.9%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
Applied egg-rr99.9%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.6%
Simplified99.6%
if 1.3000000000000001e-8 < re < 1e103Initial program 99.9%
Taylor expanded in im around 0
+-commutativeN/A
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6475.2%
Simplified75.2%
if 1e103 < re Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in re around inf
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification97.5%
(FPCore (re im)
:precision binary64
(if (<= re -0.0305)
(* (exp re) im)
(if (<= re 1.3e-8)
(* (sin im) (+ 1.0 (* re (+ 1.0 (* re 0.5)))))
(if (<= re 1.05e+103)
(* (exp re) (* im (+ 1.0 (* -0.16666666666666666 (* im im)))))
(* (sin im) (* re (* re (* re 0.16666666666666666))))))))
double code(double re, double im) {
double tmp;
if (re <= -0.0305) {
tmp = exp(re) * im;
} else if (re <= 1.3e-8) {
tmp = sin(im) * (1.0 + (re * (1.0 + (re * 0.5))));
} else if (re <= 1.05e+103) {
tmp = exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
} else {
tmp = sin(im) * (re * (re * (re * 0.16666666666666666)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= (-0.0305d0)) then
tmp = exp(re) * im
else if (re <= 1.3d-8) then
tmp = sin(im) * (1.0d0 + (re * (1.0d0 + (re * 0.5d0))))
else if (re <= 1.05d+103) then
tmp = exp(re) * (im * (1.0d0 + ((-0.16666666666666666d0) * (im * im))))
else
tmp = sin(im) * (re * (re * (re * 0.16666666666666666d0)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -0.0305) {
tmp = Math.exp(re) * im;
} else if (re <= 1.3e-8) {
tmp = Math.sin(im) * (1.0 + (re * (1.0 + (re * 0.5))));
} else if (re <= 1.05e+103) {
tmp = Math.exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
} else {
tmp = Math.sin(im) * (re * (re * (re * 0.16666666666666666)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -0.0305: tmp = math.exp(re) * im elif re <= 1.3e-8: tmp = math.sin(im) * (1.0 + (re * (1.0 + (re * 0.5)))) elif re <= 1.05e+103: tmp = math.exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im)))) else: tmp = math.sin(im) * (re * (re * (re * 0.16666666666666666))) return tmp
function code(re, im) tmp = 0.0 if (re <= -0.0305) tmp = Float64(exp(re) * im); elseif (re <= 1.3e-8) tmp = Float64(sin(im) * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5))))); elseif (re <= 1.05e+103) tmp = Float64(exp(re) * Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im))))); else tmp = Float64(sin(im) * Float64(re * Float64(re * Float64(re * 0.16666666666666666)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -0.0305) tmp = exp(re) * im; elseif (re <= 1.3e-8) tmp = sin(im) * (1.0 + (re * (1.0 + (re * 0.5)))); elseif (re <= 1.05e+103) tmp = exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im)))); else tmp = sin(im) * (re * (re * (re * 0.16666666666666666))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -0.0305], N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision], If[LessEqual[re, 1.3e-8], N[(N[Sin[im], $MachinePrecision] * N[(1.0 + N[(re * N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.05e+103], N[(N[Exp[re], $MachinePrecision] * N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[im], $MachinePrecision] * N[(re * N[(re * N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -0.0305:\\
\;\;\;\;e^{re} \cdot im\\
\mathbf{elif}\;re \leq 1.3 \cdot 10^{-8}:\\
\;\;\;\;\sin im \cdot \left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)\\
\mathbf{elif}\;re \leq 1.05 \cdot 10^{+103}:\\
\;\;\;\;e^{re} \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin im \cdot \left(re \cdot \left(re \cdot \left(re \cdot 0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if re < -0.030499999999999999Initial program 100.0%
Taylor expanded in im around 0
Simplified100.0%
if -0.030499999999999999 < re < 1.3000000000000001e-8Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.6%
Simplified99.6%
if 1.3000000000000001e-8 < re < 1.0500000000000001e103Initial program 99.9%
Taylor expanded in im around 0
+-commutativeN/A
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6475.2%
Simplified75.2%
if 1.0500000000000001e103 < re Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in re around inf
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification97.4%
(FPCore (re im)
:precision binary64
(if (<= re -0.00155)
(* (exp re) im)
(if (<= re 1.3e-8)
(* (sin im) (/ 1.0 (- 1.0 re)))
(if (<= re 1.05e+103)
(* (exp re) (* im (+ 1.0 (* -0.16666666666666666 (* im im)))))
(* (sin im) (* re (* re (* re 0.16666666666666666))))))))
double code(double re, double im) {
double tmp;
if (re <= -0.00155) {
tmp = exp(re) * im;
} else if (re <= 1.3e-8) {
tmp = sin(im) * (1.0 / (1.0 - re));
} else if (re <= 1.05e+103) {
tmp = exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
} else {
tmp = sin(im) * (re * (re * (re * 0.16666666666666666)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= (-0.00155d0)) then
tmp = exp(re) * im
else if (re <= 1.3d-8) then
tmp = sin(im) * (1.0d0 / (1.0d0 - re))
else if (re <= 1.05d+103) then
tmp = exp(re) * (im * (1.0d0 + ((-0.16666666666666666d0) * (im * im))))
else
tmp = sin(im) * (re * (re * (re * 0.16666666666666666d0)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -0.00155) {
tmp = Math.exp(re) * im;
} else if (re <= 1.3e-8) {
tmp = Math.sin(im) * (1.0 / (1.0 - re));
} else if (re <= 1.05e+103) {
tmp = Math.exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
} else {
tmp = Math.sin(im) * (re * (re * (re * 0.16666666666666666)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -0.00155: tmp = math.exp(re) * im elif re <= 1.3e-8: tmp = math.sin(im) * (1.0 / (1.0 - re)) elif re <= 1.05e+103: tmp = math.exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im)))) else: tmp = math.sin(im) * (re * (re * (re * 0.16666666666666666))) return tmp
function code(re, im) tmp = 0.0 if (re <= -0.00155) tmp = Float64(exp(re) * im); elseif (re <= 1.3e-8) tmp = Float64(sin(im) * Float64(1.0 / Float64(1.0 - re))); elseif (re <= 1.05e+103) tmp = Float64(exp(re) * Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im))))); else tmp = Float64(sin(im) * Float64(re * Float64(re * Float64(re * 0.16666666666666666)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -0.00155) tmp = exp(re) * im; elseif (re <= 1.3e-8) tmp = sin(im) * (1.0 / (1.0 - re)); elseif (re <= 1.05e+103) tmp = exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im)))); else tmp = sin(im) * (re * (re * (re * 0.16666666666666666))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -0.00155], N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision], If[LessEqual[re, 1.3e-8], N[(N[Sin[im], $MachinePrecision] * N[(1.0 / N[(1.0 - re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.05e+103], N[(N[Exp[re], $MachinePrecision] * N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[im], $MachinePrecision] * N[(re * N[(re * N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -0.00155:\\
\;\;\;\;e^{re} \cdot im\\
\mathbf{elif}\;re \leq 1.3 \cdot 10^{-8}:\\
\;\;\;\;\sin im \cdot \frac{1}{1 - re}\\
\mathbf{elif}\;re \leq 1.05 \cdot 10^{+103}:\\
\;\;\;\;e^{re} \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin im \cdot \left(re \cdot \left(re \cdot \left(re \cdot 0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if re < -0.00154999999999999995Initial program 100.0%
Taylor expanded in im around 0
Simplified100.0%
if -0.00154999999999999995 < re < 1.3000000000000001e-8Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.9%
Simplified99.9%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
Applied egg-rr99.9%
Taylor expanded in re around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f6499.3%
Simplified99.3%
if 1.3000000000000001e-8 < re < 1.0500000000000001e103Initial program 99.9%
Taylor expanded in im around 0
+-commutativeN/A
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6475.2%
Simplified75.2%
if 1.0500000000000001e103 < re Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in re around inf
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification97.3%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (exp re) im)))
(if (<= re -0.0021)
t_0
(if (<= re 1.3e-8)
(* (sin im) (/ 1.0 (- 1.0 re)))
(if (<= re 8.2e+99)
t_0
(* (sin im) (* re (* re (* re 0.16666666666666666)))))))))
double code(double re, double im) {
double t_0 = exp(re) * im;
double tmp;
if (re <= -0.0021) {
tmp = t_0;
} else if (re <= 1.3e-8) {
tmp = sin(im) * (1.0 / (1.0 - re));
} else if (re <= 8.2e+99) {
tmp = t_0;
} else {
tmp = sin(im) * (re * (re * (re * 0.16666666666666666)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = exp(re) * im
if (re <= (-0.0021d0)) then
tmp = t_0
else if (re <= 1.3d-8) then
tmp = sin(im) * (1.0d0 / (1.0d0 - re))
else if (re <= 8.2d+99) then
tmp = t_0
else
tmp = sin(im) * (re * (re * (re * 0.16666666666666666d0)))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = Math.exp(re) * im;
double tmp;
if (re <= -0.0021) {
tmp = t_0;
} else if (re <= 1.3e-8) {
tmp = Math.sin(im) * (1.0 / (1.0 - re));
} else if (re <= 8.2e+99) {
tmp = t_0;
} else {
tmp = Math.sin(im) * (re * (re * (re * 0.16666666666666666)));
}
return tmp;
}
def code(re, im): t_0 = math.exp(re) * im tmp = 0 if re <= -0.0021: tmp = t_0 elif re <= 1.3e-8: tmp = math.sin(im) * (1.0 / (1.0 - re)) elif re <= 8.2e+99: tmp = t_0 else: tmp = math.sin(im) * (re * (re * (re * 0.16666666666666666))) return tmp
function code(re, im) t_0 = Float64(exp(re) * im) tmp = 0.0 if (re <= -0.0021) tmp = t_0; elseif (re <= 1.3e-8) tmp = Float64(sin(im) * Float64(1.0 / Float64(1.0 - re))); elseif (re <= 8.2e+99) tmp = t_0; else tmp = Float64(sin(im) * Float64(re * Float64(re * Float64(re * 0.16666666666666666)))); end return tmp end
function tmp_2 = code(re, im) t_0 = exp(re) * im; tmp = 0.0; if (re <= -0.0021) tmp = t_0; elseif (re <= 1.3e-8) tmp = sin(im) * (1.0 / (1.0 - re)); elseif (re <= 8.2e+99) tmp = t_0; else tmp = sin(im) * (re * (re * (re * 0.16666666666666666))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, If[LessEqual[re, -0.0021], t$95$0, If[LessEqual[re, 1.3e-8], N[(N[Sin[im], $MachinePrecision] * N[(1.0 / N[(1.0 - re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 8.2e+99], t$95$0, N[(N[Sin[im], $MachinePrecision] * N[(re * N[(re * N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{re} \cdot im\\
\mathbf{if}\;re \leq -0.0021:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;re \leq 1.3 \cdot 10^{-8}:\\
\;\;\;\;\sin im \cdot \frac{1}{1 - re}\\
\mathbf{elif}\;re \leq 8.2 \cdot 10^{+99}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\sin im \cdot \left(re \cdot \left(re \cdot \left(re \cdot 0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if re < -0.00209999999999999987 or 1.3000000000000001e-8 < re < 8.19999999999999959e99Initial program 100.0%
Taylor expanded in im around 0
Simplified91.1%
if -0.00209999999999999987 < re < 1.3000000000000001e-8Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.9%
Simplified99.9%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
Applied egg-rr99.9%
Taylor expanded in re around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f6499.3%
Simplified99.3%
if 8.19999999999999959e99 < re Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6498.0%
Simplified98.0%
Taylor expanded in re around inf
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6498.0%
Simplified98.0%
Final simplification96.6%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (exp re) im)))
(if (<= re -0.0085)
t_0
(if (<= re 1.3e-8) (* (sin im) (/ 1.0 (- 1.0 re))) t_0))))
double code(double re, double im) {
double t_0 = exp(re) * im;
double tmp;
if (re <= -0.0085) {
tmp = t_0;
} else if (re <= 1.3e-8) {
tmp = sin(im) * (1.0 / (1.0 - re));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = exp(re) * im
if (re <= (-0.0085d0)) then
tmp = t_0
else if (re <= 1.3d-8) then
tmp = sin(im) * (1.0d0 / (1.0d0 - re))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = Math.exp(re) * im;
double tmp;
if (re <= -0.0085) {
tmp = t_0;
} else if (re <= 1.3e-8) {
tmp = Math.sin(im) * (1.0 / (1.0 - re));
} else {
tmp = t_0;
}
return tmp;
}
def code(re, im): t_0 = math.exp(re) * im tmp = 0 if re <= -0.0085: tmp = t_0 elif re <= 1.3e-8: tmp = math.sin(im) * (1.0 / (1.0 - re)) else: tmp = t_0 return tmp
function code(re, im) t_0 = Float64(exp(re) * im) tmp = 0.0 if (re <= -0.0085) tmp = t_0; elseif (re <= 1.3e-8) tmp = Float64(sin(im) * Float64(1.0 / Float64(1.0 - re))); else tmp = t_0; end return tmp end
function tmp_2 = code(re, im) t_0 = exp(re) * im; tmp = 0.0; if (re <= -0.0085) tmp = t_0; elseif (re <= 1.3e-8) tmp = sin(im) * (1.0 / (1.0 - re)); else tmp = t_0; end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, If[LessEqual[re, -0.0085], t$95$0, If[LessEqual[re, 1.3e-8], N[(N[Sin[im], $MachinePrecision] * N[(1.0 / N[(1.0 - re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{re} \cdot im\\
\mathbf{if}\;re \leq -0.0085:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;re \leq 1.3 \cdot 10^{-8}:\\
\;\;\;\;\sin im \cdot \frac{1}{1 - re}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if re < -0.0085000000000000006 or 1.3000000000000001e-8 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified84.7%
if -0.0085000000000000006 < re < 1.3000000000000001e-8Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.9%
Simplified99.9%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
Applied egg-rr99.9%
Taylor expanded in re around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f6499.3%
Simplified99.3%
Final simplification92.2%
(FPCore (re im)
:precision binary64
(let* ((t_0 (+ 0.5 (* re 0.16666666666666666))) (t_1 (* re t_0)))
(if (<= re -8.8e+20)
(/ im (+ 1.0 (* re (+ (* re (+ 0.5 (* re -0.16666666666666666))) -1.0))))
(if (<= re 4.5e-10)
(sin im)
(if (<= re 5.5e+132)
(*
(+ 1.0 (/ (* re (- 1.0 (* t_0 (* re t_1)))) (- 1.0 t_1)))
(* im (+ 1.0 (* im (* im -0.16666666666666666)))))
(* im (* 0.16666666666666666 (* re (* re re)))))))))
double code(double re, double im) {
double t_0 = 0.5 + (re * 0.16666666666666666);
double t_1 = re * t_0;
double tmp;
if (re <= -8.8e+20) {
tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0)));
} else if (re <= 4.5e-10) {
tmp = sin(im);
} else if (re <= 5.5e+132) {
tmp = (1.0 + ((re * (1.0 - (t_0 * (re * t_1)))) / (1.0 - t_1))) * (im * (1.0 + (im * (im * -0.16666666666666666))));
} else {
tmp = im * (0.16666666666666666 * (re * (re * re)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 0.5d0 + (re * 0.16666666666666666d0)
t_1 = re * t_0
if (re <= (-8.8d+20)) then
tmp = im / (1.0d0 + (re * ((re * (0.5d0 + (re * (-0.16666666666666666d0)))) + (-1.0d0))))
else if (re <= 4.5d-10) then
tmp = sin(im)
else if (re <= 5.5d+132) then
tmp = (1.0d0 + ((re * (1.0d0 - (t_0 * (re * t_1)))) / (1.0d0 - t_1))) * (im * (1.0d0 + (im * (im * (-0.16666666666666666d0)))))
else
tmp = im * (0.16666666666666666d0 * (re * (re * re)))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = 0.5 + (re * 0.16666666666666666);
double t_1 = re * t_0;
double tmp;
if (re <= -8.8e+20) {
tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0)));
} else if (re <= 4.5e-10) {
tmp = Math.sin(im);
} else if (re <= 5.5e+132) {
tmp = (1.0 + ((re * (1.0 - (t_0 * (re * t_1)))) / (1.0 - t_1))) * (im * (1.0 + (im * (im * -0.16666666666666666))));
} else {
tmp = im * (0.16666666666666666 * (re * (re * re)));
}
return tmp;
}
def code(re, im): t_0 = 0.5 + (re * 0.16666666666666666) t_1 = re * t_0 tmp = 0 if re <= -8.8e+20: tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0))) elif re <= 4.5e-10: tmp = math.sin(im) elif re <= 5.5e+132: tmp = (1.0 + ((re * (1.0 - (t_0 * (re * t_1)))) / (1.0 - t_1))) * (im * (1.0 + (im * (im * -0.16666666666666666)))) else: tmp = im * (0.16666666666666666 * (re * (re * re))) return tmp
function code(re, im) t_0 = Float64(0.5 + Float64(re * 0.16666666666666666)) t_1 = Float64(re * t_0) tmp = 0.0 if (re <= -8.8e+20) tmp = Float64(im / Float64(1.0 + Float64(re * Float64(Float64(re * Float64(0.5 + Float64(re * -0.16666666666666666))) + -1.0)))); elseif (re <= 4.5e-10) tmp = sin(im); elseif (re <= 5.5e+132) tmp = Float64(Float64(1.0 + Float64(Float64(re * Float64(1.0 - Float64(t_0 * Float64(re * t_1)))) / Float64(1.0 - t_1))) * Float64(im * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666))))); else tmp = Float64(im * Float64(0.16666666666666666 * Float64(re * Float64(re * re)))); end return tmp end
function tmp_2 = code(re, im) t_0 = 0.5 + (re * 0.16666666666666666); t_1 = re * t_0; tmp = 0.0; if (re <= -8.8e+20) tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0))); elseif (re <= 4.5e-10) tmp = sin(im); elseif (re <= 5.5e+132) tmp = (1.0 + ((re * (1.0 - (t_0 * (re * t_1)))) / (1.0 - t_1))) * (im * (1.0 + (im * (im * -0.16666666666666666)))); else tmp = im * (0.16666666666666666 * (re * (re * re))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(re * t$95$0), $MachinePrecision]}, If[LessEqual[re, -8.8e+20], N[(im / N[(1.0 + N[(re * N[(N[(re * N[(0.5 + N[(re * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 4.5e-10], N[Sin[im], $MachinePrecision], If[LessEqual[re, 5.5e+132], N[(N[(1.0 + N[(N[(re * N[(1.0 - N[(t$95$0 * N[(re * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(0.16666666666666666 * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 + re \cdot 0.16666666666666666\\
t_1 := re \cdot t\_0\\
\mathbf{if}\;re \leq -8.8 \cdot 10^{+20}:\\
\;\;\;\;\frac{im}{1 + re \cdot \left(re \cdot \left(0.5 + re \cdot -0.16666666666666666\right) + -1\right)}\\
\mathbf{elif}\;re \leq 4.5 \cdot 10^{-10}:\\
\;\;\;\;\sin im\\
\mathbf{elif}\;re \leq 5.5 \cdot 10^{+132}:\\
\;\;\;\;\left(1 + \frac{re \cdot \left(1 - t\_0 \cdot \left(re \cdot t\_1\right)\right)}{1 - t\_1}\right) \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\
\end{array}
\end{array}
if re < -8.8e20Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f641.9%
Simplified1.9%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
Applied egg-rr1.9%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6483.2%
Simplified83.2%
Taylor expanded in im around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6483.1%
Simplified83.1%
if -8.8e20 < re < 4.5e-10Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6496.5%
Simplified96.5%
if 4.5e-10 < re < 5.5e132Initial program 99.9%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6428.6%
Simplified28.6%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6446.3%
Simplified46.3%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr59.0%
if 5.5e132 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified78.9%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6476.5%
Simplified76.5%
Taylor expanded in re around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6478.9%
Simplified78.9%
Final simplification86.7%
(FPCore (re im)
:precision binary64
(let* ((t_0 (+ 0.5 (* re 0.16666666666666666))) (t_1 (* re t_0)))
(if (<= re -1.2e-123)
(/ im (+ 1.0 (* re (+ (* re (+ 0.5 (* re -0.16666666666666666))) -1.0))))
(if (<= re 1e+131)
(*
(+ 1.0 (/ (* re (- 1.0 (* t_0 (* re t_1)))) (- 1.0 t_1)))
(* im (+ 1.0 (* im (* im -0.16666666666666666)))))
(* im (* 0.16666666666666666 (* re (* re re))))))))
double code(double re, double im) {
double t_0 = 0.5 + (re * 0.16666666666666666);
double t_1 = re * t_0;
double tmp;
if (re <= -1.2e-123) {
tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0)));
} else if (re <= 1e+131) {
tmp = (1.0 + ((re * (1.0 - (t_0 * (re * t_1)))) / (1.0 - t_1))) * (im * (1.0 + (im * (im * -0.16666666666666666))));
} else {
tmp = im * (0.16666666666666666 * (re * (re * re)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 0.5d0 + (re * 0.16666666666666666d0)
t_1 = re * t_0
if (re <= (-1.2d-123)) then
tmp = im / (1.0d0 + (re * ((re * (0.5d0 + (re * (-0.16666666666666666d0)))) + (-1.0d0))))
else if (re <= 1d+131) then
tmp = (1.0d0 + ((re * (1.0d0 - (t_0 * (re * t_1)))) / (1.0d0 - t_1))) * (im * (1.0d0 + (im * (im * (-0.16666666666666666d0)))))
else
tmp = im * (0.16666666666666666d0 * (re * (re * re)))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = 0.5 + (re * 0.16666666666666666);
double t_1 = re * t_0;
double tmp;
if (re <= -1.2e-123) {
tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0)));
} else if (re <= 1e+131) {
tmp = (1.0 + ((re * (1.0 - (t_0 * (re * t_1)))) / (1.0 - t_1))) * (im * (1.0 + (im * (im * -0.16666666666666666))));
} else {
tmp = im * (0.16666666666666666 * (re * (re * re)));
}
return tmp;
}
def code(re, im): t_0 = 0.5 + (re * 0.16666666666666666) t_1 = re * t_0 tmp = 0 if re <= -1.2e-123: tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0))) elif re <= 1e+131: tmp = (1.0 + ((re * (1.0 - (t_0 * (re * t_1)))) / (1.0 - t_1))) * (im * (1.0 + (im * (im * -0.16666666666666666)))) else: tmp = im * (0.16666666666666666 * (re * (re * re))) return tmp
function code(re, im) t_0 = Float64(0.5 + Float64(re * 0.16666666666666666)) t_1 = Float64(re * t_0) tmp = 0.0 if (re <= -1.2e-123) tmp = Float64(im / Float64(1.0 + Float64(re * Float64(Float64(re * Float64(0.5 + Float64(re * -0.16666666666666666))) + -1.0)))); elseif (re <= 1e+131) tmp = Float64(Float64(1.0 + Float64(Float64(re * Float64(1.0 - Float64(t_0 * Float64(re * t_1)))) / Float64(1.0 - t_1))) * Float64(im * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666))))); else tmp = Float64(im * Float64(0.16666666666666666 * Float64(re * Float64(re * re)))); end return tmp end
function tmp_2 = code(re, im) t_0 = 0.5 + (re * 0.16666666666666666); t_1 = re * t_0; tmp = 0.0; if (re <= -1.2e-123) tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0))); elseif (re <= 1e+131) tmp = (1.0 + ((re * (1.0 - (t_0 * (re * t_1)))) / (1.0 - t_1))) * (im * (1.0 + (im * (im * -0.16666666666666666)))); else tmp = im * (0.16666666666666666 * (re * (re * re))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(re * t$95$0), $MachinePrecision]}, If[LessEqual[re, -1.2e-123], N[(im / N[(1.0 + N[(re * N[(N[(re * N[(0.5 + N[(re * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1e+131], N[(N[(1.0 + N[(N[(re * N[(1.0 - N[(t$95$0 * N[(re * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(0.16666666666666666 * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 + re \cdot 0.16666666666666666\\
t_1 := re \cdot t\_0\\
\mathbf{if}\;re \leq -1.2 \cdot 10^{-123}:\\
\;\;\;\;\frac{im}{1 + re \cdot \left(re \cdot \left(0.5 + re \cdot -0.16666666666666666\right) + -1\right)}\\
\mathbf{elif}\;re \leq 10^{+131}:\\
\;\;\;\;\left(1 + \frac{re \cdot \left(1 - t\_0 \cdot \left(re \cdot t\_1\right)\right)}{1 - t\_1}\right) \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\
\end{array}
\end{array}
if re < -1.2e-123Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6433.7%
Simplified33.7%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
Applied egg-rr33.7%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6485.6%
Simplified85.6%
Taylor expanded in im around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6465.9%
Simplified65.9%
if -1.2e-123 < re < 9.9999999999999991e130Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6484.1%
Simplified84.1%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6450.7%
Simplified50.7%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr53.5%
if 9.9999999999999991e130 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified78.9%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6476.5%
Simplified76.5%
Taylor expanded in re around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6478.9%
Simplified78.9%
Final simplification61.3%
(FPCore (re im)
:precision binary64
(if (<= re -2.45e-123)
(/ im (+ 1.0 (* re (+ (* re (+ 0.5 (* re -0.16666666666666666))) -1.0))))
(*
(+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666))))))
(* im (+ 1.0 (* im (* im -0.16666666666666666)))))))
double code(double re, double im) {
double tmp;
if (re <= -2.45e-123) {
tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0)));
} else {
tmp = (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) * (im * (1.0 + (im * (im * -0.16666666666666666))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= (-2.45d-123)) then
tmp = im / (1.0d0 + (re * ((re * (0.5d0 + (re * (-0.16666666666666666d0)))) + (-1.0d0))))
else
tmp = (1.0d0 + (re * (1.0d0 + (re * (0.5d0 + (re * 0.16666666666666666d0)))))) * (im * (1.0d0 + (im * (im * (-0.16666666666666666d0)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -2.45e-123) {
tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0)));
} else {
tmp = (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) * (im * (1.0 + (im * (im * -0.16666666666666666))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -2.45e-123: tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0))) else: tmp = (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) * (im * (1.0 + (im * (im * -0.16666666666666666)))) return tmp
function code(re, im) tmp = 0.0 if (re <= -2.45e-123) tmp = Float64(im / Float64(1.0 + Float64(re * Float64(Float64(re * Float64(0.5 + Float64(re * -0.16666666666666666))) + -1.0)))); else tmp = Float64(Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666)))))) * Float64(im * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -2.45e-123) tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0))); else tmp = (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) * (im * (1.0 + (im * (im * -0.16666666666666666)))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -2.45e-123], N[(im / N[(1.0 + N[(re * N[(N[(re * N[(0.5 + N[(re * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(re * N[(1.0 + N[(re * N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -2.45 \cdot 10^{-123}:\\
\;\;\;\;\frac{im}{1 + re \cdot \left(re \cdot \left(0.5 + re \cdot -0.16666666666666666\right) + -1\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right) \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if re < -2.4499999999999999e-123Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6433.7%
Simplified33.7%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
Applied egg-rr33.7%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6485.6%
Simplified85.6%
Taylor expanded in im around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6465.9%
Simplified65.9%
if -2.4499999999999999e-123 < re Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6487.6%
Simplified87.6%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6455.7%
Simplified55.7%
(FPCore (re im)
:precision binary64
(if (<= re -3.8e-123)
(/ im (+ 1.0 (* re (+ (* re (+ 0.5 (* re -0.16666666666666666))) -1.0))))
(*
(* im (+ 1.0 (* im (* im -0.16666666666666666))))
(+ 1.0 (* re (* (* re re) (+ 0.16666666666666666 (/ 0.5 re))))))))
double code(double re, double im) {
double tmp;
if (re <= -3.8e-123) {
tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0)));
} else {
tmp = (im * (1.0 + (im * (im * -0.16666666666666666)))) * (1.0 + (re * ((re * re) * (0.16666666666666666 + (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 (re <= (-3.8d-123)) then
tmp = im / (1.0d0 + (re * ((re * (0.5d0 + (re * (-0.16666666666666666d0)))) + (-1.0d0))))
else
tmp = (im * (1.0d0 + (im * (im * (-0.16666666666666666d0))))) * (1.0d0 + (re * ((re * re) * (0.16666666666666666d0 + (0.5d0 / re)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -3.8e-123) {
tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0)));
} else {
tmp = (im * (1.0 + (im * (im * -0.16666666666666666)))) * (1.0 + (re * ((re * re) * (0.16666666666666666 + (0.5 / re)))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -3.8e-123: tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0))) else: tmp = (im * (1.0 + (im * (im * -0.16666666666666666)))) * (1.0 + (re * ((re * re) * (0.16666666666666666 + (0.5 / re))))) return tmp
function code(re, im) tmp = 0.0 if (re <= -3.8e-123) tmp = Float64(im / Float64(1.0 + Float64(re * Float64(Float64(re * Float64(0.5 + Float64(re * -0.16666666666666666))) + -1.0)))); else tmp = Float64(Float64(im * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666)))) * Float64(1.0 + Float64(re * Float64(Float64(re * re) * Float64(0.16666666666666666 + Float64(0.5 / re)))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -3.8e-123) tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0))); else tmp = (im * (1.0 + (im * (im * -0.16666666666666666)))) * (1.0 + (re * ((re * re) * (0.16666666666666666 + (0.5 / re))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -3.8e-123], N[(im / N[(1.0 + N[(re * N[(N[(re * N[(0.5 + N[(re * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(im * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(re * N[(N[(re * re), $MachinePrecision] * N[(0.16666666666666666 + N[(0.5 / re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -3.8 \cdot 10^{-123}:\\
\;\;\;\;\frac{im}{1 + re \cdot \left(re \cdot \left(0.5 + re \cdot -0.16666666666666666\right) + -1\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right) \cdot \left(1 + re \cdot \left(\left(re \cdot re\right) \cdot \left(0.16666666666666666 + \frac{0.5}{re}\right)\right)\right)\\
\end{array}
\end{array}
if re < -3.79999999999999996e-123Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6433.7%
Simplified33.7%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
Applied egg-rr33.7%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6485.6%
Simplified85.6%
Taylor expanded in im around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6465.9%
Simplified65.9%
if -3.79999999999999996e-123 < re Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6487.6%
Simplified87.6%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6455.7%
Simplified55.7%
Taylor expanded in re around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6455.3%
Simplified55.3%
Final simplification58.8%
(FPCore (re im)
:precision binary64
(if (<= re -8e-123)
(/ im (+ 1.0 (* re (+ (* re (+ 0.5 (* re -0.16666666666666666))) -1.0))))
(if (<= re 3.7e+71)
(* im (* (+ re 1.0) (+ 1.0 (* im (* im -0.16666666666666666)))))
(* im (* 0.16666666666666666 (* re (* re re)))))))
double code(double re, double im) {
double tmp;
if (re <= -8e-123) {
tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0)));
} else if (re <= 3.7e+71) {
tmp = im * ((re + 1.0) * (1.0 + (im * (im * -0.16666666666666666))));
} else {
tmp = im * (0.16666666666666666 * (re * (re * re)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= (-8d-123)) then
tmp = im / (1.0d0 + (re * ((re * (0.5d0 + (re * (-0.16666666666666666d0)))) + (-1.0d0))))
else if (re <= 3.7d+71) then
tmp = im * ((re + 1.0d0) * (1.0d0 + (im * (im * (-0.16666666666666666d0)))))
else
tmp = im * (0.16666666666666666d0 * (re * (re * re)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -8e-123) {
tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0)));
} else if (re <= 3.7e+71) {
tmp = im * ((re + 1.0) * (1.0 + (im * (im * -0.16666666666666666))));
} else {
tmp = im * (0.16666666666666666 * (re * (re * re)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -8e-123: tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0))) elif re <= 3.7e+71: tmp = im * ((re + 1.0) * (1.0 + (im * (im * -0.16666666666666666)))) else: tmp = im * (0.16666666666666666 * (re * (re * re))) return tmp
function code(re, im) tmp = 0.0 if (re <= -8e-123) tmp = Float64(im / Float64(1.0 + Float64(re * Float64(Float64(re * Float64(0.5 + Float64(re * -0.16666666666666666))) + -1.0)))); elseif (re <= 3.7e+71) tmp = Float64(im * Float64(Float64(re + 1.0) * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666))))); else tmp = Float64(im * Float64(0.16666666666666666 * Float64(re * Float64(re * re)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -8e-123) tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0))); elseif (re <= 3.7e+71) tmp = im * ((re + 1.0) * (1.0 + (im * (im * -0.16666666666666666)))); else tmp = im * (0.16666666666666666 * (re * (re * re))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -8e-123], N[(im / N[(1.0 + N[(re * N[(N[(re * N[(0.5 + N[(re * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 3.7e+71], N[(im * N[(N[(re + 1.0), $MachinePrecision] * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(0.16666666666666666 * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -8 \cdot 10^{-123}:\\
\;\;\;\;\frac{im}{1 + re \cdot \left(re \cdot \left(0.5 + re \cdot -0.16666666666666666\right) + -1\right)}\\
\mathbf{elif}\;re \leq 3.7 \cdot 10^{+71}:\\
\;\;\;\;im \cdot \left(\left(re + 1\right) \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\
\end{array}
\end{array}
if re < -8.0000000000000005e-123Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6433.7%
Simplified33.7%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
Applied egg-rr33.7%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6485.6%
Simplified85.6%
Taylor expanded in im around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6465.9%
Simplified65.9%
if -8.0000000000000005e-123 < re < 3.7e71Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6488.2%
Simplified88.2%
Taylor expanded in im around 0
associate-+r+N/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified49.6%
if 3.7e71 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified75.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6462.3%
Simplified62.3%
Taylor expanded in re around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.5%
Simplified69.5%
Final simplification59.0%
(FPCore (re im)
:precision binary64
(if (<= re 160.0)
(/ im (+ 1.0 (* re (+ (* re (+ 0.5 (* re -0.16666666666666666))) -1.0))))
(*
(* re (* re (* re 0.16666666666666666)))
(* im (+ 1.0 (* im (* im -0.16666666666666666)))))))
double code(double re, double im) {
double tmp;
if (re <= 160.0) {
tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0)));
} else {
tmp = (re * (re * (re * 0.16666666666666666))) * (im * (1.0 + (im * (im * -0.16666666666666666))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 160.0d0) then
tmp = im / (1.0d0 + (re * ((re * (0.5d0 + (re * (-0.16666666666666666d0)))) + (-1.0d0))))
else
tmp = (re * (re * (re * 0.16666666666666666d0))) * (im * (1.0d0 + (im * (im * (-0.16666666666666666d0)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 160.0) {
tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0)));
} else {
tmp = (re * (re * (re * 0.16666666666666666))) * (im * (1.0 + (im * (im * -0.16666666666666666))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 160.0: tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0))) else: tmp = (re * (re * (re * 0.16666666666666666))) * (im * (1.0 + (im * (im * -0.16666666666666666)))) return tmp
function code(re, im) tmp = 0.0 if (re <= 160.0) tmp = Float64(im / Float64(1.0 + Float64(re * Float64(Float64(re * Float64(0.5 + Float64(re * -0.16666666666666666))) + -1.0)))); else tmp = Float64(Float64(re * Float64(re * Float64(re * 0.16666666666666666))) * Float64(im * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 160.0) tmp = im / (1.0 + (re * ((re * (0.5 + (re * -0.16666666666666666))) + -1.0))); else tmp = (re * (re * (re * 0.16666666666666666))) * (im * (1.0 + (im * (im * -0.16666666666666666)))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 160.0], N[(im / N[(1.0 + N[(re * N[(N[(re * N[(0.5 + N[(re * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(re * N[(re * N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 160:\\
\;\;\;\;\frac{im}{1 + re \cdot \left(re \cdot \left(0.5 + re \cdot -0.16666666666666666\right) + -1\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(re \cdot \left(re \cdot \left(re \cdot 0.16666666666666666\right)\right)\right) \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if re < 160Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6470.4%
Simplified70.4%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
Applied egg-rr70.4%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6493.0%
Simplified93.0%
Taylor expanded in im around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6457.5%
Simplified57.5%
if 160 < re Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6469.3%
Simplified69.3%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6462.1%
Simplified62.1%
Taylor expanded in re around inf
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6462.1%
Simplified62.1%
(FPCore (re im) :precision binary64 (if (<= im 1.22e+46) (* im (+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666))))))) (* im (* re (+ 1.0 (* im (* im -0.16666666666666666)))))))
double code(double re, double im) {
double tmp;
if (im <= 1.22e+46) {
tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
} else {
tmp = im * (re * (1.0 + (im * (im * -0.16666666666666666))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 1.22d+46) then
tmp = im * (1.0d0 + (re * (1.0d0 + (re * (0.5d0 + (re * 0.16666666666666666d0))))))
else
tmp = im * (re * (1.0d0 + (im * (im * (-0.16666666666666666d0)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 1.22e+46) {
tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
} else {
tmp = im * (re * (1.0 + (im * (im * -0.16666666666666666))));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 1.22e+46: tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) else: tmp = im * (re * (1.0 + (im * (im * -0.16666666666666666)))) return tmp
function code(re, im) tmp = 0.0 if (im <= 1.22e+46) tmp = Float64(im * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666))))))); else tmp = Float64(im * Float64(re * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 1.22e+46) tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))); else tmp = im * (re * (1.0 + (im * (im * -0.16666666666666666)))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 1.22e+46], N[(im * N[(1.0 + N[(re * N[(1.0 + N[(re * N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(re * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 1.22 \cdot 10^{+46}:\\
\;\;\;\;im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(re \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if im < 1.22e46Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6470.1%
Simplified70.1%
Taylor expanded in im around 0
Simplified48.3%
if 1.22e46 < im Initial program 99.9%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6459.0%
Simplified59.0%
Taylor expanded in re around inf
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f643.5%
Simplified3.5%
Taylor expanded in im around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6412.9%
Simplified12.9%
Final simplification40.7%
(FPCore (re im) :precision binary64 (if (<= re 4.25e+71) (* im (* (+ re 1.0) (+ 1.0 (* im (* im -0.16666666666666666))))) (* im (* 0.16666666666666666 (* re (* re re))))))
double code(double re, double im) {
double tmp;
if (re <= 4.25e+71) {
tmp = im * ((re + 1.0) * (1.0 + (im * (im * -0.16666666666666666))));
} else {
tmp = im * (0.16666666666666666 * (re * (re * re)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 4.25d+71) then
tmp = im * ((re + 1.0d0) * (1.0d0 + (im * (im * (-0.16666666666666666d0)))))
else
tmp = im * (0.16666666666666666d0 * (re * (re * re)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 4.25e+71) {
tmp = im * ((re + 1.0) * (1.0 + (im * (im * -0.16666666666666666))));
} else {
tmp = im * (0.16666666666666666 * (re * (re * re)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 4.25e+71: tmp = im * ((re + 1.0) * (1.0 + (im * (im * -0.16666666666666666)))) else: tmp = im * (0.16666666666666666 * (re * (re * re))) return tmp
function code(re, im) tmp = 0.0 if (re <= 4.25e+71) tmp = Float64(im * Float64(Float64(re + 1.0) * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666))))); else tmp = Float64(im * Float64(0.16666666666666666 * Float64(re * Float64(re * re)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 4.25e+71) tmp = im * ((re + 1.0) * (1.0 + (im * (im * -0.16666666666666666)))); else tmp = im * (0.16666666666666666 * (re * (re * re))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 4.25e+71], N[(im * N[(N[(re + 1.0), $MachinePrecision] * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(0.16666666666666666 * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 4.25 \cdot 10^{+71}:\\
\;\;\;\;im \cdot \left(\left(re + 1\right) \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\
\end{array}
\end{array}
if re < 4.2499999999999998e71Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6465.9%
Simplified65.9%
Taylor expanded in im around 0
associate-+r+N/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified35.2%
if 4.2499999999999998e71 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified75.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6462.3%
Simplified62.3%
Taylor expanded in re around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.5%
Simplified69.5%
Final simplification42.2%
(FPCore (re im) :precision binary64 (if (<= im 1.22e+46) (* im (+ 1.0 (* re (* re (* re 0.16666666666666666))))) (* im (* re (+ 1.0 (* im (* im -0.16666666666666666)))))))
double code(double re, double im) {
double tmp;
if (im <= 1.22e+46) {
tmp = im * (1.0 + (re * (re * (re * 0.16666666666666666))));
} else {
tmp = im * (re * (1.0 + (im * (im * -0.16666666666666666))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 1.22d+46) then
tmp = im * (1.0d0 + (re * (re * (re * 0.16666666666666666d0))))
else
tmp = im * (re * (1.0d0 + (im * (im * (-0.16666666666666666d0)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 1.22e+46) {
tmp = im * (1.0 + (re * (re * (re * 0.16666666666666666))));
} else {
tmp = im * (re * (1.0 + (im * (im * -0.16666666666666666))));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 1.22e+46: tmp = im * (1.0 + (re * (re * (re * 0.16666666666666666)))) else: tmp = im * (re * (1.0 + (im * (im * -0.16666666666666666)))) return tmp
function code(re, im) tmp = 0.0 if (im <= 1.22e+46) tmp = Float64(im * Float64(1.0 + Float64(re * Float64(re * Float64(re * 0.16666666666666666))))); else tmp = Float64(im * Float64(re * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 1.22e+46) tmp = im * (1.0 + (re * (re * (re * 0.16666666666666666)))); else tmp = im * (re * (1.0 + (im * (im * -0.16666666666666666)))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 1.22e+46], N[(im * N[(1.0 + N[(re * N[(re * N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(re * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 1.22 \cdot 10^{+46}:\\
\;\;\;\;im \cdot \left(1 + re \cdot \left(re \cdot \left(re \cdot 0.16666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(re \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if im < 1.22e46Initial program 100.0%
Taylor expanded in im around 0
Simplified75.8%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6446.4%
Simplified46.4%
Taylor expanded in re around inf
unpow2N/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6446.1%
Simplified46.1%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6447.9%
Simplified47.9%
if 1.22e46 < im Initial program 99.9%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6459.0%
Simplified59.0%
Taylor expanded in re around inf
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f643.5%
Simplified3.5%
Taylor expanded in im around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6412.9%
Simplified12.9%
Final simplification40.4%
(FPCore (re im) :precision binary64 (if (<= re 3.9e+71) (* im (+ 1.0 (* im (* im -0.16666666666666666)))) (* im (* 0.16666666666666666 (* re (* re re))))))
double code(double re, double im) {
double tmp;
if (re <= 3.9e+71) {
tmp = im * (1.0 + (im * (im * -0.16666666666666666)));
} else {
tmp = im * (0.16666666666666666 * (re * (re * re)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 3.9d+71) then
tmp = im * (1.0d0 + (im * (im * (-0.16666666666666666d0))))
else
tmp = im * (0.16666666666666666d0 * (re * (re * re)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 3.9e+71) {
tmp = im * (1.0 + (im * (im * -0.16666666666666666)));
} else {
tmp = im * (0.16666666666666666 * (re * (re * re)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 3.9e+71: tmp = im * (1.0 + (im * (im * -0.16666666666666666))) else: tmp = im * (0.16666666666666666 * (re * (re * re))) return tmp
function code(re, im) tmp = 0.0 if (re <= 3.9e+71) tmp = Float64(im * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666)))); else tmp = Float64(im * Float64(0.16666666666666666 * Float64(re * Float64(re * re)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 3.9e+71) tmp = im * (1.0 + (im * (im * -0.16666666666666666))); else tmp = im * (0.16666666666666666 * (re * (re * re))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 3.9e+71], N[(im * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(0.16666666666666666 * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 3.9 \cdot 10^{+71}:\\
\;\;\;\;im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\
\end{array}
\end{array}
if re < 3.9000000000000001e71Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6465.5%
Simplified65.5%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6434.7%
Simplified34.7%
if 3.9000000000000001e71 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified75.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6462.3%
Simplified62.3%
Taylor expanded in re around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.5%
Simplified69.5%
(FPCore (re im) :precision binary64 (if (<= re 185.0) (+ im (* re im)) (* im (* 0.16666666666666666 (* re (* re re))))))
double code(double re, double im) {
double tmp;
if (re <= 185.0) {
tmp = im + (re * im);
} else {
tmp = im * (0.16666666666666666 * (re * (re * re)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 185.0d0) then
tmp = im + (re * im)
else
tmp = im * (0.16666666666666666d0 * (re * (re * re)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 185.0) {
tmp = im + (re * im);
} else {
tmp = im * (0.16666666666666666 * (re * (re * re)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 185.0: tmp = im + (re * im) else: tmp = im * (0.16666666666666666 * (re * (re * re))) return tmp
function code(re, im) tmp = 0.0 if (re <= 185.0) tmp = Float64(im + Float64(re * im)); else tmp = Float64(im * Float64(0.16666666666666666 * Float64(re * Float64(re * re)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 185.0) tmp = im + (re * im); else tmp = im * (0.16666666666666666 * (re * (re * re))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 185.0], N[(im + N[(re * im), $MachinePrecision]), $MachinePrecision], N[(im * N[(0.16666666666666666 * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 185:\\
\;\;\;\;im + re \cdot im\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(0.16666666666666666 \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\
\end{array}
\end{array}
if re < 185Initial program 100.0%
Taylor expanded in im around 0
Simplified64.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6435.0%
Simplified35.0%
Taylor expanded in re around 0
Simplified35.1%
if 185 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified72.3%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6450.3%
Simplified50.3%
Taylor expanded in re around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6456.1%
Simplified56.1%
(FPCore (re im) :precision binary64 (if (<= re 200.0) (+ im (* re im)) (* im (* 0.5 (* re re)))))
double code(double re, double im) {
double tmp;
if (re <= 200.0) {
tmp = im + (re * im);
} else {
tmp = im * (0.5 * (re * re));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 200.0d0) then
tmp = im + (re * im)
else
tmp = im * (0.5d0 * (re * re))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 200.0) {
tmp = im + (re * im);
} else {
tmp = im * (0.5 * (re * re));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 200.0: tmp = im + (re * im) else: tmp = im * (0.5 * (re * re)) return tmp
function code(re, im) tmp = 0.0 if (re <= 200.0) tmp = Float64(im + Float64(re * im)); else tmp = Float64(im * Float64(0.5 * Float64(re * re))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 200.0) tmp = im + (re * im); else tmp = im * (0.5 * (re * re)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 200.0], N[(im + N[(re * im), $MachinePrecision]), $MachinePrecision], N[(im * N[(0.5 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 200:\\
\;\;\;\;im + re \cdot im\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(0.5 \cdot \left(re \cdot re\right)\right)\\
\end{array}
\end{array}
if re < 200Initial program 100.0%
Taylor expanded in im around 0
Simplified64.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6435.0%
Simplified35.0%
Taylor expanded in re around 0
Simplified35.1%
if 200 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified72.3%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6441.4%
Simplified41.4%
Taylor expanded in re around inf
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6447.2%
Simplified47.2%
(FPCore (re im) :precision binary64 (if (<= im 4.3e+20) im (* re im)))
double code(double re, double im) {
double tmp;
if (im <= 4.3e+20) {
tmp = im;
} else {
tmp = 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 <= 4.3d+20) then
tmp = im
else
tmp = re * im
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 4.3e+20) {
tmp = im;
} else {
tmp = re * im;
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 4.3e+20: tmp = im else: tmp = re * im return tmp
function code(re, im) tmp = 0.0 if (im <= 4.3e+20) tmp = im; else tmp = Float64(re * im); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 4.3e+20) tmp = im; else tmp = re * im; end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 4.3e+20], im, N[(re * im), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 4.3 \cdot 10^{+20}:\\
\;\;\;\;im\\
\mathbf{else}:\\
\;\;\;\;re \cdot im\\
\end{array}
\end{array}
if im < 4.3e20Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6451.5%
Simplified51.5%
Taylor expanded in im around 0
Simplified33.8%
if 4.3e20 < im Initial program 99.9%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6457.8%
Simplified57.8%
Taylor expanded in re around inf
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f643.6%
Simplified3.6%
Taylor expanded in im around 0
*-lowering-*.f648.4%
Simplified8.4%
Final simplification28.0%
(FPCore (re im) :precision binary64 (+ im (* re im)))
double code(double re, double im) {
return im + (re * im);
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = im + (re * im)
end function
public static double code(double re, double im) {
return im + (re * im);
}
def code(re, im): return im + (re * im)
function code(re, im) return Float64(im + Float64(re * im)) end
function tmp = code(re, im) tmp = im + (re * im); end
code[re_, im_] := N[(im + N[(re * im), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
im + re \cdot im
\end{array}
Initial program 100.0%
Taylor expanded in im around 0
Simplified66.1%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6436.6%
Simplified36.6%
Taylor expanded in re around 0
Simplified29.2%
(FPCore (re im) :precision binary64 (* im (+ re 1.0)))
double code(double re, double im) {
return im * (re + 1.0);
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = im * (re + 1.0d0)
end function
public static double code(double re, double im) {
return im * (re + 1.0);
}
def code(re, im): return im * (re + 1.0)
function code(re, im) return Float64(im * Float64(re + 1.0)) end
function tmp = code(re, im) tmp = im * (re + 1.0); end
code[re_, im_] := N[(im * N[(re + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
im \cdot \left(re + 1\right)
\end{array}
Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6453.5%
Simplified53.5%
Taylor expanded in im around 0
Simplified29.2%
Final simplification29.2%
(FPCore (re im) :precision binary64 im)
double code(double re, double im) {
return im;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = im
end function
public static double code(double re, double im) {
return im;
}
def code(re, im): return im
function code(re, im) return im end
function tmp = code(re, im) tmp = im; end
code[re_, im_] := im
\begin{array}{l}
\\
im
\end{array}
Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6452.8%
Simplified52.8%
Taylor expanded in im around 0
Simplified26.8%
herbie shell --seed 2024158
(FPCore (re im)
:name "math.exp on complex, imaginary part"
:precision binary64
(* (exp re) (sin im)))