
(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 (* re (+ 0.5 (* re 0.16666666666666666))))
(t_1 (+ 1.0 t_0))
(t_2 (* re t_1))
(t_3 (- -1.0 t_0)))
(if (<= re -0.105)
(* (exp re) im)
(if (<= re 4.4e+51)
(*
(sin im)
(/
(+ 1.0 (* t_2 (* (* re re) (* t_1 t_1))))
(+ 1.0 (* t_2 (+ t_2 -1.0)))))
(if (<= re 1e+103)
(/ (* (sin im) (+ 1.0 (* (* re re) (* t_1 t_3)))) (+ 1.0 (* re t_3)))
(* (sin im) (+ 1.0 t_2)))))))
double code(double re, double im) {
double t_0 = re * (0.5 + (re * 0.16666666666666666));
double t_1 = 1.0 + t_0;
double t_2 = re * t_1;
double t_3 = -1.0 - t_0;
double tmp;
if (re <= -0.105) {
tmp = exp(re) * im;
} else if (re <= 4.4e+51) {
tmp = sin(im) * ((1.0 + (t_2 * ((re * re) * (t_1 * t_1)))) / (1.0 + (t_2 * (t_2 + -1.0))));
} else if (re <= 1e+103) {
tmp = (sin(im) * (1.0 + ((re * re) * (t_1 * t_3)))) / (1.0 + (re * t_3));
} else {
tmp = sin(im) * (1.0 + t_2);
}
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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = re * (0.5d0 + (re * 0.16666666666666666d0))
t_1 = 1.0d0 + t_0
t_2 = re * t_1
t_3 = (-1.0d0) - t_0
if (re <= (-0.105d0)) then
tmp = exp(re) * im
else if (re <= 4.4d+51) then
tmp = sin(im) * ((1.0d0 + (t_2 * ((re * re) * (t_1 * t_1)))) / (1.0d0 + (t_2 * (t_2 + (-1.0d0)))))
else if (re <= 1d+103) then
tmp = (sin(im) * (1.0d0 + ((re * re) * (t_1 * t_3)))) / (1.0d0 + (re * t_3))
else
tmp = sin(im) * (1.0d0 + t_2)
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = re * (0.5 + (re * 0.16666666666666666));
double t_1 = 1.0 + t_0;
double t_2 = re * t_1;
double t_3 = -1.0 - t_0;
double tmp;
if (re <= -0.105) {
tmp = Math.exp(re) * im;
} else if (re <= 4.4e+51) {
tmp = Math.sin(im) * ((1.0 + (t_2 * ((re * re) * (t_1 * t_1)))) / (1.0 + (t_2 * (t_2 + -1.0))));
} else if (re <= 1e+103) {
tmp = (Math.sin(im) * (1.0 + ((re * re) * (t_1 * t_3)))) / (1.0 + (re * t_3));
} else {
tmp = Math.sin(im) * (1.0 + t_2);
}
return tmp;
}
def code(re, im): t_0 = re * (0.5 + (re * 0.16666666666666666)) t_1 = 1.0 + t_0 t_2 = re * t_1 t_3 = -1.0 - t_0 tmp = 0 if re <= -0.105: tmp = math.exp(re) * im elif re <= 4.4e+51: tmp = math.sin(im) * ((1.0 + (t_2 * ((re * re) * (t_1 * t_1)))) / (1.0 + (t_2 * (t_2 + -1.0)))) elif re <= 1e+103: tmp = (math.sin(im) * (1.0 + ((re * re) * (t_1 * t_3)))) / (1.0 + (re * t_3)) else: tmp = math.sin(im) * (1.0 + t_2) return tmp
function code(re, im) t_0 = Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666))) t_1 = Float64(1.0 + t_0) t_2 = Float64(re * t_1) t_3 = Float64(-1.0 - t_0) tmp = 0.0 if (re <= -0.105) tmp = Float64(exp(re) * im); elseif (re <= 4.4e+51) tmp = Float64(sin(im) * Float64(Float64(1.0 + Float64(t_2 * Float64(Float64(re * re) * Float64(t_1 * t_1)))) / Float64(1.0 + Float64(t_2 * Float64(t_2 + -1.0))))); elseif (re <= 1e+103) tmp = Float64(Float64(sin(im) * Float64(1.0 + Float64(Float64(re * re) * Float64(t_1 * t_3)))) / Float64(1.0 + Float64(re * t_3))); else tmp = Float64(sin(im) * Float64(1.0 + t_2)); end return tmp end
function tmp_2 = code(re, im) t_0 = re * (0.5 + (re * 0.16666666666666666)); t_1 = 1.0 + t_0; t_2 = re * t_1; t_3 = -1.0 - t_0; tmp = 0.0; if (re <= -0.105) tmp = exp(re) * im; elseif (re <= 4.4e+51) tmp = sin(im) * ((1.0 + (t_2 * ((re * re) * (t_1 * t_1)))) / (1.0 + (t_2 * (t_2 + -1.0)))); elseif (re <= 1e+103) tmp = (sin(im) * (1.0 + ((re * re) * (t_1 * t_3)))) / (1.0 + (re * t_3)); else tmp = sin(im) * (1.0 + t_2); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(re * N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(re * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(-1.0 - t$95$0), $MachinePrecision]}, If[LessEqual[re, -0.105], N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision], If[LessEqual[re, 4.4e+51], N[(N[Sin[im], $MachinePrecision] * N[(N[(1.0 + N[(t$95$2 * N[(N[(re * re), $MachinePrecision] * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(t$95$2 * N[(t$95$2 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1e+103], N[(N[(N[Sin[im], $MachinePrecision] * N[(1.0 + N[(N[(re * re), $MachinePrecision] * N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(re * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[im], $MachinePrecision] * N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\\
t_1 := 1 + t\_0\\
t_2 := re \cdot t\_1\\
t_3 := -1 - t\_0\\
\mathbf{if}\;re \leq -0.105:\\
\;\;\;\;e^{re} \cdot im\\
\mathbf{elif}\;re \leq 4.4 \cdot 10^{+51}:\\
\;\;\;\;\sin im \cdot \frac{1 + t\_2 \cdot \left(\left(re \cdot re\right) \cdot \left(t\_1 \cdot t\_1\right)\right)}{1 + t\_2 \cdot \left(t\_2 + -1\right)}\\
\mathbf{elif}\;re \leq 10^{+103}:\\
\;\;\;\;\frac{\sin im \cdot \left(1 + \left(re \cdot re\right) \cdot \left(t\_1 \cdot t\_3\right)\right)}{1 + re \cdot t\_3}\\
\mathbf{else}:\\
\;\;\;\;\sin im \cdot \left(1 + t\_2\right)\\
\end{array}
\end{array}
if re < -0.104999999999999996Initial program 100.0%
Taylor expanded in im around 0
Simplified100.0%
if -0.104999999999999996 < re < 4.39999999999999984e51Initial 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-*.f6492.6%
Simplified92.6%
flip3-+N/A
/-lowering-/.f64N/A
Applied egg-rr96.8%
if 4.39999999999999984e51 < re < 1e103Initial 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-*.f646.7%
Simplified6.7%
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr100.0%
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%
Final simplification98.3%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* re (+ 0.5 (* re 0.16666666666666666))))
(t_1 (+ 1.0 t_0))
(t_2 (- -1.0 t_0)))
(if (<= re -0.16)
(* (exp re) im)
(if (<= re 1e+103)
(/ (* (sin im) (+ 1.0 (* (* re re) (* t_1 t_2)))) (+ 1.0 (* re t_2)))
(* (sin im) (+ 1.0 (* re t_1)))))))
double code(double re, double im) {
double t_0 = re * (0.5 + (re * 0.16666666666666666));
double t_1 = 1.0 + t_0;
double t_2 = -1.0 - t_0;
double tmp;
if (re <= -0.16) {
tmp = exp(re) * im;
} else if (re <= 1e+103) {
tmp = (sin(im) * (1.0 + ((re * re) * (t_1 * t_2)))) / (1.0 + (re * t_2));
} else {
tmp = sin(im) * (1.0 + (re * t_1));
}
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) :: t_2
real(8) :: tmp
t_0 = re * (0.5d0 + (re * 0.16666666666666666d0))
t_1 = 1.0d0 + t_0
t_2 = (-1.0d0) - t_0
if (re <= (-0.16d0)) then
tmp = exp(re) * im
else if (re <= 1d+103) then
tmp = (sin(im) * (1.0d0 + ((re * re) * (t_1 * t_2)))) / (1.0d0 + (re * t_2))
else
tmp = sin(im) * (1.0d0 + (re * t_1))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = re * (0.5 + (re * 0.16666666666666666));
double t_1 = 1.0 + t_0;
double t_2 = -1.0 - t_0;
double tmp;
if (re <= -0.16) {
tmp = Math.exp(re) * im;
} else if (re <= 1e+103) {
tmp = (Math.sin(im) * (1.0 + ((re * re) * (t_1 * t_2)))) / (1.0 + (re * t_2));
} else {
tmp = Math.sin(im) * (1.0 + (re * t_1));
}
return tmp;
}
def code(re, im): t_0 = re * (0.5 + (re * 0.16666666666666666)) t_1 = 1.0 + t_0 t_2 = -1.0 - t_0 tmp = 0 if re <= -0.16: tmp = math.exp(re) * im elif re <= 1e+103: tmp = (math.sin(im) * (1.0 + ((re * re) * (t_1 * t_2)))) / (1.0 + (re * t_2)) else: tmp = math.sin(im) * (1.0 + (re * t_1)) return tmp
function code(re, im) t_0 = Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666))) t_1 = Float64(1.0 + t_0) t_2 = Float64(-1.0 - t_0) tmp = 0.0 if (re <= -0.16) tmp = Float64(exp(re) * im); elseif (re <= 1e+103) tmp = Float64(Float64(sin(im) * Float64(1.0 + Float64(Float64(re * re) * Float64(t_1 * t_2)))) / Float64(1.0 + Float64(re * t_2))); else tmp = Float64(sin(im) * Float64(1.0 + Float64(re * t_1))); end return tmp end
function tmp_2 = code(re, im) t_0 = re * (0.5 + (re * 0.16666666666666666)); t_1 = 1.0 + t_0; t_2 = -1.0 - t_0; tmp = 0.0; if (re <= -0.16) tmp = exp(re) * im; elseif (re <= 1e+103) tmp = (sin(im) * (1.0 + ((re * re) * (t_1 * t_2)))) / (1.0 + (re * t_2)); else tmp = sin(im) * (1.0 + (re * t_1)); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(re * N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 - t$95$0), $MachinePrecision]}, If[LessEqual[re, -0.16], N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision], If[LessEqual[re, 1e+103], N[(N[(N[Sin[im], $MachinePrecision] * N[(1.0 + N[(N[(re * re), $MachinePrecision] * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(re * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[im], $MachinePrecision] * N[(1.0 + N[(re * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\\
t_1 := 1 + t\_0\\
t_2 := -1 - t\_0\\
\mathbf{if}\;re \leq -0.16:\\
\;\;\;\;e^{re} \cdot im\\
\mathbf{elif}\;re \leq 10^{+103}:\\
\;\;\;\;\frac{\sin im \cdot \left(1 + \left(re \cdot re\right) \cdot \left(t\_1 \cdot t\_2\right)\right)}{1 + re \cdot t\_2}\\
\mathbf{else}:\\
\;\;\;\;\sin im \cdot \left(1 + re \cdot t\_1\right)\\
\end{array}
\end{array}
if re < -0.160000000000000003Initial program 100.0%
Taylor expanded in im around 0
Simplified100.0%
if -0.160000000000000003 < re < 1e103Initial 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-*.f6486.3%
Simplified86.3%
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr93.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%
Final simplification96.0%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (exp re) im)) (t_1 (+ 0.5 (* re 0.16666666666666666))))
(if (<= re -0.39)
t_0
(if (<= re 92000000000000.0)
(*
(sin im)
(+
(* (+ 1.0 (* re (* re re))) (/ 1.0 (+ (* re re) (- 1.0 re))))
(* t_1 (* re re))))
(if (<= re 5e+102)
t_0
(* (sin im) (+ 1.0 (* re (+ 1.0 (* re t_1))))))))))
double code(double re, double im) {
double t_0 = exp(re) * im;
double t_1 = 0.5 + (re * 0.16666666666666666);
double tmp;
if (re <= -0.39) {
tmp = t_0;
} else if (re <= 92000000000000.0) {
tmp = sin(im) * (((1.0 + (re * (re * re))) * (1.0 / ((re * re) + (1.0 - re)))) + (t_1 * (re * re)));
} else if (re <= 5e+102) {
tmp = t_0;
} else {
tmp = sin(im) * (1.0 + (re * (1.0 + (re * t_1))));
}
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 = exp(re) * im
t_1 = 0.5d0 + (re * 0.16666666666666666d0)
if (re <= (-0.39d0)) then
tmp = t_0
else if (re <= 92000000000000.0d0) then
tmp = sin(im) * (((1.0d0 + (re * (re * re))) * (1.0d0 / ((re * re) + (1.0d0 - re)))) + (t_1 * (re * re)))
else if (re <= 5d+102) then
tmp = t_0
else
tmp = sin(im) * (1.0d0 + (re * (1.0d0 + (re * t_1))))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = Math.exp(re) * im;
double t_1 = 0.5 + (re * 0.16666666666666666);
double tmp;
if (re <= -0.39) {
tmp = t_0;
} else if (re <= 92000000000000.0) {
tmp = Math.sin(im) * (((1.0 + (re * (re * re))) * (1.0 / ((re * re) + (1.0 - re)))) + (t_1 * (re * re)));
} else if (re <= 5e+102) {
tmp = t_0;
} else {
tmp = Math.sin(im) * (1.0 + (re * (1.0 + (re * t_1))));
}
return tmp;
}
def code(re, im): t_0 = math.exp(re) * im t_1 = 0.5 + (re * 0.16666666666666666) tmp = 0 if re <= -0.39: tmp = t_0 elif re <= 92000000000000.0: tmp = math.sin(im) * (((1.0 + (re * (re * re))) * (1.0 / ((re * re) + (1.0 - re)))) + (t_1 * (re * re))) elif re <= 5e+102: tmp = t_0 else: tmp = math.sin(im) * (1.0 + (re * (1.0 + (re * t_1)))) return tmp
function code(re, im) t_0 = Float64(exp(re) * im) t_1 = Float64(0.5 + Float64(re * 0.16666666666666666)) tmp = 0.0 if (re <= -0.39) tmp = t_0; elseif (re <= 92000000000000.0) tmp = Float64(sin(im) * Float64(Float64(Float64(1.0 + Float64(re * Float64(re * re))) * Float64(1.0 / Float64(Float64(re * re) + Float64(1.0 - re)))) + Float64(t_1 * Float64(re * re)))); elseif (re <= 5e+102) tmp = t_0; else tmp = Float64(sin(im) * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * t_1))))); end return tmp end
function tmp_2 = code(re, im) t_0 = exp(re) * im; t_1 = 0.5 + (re * 0.16666666666666666); tmp = 0.0; if (re <= -0.39) tmp = t_0; elseif (re <= 92000000000000.0) tmp = sin(im) * (((1.0 + (re * (re * re))) * (1.0 / ((re * re) + (1.0 - re)))) + (t_1 * (re * re))); elseif (re <= 5e+102) tmp = t_0; else tmp = sin(im) * (1.0 + (re * (1.0 + (re * t_1)))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -0.39], t$95$0, If[LessEqual[re, 92000000000000.0], N[(N[Sin[im], $MachinePrecision] * N[(N[(N[(1.0 + N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(re * re), $MachinePrecision] + N[(1.0 - re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 5e+102], t$95$0, N[(N[Sin[im], $MachinePrecision] * N[(1.0 + N[(re * N[(1.0 + N[(re * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{re} \cdot im\\
t_1 := 0.5 + re \cdot 0.16666666666666666\\
\mathbf{if}\;re \leq -0.39:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;re \leq 92000000000000:\\
\;\;\;\;\sin im \cdot \left(\left(1 + re \cdot \left(re \cdot re\right)\right) \cdot \frac{1}{re \cdot re + \left(1 - re\right)} + t\_1 \cdot \left(re \cdot re\right)\right)\\
\mathbf{elif}\;re \leq 5 \cdot 10^{+102}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\sin im \cdot \left(1 + re \cdot \left(1 + re \cdot t\_1\right)\right)\\
\end{array}
\end{array}
if re < -0.39000000000000001 or 9.2e13 < re < 5e102Initial program 100.0%
Taylor expanded in im around 0
Simplified96.5%
if -0.39000000000000001 < re < 9.2e13Initial 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.1%
Simplified98.1%
distribute-rgt-inN/A
*-lft-identityN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6498.1%
Applied egg-rr98.1%
+-commutativeN/A
flip3-+N/A
div-invN/A
metadata-evalN/A
+-commutativeN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
*-rgt-identityN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f6498.1%
Applied egg-rr98.1%
if 5e102 < 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-*.f6497.8%
Simplified97.8%
Final simplification97.5%
(FPCore (re im)
:precision binary64
(let* ((t_0 (+ 0.5 (* re 0.16666666666666666))) (t_1 (* (exp re) im)))
(if (<= re -0.0285)
t_1
(if (<= re 92000000000000.0)
(* (sin im) (+ (* t_0 (* re re)) (+ re 1.0)))
(if (<= re 5e+102)
t_1
(* (sin im) (+ 1.0 (* re (+ 1.0 (* re t_0))))))))))
double code(double re, double im) {
double t_0 = 0.5 + (re * 0.16666666666666666);
double t_1 = exp(re) * im;
double tmp;
if (re <= -0.0285) {
tmp = t_1;
} else if (re <= 92000000000000.0) {
tmp = sin(im) * ((t_0 * (re * re)) + (re + 1.0));
} else if (re <= 5e+102) {
tmp = t_1;
} else {
tmp = sin(im) * (1.0 + (re * (1.0 + (re * t_0))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 0.5d0 + (re * 0.16666666666666666d0)
t_1 = exp(re) * im
if (re <= (-0.0285d0)) then
tmp = t_1
else if (re <= 92000000000000.0d0) then
tmp = sin(im) * ((t_0 * (re * re)) + (re + 1.0d0))
else if (re <= 5d+102) then
tmp = t_1
else
tmp = sin(im) * (1.0d0 + (re * (1.0d0 + (re * t_0))))
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 = Math.exp(re) * im;
double tmp;
if (re <= -0.0285) {
tmp = t_1;
} else if (re <= 92000000000000.0) {
tmp = Math.sin(im) * ((t_0 * (re * re)) + (re + 1.0));
} else if (re <= 5e+102) {
tmp = t_1;
} else {
tmp = Math.sin(im) * (1.0 + (re * (1.0 + (re * t_0))));
}
return tmp;
}
def code(re, im): t_0 = 0.5 + (re * 0.16666666666666666) t_1 = math.exp(re) * im tmp = 0 if re <= -0.0285: tmp = t_1 elif re <= 92000000000000.0: tmp = math.sin(im) * ((t_0 * (re * re)) + (re + 1.0)) elif re <= 5e+102: tmp = t_1 else: tmp = math.sin(im) * (1.0 + (re * (1.0 + (re * t_0)))) return tmp
function code(re, im) t_0 = Float64(0.5 + Float64(re * 0.16666666666666666)) t_1 = Float64(exp(re) * im) tmp = 0.0 if (re <= -0.0285) tmp = t_1; elseif (re <= 92000000000000.0) tmp = Float64(sin(im) * Float64(Float64(t_0 * Float64(re * re)) + Float64(re + 1.0))); elseif (re <= 5e+102) tmp = t_1; else tmp = Float64(sin(im) * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * t_0))))); end return tmp end
function tmp_2 = code(re, im) t_0 = 0.5 + (re * 0.16666666666666666); t_1 = exp(re) * im; tmp = 0.0; if (re <= -0.0285) tmp = t_1; elseif (re <= 92000000000000.0) tmp = sin(im) * ((t_0 * (re * re)) + (re + 1.0)); elseif (re <= 5e+102) tmp = t_1; else tmp = sin(im) * (1.0 + (re * (1.0 + (re * t_0)))); 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[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, If[LessEqual[re, -0.0285], t$95$1, If[LessEqual[re, 92000000000000.0], N[(N[Sin[im], $MachinePrecision] * N[(N[(t$95$0 * N[(re * re), $MachinePrecision]), $MachinePrecision] + N[(re + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 5e+102], t$95$1, N[(N[Sin[im], $MachinePrecision] * N[(1.0 + N[(re * N[(1.0 + N[(re * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 + re \cdot 0.16666666666666666\\
t_1 := e^{re} \cdot im\\
\mathbf{if}\;re \leq -0.0285:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;re \leq 92000000000000:\\
\;\;\;\;\sin im \cdot \left(t\_0 \cdot \left(re \cdot re\right) + \left(re + 1\right)\right)\\
\mathbf{elif}\;re \leq 5 \cdot 10^{+102}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\sin im \cdot \left(1 + re \cdot \left(1 + re \cdot t\_0\right)\right)\\
\end{array}
\end{array}
if re < -0.028500000000000001 or 9.2e13 < re < 5e102Initial program 100.0%
Taylor expanded in im around 0
Simplified96.5%
if -0.028500000000000001 < re < 9.2e13Initial 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.1%
Simplified98.1%
distribute-rgt-inN/A
*-lft-identityN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6498.1%
Applied egg-rr98.1%
if 5e102 < 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-*.f6497.8%
Simplified97.8%
Final simplification97.5%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (exp re) im))
(t_1
(*
(sin im)
(+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666)))))))))
(if (<= re -0.049)
t_0
(if (<= re 92000000000000.0) t_1 (if (<= re 5e+102) t_0 t_1)))))
double code(double re, double im) {
double t_0 = exp(re) * im;
double t_1 = sin(im) * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
double tmp;
if (re <= -0.049) {
tmp = t_0;
} else if (re <= 92000000000000.0) {
tmp = t_1;
} else if (re <= 5e+102) {
tmp = t_0;
} else {
tmp = t_1;
}
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 = exp(re) * im
t_1 = sin(im) * (1.0d0 + (re * (1.0d0 + (re * (0.5d0 + (re * 0.16666666666666666d0))))))
if (re <= (-0.049d0)) then
tmp = t_0
else if (re <= 92000000000000.0d0) then
tmp = t_1
else if (re <= 5d+102) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = Math.exp(re) * im;
double t_1 = Math.sin(im) * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
double tmp;
if (re <= -0.049) {
tmp = t_0;
} else if (re <= 92000000000000.0) {
tmp = t_1;
} else if (re <= 5e+102) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(re, im): t_0 = math.exp(re) * im t_1 = math.sin(im) * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) tmp = 0 if re <= -0.049: tmp = t_0 elif re <= 92000000000000.0: tmp = t_1 elif re <= 5e+102: tmp = t_0 else: tmp = t_1 return tmp
function code(re, im) t_0 = Float64(exp(re) * im) t_1 = Float64(sin(im) * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666))))))) tmp = 0.0 if (re <= -0.049) tmp = t_0; elseif (re <= 92000000000000.0) tmp = t_1; elseif (re <= 5e+102) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(re, im) t_0 = exp(re) * im; t_1 = sin(im) * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))); tmp = 0.0; if (re <= -0.049) tmp = t_0; elseif (re <= 92000000000000.0) tmp = t_1; elseif (re <= 5e+102) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, Block[{t$95$1 = 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, -0.049], t$95$0, If[LessEqual[re, 92000000000000.0], t$95$1, If[LessEqual[re, 5e+102], t$95$0, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{re} \cdot im\\
t_1 := \sin im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\
\mathbf{if}\;re \leq -0.049:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;re \leq 92000000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;re \leq 5 \cdot 10^{+102}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if re < -0.049000000000000002 or 9.2e13 < re < 5e102Initial program 100.0%
Taylor expanded in im around 0
Simplified96.5%
if -0.049000000000000002 < re < 9.2e13 or 5e102 < 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%
Final simplification97.5%
(FPCore (re im)
:precision binary64
(let* ((t_0 (+ 1.0 (* re (+ 1.0 (* re 0.5))))) (t_1 (* (exp re) im)))
(if (<= re -0.014)
t_1
(if (<= re 92000000000000.0)
(/ (sin im) (/ 1.0 t_0))
(if (<= re 1.9e+154) t_1 (* (sin im) t_0))))))
double code(double re, double im) {
double t_0 = 1.0 + (re * (1.0 + (re * 0.5)));
double t_1 = exp(re) * im;
double tmp;
if (re <= -0.014) {
tmp = t_1;
} else if (re <= 92000000000000.0) {
tmp = sin(im) / (1.0 / t_0);
} else if (re <= 1.9e+154) {
tmp = t_1;
} else {
tmp = sin(im) * 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) :: t_1
real(8) :: tmp
t_0 = 1.0d0 + (re * (1.0d0 + (re * 0.5d0)))
t_1 = exp(re) * im
if (re <= (-0.014d0)) then
tmp = t_1
else if (re <= 92000000000000.0d0) then
tmp = sin(im) / (1.0d0 / t_0)
else if (re <= 1.9d+154) then
tmp = t_1
else
tmp = sin(im) * t_0
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = 1.0 + (re * (1.0 + (re * 0.5)));
double t_1 = Math.exp(re) * im;
double tmp;
if (re <= -0.014) {
tmp = t_1;
} else if (re <= 92000000000000.0) {
tmp = Math.sin(im) / (1.0 / t_0);
} else if (re <= 1.9e+154) {
tmp = t_1;
} else {
tmp = Math.sin(im) * t_0;
}
return tmp;
}
def code(re, im): t_0 = 1.0 + (re * (1.0 + (re * 0.5))) t_1 = math.exp(re) * im tmp = 0 if re <= -0.014: tmp = t_1 elif re <= 92000000000000.0: tmp = math.sin(im) / (1.0 / t_0) elif re <= 1.9e+154: tmp = t_1 else: tmp = math.sin(im) * t_0 return tmp
function code(re, im) t_0 = Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5)))) t_1 = Float64(exp(re) * im) tmp = 0.0 if (re <= -0.014) tmp = t_1; elseif (re <= 92000000000000.0) tmp = Float64(sin(im) / Float64(1.0 / t_0)); elseif (re <= 1.9e+154) tmp = t_1; else tmp = Float64(sin(im) * t_0); end return tmp end
function tmp_2 = code(re, im) t_0 = 1.0 + (re * (1.0 + (re * 0.5))); t_1 = exp(re) * im; tmp = 0.0; if (re <= -0.014) tmp = t_1; elseif (re <= 92000000000000.0) tmp = sin(im) / (1.0 / t_0); elseif (re <= 1.9e+154) tmp = t_1; else tmp = sin(im) * t_0; end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(1.0 + N[(re * N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, If[LessEqual[re, -0.014], t$95$1, If[LessEqual[re, 92000000000000.0], N[(N[Sin[im], $MachinePrecision] / N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.9e+154], t$95$1, N[(N[Sin[im], $MachinePrecision] * t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + re \cdot \left(1 + re \cdot 0.5\right)\\
t_1 := e^{re} \cdot im\\
\mathbf{if}\;re \leq -0.014:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;re \leq 92000000000000:\\
\;\;\;\;\frac{\sin im}{\frac{1}{t\_0}}\\
\mathbf{elif}\;re \leq 1.9 \cdot 10^{+154}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\sin im \cdot t\_0\\
\end{array}
\end{array}
if re < -0.0140000000000000003 or 9.2e13 < re < 1.8999999999999999e154Initial program 100.0%
Taylor expanded in im around 0
Simplified93.8%
if -0.0140000000000000003 < re < 9.2e13Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6497.8%
Simplified97.8%
*-commutativeN/A
flip3-+N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
Applied egg-rr97.8%
if 1.8999999999999999e154 < re Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification96.6%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (exp re) im))
(t_1 (* (sin im) (+ 1.0 (* re (+ 1.0 (* re 0.5)))))))
(if (<= re -0.036)
t_0
(if (<= re 92000000000000.0) t_1 (if (<= re 1.9e+154) t_0 t_1)))))
double code(double re, double im) {
double t_0 = exp(re) * im;
double t_1 = sin(im) * (1.0 + (re * (1.0 + (re * 0.5))));
double tmp;
if (re <= -0.036) {
tmp = t_0;
} else if (re <= 92000000000000.0) {
tmp = t_1;
} else if (re <= 1.9e+154) {
tmp = t_0;
} else {
tmp = t_1;
}
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 = exp(re) * im
t_1 = sin(im) * (1.0d0 + (re * (1.0d0 + (re * 0.5d0))))
if (re <= (-0.036d0)) then
tmp = t_0
else if (re <= 92000000000000.0d0) then
tmp = t_1
else if (re <= 1.9d+154) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = Math.exp(re) * im;
double t_1 = Math.sin(im) * (1.0 + (re * (1.0 + (re * 0.5))));
double tmp;
if (re <= -0.036) {
tmp = t_0;
} else if (re <= 92000000000000.0) {
tmp = t_1;
} else if (re <= 1.9e+154) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(re, im): t_0 = math.exp(re) * im t_1 = math.sin(im) * (1.0 + (re * (1.0 + (re * 0.5)))) tmp = 0 if re <= -0.036: tmp = t_0 elif re <= 92000000000000.0: tmp = t_1 elif re <= 1.9e+154: tmp = t_0 else: tmp = t_1 return tmp
function code(re, im) t_0 = Float64(exp(re) * im) t_1 = Float64(sin(im) * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5))))) tmp = 0.0 if (re <= -0.036) tmp = t_0; elseif (re <= 92000000000000.0) tmp = t_1; elseif (re <= 1.9e+154) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(re, im) t_0 = exp(re) * im; t_1 = sin(im) * (1.0 + (re * (1.0 + (re * 0.5)))); tmp = 0.0; if (re <= -0.036) tmp = t_0; elseif (re <= 92000000000000.0) tmp = t_1; elseif (re <= 1.9e+154) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, Block[{t$95$1 = 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, -0.036], t$95$0, If[LessEqual[re, 92000000000000.0], t$95$1, If[LessEqual[re, 1.9e+154], t$95$0, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{re} \cdot im\\
t_1 := \sin im \cdot \left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)\\
\mathbf{if}\;re \leq -0.036:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;re \leq 92000000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;re \leq 1.9 \cdot 10^{+154}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if re < -0.0359999999999999973 or 9.2e13 < re < 1.8999999999999999e154Initial program 100.0%
Taylor expanded in im around 0
Simplified93.8%
if -0.0359999999999999973 < re < 9.2e13 or 1.8999999999999999e154 < re Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6498.2%
Simplified98.2%
Final simplification96.5%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (exp re) im)))
(if (<= re -0.029)
t_0
(if (<= re 92000000000000.0) (/ (sin im) (/ 1.0 (+ re 1.0))) t_0))))
double code(double re, double im) {
double t_0 = exp(re) * im;
double tmp;
if (re <= -0.029) {
tmp = t_0;
} else if (re <= 92000000000000.0) {
tmp = sin(im) / (1.0 / (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 (re <= (-0.029d0)) then
tmp = t_0
else if (re <= 92000000000000.0d0) then
tmp = sin(im) / (1.0d0 / (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 (re <= -0.029) {
tmp = t_0;
} else if (re <= 92000000000000.0) {
tmp = Math.sin(im) / (1.0 / (re + 1.0));
} else {
tmp = t_0;
}
return tmp;
}
def code(re, im): t_0 = math.exp(re) * im tmp = 0 if re <= -0.029: tmp = t_0 elif re <= 92000000000000.0: tmp = math.sin(im) / (1.0 / (re + 1.0)) else: tmp = t_0 return tmp
function code(re, im) t_0 = Float64(exp(re) * im) tmp = 0.0 if (re <= -0.029) tmp = t_0; elseif (re <= 92000000000000.0) tmp = Float64(sin(im) / Float64(1.0 / 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 (re <= -0.029) tmp = t_0; elseif (re <= 92000000000000.0) tmp = sin(im) / (1.0 / (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[re, -0.029], t$95$0, If[LessEqual[re, 92000000000000.0], N[(N[Sin[im], $MachinePrecision] / N[(1.0 / N[(re + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{re} \cdot im\\
\mathbf{if}\;re \leq -0.029:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;re \leq 92000000000000:\\
\;\;\;\;\frac{\sin im}{\frac{1}{re + 1}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if re < -0.0290000000000000015 or 9.2e13 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified91.2%
if -0.0290000000000000015 < re < 9.2e13Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6497.6%
Simplified97.6%
*-commutativeN/A
flip-+N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
clear-numN/A
flip-+N/A
/-lowering-/.f64N/A
+-lowering-+.f6497.6%
Applied egg-rr97.6%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (exp re) im)))
(if (<= re -0.066)
t_0
(if (<= re 92000000000000.0) (* (sin im) (+ re 1.0)) t_0))))
double code(double re, double im) {
double t_0 = exp(re) * im;
double tmp;
if (re <= -0.066) {
tmp = t_0;
} else if (re <= 92000000000000.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 (re <= (-0.066d0)) then
tmp = t_0
else if (re <= 92000000000000.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 (re <= -0.066) {
tmp = t_0;
} else if (re <= 92000000000000.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 re <= -0.066: tmp = t_0 elif re <= 92000000000000.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 (re <= -0.066) tmp = t_0; elseif (re <= 92000000000000.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 (re <= -0.066) tmp = t_0; elseif (re <= 92000000000000.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[re, -0.066], t$95$0, If[LessEqual[re, 92000000000000.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}\;re \leq -0.066:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;re \leq 92000000000000:\\
\;\;\;\;\sin im \cdot \left(re + 1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if re < -0.066000000000000003 or 9.2e13 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified91.2%
if -0.066000000000000003 < re < 9.2e13Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6497.6%
Simplified97.6%
Final simplification94.5%
(FPCore (re im) :precision binary64 (let* ((t_0 (* (exp re) im))) (if (<= re -0.013) t_0 (if (<= re 5.8e-22) (sin im) t_0))))
double code(double re, double im) {
double t_0 = exp(re) * im;
double tmp;
if (re <= -0.013) {
tmp = t_0;
} else if (re <= 5.8e-22) {
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 (re <= (-0.013d0)) then
tmp = t_0
else if (re <= 5.8d-22) 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 (re <= -0.013) {
tmp = t_0;
} else if (re <= 5.8e-22) {
tmp = Math.sin(im);
} else {
tmp = t_0;
}
return tmp;
}
def code(re, im): t_0 = math.exp(re) * im tmp = 0 if re <= -0.013: tmp = t_0 elif re <= 5.8e-22: tmp = math.sin(im) else: tmp = t_0 return tmp
function code(re, im) t_0 = Float64(exp(re) * im) tmp = 0.0 if (re <= -0.013) tmp = t_0; elseif (re <= 5.8e-22) 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 (re <= -0.013) tmp = t_0; elseif (re <= 5.8e-22) 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[re, -0.013], t$95$0, If[LessEqual[re, 5.8e-22], N[Sin[im], $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{re} \cdot im\\
\mathbf{if}\;re \leq -0.013:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;re \leq 5.8 \cdot 10^{-22}:\\
\;\;\;\;\sin im\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if re < -0.0129999999999999994 or 5.8000000000000003e-22 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified89.3%
if -0.0129999999999999994 < re < 5.8000000000000003e-22Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6499.1%
Simplified99.1%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* re (* re (* re re)))))
(if (<= re -17000000000000.0)
(* (+ re 1.0) (* im (* 0.008333333333333333 (* (* im im) (* im im)))))
(if (<= re 5.8e-22)
(sin im)
(if (<= re 1.16e+77)
(/
(*
(/ (+ -1.0 (* (* re re) t_0)) (+ t_0 (+ 1.0 (* re re))))
(* im (+ 1.0 (* im (* im -0.16666666666666666)))))
(+ re -1.0))
(*
im
(+
1.0
(* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666))))))))))))
double code(double re, double im) {
double t_0 = re * (re * (re * re));
double tmp;
if (re <= -17000000000000.0) {
tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))));
} else if (re <= 5.8e-22) {
tmp = sin(im);
} else if (re <= 1.16e+77) {
tmp = (((-1.0 + ((re * re) * t_0)) / (t_0 + (1.0 + (re * re)))) * (im * (1.0 + (im * (im * -0.16666666666666666))))) / (re + -1.0);
} else {
tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (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 = re * (re * (re * re))
if (re <= (-17000000000000.0d0)) then
tmp = (re + 1.0d0) * (im * (0.008333333333333333d0 * ((im * im) * (im * im))))
else if (re <= 5.8d-22) then
tmp = sin(im)
else if (re <= 1.16d+77) then
tmp = ((((-1.0d0) + ((re * re) * t_0)) / (t_0 + (1.0d0 + (re * re)))) * (im * (1.0d0 + (im * (im * (-0.16666666666666666d0)))))) / (re + (-1.0d0))
else
tmp = im * (1.0d0 + (re * (1.0d0 + (re * (0.5d0 + (re * 0.16666666666666666d0))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = re * (re * (re * re));
double tmp;
if (re <= -17000000000000.0) {
tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))));
} else if (re <= 5.8e-22) {
tmp = Math.sin(im);
} else if (re <= 1.16e+77) {
tmp = (((-1.0 + ((re * re) * t_0)) / (t_0 + (1.0 + (re * re)))) * (im * (1.0 + (im * (im * -0.16666666666666666))))) / (re + -1.0);
} else {
tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
}
return tmp;
}
def code(re, im): t_0 = re * (re * (re * re)) tmp = 0 if re <= -17000000000000.0: tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im)))) elif re <= 5.8e-22: tmp = math.sin(im) elif re <= 1.16e+77: tmp = (((-1.0 + ((re * re) * t_0)) / (t_0 + (1.0 + (re * re)))) * (im * (1.0 + (im * (im * -0.16666666666666666))))) / (re + -1.0) else: tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) return tmp
function code(re, im) t_0 = Float64(re * Float64(re * Float64(re * re))) tmp = 0.0 if (re <= -17000000000000.0) tmp = Float64(Float64(re + 1.0) * Float64(im * Float64(0.008333333333333333 * Float64(Float64(im * im) * Float64(im * im))))); elseif (re <= 5.8e-22) tmp = sin(im); elseif (re <= 1.16e+77) tmp = Float64(Float64(Float64(Float64(-1.0 + Float64(Float64(re * re) * t_0)) / Float64(t_0 + Float64(1.0 + Float64(re * re)))) * Float64(im * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666))))) / Float64(re + -1.0)); else tmp = Float64(im * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666))))))); end return tmp end
function tmp_2 = code(re, im) t_0 = re * (re * (re * re)); tmp = 0.0; if (re <= -17000000000000.0) tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im)))); elseif (re <= 5.8e-22) tmp = sin(im); elseif (re <= 1.16e+77) tmp = (((-1.0 + ((re * re) * t_0)) / (t_0 + (1.0 + (re * re)))) * (im * (1.0 + (im * (im * -0.16666666666666666))))) / (re + -1.0); else tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(re * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -17000000000000.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * N[(0.008333333333333333 * N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 5.8e-22], N[Sin[im], $MachinePrecision], If[LessEqual[re, 1.16e+77], N[(N[(N[(N[(-1.0 + N[(N[(re * re), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(t$95$0 + N[(1.0 + N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(re + -1.0), $MachinePrecision]), $MachinePrecision], 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]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := re \cdot \left(re \cdot \left(re \cdot re\right)\right)\\
\mathbf{if}\;re \leq -17000000000000:\\
\;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\right)\\
\mathbf{elif}\;re \leq 5.8 \cdot 10^{-22}:\\
\;\;\;\;\sin im\\
\mathbf{elif}\;re \leq 1.16 \cdot 10^{+77}:\\
\;\;\;\;\frac{\frac{-1 + \left(re \cdot re\right) \cdot t\_0}{t\_0 + \left(1 + re \cdot re\right)} \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)}{re + -1}\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if re < -1.7e13Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.7%
Simplified2.7%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f642.3%
Simplified2.3%
Taylor expanded in im around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6439.2%
Simplified39.2%
if -1.7e13 < re < 5.8000000000000003e-22Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6495.4%
Simplified95.4%
if 5.8000000000000003e-22 < re < 1.1600000000000001e77Initial 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-*.f6479.2%
Simplified79.2%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6443.1%
Simplified43.1%
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval43.1%
Applied egg-rr43.1%
metadata-evalN/A
sub-negN/A
flip3--N/A
cube-multN/A
metadata-evalN/A
fmm-defN/A
metadata-evalN/A
fma-defineN/A
cube-multN/A
metadata-evalN/A
/-lowering-/.f64N/A
Applied egg-rr63.7%
if 1.1600000000000001e77 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified81.8%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6479.7%
Simplified79.7%
Final simplification76.5%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* re (* re (* re re)))))
(if (<= re -17000000000000.0)
(* (+ re 1.0) (* im (* 0.008333333333333333 (* (* im im) (* im im)))))
(if (<= re 1.16e+77)
(/
(*
(/ (+ -1.0 (* (* re re) t_0)) (+ t_0 (+ 1.0 (* re re))))
(* im (+ 1.0 (* im (* im -0.16666666666666666)))))
(+ re -1.0))
(*
im
(+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666)))))))))))
double code(double re, double im) {
double t_0 = re * (re * (re * re));
double tmp;
if (re <= -17000000000000.0) {
tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))));
} else if (re <= 1.16e+77) {
tmp = (((-1.0 + ((re * re) * t_0)) / (t_0 + (1.0 + (re * re)))) * (im * (1.0 + (im * (im * -0.16666666666666666))))) / (re + -1.0);
} else {
tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (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 = re * (re * (re * re))
if (re <= (-17000000000000.0d0)) then
tmp = (re + 1.0d0) * (im * (0.008333333333333333d0 * ((im * im) * (im * im))))
else if (re <= 1.16d+77) then
tmp = ((((-1.0d0) + ((re * re) * t_0)) / (t_0 + (1.0d0 + (re * re)))) * (im * (1.0d0 + (im * (im * (-0.16666666666666666d0)))))) / (re + (-1.0d0))
else
tmp = im * (1.0d0 + (re * (1.0d0 + (re * (0.5d0 + (re * 0.16666666666666666d0))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = re * (re * (re * re));
double tmp;
if (re <= -17000000000000.0) {
tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))));
} else if (re <= 1.16e+77) {
tmp = (((-1.0 + ((re * re) * t_0)) / (t_0 + (1.0 + (re * re)))) * (im * (1.0 + (im * (im * -0.16666666666666666))))) / (re + -1.0);
} else {
tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
}
return tmp;
}
def code(re, im): t_0 = re * (re * (re * re)) tmp = 0 if re <= -17000000000000.0: tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im)))) elif re <= 1.16e+77: tmp = (((-1.0 + ((re * re) * t_0)) / (t_0 + (1.0 + (re * re)))) * (im * (1.0 + (im * (im * -0.16666666666666666))))) / (re + -1.0) else: tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) return tmp
function code(re, im) t_0 = Float64(re * Float64(re * Float64(re * re))) tmp = 0.0 if (re <= -17000000000000.0) tmp = Float64(Float64(re + 1.0) * Float64(im * Float64(0.008333333333333333 * Float64(Float64(im * im) * Float64(im * im))))); elseif (re <= 1.16e+77) tmp = Float64(Float64(Float64(Float64(-1.0 + Float64(Float64(re * re) * t_0)) / Float64(t_0 + Float64(1.0 + Float64(re * re)))) * Float64(im * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666))))) / Float64(re + -1.0)); else tmp = Float64(im * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666))))))); end return tmp end
function tmp_2 = code(re, im) t_0 = re * (re * (re * re)); tmp = 0.0; if (re <= -17000000000000.0) tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im)))); elseif (re <= 1.16e+77) tmp = (((-1.0 + ((re * re) * t_0)) / (t_0 + (1.0 + (re * re)))) * (im * (1.0 + (im * (im * -0.16666666666666666))))) / (re + -1.0); else tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(re * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -17000000000000.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * N[(0.008333333333333333 * N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.16e+77], N[(N[(N[(N[(-1.0 + N[(N[(re * re), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(t$95$0 + N[(1.0 + N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(re + -1.0), $MachinePrecision]), $MachinePrecision], 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]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := re \cdot \left(re \cdot \left(re \cdot re\right)\right)\\
\mathbf{if}\;re \leq -17000000000000:\\
\;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\right)\\
\mathbf{elif}\;re \leq 1.16 \cdot 10^{+77}:\\
\;\;\;\;\frac{\frac{-1 + \left(re \cdot re\right) \cdot t\_0}{t\_0 + \left(1 + re \cdot re\right)} \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)}{re + -1}\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if re < -1.7e13Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.7%
Simplified2.7%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f642.3%
Simplified2.3%
Taylor expanded in im around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6439.2%
Simplified39.2%
if -1.7e13 < re < 1.1600000000000001e77Initial program 100.0%
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-*.f6451.0%
Simplified51.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6444.4%
Simplified44.4%
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval44.4%
Applied egg-rr44.4%
metadata-evalN/A
sub-negN/A
flip3--N/A
cube-multN/A
metadata-evalN/A
fmm-defN/A
metadata-evalN/A
fma-defineN/A
cube-multN/A
metadata-evalN/A
/-lowering-/.f64N/A
Applied egg-rr47.0%
if 1.1600000000000001e77 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified81.8%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6479.7%
Simplified79.7%
Final simplification50.7%
(FPCore (re im)
:precision binary64
(if (<= re -8500.0)
(* (+ re 1.0) (* im (* 0.008333333333333333 (* (* im im) (* im im)))))
(*
(+ (* (+ 0.5 (* re 0.16666666666666666)) (* re re)) (+ re 1.0))
(*
im
(+
1.0
(*
im
(* im (+ -0.16666666666666666 (* 0.008333333333333333 (* im im))))))))))
double code(double re, double im) {
double tmp;
if (re <= -8500.0) {
tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))));
} else {
tmp = (((0.5 + (re * 0.16666666666666666)) * (re * re)) + (re + 1.0)) * (im * (1.0 + (im * (im * (-0.16666666666666666 + (0.008333333333333333 * (im * im)))))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= (-8500.0d0)) then
tmp = (re + 1.0d0) * (im * (0.008333333333333333d0 * ((im * im) * (im * im))))
else
tmp = (((0.5d0 + (re * 0.16666666666666666d0)) * (re * re)) + (re + 1.0d0)) * (im * (1.0d0 + (im * (im * ((-0.16666666666666666d0) + (0.008333333333333333d0 * (im * im)))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -8500.0) {
tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))));
} else {
tmp = (((0.5 + (re * 0.16666666666666666)) * (re * re)) + (re + 1.0)) * (im * (1.0 + (im * (im * (-0.16666666666666666 + (0.008333333333333333 * (im * im)))))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -8500.0: tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im)))) else: tmp = (((0.5 + (re * 0.16666666666666666)) * (re * re)) + (re + 1.0)) * (im * (1.0 + (im * (im * (-0.16666666666666666 + (0.008333333333333333 * (im * im))))))) return tmp
function code(re, im) tmp = 0.0 if (re <= -8500.0) tmp = Float64(Float64(re + 1.0) * Float64(im * Float64(0.008333333333333333 * Float64(Float64(im * im) * Float64(im * im))))); else tmp = Float64(Float64(Float64(Float64(0.5 + Float64(re * 0.16666666666666666)) * Float64(re * re)) + Float64(re + 1.0)) * Float64(im * Float64(1.0 + Float64(im * Float64(im * Float64(-0.16666666666666666 + Float64(0.008333333333333333 * Float64(im * im)))))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -8500.0) tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im)))); else tmp = (((0.5 + (re * 0.16666666666666666)) * (re * re)) + (re + 1.0)) * (im * (1.0 + (im * (im * (-0.16666666666666666 + (0.008333333333333333 * (im * im))))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -8500.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * N[(0.008333333333333333 * N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] * N[(re * re), $MachinePrecision]), $MachinePrecision] + N[(re + 1.0), $MachinePrecision]), $MachinePrecision] * N[(im * N[(1.0 + N[(im * N[(im * N[(-0.16666666666666666 + N[(0.008333333333333333 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -8500:\\
\;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(0.5 + re \cdot 0.16666666666666666\right) \cdot \left(re \cdot re\right) + \left(re + 1\right)\right) \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot \left(-0.16666666666666666 + 0.008333333333333333 \cdot \left(im \cdot im\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if re < -8500Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.7%
Simplified2.7%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f642.3%
Simplified2.3%
Taylor expanded in im around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6437.0%
Simplified37.0%
if -8500 < 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-*.f6488.6%
Simplified88.6%
distribute-rgt-inN/A
*-lft-identityN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6488.6%
Applied egg-rr88.6%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6452.6%
Simplified52.6%
Final simplification48.5%
(FPCore (re im)
:precision binary64
(if (<= re -17000000000000.0)
(* (+ re 1.0) (* im (* 0.008333333333333333 (* (* im im) (* im im)))))
(if (<= re 2.7e+82)
(*
(+ 1.0 (* re (+ 1.0 (* re 0.5))))
(* im (+ 1.0 (* (* im im) -0.16666666666666666))))
(* im (+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666))))))))))
double code(double re, double im) {
double tmp;
if (re <= -17000000000000.0) {
tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))));
} else if (re <= 2.7e+82) {
tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + ((im * im) * -0.16666666666666666)));
} else {
tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (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 <= (-17000000000000.0d0)) then
tmp = (re + 1.0d0) * (im * (0.008333333333333333d0 * ((im * im) * (im * im))))
else if (re <= 2.7d+82) then
tmp = (1.0d0 + (re * (1.0d0 + (re * 0.5d0)))) * (im * (1.0d0 + ((im * im) * (-0.16666666666666666d0))))
else
tmp = im * (1.0d0 + (re * (1.0d0 + (re * (0.5d0 + (re * 0.16666666666666666d0))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -17000000000000.0) {
tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))));
} else if (re <= 2.7e+82) {
tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + ((im * im) * -0.16666666666666666)));
} else {
tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -17000000000000.0: tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im)))) elif re <= 2.7e+82: tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + ((im * im) * -0.16666666666666666))) else: tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) return tmp
function code(re, im) tmp = 0.0 if (re <= -17000000000000.0) tmp = Float64(Float64(re + 1.0) * Float64(im * Float64(0.008333333333333333 * Float64(Float64(im * im) * Float64(im * im))))); elseif (re <= 2.7e+82) tmp = Float64(Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5)))) * Float64(im * Float64(1.0 + Float64(Float64(im * im) * -0.16666666666666666)))); else tmp = Float64(im * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666))))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -17000000000000.0) tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im)))); elseif (re <= 2.7e+82) tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + ((im * im) * -0.16666666666666666))); else tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -17000000000000.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * N[(0.008333333333333333 * N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 2.7e+82], N[(N[(1.0 + N[(re * N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(1.0 + N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -17000000000000:\\
\;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\right)\\
\mathbf{elif}\;re \leq 2.7 \cdot 10^{+82}:\\
\;\;\;\;\left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right) \cdot \left(im \cdot \left(1 + \left(im \cdot im\right) \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if re < -1.7e13Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.7%
Simplified2.7%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f642.3%
Simplified2.3%
Taylor expanded in im around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6439.2%
Simplified39.2%
if -1.7e13 < re < 2.6999999999999999e82Initial program 100.0%
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-*.f6451.0%
Simplified51.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6444.5%
Simplified44.5%
if 2.6999999999999999e82 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified81.8%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6479.7%
Simplified79.7%
Final simplification49.2%
(FPCore (re im)
:precision binary64
(if (<= re -17000000000000.0)
(* (+ re 1.0) (* im (* 0.008333333333333333 (* (* im im) (* im im)))))
(*
(+ 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 <= -17000000000000.0) {
tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))));
} 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 <= (-17000000000000.0d0)) then
tmp = (re + 1.0d0) * (im * (0.008333333333333333d0 * ((im * im) * (im * im))))
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 <= -17000000000000.0) {
tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))));
} 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 <= -17000000000000.0: tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im)))) 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 <= -17000000000000.0) tmp = Float64(Float64(re + 1.0) * Float64(im * Float64(0.008333333333333333 * Float64(Float64(im * im) * Float64(im * im))))); 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(Float64(im * im) * -0.16666666666666666)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -17000000000000.0) tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im)))); 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, -17000000000000.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * N[(0.008333333333333333 * N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $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[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -17000000000000:\\
\;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\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 + \left(im \cdot im\right) \cdot -0.16666666666666666\right)\right)\\
\end{array}
\end{array}
if re < -1.7e13Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.7%
Simplified2.7%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f642.3%
Simplified2.3%
Taylor expanded in im around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6439.2%
Simplified39.2%
if -1.7e13 < re Initial program 100.0%
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-*.f6455.9%
Simplified55.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-*.f6450.4%
Simplified50.4%
Final simplification47.7%
(FPCore (re im)
:precision binary64
(if (<= re -17000000000000.0)
(* (+ re 1.0) (* im (* 0.008333333333333333 (* (* im im) (* im im)))))
(if (<= re 1.3e+77)
(* (+ re 1.0) (* im (+ 1.0 (* (* im im) -0.16666666666666666))))
(* im (+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666))))))))))
double code(double re, double im) {
double tmp;
if (re <= -17000000000000.0) {
tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))));
} else if (re <= 1.3e+77) {
tmp = (re + 1.0) * (im * (1.0 + ((im * im) * -0.16666666666666666)));
} else {
tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (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 <= (-17000000000000.0d0)) then
tmp = (re + 1.0d0) * (im * (0.008333333333333333d0 * ((im * im) * (im * im))))
else if (re <= 1.3d+77) then
tmp = (re + 1.0d0) * (im * (1.0d0 + ((im * im) * (-0.16666666666666666d0))))
else
tmp = im * (1.0d0 + (re * (1.0d0 + (re * (0.5d0 + (re * 0.16666666666666666d0))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -17000000000000.0) {
tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im))));
} else if (re <= 1.3e+77) {
tmp = (re + 1.0) * (im * (1.0 + ((im * im) * -0.16666666666666666)));
} else {
tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -17000000000000.0: tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im)))) elif re <= 1.3e+77: tmp = (re + 1.0) * (im * (1.0 + ((im * im) * -0.16666666666666666))) else: tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) return tmp
function code(re, im) tmp = 0.0 if (re <= -17000000000000.0) tmp = Float64(Float64(re + 1.0) * Float64(im * Float64(0.008333333333333333 * Float64(Float64(im * im) * Float64(im * im))))); elseif (re <= 1.3e+77) tmp = Float64(Float64(re + 1.0) * Float64(im * Float64(1.0 + Float64(Float64(im * im) * -0.16666666666666666)))); else tmp = Float64(im * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666))))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -17000000000000.0) tmp = (re + 1.0) * (im * (0.008333333333333333 * ((im * im) * (im * im)))); elseif (re <= 1.3e+77) tmp = (re + 1.0) * (im * (1.0 + ((im * im) * -0.16666666666666666))); else tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -17000000000000.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * N[(0.008333333333333333 * N[(N[(im * im), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.3e+77], N[(N[(re + 1.0), $MachinePrecision] * N[(im * N[(1.0 + N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -17000000000000:\\
\;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(0.008333333333333333 \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot im\right)\right)\right)\right)\\
\mathbf{elif}\;re \leq 1.3 \cdot 10^{+77}:\\
\;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(1 + \left(im \cdot im\right) \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if re < -1.7e13Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.7%
Simplified2.7%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f642.3%
Simplified2.3%
Taylor expanded in im around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6439.2%
Simplified39.2%
if -1.7e13 < re < 1.3000000000000001e77Initial program 100.0%
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-*.f6451.0%
Simplified51.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6444.4%
Simplified44.4%
if 1.3000000000000001e77 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified81.8%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6479.7%
Simplified79.7%
Final simplification49.2%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (* im im) -0.16666666666666666)))
(if (<= re -17000000000000.0)
(* (+ re 1.0) (* im t_0))
(if (<= re 1.65e+73)
(* (+ re 1.0) (* im (+ 1.0 t_0)))
(*
im
(+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666)))))))))))
double code(double re, double im) {
double t_0 = (im * im) * -0.16666666666666666;
double tmp;
if (re <= -17000000000000.0) {
tmp = (re + 1.0) * (im * t_0);
} else if (re <= 1.65e+73) {
tmp = (re + 1.0) * (im * (1.0 + t_0));
} else {
tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (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 = (im * im) * (-0.16666666666666666d0)
if (re <= (-17000000000000.0d0)) then
tmp = (re + 1.0d0) * (im * t_0)
else if (re <= 1.65d+73) then
tmp = (re + 1.0d0) * (im * (1.0d0 + t_0))
else
tmp = im * (1.0d0 + (re * (1.0d0 + (re * (0.5d0 + (re * 0.16666666666666666d0))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = (im * im) * -0.16666666666666666;
double tmp;
if (re <= -17000000000000.0) {
tmp = (re + 1.0) * (im * t_0);
} else if (re <= 1.65e+73) {
tmp = (re + 1.0) * (im * (1.0 + t_0));
} else {
tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
}
return tmp;
}
def code(re, im): t_0 = (im * im) * -0.16666666666666666 tmp = 0 if re <= -17000000000000.0: tmp = (re + 1.0) * (im * t_0) elif re <= 1.65e+73: tmp = (re + 1.0) * (im * (1.0 + t_0)) else: tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) return tmp
function code(re, im) t_0 = Float64(Float64(im * im) * -0.16666666666666666) tmp = 0.0 if (re <= -17000000000000.0) tmp = Float64(Float64(re + 1.0) * Float64(im * t_0)); elseif (re <= 1.65e+73) tmp = Float64(Float64(re + 1.0) * Float64(im * Float64(1.0 + t_0))); else tmp = Float64(im * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666))))))); end return tmp end
function tmp_2 = code(re, im) t_0 = (im * im) * -0.16666666666666666; tmp = 0.0; if (re <= -17000000000000.0) tmp = (re + 1.0) * (im * t_0); elseif (re <= 1.65e+73) tmp = (re + 1.0) * (im * (1.0 + t_0)); else tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]}, If[LessEqual[re, -17000000000000.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.65e+73], N[(N[(re + 1.0), $MachinePrecision] * N[(im * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(im \cdot im\right) \cdot -0.16666666666666666\\
\mathbf{if}\;re \leq -17000000000000:\\
\;\;\;\;\left(re + 1\right) \cdot \left(im \cdot t\_0\right)\\
\mathbf{elif}\;re \leq 1.65 \cdot 10^{+73}:\\
\;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(1 + t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if re < -1.7e13Initial program 100.0%
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-*.f6476.2%
Simplified76.2%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.3%
Simplified2.3%
Taylor expanded in im around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6430.0%
Simplified30.0%
if -1.7e13 < re < 1.65000000000000015e73Initial program 100.0%
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-*.f6451.0%
Simplified51.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6444.4%
Simplified44.4%
if 1.65000000000000015e73 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified81.8%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6479.7%
Simplified79.7%
Final simplification46.9%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (* im im) -0.16666666666666666)))
(if (<= re -17000000000000.0)
(* (+ re 1.0) (* im t_0))
(if (<= re 1.8e+76)
(* (+ re 1.0) (* im (+ 1.0 t_0)))
(* im (+ 1.0 (* re (+ 1.0 (* re 0.5)))))))))
double code(double re, double im) {
double t_0 = (im * im) * -0.16666666666666666;
double tmp;
if (re <= -17000000000000.0) {
tmp = (re + 1.0) * (im * t_0);
} else if (re <= 1.8e+76) {
tmp = (re + 1.0) * (im * (1.0 + t_0));
} else {
tmp = im * (1.0 + (re * (1.0 + (re * 0.5))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = (im * im) * (-0.16666666666666666d0)
if (re <= (-17000000000000.0d0)) then
tmp = (re + 1.0d0) * (im * t_0)
else if (re <= 1.8d+76) then
tmp = (re + 1.0d0) * (im * (1.0d0 + t_0))
else
tmp = im * (1.0d0 + (re * (1.0d0 + (re * 0.5d0))))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = (im * im) * -0.16666666666666666;
double tmp;
if (re <= -17000000000000.0) {
tmp = (re + 1.0) * (im * t_0);
} else if (re <= 1.8e+76) {
tmp = (re + 1.0) * (im * (1.0 + t_0));
} else {
tmp = im * (1.0 + (re * (1.0 + (re * 0.5))));
}
return tmp;
}
def code(re, im): t_0 = (im * im) * -0.16666666666666666 tmp = 0 if re <= -17000000000000.0: tmp = (re + 1.0) * (im * t_0) elif re <= 1.8e+76: tmp = (re + 1.0) * (im * (1.0 + t_0)) else: tmp = im * (1.0 + (re * (1.0 + (re * 0.5)))) return tmp
function code(re, im) t_0 = Float64(Float64(im * im) * -0.16666666666666666) tmp = 0.0 if (re <= -17000000000000.0) tmp = Float64(Float64(re + 1.0) * Float64(im * t_0)); elseif (re <= 1.8e+76) tmp = Float64(Float64(re + 1.0) * Float64(im * Float64(1.0 + t_0))); else tmp = Float64(im * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5))))); end return tmp end
function tmp_2 = code(re, im) t_0 = (im * im) * -0.16666666666666666; tmp = 0.0; if (re <= -17000000000000.0) tmp = (re + 1.0) * (im * t_0); elseif (re <= 1.8e+76) tmp = (re + 1.0) * (im * (1.0 + t_0)); else tmp = im * (1.0 + (re * (1.0 + (re * 0.5)))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]}, If[LessEqual[re, -17000000000000.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.8e+76], N[(N[(re + 1.0), $MachinePrecision] * N[(im * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(1.0 + N[(re * N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(im \cdot im\right) \cdot -0.16666666666666666\\
\mathbf{if}\;re \leq -17000000000000:\\
\;\;\;\;\left(re + 1\right) \cdot \left(im \cdot t\_0\right)\\
\mathbf{elif}\;re \leq 1.8 \cdot 10^{+76}:\\
\;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(1 + t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)\\
\end{array}
\end{array}
if re < -1.7e13Initial program 100.0%
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-*.f6476.2%
Simplified76.2%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.3%
Simplified2.3%
Taylor expanded in im around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6430.0%
Simplified30.0%
if -1.7e13 < re < 1.8000000000000001e76Initial program 100.0%
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-*.f6451.0%
Simplified51.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6444.4%
Simplified44.4%
if 1.8000000000000001e76 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified81.8%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6462.4%
Simplified62.4%
Final simplification44.0%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (* im im) -0.16666666666666666)))
(if (<= re -17000000000000.0)
(* (+ re 1.0) (* im t_0))
(if (<= re 3.8e+77)
(* im (+ 1.0 t_0))
(* im (+ 1.0 (* re (+ 1.0 (* re 0.5)))))))))
double code(double re, double im) {
double t_0 = (im * im) * -0.16666666666666666;
double tmp;
if (re <= -17000000000000.0) {
tmp = (re + 1.0) * (im * t_0);
} else if (re <= 3.8e+77) {
tmp = im * (1.0 + t_0);
} else {
tmp = im * (1.0 + (re * (1.0 + (re * 0.5))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = (im * im) * (-0.16666666666666666d0)
if (re <= (-17000000000000.0d0)) then
tmp = (re + 1.0d0) * (im * t_0)
else if (re <= 3.8d+77) then
tmp = im * (1.0d0 + t_0)
else
tmp = im * (1.0d0 + (re * (1.0d0 + (re * 0.5d0))))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = (im * im) * -0.16666666666666666;
double tmp;
if (re <= -17000000000000.0) {
tmp = (re + 1.0) * (im * t_0);
} else if (re <= 3.8e+77) {
tmp = im * (1.0 + t_0);
} else {
tmp = im * (1.0 + (re * (1.0 + (re * 0.5))));
}
return tmp;
}
def code(re, im): t_0 = (im * im) * -0.16666666666666666 tmp = 0 if re <= -17000000000000.0: tmp = (re + 1.0) * (im * t_0) elif re <= 3.8e+77: tmp = im * (1.0 + t_0) else: tmp = im * (1.0 + (re * (1.0 + (re * 0.5)))) return tmp
function code(re, im) t_0 = Float64(Float64(im * im) * -0.16666666666666666) tmp = 0.0 if (re <= -17000000000000.0) tmp = Float64(Float64(re + 1.0) * Float64(im * t_0)); elseif (re <= 3.8e+77) tmp = Float64(im * Float64(1.0 + t_0)); else tmp = Float64(im * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5))))); end return tmp end
function tmp_2 = code(re, im) t_0 = (im * im) * -0.16666666666666666; tmp = 0.0; if (re <= -17000000000000.0) tmp = (re + 1.0) * (im * t_0); elseif (re <= 3.8e+77) tmp = im * (1.0 + t_0); else tmp = im * (1.0 + (re * (1.0 + (re * 0.5)))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]}, If[LessEqual[re, -17000000000000.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 3.8e+77], N[(im * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision], N[(im * N[(1.0 + N[(re * N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(im \cdot im\right) \cdot -0.16666666666666666\\
\mathbf{if}\;re \leq -17000000000000:\\
\;\;\;\;\left(re + 1\right) \cdot \left(im \cdot t\_0\right)\\
\mathbf{elif}\;re \leq 3.8 \cdot 10^{+77}:\\
\;\;\;\;im \cdot \left(1 + t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)\\
\end{array}
\end{array}
if re < -1.7e13Initial program 100.0%
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-*.f6476.2%
Simplified76.2%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.3%
Simplified2.3%
Taylor expanded in im around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6430.0%
Simplified30.0%
if -1.7e13 < re < 3.8000000000000001e77Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6485.5%
Simplified85.5%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6444.0%
Simplified44.0%
if 3.8000000000000001e77 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified81.8%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6462.4%
Simplified62.4%
Final simplification43.7%
(FPCore (re im)
:precision binary64
(if (<= re -17000000000000.0)
(* (* im im) (* im (+ -0.16666666666666666 (* re -0.16666666666666666))))
(if (<= re 6e+77)
(* im (+ 1.0 (* (* im im) -0.16666666666666666)))
(* im (+ 1.0 (* re (+ 1.0 (* re 0.5))))))))
double code(double re, double im) {
double tmp;
if (re <= -17000000000000.0) {
tmp = (im * im) * (im * (-0.16666666666666666 + (re * -0.16666666666666666)));
} else if (re <= 6e+77) {
tmp = im * (1.0 + ((im * im) * -0.16666666666666666));
} else {
tmp = im * (1.0 + (re * (1.0 + (re * 0.5))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= (-17000000000000.0d0)) then
tmp = (im * im) * (im * ((-0.16666666666666666d0) + (re * (-0.16666666666666666d0))))
else if (re <= 6d+77) then
tmp = im * (1.0d0 + ((im * im) * (-0.16666666666666666d0)))
else
tmp = im * (1.0d0 + (re * (1.0d0 + (re * 0.5d0))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -17000000000000.0) {
tmp = (im * im) * (im * (-0.16666666666666666 + (re * -0.16666666666666666)));
} else if (re <= 6e+77) {
tmp = im * (1.0 + ((im * im) * -0.16666666666666666));
} else {
tmp = im * (1.0 + (re * (1.0 + (re * 0.5))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -17000000000000.0: tmp = (im * im) * (im * (-0.16666666666666666 + (re * -0.16666666666666666))) elif re <= 6e+77: tmp = im * (1.0 + ((im * im) * -0.16666666666666666)) else: tmp = im * (1.0 + (re * (1.0 + (re * 0.5)))) return tmp
function code(re, im) tmp = 0.0 if (re <= -17000000000000.0) tmp = Float64(Float64(im * im) * Float64(im * Float64(-0.16666666666666666 + Float64(re * -0.16666666666666666)))); elseif (re <= 6e+77) tmp = Float64(im * Float64(1.0 + Float64(Float64(im * im) * -0.16666666666666666))); else tmp = Float64(im * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -17000000000000.0) tmp = (im * im) * (im * (-0.16666666666666666 + (re * -0.16666666666666666))); elseif (re <= 6e+77) tmp = im * (1.0 + ((im * im) * -0.16666666666666666)); else tmp = im * (1.0 + (re * (1.0 + (re * 0.5)))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -17000000000000.0], N[(N[(im * im), $MachinePrecision] * N[(im * N[(-0.16666666666666666 + N[(re * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 6e+77], N[(im * N[(1.0 + N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(1.0 + N[(re * N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -17000000000000:\\
\;\;\;\;\left(im \cdot im\right) \cdot \left(im \cdot \left(-0.16666666666666666 + re \cdot -0.16666666666666666\right)\right)\\
\mathbf{elif}\;re \leq 6 \cdot 10^{+77}:\\
\;\;\;\;im \cdot \left(1 + \left(im \cdot im\right) \cdot -0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)\\
\end{array}
\end{array}
if re < -1.7e13Initial program 100.0%
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-*.f6476.2%
Simplified76.2%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.3%
Simplified2.3%
Taylor expanded in im around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
unpow3N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f6427.0%
Simplified27.0%
if -1.7e13 < re < 5.9999999999999996e77Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6485.5%
Simplified85.5%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6444.0%
Simplified44.0%
if 5.9999999999999996e77 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified81.8%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6462.4%
Simplified62.4%
Final simplification43.0%
(FPCore (re im)
:precision binary64
(if (<= re -17000000000000.0)
(* (* im im) (* im (+ -0.16666666666666666 (* re -0.16666666666666666))))
(if (<= re 3.2e+190)
(* im (+ 1.0 (* (* im im) -0.16666666666666666)))
(* re im))))
double code(double re, double im) {
double tmp;
if (re <= -17000000000000.0) {
tmp = (im * im) * (im * (-0.16666666666666666 + (re * -0.16666666666666666)));
} else if (re <= 3.2e+190) {
tmp = im * (1.0 + ((im * im) * -0.16666666666666666));
} 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 (re <= (-17000000000000.0d0)) then
tmp = (im * im) * (im * ((-0.16666666666666666d0) + (re * (-0.16666666666666666d0))))
else if (re <= 3.2d+190) then
tmp = im * (1.0d0 + ((im * im) * (-0.16666666666666666d0)))
else
tmp = re * im
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -17000000000000.0) {
tmp = (im * im) * (im * (-0.16666666666666666 + (re * -0.16666666666666666)));
} else if (re <= 3.2e+190) {
tmp = im * (1.0 + ((im * im) * -0.16666666666666666));
} else {
tmp = re * im;
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -17000000000000.0: tmp = (im * im) * (im * (-0.16666666666666666 + (re * -0.16666666666666666))) elif re <= 3.2e+190: tmp = im * (1.0 + ((im * im) * -0.16666666666666666)) else: tmp = re * im return tmp
function code(re, im) tmp = 0.0 if (re <= -17000000000000.0) tmp = Float64(Float64(im * im) * Float64(im * Float64(-0.16666666666666666 + Float64(re * -0.16666666666666666)))); elseif (re <= 3.2e+190) tmp = Float64(im * Float64(1.0 + Float64(Float64(im * im) * -0.16666666666666666))); else tmp = Float64(re * im); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -17000000000000.0) tmp = (im * im) * (im * (-0.16666666666666666 + (re * -0.16666666666666666))); elseif (re <= 3.2e+190) tmp = im * (1.0 + ((im * im) * -0.16666666666666666)); else tmp = re * im; end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -17000000000000.0], N[(N[(im * im), $MachinePrecision] * N[(im * N[(-0.16666666666666666 + N[(re * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 3.2e+190], N[(im * N[(1.0 + N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -17000000000000:\\
\;\;\;\;\left(im \cdot im\right) \cdot \left(im \cdot \left(-0.16666666666666666 + re \cdot -0.16666666666666666\right)\right)\\
\mathbf{elif}\;re \leq 3.2 \cdot 10^{+190}:\\
\;\;\;\;im \cdot \left(1 + \left(im \cdot im\right) \cdot -0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot im\\
\end{array}
\end{array}
if re < -1.7e13Initial program 100.0%
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-*.f6476.2%
Simplified76.2%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.3%
Simplified2.3%
Taylor expanded in im around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
unpow3N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f6427.0%
Simplified27.0%
if -1.7e13 < re < 3.2000000000000001e190Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6475.7%
Simplified75.7%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6440.7%
Simplified40.7%
if 3.2000000000000001e190 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified87.5%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6424.1%
Simplified24.1%
Taylor expanded in re around inf
Simplified24.1%
Final simplification35.8%
(FPCore (re im) :precision binary64 (if (<= re 1.3e+189) (* im (+ 1.0 (* (* im im) -0.16666666666666666))) (* re im)))
double code(double re, double im) {
double tmp;
if (re <= 1.3e+189) {
tmp = im * (1.0 + ((im * im) * -0.16666666666666666));
} 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 (re <= 1.3d+189) then
tmp = im * (1.0d0 + ((im * im) * (-0.16666666666666666d0)))
else
tmp = re * im
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 1.3e+189) {
tmp = im * (1.0 + ((im * im) * -0.16666666666666666));
} else {
tmp = re * im;
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 1.3e+189: tmp = im * (1.0 + ((im * im) * -0.16666666666666666)) else: tmp = re * im return tmp
function code(re, im) tmp = 0.0 if (re <= 1.3e+189) tmp = Float64(im * Float64(1.0 + Float64(Float64(im * im) * -0.16666666666666666))); else tmp = Float64(re * im); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 1.3e+189) tmp = im * (1.0 + ((im * im) * -0.16666666666666666)); else tmp = re * im; end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 1.3e+189], N[(im * N[(1.0 + N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * im), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 1.3 \cdot 10^{+189}:\\
\;\;\;\;im \cdot \left(1 + \left(im \cdot im\right) \cdot -0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot im\\
\end{array}
\end{array}
if re < 1.29999999999999991e189Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6456.2%
Simplified56.2%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6430.6%
Simplified30.6%
if 1.29999999999999991e189 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified87.5%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6424.1%
Simplified24.1%
Taylor expanded in re around inf
Simplified24.1%
Final simplification30.0%
(FPCore (re im) :precision binary64 (if (<= im 4.8e+28) im (* re im)))
double code(double re, double im) {
double tmp;
if (im <= 4.8e+28) {
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.8d+28) 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.8e+28) {
tmp = im;
} else {
tmp = re * im;
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 4.8e+28: tmp = im else: tmp = re * im return tmp
function code(re, im) tmp = 0.0 if (im <= 4.8e+28) tmp = im; else tmp = Float64(re * im); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 4.8e+28) tmp = im; else tmp = re * im; end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 4.8e+28], im, N[(re * im), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 4.8 \cdot 10^{+28}:\\
\;\;\;\;im\\
\mathbf{else}:\\
\;\;\;\;re \cdot im\\
\end{array}
\end{array}
if im < 4.79999999999999962e28Initial program 100.0%
Taylor expanded in im around 0
Simplified74.5%
Taylor expanded in re around 0
Simplified31.2%
if 4.79999999999999962e28 < im Initial program 100.0%
Taylor expanded in im around 0
Simplified45.5%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6412.3%
Simplified12.3%
Taylor expanded in re around inf
Simplified13.7%
(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 im around 0
Simplified68.2%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6427.6%
Simplified27.6%
Final simplification27.6%
(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 im around 0
Simplified68.2%
Taylor expanded in re around 0
Simplified24.9%
herbie shell --seed 2024139
(FPCore (re im)
:name "math.exp on complex, imaginary part"
:precision binary64
(* (exp re) (sin im)))