
(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 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (re im) :precision binary64 (* (exp re) (sin im)))
double code(double re, double im) {
return exp(re) * sin(im);
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = exp(re) * sin(im)
end function
public static double code(double re, double im) {
return Math.exp(re) * Math.sin(im);
}
def code(re, im): return math.exp(re) * math.sin(im)
function code(re, im) return Float64(exp(re) * sin(im)) end
function tmp = code(re, im) tmp = exp(re) * sin(im); end
code[re_, im_] := N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
e^{re} \cdot \sin im
\end{array}
(FPCore (re im) :precision binary64 (* (exp re) (sin im)))
double code(double re, double im) {
return exp(re) * sin(im);
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = exp(re) * sin(im)
end function
public static double code(double re, double im) {
return Math.exp(re) * Math.sin(im);
}
def code(re, im): return math.exp(re) * math.sin(im)
function code(re, im) return Float64(exp(re) * sin(im)) end
function tmp = code(re, im) tmp = exp(re) * sin(im); end
code[re_, im_] := N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
e^{re} \cdot \sin im
\end{array}
Initial program 100.0%
(FPCore (re im) :precision binary64 (let* ((t_0 (* (exp re) im))) (if (<= (exp re) 0.1) t_0 (if (<= (exp re) 20.0) (sin im) t_0))))
double code(double re, double im) {
double t_0 = exp(re) * im;
double tmp;
if (exp(re) <= 0.1) {
tmp = t_0;
} else if (exp(re) <= 20.0) {
tmp = sin(im);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = exp(re) * im
if (exp(re) <= 0.1d0) then
tmp = t_0
else if (exp(re) <= 20.0d0) then
tmp = sin(im)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = Math.exp(re) * im;
double tmp;
if (Math.exp(re) <= 0.1) {
tmp = t_0;
} else if (Math.exp(re) <= 20.0) {
tmp = Math.sin(im);
} else {
tmp = t_0;
}
return tmp;
}
def code(re, im): t_0 = math.exp(re) * im tmp = 0 if math.exp(re) <= 0.1: tmp = t_0 elif math.exp(re) <= 20.0: tmp = math.sin(im) else: tmp = t_0 return tmp
function code(re, im) t_0 = Float64(exp(re) * im) tmp = 0.0 if (exp(re) <= 0.1) tmp = t_0; elseif (exp(re) <= 20.0) tmp = sin(im); else tmp = t_0; end return tmp end
function tmp_2 = code(re, im) t_0 = exp(re) * im; tmp = 0.0; if (exp(re) <= 0.1) tmp = t_0; elseif (exp(re) <= 20.0) tmp = sin(im); else tmp = t_0; end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, If[LessEqual[N[Exp[re], $MachinePrecision], 0.1], t$95$0, If[LessEqual[N[Exp[re], $MachinePrecision], 20.0], N[Sin[im], $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{re} \cdot im\\
\mathbf{if}\;e^{re} \leq 0.1:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;e^{re} \leq 20:\\
\;\;\;\;\sin im\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (exp.f64 re) < 0.10000000000000001 or 20 < (exp.f64 re) Initial program 100.0%
Taylor expanded in im around 0
Simplified90.6%
if 0.10000000000000001 < (exp.f64 re) < 20Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6498.0%
Simplified98.0%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666)))))))
(if (<= re -0.175)
(* (exp re) im)
(if (<= re 2700000.0)
(* (sin im) (+ 1.0 t_0))
(if (<= re 1e+103)
(* (exp re) (* im (+ 1.0 (* im (* im -0.16666666666666666)))))
(* (sin im) t_0))))))
double code(double re, double im) {
double t_0 = re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))));
double tmp;
if (re <= -0.175) {
tmp = exp(re) * im;
} else if (re <= 2700000.0) {
tmp = sin(im) * (1.0 + t_0);
} else if (re <= 1e+103) {
tmp = exp(re) * (im * (1.0 + (im * (im * -0.16666666666666666))));
} 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) :: tmp
t_0 = re * (1.0d0 + (re * (0.5d0 + (re * 0.16666666666666666d0))))
if (re <= (-0.175d0)) then
tmp = exp(re) * im
else if (re <= 2700000.0d0) then
tmp = sin(im) * (1.0d0 + t_0)
else if (re <= 1d+103) then
tmp = exp(re) * (im * (1.0d0 + (im * (im * (-0.16666666666666666d0)))))
else
tmp = sin(im) * t_0
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))));
double tmp;
if (re <= -0.175) {
tmp = Math.exp(re) * im;
} else if (re <= 2700000.0) {
tmp = Math.sin(im) * (1.0 + t_0);
} else if (re <= 1e+103) {
tmp = Math.exp(re) * (im * (1.0 + (im * (im * -0.16666666666666666))));
} else {
tmp = Math.sin(im) * t_0;
}
return tmp;
}
def code(re, im): t_0 = re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))) tmp = 0 if re <= -0.175: tmp = math.exp(re) * im elif re <= 2700000.0: tmp = math.sin(im) * (1.0 + t_0) elif re <= 1e+103: tmp = math.exp(re) * (im * (1.0 + (im * (im * -0.16666666666666666)))) else: tmp = math.sin(im) * t_0 return tmp
function code(re, im) t_0 = Float64(re * Float64(1.0 + Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666))))) tmp = 0.0 if (re <= -0.175) tmp = Float64(exp(re) * im); elseif (re <= 2700000.0) tmp = Float64(sin(im) * Float64(1.0 + t_0)); elseif (re <= 1e+103) tmp = Float64(exp(re) * Float64(im * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666))))); else tmp = Float64(sin(im) * t_0); end return tmp end
function tmp_2 = code(re, im) t_0 = re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))); tmp = 0.0; if (re <= -0.175) tmp = exp(re) * im; elseif (re <= 2700000.0) tmp = sin(im) * (1.0 + t_0); elseif (re <= 1e+103) tmp = exp(re) * (im * (1.0 + (im * (im * -0.16666666666666666)))); else tmp = sin(im) * t_0; end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(re * N[(1.0 + N[(re * N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -0.175], N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision], If[LessEqual[re, 2700000.0], N[(N[Sin[im], $MachinePrecision] * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1e+103], N[(N[Exp[re], $MachinePrecision] * N[(im * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[im], $MachinePrecision] * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\\
\mathbf{if}\;re \leq -0.175:\\
\;\;\;\;e^{re} \cdot im\\
\mathbf{elif}\;re \leq 2700000:\\
\;\;\;\;\sin im \cdot \left(1 + t\_0\right)\\
\mathbf{elif}\;re \leq 10^{+103}:\\
\;\;\;\;e^{re} \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin im \cdot t\_0\\
\end{array}
\end{array}
if re < -0.17499999999999999Initial program 100.0%
Taylor expanded in im around 0
Simplified100.0%
if -0.17499999999999999 < re < 2.7e6Initial 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.6%
Simplified98.6%
if 2.7e6 < re < 1e103Initial 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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6489.5%
Simplified89.5%
if 1e103 < re Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in re around inf
cube-multN/A
unpow2N/A
associate-*l*N/A
distribute-lft-inN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
Simplified100.0%
Final simplification98.5%
(FPCore (re im)
:precision binary64
(if (<= re -0.0095)
(* (exp re) im)
(if (<= re 2700000.0)
(* (sin im) (+ 1.0 (* re (+ 1.0 (* re 0.5)))))
(if (<= re 1e+103)
(* (exp re) (* im (+ 1.0 (* im (* im -0.16666666666666666)))))
(*
(sin im)
(* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666))))))))))
double code(double re, double im) {
double tmp;
if (re <= -0.0095) {
tmp = exp(re) * im;
} else if (re <= 2700000.0) {
tmp = sin(im) * (1.0 + (re * (1.0 + (re * 0.5))));
} else if (re <= 1e+103) {
tmp = exp(re) * (im * (1.0 + (im * (im * -0.16666666666666666))));
} else {
tmp = sin(im) * (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 <= (-0.0095d0)) then
tmp = exp(re) * im
else if (re <= 2700000.0d0) then
tmp = sin(im) * (1.0d0 + (re * (1.0d0 + (re * 0.5d0))))
else if (re <= 1d+103) then
tmp = exp(re) * (im * (1.0d0 + (im * (im * (-0.16666666666666666d0)))))
else
tmp = sin(im) * (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 <= -0.0095) {
tmp = Math.exp(re) * im;
} else if (re <= 2700000.0) {
tmp = Math.sin(im) * (1.0 + (re * (1.0 + (re * 0.5))));
} else if (re <= 1e+103) {
tmp = Math.exp(re) * (im * (1.0 + (im * (im * -0.16666666666666666))));
} else {
tmp = Math.sin(im) * (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -0.0095: tmp = math.exp(re) * im elif re <= 2700000.0: tmp = math.sin(im) * (1.0 + (re * (1.0 + (re * 0.5)))) elif re <= 1e+103: tmp = math.exp(re) * (im * (1.0 + (im * (im * -0.16666666666666666)))) else: tmp = math.sin(im) * (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))) return tmp
function code(re, im) tmp = 0.0 if (re <= -0.0095) tmp = Float64(exp(re) * im); elseif (re <= 2700000.0) tmp = Float64(sin(im) * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5))))); elseif (re <= 1e+103) tmp = Float64(exp(re) * Float64(im * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666))))); else tmp = Float64(sin(im) * 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 <= -0.0095) tmp = exp(re) * im; elseif (re <= 2700000.0) tmp = sin(im) * (1.0 + (re * (1.0 + (re * 0.5)))); elseif (re <= 1e+103) tmp = exp(re) * (im * (1.0 + (im * (im * -0.16666666666666666)))); else tmp = sin(im) * (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -0.0095], N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision], If[LessEqual[re, 2700000.0], 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, 1e+103], N[(N[Exp[re], $MachinePrecision] * N[(im * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[im], $MachinePrecision] * N[(re * N[(1.0 + N[(re * N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -0.0095:\\
\;\;\;\;e^{re} \cdot im\\
\mathbf{elif}\;re \leq 2700000:\\
\;\;\;\;\sin im \cdot \left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)\\
\mathbf{elif}\;re \leq 10^{+103}:\\
\;\;\;\;e^{re} \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin im \cdot \left(re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if re < -0.00949999999999999976Initial program 100.0%
Taylor expanded in im around 0
Simplified100.0%
if -0.00949999999999999976 < re < 2.7e6Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6498.6%
Simplified98.6%
if 2.7e6 < re < 1e103Initial 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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6489.5%
Simplified89.5%
if 1e103 < re Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in re around inf
cube-multN/A
unpow2N/A
associate-*l*N/A
distribute-lft-inN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
Simplified100.0%
Final simplification98.5%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (exp re) im)))
(if (<= re -0.000112)
t_0
(if (<= re 2.8)
(* (sin im) (+ re 1.0))
(if (<= re 7e+94)
t_0
(if (<= re 1.9e+154)
(*
(* re (* re re))
(*
im
(*
0.16666666666666666
(+ 1.0 (* im (* im -0.16666666666666666))))))
(* (sin im) (* re (* re 0.5)))))))))
double code(double re, double im) {
double t_0 = exp(re) * im;
double tmp;
if (re <= -0.000112) {
tmp = t_0;
} else if (re <= 2.8) {
tmp = sin(im) * (re + 1.0);
} else if (re <= 7e+94) {
tmp = t_0;
} else if (re <= 1.9e+154) {
tmp = (re * (re * re)) * (im * (0.16666666666666666 * (1.0 + (im * (im * -0.16666666666666666)))));
} else {
tmp = sin(im) * (re * (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 = exp(re) * im
if (re <= (-0.000112d0)) then
tmp = t_0
else if (re <= 2.8d0) then
tmp = sin(im) * (re + 1.0d0)
else if (re <= 7d+94) then
tmp = t_0
else if (re <= 1.9d+154) then
tmp = (re * (re * re)) * (im * (0.16666666666666666d0 * (1.0d0 + (im * (im * (-0.16666666666666666d0))))))
else
tmp = sin(im) * (re * (re * 0.5d0))
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.000112) {
tmp = t_0;
} else if (re <= 2.8) {
tmp = Math.sin(im) * (re + 1.0);
} else if (re <= 7e+94) {
tmp = t_0;
} else if (re <= 1.9e+154) {
tmp = (re * (re * re)) * (im * (0.16666666666666666 * (1.0 + (im * (im * -0.16666666666666666)))));
} else {
tmp = Math.sin(im) * (re * (re * 0.5));
}
return tmp;
}
def code(re, im): t_0 = math.exp(re) * im tmp = 0 if re <= -0.000112: tmp = t_0 elif re <= 2.8: tmp = math.sin(im) * (re + 1.0) elif re <= 7e+94: tmp = t_0 elif re <= 1.9e+154: tmp = (re * (re * re)) * (im * (0.16666666666666666 * (1.0 + (im * (im * -0.16666666666666666))))) else: tmp = math.sin(im) * (re * (re * 0.5)) return tmp
function code(re, im) t_0 = Float64(exp(re) * im) tmp = 0.0 if (re <= -0.000112) tmp = t_0; elseif (re <= 2.8) tmp = Float64(sin(im) * Float64(re + 1.0)); elseif (re <= 7e+94) tmp = t_0; elseif (re <= 1.9e+154) tmp = Float64(Float64(re * Float64(re * re)) * Float64(im * Float64(0.16666666666666666 * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666)))))); else tmp = Float64(sin(im) * Float64(re * Float64(re * 0.5))); end return tmp end
function tmp_2 = code(re, im) t_0 = exp(re) * im; tmp = 0.0; if (re <= -0.000112) tmp = t_0; elseif (re <= 2.8) tmp = sin(im) * (re + 1.0); elseif (re <= 7e+94) tmp = t_0; elseif (re <= 1.9e+154) tmp = (re * (re * re)) * (im * (0.16666666666666666 * (1.0 + (im * (im * -0.16666666666666666))))); else tmp = sin(im) * (re * (re * 0.5)); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, If[LessEqual[re, -0.000112], t$95$0, If[LessEqual[re, 2.8], N[(N[Sin[im], $MachinePrecision] * N[(re + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 7e+94], t$95$0, If[LessEqual[re, 1.9e+154], N[(N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision] * N[(im * N[(0.16666666666666666 * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[im], $MachinePrecision] * N[(re * N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{re} \cdot im\\
\mathbf{if}\;re \leq -0.000112:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;re \leq 2.8:\\
\;\;\;\;\sin im \cdot \left(re + 1\right)\\
\mathbf{elif}\;re \leq 7 \cdot 10^{+94}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;re \leq 1.9 \cdot 10^{+154}:\\
\;\;\;\;\left(re \cdot \left(re \cdot re\right)\right) \cdot \left(im \cdot \left(0.16666666666666666 \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin im \cdot \left(re \cdot \left(re \cdot 0.5\right)\right)\\
\end{array}
\end{array}
if re < -1.11999999999999998e-4 or 2.7999999999999998 < re < 6.9999999999999994e94Initial program 100.0%
Taylor expanded in im around 0
Simplified97.7%
if -1.11999999999999998e-4 < re < 2.7999999999999998Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6499.2%
Simplified99.2%
if 6.9999999999999994e94 < re < 1.8999999999999999e154Initial 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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6491.7%
Simplified91.7%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6475.7%
Simplified75.7%
Taylor expanded in re around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6483.7%
Simplified83.7%
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%
Taylor expanded in re around inf
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification98.0%
(FPCore (re im)
:precision binary64
(if (<= re -0.0072)
(* (exp re) im)
(if (<= re 2700000.0)
(* (sin im) (+ 1.0 (* re (+ 1.0 (* re 0.5)))))
(if (<= re 1.9e+154)
(* (exp re) (* im (+ 1.0 (* im (* im -0.16666666666666666)))))
(* (sin im) (* re (* re 0.5)))))))
double code(double re, double im) {
double tmp;
if (re <= -0.0072) {
tmp = exp(re) * im;
} else if (re <= 2700000.0) {
tmp = sin(im) * (1.0 + (re * (1.0 + (re * 0.5))));
} else if (re <= 1.9e+154) {
tmp = exp(re) * (im * (1.0 + (im * (im * -0.16666666666666666))));
} else {
tmp = sin(im) * (re * (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 <= (-0.0072d0)) then
tmp = exp(re) * im
else if (re <= 2700000.0d0) then
tmp = sin(im) * (1.0d0 + (re * (1.0d0 + (re * 0.5d0))))
else if (re <= 1.9d+154) then
tmp = exp(re) * (im * (1.0d0 + (im * (im * (-0.16666666666666666d0)))))
else
tmp = sin(im) * (re * (re * 0.5d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -0.0072) {
tmp = Math.exp(re) * im;
} else if (re <= 2700000.0) {
tmp = Math.sin(im) * (1.0 + (re * (1.0 + (re * 0.5))));
} else if (re <= 1.9e+154) {
tmp = Math.exp(re) * (im * (1.0 + (im * (im * -0.16666666666666666))));
} else {
tmp = Math.sin(im) * (re * (re * 0.5));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -0.0072: tmp = math.exp(re) * im elif re <= 2700000.0: tmp = math.sin(im) * (1.0 + (re * (1.0 + (re * 0.5)))) elif re <= 1.9e+154: tmp = math.exp(re) * (im * (1.0 + (im * (im * -0.16666666666666666)))) else: tmp = math.sin(im) * (re * (re * 0.5)) return tmp
function code(re, im) tmp = 0.0 if (re <= -0.0072) tmp = Float64(exp(re) * im); elseif (re <= 2700000.0) tmp = Float64(sin(im) * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5))))); elseif (re <= 1.9e+154) tmp = Float64(exp(re) * Float64(im * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666))))); else tmp = Float64(sin(im) * Float64(re * Float64(re * 0.5))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -0.0072) tmp = exp(re) * im; elseif (re <= 2700000.0) tmp = sin(im) * (1.0 + (re * (1.0 + (re * 0.5)))); elseif (re <= 1.9e+154) tmp = exp(re) * (im * (1.0 + (im * (im * -0.16666666666666666)))); else tmp = sin(im) * (re * (re * 0.5)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -0.0072], N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision], If[LessEqual[re, 2700000.0], N[(N[Sin[im], $MachinePrecision] * N[(1.0 + N[(re * N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.9e+154], N[(N[Exp[re], $MachinePrecision] * N[(im * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[im], $MachinePrecision] * N[(re * N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -0.0072:\\
\;\;\;\;e^{re} \cdot im\\
\mathbf{elif}\;re \leq 2700000:\\
\;\;\;\;\sin im \cdot \left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)\\
\mathbf{elif}\;re \leq 1.9 \cdot 10^{+154}:\\
\;\;\;\;e^{re} \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin im \cdot \left(re \cdot \left(re \cdot 0.5\right)\right)\\
\end{array}
\end{array}
if re < -0.0071999999999999998Initial program 100.0%
Taylor expanded in im around 0
Simplified100.0%
if -0.0071999999999999998 < re < 2.7e6Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6498.6%
Simplified98.6%
if 2.7e6 < re < 1.8999999999999999e154Initial 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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6488.9%
Simplified88.9%
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%
Taylor expanded in re around inf
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification98.1%
(FPCore (re im)
:precision binary64
(if (<= re -0.0085)
(* (exp re) im)
(if (<= re 2700000.0)
(* (sin im) (+ re 1.0))
(if (<= re 1.9e+154)
(* (exp re) (* im (+ 1.0 (* im (* im -0.16666666666666666)))))
(* (sin im) (* re (* re 0.5)))))))
double code(double re, double im) {
double tmp;
if (re <= -0.0085) {
tmp = exp(re) * im;
} else if (re <= 2700000.0) {
tmp = sin(im) * (re + 1.0);
} else if (re <= 1.9e+154) {
tmp = exp(re) * (im * (1.0 + (im * (im * -0.16666666666666666))));
} else {
tmp = sin(im) * (re * (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 <= (-0.0085d0)) then
tmp = exp(re) * im
else if (re <= 2700000.0d0) then
tmp = sin(im) * (re + 1.0d0)
else if (re <= 1.9d+154) then
tmp = exp(re) * (im * (1.0d0 + (im * (im * (-0.16666666666666666d0)))))
else
tmp = sin(im) * (re * (re * 0.5d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -0.0085) {
tmp = Math.exp(re) * im;
} else if (re <= 2700000.0) {
tmp = Math.sin(im) * (re + 1.0);
} else if (re <= 1.9e+154) {
tmp = Math.exp(re) * (im * (1.0 + (im * (im * -0.16666666666666666))));
} else {
tmp = Math.sin(im) * (re * (re * 0.5));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -0.0085: tmp = math.exp(re) * im elif re <= 2700000.0: tmp = math.sin(im) * (re + 1.0) elif re <= 1.9e+154: tmp = math.exp(re) * (im * (1.0 + (im * (im * -0.16666666666666666)))) else: tmp = math.sin(im) * (re * (re * 0.5)) return tmp
function code(re, im) tmp = 0.0 if (re <= -0.0085) tmp = Float64(exp(re) * im); elseif (re <= 2700000.0) tmp = Float64(sin(im) * Float64(re + 1.0)); elseif (re <= 1.9e+154) tmp = Float64(exp(re) * Float64(im * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666))))); else tmp = Float64(sin(im) * Float64(re * Float64(re * 0.5))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -0.0085) tmp = exp(re) * im; elseif (re <= 2700000.0) tmp = sin(im) * (re + 1.0); elseif (re <= 1.9e+154) tmp = exp(re) * (im * (1.0 + (im * (im * -0.16666666666666666)))); else tmp = sin(im) * (re * (re * 0.5)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -0.0085], N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision], If[LessEqual[re, 2700000.0], N[(N[Sin[im], $MachinePrecision] * N[(re + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.9e+154], N[(N[Exp[re], $MachinePrecision] * N[(im * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[im], $MachinePrecision] * N[(re * N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -0.0085:\\
\;\;\;\;e^{re} \cdot im\\
\mathbf{elif}\;re \leq 2700000:\\
\;\;\;\;\sin im \cdot \left(re + 1\right)\\
\mathbf{elif}\;re \leq 1.9 \cdot 10^{+154}:\\
\;\;\;\;e^{re} \cdot \left(im \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin im \cdot \left(re \cdot \left(re \cdot 0.5\right)\right)\\
\end{array}
\end{array}
if re < -0.0085000000000000006Initial program 100.0%
Taylor expanded in im around 0
Simplified100.0%
if -0.0085000000000000006 < re < 2.7e6Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6498.4%
Simplified98.4%
if 2.7e6 < re < 1.8999999999999999e154Initial 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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6488.9%
Simplified88.9%
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%
Taylor expanded in re around inf
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification98.0%
(FPCore (re im) :precision binary64 (let* ((t_0 (* (exp re) im))) (if (<= re -0.000285) t_0 (if (<= re 2.8) (* (sin im) (+ re 1.0)) t_0))))
double code(double re, double im) {
double t_0 = exp(re) * im;
double tmp;
if (re <= -0.000285) {
tmp = t_0;
} else if (re <= 2.8) {
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.000285d0)) then
tmp = t_0
else if (re <= 2.8d0) 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.000285) {
tmp = t_0;
} else if (re <= 2.8) {
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.000285: tmp = t_0 elif re <= 2.8: 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.000285) tmp = t_0; elseif (re <= 2.8) 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.000285) tmp = t_0; elseif (re <= 2.8) 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.000285], t$95$0, If[LessEqual[re, 2.8], 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.000285:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;re \leq 2.8:\\
\;\;\;\;\sin im \cdot \left(re + 1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if re < -2.8499999999999999e-4 or 2.7999999999999998 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified90.6%
if -2.8499999999999999e-4 < re < 2.7999999999999998Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6499.2%
Simplified99.2%
Final simplification94.9%
(FPCore (re im)
:precision binary64
(if (<= re -120000000000.0)
(* im (* (+ re 1.0) (* -0.16666666666666666 (* im im))))
(if (<= re 2700000.0)
(sin im)
(*
(* re (* re re))
(*
im
(* 0.16666666666666666 (+ 1.0 (* im (* im -0.16666666666666666)))))))))
double code(double re, double im) {
double tmp;
if (re <= -120000000000.0) {
tmp = im * ((re + 1.0) * (-0.16666666666666666 * (im * im)));
} else if (re <= 2700000.0) {
tmp = sin(im);
} else {
tmp = (re * (re * re)) * (im * (0.16666666666666666 * (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 <= (-120000000000.0d0)) then
tmp = im * ((re + 1.0d0) * ((-0.16666666666666666d0) * (im * im)))
else if (re <= 2700000.0d0) then
tmp = sin(im)
else
tmp = (re * (re * re)) * (im * (0.16666666666666666d0 * (1.0d0 + (im * (im * (-0.16666666666666666d0))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -120000000000.0) {
tmp = im * ((re + 1.0) * (-0.16666666666666666 * (im * im)));
} else if (re <= 2700000.0) {
tmp = Math.sin(im);
} else {
tmp = (re * (re * re)) * (im * (0.16666666666666666 * (1.0 + (im * (im * -0.16666666666666666)))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -120000000000.0: tmp = im * ((re + 1.0) * (-0.16666666666666666 * (im * im))) elif re <= 2700000.0: tmp = math.sin(im) else: tmp = (re * (re * re)) * (im * (0.16666666666666666 * (1.0 + (im * (im * -0.16666666666666666))))) return tmp
function code(re, im) tmp = 0.0 if (re <= -120000000000.0) tmp = Float64(im * Float64(Float64(re + 1.0) * Float64(-0.16666666666666666 * Float64(im * im)))); elseif (re <= 2700000.0) tmp = sin(im); else tmp = Float64(Float64(re * Float64(re * re)) * Float64(im * Float64(0.16666666666666666 * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666)))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -120000000000.0) tmp = im * ((re + 1.0) * (-0.16666666666666666 * (im * im))); elseif (re <= 2700000.0) tmp = sin(im); else tmp = (re * (re * re)) * (im * (0.16666666666666666 * (1.0 + (im * (im * -0.16666666666666666))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -120000000000.0], N[(im * N[(N[(re + 1.0), $MachinePrecision] * N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 2700000.0], N[Sin[im], $MachinePrecision], N[(N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision] * N[(im * N[(0.16666666666666666 * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -120000000000:\\
\;\;\;\;im \cdot \left(\left(re + 1\right) \cdot \left(-0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\
\mathbf{elif}\;re \leq 2700000:\\
\;\;\;\;\sin im\\
\mathbf{else}:\\
\;\;\;\;\left(re \cdot \left(re \cdot re\right)\right) \cdot \left(im \cdot \left(0.16666666666666666 \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\right)\\
\end{array}
\end{array}
if re < -1.2e11Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.8%
Simplified2.8%
Taylor expanded in im around 0
associate-+r+N/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-rgt-identityN/A
distribute-rgt1-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-inN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f642.5%
Simplified2.5%
Taylor expanded in im around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6430.8%
Simplified30.8%
if -1.2e11 < re < 2.7e6Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6495.2%
Simplified95.2%
if 2.7e6 < 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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6485.5%
Simplified85.5%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6462.5%
Simplified62.5%
Taylor expanded in re around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6464.3%
Simplified64.3%
(FPCore (re im)
:precision binary64
(if (<= re -1.6)
(* im (* (+ re 1.0) (* -0.16666666666666666 (* 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 <= -1.6) {
tmp = im * ((re + 1.0) * (-0.16666666666666666 * (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 <= (-1.6d0)) then
tmp = im * ((re + 1.0d0) * ((-0.16666666666666666d0) * (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 <= -1.6) {
tmp = im * ((re + 1.0) * (-0.16666666666666666 * (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 <= -1.6: tmp = im * ((re + 1.0) * (-0.16666666666666666 * (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 <= -1.6) tmp = Float64(im * Float64(Float64(re + 1.0) * Float64(-0.16666666666666666 * 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(im * Float64(im * -0.16666666666666666))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -1.6) tmp = im * ((re + 1.0) * (-0.16666666666666666 * (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, -1.6], N[(im * N[(N[(re + 1.0), $MachinePrecision] * N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(re * N[(1.0 + N[(re * N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -1.6:\\
\;\;\;\;im \cdot \left(\left(re + 1\right) \cdot \left(-0.16666666666666666 \cdot \left(im \cdot im\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 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if re < -1.6000000000000001Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.8%
Simplified2.8%
Taylor expanded in im around 0
associate-+r+N/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-rgt-identityN/A
distribute-rgt1-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-inN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f642.5%
Simplified2.5%
Taylor expanded in im around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6429.6%
Simplified29.6%
if -1.6000000000000001 < 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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6458.4%
Simplified58.4%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6451.6%
Simplified51.6%
(FPCore (re im)
:precision binary64
(if (<= re -120000000000.0)
(* im (* (+ re 1.0) (* -0.16666666666666666 (* im im))))
(if (<= re 3400000.0)
(* im (+ 1.0 (* re (+ 1.0 (* re 0.5)))))
(*
(* re (* re re))
(*
im
(* 0.16666666666666666 (+ 1.0 (* im (* im -0.16666666666666666)))))))))
double code(double re, double im) {
double tmp;
if (re <= -120000000000.0) {
tmp = im * ((re + 1.0) * (-0.16666666666666666 * (im * im)));
} else if (re <= 3400000.0) {
tmp = im * (1.0 + (re * (1.0 + (re * 0.5))));
} else {
tmp = (re * (re * re)) * (im * (0.16666666666666666 * (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 <= (-120000000000.0d0)) then
tmp = im * ((re + 1.0d0) * ((-0.16666666666666666d0) * (im * im)))
else if (re <= 3400000.0d0) then
tmp = im * (1.0d0 + (re * (1.0d0 + (re * 0.5d0))))
else
tmp = (re * (re * re)) * (im * (0.16666666666666666d0 * (1.0d0 + (im * (im * (-0.16666666666666666d0))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -120000000000.0) {
tmp = im * ((re + 1.0) * (-0.16666666666666666 * (im * im)));
} else if (re <= 3400000.0) {
tmp = im * (1.0 + (re * (1.0 + (re * 0.5))));
} else {
tmp = (re * (re * re)) * (im * (0.16666666666666666 * (1.0 + (im * (im * -0.16666666666666666)))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -120000000000.0: tmp = im * ((re + 1.0) * (-0.16666666666666666 * (im * im))) elif re <= 3400000.0: tmp = im * (1.0 + (re * (1.0 + (re * 0.5)))) else: tmp = (re * (re * re)) * (im * (0.16666666666666666 * (1.0 + (im * (im * -0.16666666666666666))))) return tmp
function code(re, im) tmp = 0.0 if (re <= -120000000000.0) tmp = Float64(im * Float64(Float64(re + 1.0) * Float64(-0.16666666666666666 * Float64(im * im)))); elseif (re <= 3400000.0) tmp = Float64(im * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5))))); else tmp = Float64(Float64(re * Float64(re * re)) * Float64(im * Float64(0.16666666666666666 * Float64(1.0 + Float64(im * Float64(im * -0.16666666666666666)))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -120000000000.0) tmp = im * ((re + 1.0) * (-0.16666666666666666 * (im * im))); elseif (re <= 3400000.0) tmp = im * (1.0 + (re * (1.0 + (re * 0.5)))); else tmp = (re * (re * re)) * (im * (0.16666666666666666 * (1.0 + (im * (im * -0.16666666666666666))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -120000000000.0], N[(im * N[(N[(re + 1.0), $MachinePrecision] * N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 3400000.0], N[(im * N[(1.0 + N[(re * N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision] * N[(im * N[(0.16666666666666666 * N[(1.0 + N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -120000000000:\\
\;\;\;\;im \cdot \left(\left(re + 1\right) \cdot \left(-0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\
\mathbf{elif}\;re \leq 3400000:\\
\;\;\;\;im \cdot \left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(re \cdot \left(re \cdot re\right)\right) \cdot \left(im \cdot \left(0.16666666666666666 \cdot \left(1 + im \cdot \left(im \cdot -0.16666666666666666\right)\right)\right)\right)\\
\end{array}
\end{array}
if re < -1.2e11Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.8%
Simplified2.8%
Taylor expanded in im around 0
associate-+r+N/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-rgt-identityN/A
distribute-rgt1-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-inN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f642.5%
Simplified2.5%
Taylor expanded in im around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6430.8%
Simplified30.8%
if -1.2e11 < re < 3.4e6Initial program 100.0%
Taylor expanded in im around 0
Simplified49.3%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6446.4%
Simplified46.4%
if 3.4e6 < 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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6485.5%
Simplified85.5%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6462.5%
Simplified62.5%
Taylor expanded in re around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6464.3%
Simplified64.3%
Final simplification46.0%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* -0.16666666666666666 (* im im))))
(if (<= re -1.0)
(* im (* (+ re 1.0) t_0))
(if (<= re 1.4e+122)
(* im (* (+ re 1.0) (+ 1.0 t_0)))
(* im (* (+ 0.5 (* re 0.16666666666666666)) (* re re)))))))
double code(double re, double im) {
double t_0 = -0.16666666666666666 * (im * im);
double tmp;
if (re <= -1.0) {
tmp = im * ((re + 1.0) * t_0);
} else if (re <= 1.4e+122) {
tmp = im * ((re + 1.0) * (1.0 + t_0));
} else {
tmp = im * ((0.5 + (re * 0.16666666666666666)) * (re * re));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = (-0.16666666666666666d0) * (im * im)
if (re <= (-1.0d0)) then
tmp = im * ((re + 1.0d0) * t_0)
else if (re <= 1.4d+122) then
tmp = im * ((re + 1.0d0) * (1.0d0 + t_0))
else
tmp = im * ((0.5d0 + (re * 0.16666666666666666d0)) * (re * re))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = -0.16666666666666666 * (im * im);
double tmp;
if (re <= -1.0) {
tmp = im * ((re + 1.0) * t_0);
} else if (re <= 1.4e+122) {
tmp = im * ((re + 1.0) * (1.0 + t_0));
} else {
tmp = im * ((0.5 + (re * 0.16666666666666666)) * (re * re));
}
return tmp;
}
def code(re, im): t_0 = -0.16666666666666666 * (im * im) tmp = 0 if re <= -1.0: tmp = im * ((re + 1.0) * t_0) elif re <= 1.4e+122: tmp = im * ((re + 1.0) * (1.0 + t_0)) else: tmp = im * ((0.5 + (re * 0.16666666666666666)) * (re * re)) return tmp
function code(re, im) t_0 = Float64(-0.16666666666666666 * Float64(im * im)) tmp = 0.0 if (re <= -1.0) tmp = Float64(im * Float64(Float64(re + 1.0) * t_0)); elseif (re <= 1.4e+122) tmp = Float64(im * Float64(Float64(re + 1.0) * Float64(1.0 + t_0))); else tmp = Float64(im * Float64(Float64(0.5 + Float64(re * 0.16666666666666666)) * Float64(re * re))); end return tmp end
function tmp_2 = code(re, im) t_0 = -0.16666666666666666 * (im * im); tmp = 0.0; if (re <= -1.0) tmp = im * ((re + 1.0) * t_0); elseif (re <= 1.4e+122) tmp = im * ((re + 1.0) * (1.0 + t_0)); else tmp = im * ((0.5 + (re * 0.16666666666666666)) * (re * re)); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -1.0], N[(im * N[(N[(re + 1.0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.4e+122], N[(im * N[(N[(re + 1.0), $MachinePrecision] * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -0.16666666666666666 \cdot \left(im \cdot im\right)\\
\mathbf{if}\;re \leq -1:\\
\;\;\;\;im \cdot \left(\left(re + 1\right) \cdot t\_0\right)\\
\mathbf{elif}\;re \leq 1.4 \cdot 10^{+122}:\\
\;\;\;\;im \cdot \left(\left(re + 1\right) \cdot \left(1 + t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(\left(0.5 + re \cdot 0.16666666666666666\right) \cdot \left(re \cdot re\right)\right)\\
\end{array}
\end{array}
if re < -1Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.8%
Simplified2.8%
Taylor expanded in im around 0
associate-+r+N/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-rgt-identityN/A
distribute-rgt1-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-inN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f642.5%
Simplified2.5%
Taylor expanded in im around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6429.6%
Simplified29.6%
if -1 < re < 1.4e122Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6484.0%
Simplified84.0%
Taylor expanded in im around 0
associate-+r+N/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-rgt-identityN/A
distribute-rgt1-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-inN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6442.8%
Simplified42.8%
if 1.4e122 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified87.5%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6487.5%
Simplified87.5%
Taylor expanded in re around inf
cube-multN/A
unpow2N/A
associate-*l*N/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
lft-mult-inverseN/A
*-lft-identityN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
distribute-lft-inN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
*-lowering-*.f64N/A
Simplified87.5%
Final simplification44.7%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* -0.16666666666666666 (* im im))))
(if (<= re -120000000000.0)
(* im (* (+ re 1.0) t_0))
(if (<= re 1.4e+122)
(* im (+ 1.0 t_0))
(* im (* (+ 0.5 (* re 0.16666666666666666)) (* re re)))))))
double code(double re, double im) {
double t_0 = -0.16666666666666666 * (im * im);
double tmp;
if (re <= -120000000000.0) {
tmp = im * ((re + 1.0) * t_0);
} else if (re <= 1.4e+122) {
tmp = im * (1.0 + t_0);
} else {
tmp = im * ((0.5 + (re * 0.16666666666666666)) * (re * re));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = (-0.16666666666666666d0) * (im * im)
if (re <= (-120000000000.0d0)) then
tmp = im * ((re + 1.0d0) * t_0)
else if (re <= 1.4d+122) then
tmp = im * (1.0d0 + t_0)
else
tmp = im * ((0.5d0 + (re * 0.16666666666666666d0)) * (re * re))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = -0.16666666666666666 * (im * im);
double tmp;
if (re <= -120000000000.0) {
tmp = im * ((re + 1.0) * t_0);
} else if (re <= 1.4e+122) {
tmp = im * (1.0 + t_0);
} else {
tmp = im * ((0.5 + (re * 0.16666666666666666)) * (re * re));
}
return tmp;
}
def code(re, im): t_0 = -0.16666666666666666 * (im * im) tmp = 0 if re <= -120000000000.0: tmp = im * ((re + 1.0) * t_0) elif re <= 1.4e+122: tmp = im * (1.0 + t_0) else: tmp = im * ((0.5 + (re * 0.16666666666666666)) * (re * re)) return tmp
function code(re, im) t_0 = Float64(-0.16666666666666666 * Float64(im * im)) tmp = 0.0 if (re <= -120000000000.0) tmp = Float64(im * Float64(Float64(re + 1.0) * t_0)); elseif (re <= 1.4e+122) tmp = Float64(im * Float64(1.0 + t_0)); else tmp = Float64(im * Float64(Float64(0.5 + Float64(re * 0.16666666666666666)) * Float64(re * re))); end return tmp end
function tmp_2 = code(re, im) t_0 = -0.16666666666666666 * (im * im); tmp = 0.0; if (re <= -120000000000.0) tmp = im * ((re + 1.0) * t_0); elseif (re <= 1.4e+122) tmp = im * (1.0 + t_0); else tmp = im * ((0.5 + (re * 0.16666666666666666)) * (re * re)); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -120000000000.0], N[(im * N[(N[(re + 1.0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.4e+122], N[(im * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision], N[(im * N[(N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -0.16666666666666666 \cdot \left(im \cdot im\right)\\
\mathbf{if}\;re \leq -120000000000:\\
\;\;\;\;im \cdot \left(\left(re + 1\right) \cdot t\_0\right)\\
\mathbf{elif}\;re \leq 1.4 \cdot 10^{+122}:\\
\;\;\;\;im \cdot \left(1 + t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(\left(0.5 + re \cdot 0.16666666666666666\right) \cdot \left(re \cdot re\right)\right)\\
\end{array}
\end{array}
if re < -1.2e11Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.8%
Simplified2.8%
Taylor expanded in im around 0
associate-+r+N/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-rgt-identityN/A
distribute-rgt1-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-inN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f642.5%
Simplified2.5%
Taylor expanded in im around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6430.8%
Simplified30.8%
if -1.2e11 < re < 1.4e122Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6481.5%
Simplified81.5%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6441.6%
Simplified41.6%
if 1.4e122 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified87.5%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6487.5%
Simplified87.5%
Taylor expanded in re around inf
cube-multN/A
unpow2N/A
associate-*l*N/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
lft-mult-inverseN/A
*-lft-identityN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
distribute-lft-inN/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
*-lowering-*.f64N/A
Simplified87.5%
Final simplification44.4%
(FPCore (re im) :precision binary64 (if (<= re -1.6) (* im (* (+ re 1.0) (* -0.16666666666666666 (* im im)))) (* im (+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666)))))))))
double code(double re, double im) {
double tmp;
if (re <= -1.6) {
tmp = im * ((re + 1.0) * (-0.16666666666666666 * (im * im)));
} 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 <= (-1.6d0)) then
tmp = im * ((re + 1.0d0) * ((-0.16666666666666666d0) * (im * im)))
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 <= -1.6) {
tmp = im * ((re + 1.0) * (-0.16666666666666666 * (im * im)));
} else {
tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -1.6: tmp = im * ((re + 1.0) * (-0.16666666666666666 * (im * im))) 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 <= -1.6) tmp = Float64(im * Float64(Float64(re + 1.0) * Float64(-0.16666666666666666 * Float64(im * im)))); 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 <= -1.6) tmp = im * ((re + 1.0) * (-0.16666666666666666 * (im * im))); 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, -1.6], N[(im * N[(N[(re + 1.0), $MachinePrecision] * N[(-0.16666666666666666 * N[(im * im), $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 -1.6:\\
\;\;\;\;im \cdot \left(\left(re + 1\right) \cdot \left(-0.16666666666666666 \cdot \left(im \cdot im\right)\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.6000000000000001Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.8%
Simplified2.8%
Taylor expanded in im around 0
associate-+r+N/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-rgt-identityN/A
distribute-rgt1-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-inN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f642.5%
Simplified2.5%
Taylor expanded in im around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6429.6%
Simplified29.6%
if -1.6000000000000001 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified57.1%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6449.2%
Simplified49.2%
Final simplification43.7%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* -0.16666666666666666 (* im im))))
(if (<= re -120000000000.0)
(* im (* (+ re 1.0) t_0))
(if (<= re 1.4e+122)
(* im (+ 1.0 t_0))
(* im (* re (* 0.16666666666666666 (* re re))))))))
double code(double re, double im) {
double t_0 = -0.16666666666666666 * (im * im);
double tmp;
if (re <= -120000000000.0) {
tmp = im * ((re + 1.0) * t_0);
} else if (re <= 1.4e+122) {
tmp = im * (1.0 + t_0);
} else {
tmp = im * (re * (0.16666666666666666 * (re * re)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = (-0.16666666666666666d0) * (im * im)
if (re <= (-120000000000.0d0)) then
tmp = im * ((re + 1.0d0) * t_0)
else if (re <= 1.4d+122) then
tmp = im * (1.0d0 + t_0)
else
tmp = im * (re * (0.16666666666666666d0 * (re * re)))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = -0.16666666666666666 * (im * im);
double tmp;
if (re <= -120000000000.0) {
tmp = im * ((re + 1.0) * t_0);
} else if (re <= 1.4e+122) {
tmp = im * (1.0 + t_0);
} else {
tmp = im * (re * (0.16666666666666666 * (re * re)));
}
return tmp;
}
def code(re, im): t_0 = -0.16666666666666666 * (im * im) tmp = 0 if re <= -120000000000.0: tmp = im * ((re + 1.0) * t_0) elif re <= 1.4e+122: tmp = im * (1.0 + t_0) else: tmp = im * (re * (0.16666666666666666 * (re * re))) return tmp
function code(re, im) t_0 = Float64(-0.16666666666666666 * Float64(im * im)) tmp = 0.0 if (re <= -120000000000.0) tmp = Float64(im * Float64(Float64(re + 1.0) * t_0)); elseif (re <= 1.4e+122) tmp = Float64(im * Float64(1.0 + t_0)); else tmp = Float64(im * Float64(re * Float64(0.16666666666666666 * Float64(re * re)))); end return tmp end
function tmp_2 = code(re, im) t_0 = -0.16666666666666666 * (im * im); tmp = 0.0; if (re <= -120000000000.0) tmp = im * ((re + 1.0) * t_0); elseif (re <= 1.4e+122) tmp = im * (1.0 + t_0); else tmp = im * (re * (0.16666666666666666 * (re * re))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -120000000000.0], N[(im * N[(N[(re + 1.0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.4e+122], N[(im * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision], N[(im * N[(re * N[(0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -0.16666666666666666 \cdot \left(im \cdot im\right)\\
\mathbf{if}\;re \leq -120000000000:\\
\;\;\;\;im \cdot \left(\left(re + 1\right) \cdot t\_0\right)\\
\mathbf{elif}\;re \leq 1.4 \cdot 10^{+122}:\\
\;\;\;\;im \cdot \left(1 + t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(re \cdot \left(0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\\
\end{array}
\end{array}
if re < -1.2e11Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.8%
Simplified2.8%
Taylor expanded in im around 0
associate-+r+N/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-rgt-identityN/A
distribute-rgt1-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-inN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f642.5%
Simplified2.5%
Taylor expanded in im around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6430.8%
Simplified30.8%
if -1.2e11 < re < 1.4e122Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6481.5%
Simplified81.5%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6441.6%
Simplified41.6%
if 1.4e122 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified87.5%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6487.5%
Simplified87.5%
Taylor expanded in re around inf
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.5%
Simplified87.5%
Final simplification44.4%
(FPCore (re im)
:precision binary64
(if (<= re -120000000000.0)
(* im (* im (* im (+ -0.16666666666666666 (* re -0.16666666666666666)))))
(if (<= re 1.4e+122)
(* im (+ 1.0 (* -0.16666666666666666 (* im im))))
(* im (* re (* 0.16666666666666666 (* re re)))))))
double code(double re, double im) {
double tmp;
if (re <= -120000000000.0) {
tmp = im * (im * (im * (-0.16666666666666666 + (re * -0.16666666666666666))));
} else if (re <= 1.4e+122) {
tmp = im * (1.0 + (-0.16666666666666666 * (im * im)));
} else {
tmp = im * (re * (0.16666666666666666 * (re * re)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= (-120000000000.0d0)) then
tmp = im * (im * (im * ((-0.16666666666666666d0) + (re * (-0.16666666666666666d0)))))
else if (re <= 1.4d+122) then
tmp = im * (1.0d0 + ((-0.16666666666666666d0) * (im * im)))
else
tmp = im * (re * (0.16666666666666666d0 * (re * re)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -120000000000.0) {
tmp = im * (im * (im * (-0.16666666666666666 + (re * -0.16666666666666666))));
} else if (re <= 1.4e+122) {
tmp = im * (1.0 + (-0.16666666666666666 * (im * im)));
} else {
tmp = im * (re * (0.16666666666666666 * (re * re)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -120000000000.0: tmp = im * (im * (im * (-0.16666666666666666 + (re * -0.16666666666666666)))) elif re <= 1.4e+122: tmp = im * (1.0 + (-0.16666666666666666 * (im * im))) else: tmp = im * (re * (0.16666666666666666 * (re * re))) return tmp
function code(re, im) tmp = 0.0 if (re <= -120000000000.0) tmp = Float64(im * Float64(im * Float64(im * Float64(-0.16666666666666666 + Float64(re * -0.16666666666666666))))); elseif (re <= 1.4e+122) tmp = Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im)))); else tmp = Float64(im * Float64(re * Float64(0.16666666666666666 * Float64(re * re)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -120000000000.0) tmp = im * (im * (im * (-0.16666666666666666 + (re * -0.16666666666666666)))); elseif (re <= 1.4e+122) tmp = im * (1.0 + (-0.16666666666666666 * (im * im))); else tmp = im * (re * (0.16666666666666666 * (re * re))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -120000000000.0], N[(im * N[(im * N[(im * N[(-0.16666666666666666 + N[(re * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.4e+122], N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(re * N[(0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -120000000000:\\
\;\;\;\;im \cdot \left(im \cdot \left(im \cdot \left(-0.16666666666666666 + re \cdot -0.16666666666666666\right)\right)\right)\\
\mathbf{elif}\;re \leq 1.4 \cdot 10^{+122}:\\
\;\;\;\;im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(re \cdot \left(0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\\
\end{array}
\end{array}
if re < -1.2e11Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.8%
Simplified2.8%
Taylor expanded in im around 0
associate-+r+N/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-rgt-identityN/A
distribute-rgt1-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-inN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f642.5%
Simplified2.5%
Taylor expanded in im around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f6429.7%
Simplified29.7%
if -1.2e11 < re < 1.4e122Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6481.5%
Simplified81.5%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6441.6%
Simplified41.6%
if 1.4e122 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified87.5%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6487.5%
Simplified87.5%
Taylor expanded in re around inf
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.5%
Simplified87.5%
Final simplification44.1%
(FPCore (re im) :precision binary64 (if (<= re 1.4e+122) (* im (+ 1.0 (* -0.16666666666666666 (* im im)))) (* im (* re (* 0.16666666666666666 (* re re))))))
double code(double re, double im) {
double tmp;
if (re <= 1.4e+122) {
tmp = im * (1.0 + (-0.16666666666666666 * (im * im)));
} else {
tmp = im * (re * (0.16666666666666666 * (re * re)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 1.4d+122) then
tmp = im * (1.0d0 + ((-0.16666666666666666d0) * (im * im)))
else
tmp = im * (re * (0.16666666666666666d0 * (re * re)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 1.4e+122) {
tmp = im * (1.0 + (-0.16666666666666666 * (im * im)));
} else {
tmp = im * (re * (0.16666666666666666 * (re * re)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 1.4e+122: tmp = im * (1.0 + (-0.16666666666666666 * (im * im))) else: tmp = im * (re * (0.16666666666666666 * (re * re))) return tmp
function code(re, im) tmp = 0.0 if (re <= 1.4e+122) tmp = Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im)))); else tmp = Float64(im * Float64(re * Float64(0.16666666666666666 * Float64(re * re)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 1.4e+122) tmp = im * (1.0 + (-0.16666666666666666 * (im * im))); else tmp = im * (re * (0.16666666666666666 * (re * re))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 1.4e+122], N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(re * N[(0.16666666666666666 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 1.4 \cdot 10^{+122}:\\
\;\;\;\;im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(re \cdot \left(0.16666666666666666 \cdot \left(re \cdot re\right)\right)\right)\\
\end{array}
\end{array}
if re < 1.4e122Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6457.7%
Simplified57.7%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6429.9%
Simplified29.9%
if 1.4e122 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified87.5%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6487.5%
Simplified87.5%
Taylor expanded in re around inf
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.5%
Simplified87.5%
Final simplification37.1%
(FPCore (re im) :precision binary64 (if (<= re 1e+123) (* im (+ 1.0 (* -0.16666666666666666 (* im im)))) (* im (* 0.5 (* re re)))))
double code(double re, double im) {
double tmp;
if (re <= 1e+123) {
tmp = im * (1.0 + (-0.16666666666666666 * (im * im)));
} else {
tmp = im * (0.5 * (re * re));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 1d+123) then
tmp = im * (1.0d0 + ((-0.16666666666666666d0) * (im * im)))
else
tmp = im * (0.5d0 * (re * re))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 1e+123) {
tmp = im * (1.0 + (-0.16666666666666666 * (im * im)));
} else {
tmp = im * (0.5 * (re * re));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 1e+123: tmp = im * (1.0 + (-0.16666666666666666 * (im * im))) else: tmp = im * (0.5 * (re * re)) return tmp
function code(re, im) tmp = 0.0 if (re <= 1e+123) tmp = Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im)))); else tmp = Float64(im * Float64(0.5 * Float64(re * re))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 1e+123) tmp = im * (1.0 + (-0.16666666666666666 * (im * im))); else tmp = im * (0.5 * (re * re)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 1e+123], N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(0.5 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 10^{+123}:\\
\;\;\;\;im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(0.5 \cdot \left(re \cdot re\right)\right)\\
\end{array}
\end{array}
if re < 9.99999999999999978e122Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6457.7%
Simplified57.7%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6429.9%
Simplified29.9%
if 9.99999999999999978e122 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified87.5%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6478.5%
Simplified78.5%
Taylor expanded in re around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6478.5%
Simplified78.5%
Final simplification36.0%
(FPCore (re im) :precision binary64 (if (<= re 1.7e-6) im (* im (* 0.5 (* re re)))))
double code(double re, double im) {
double tmp;
if (re <= 1.7e-6) {
tmp = im;
} else {
tmp = im * (0.5 * (re * re));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 1.7d-6) then
tmp = im
else
tmp = im * (0.5d0 * (re * re))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 1.7e-6) {
tmp = im;
} else {
tmp = im * (0.5 * (re * re));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 1.7e-6: tmp = im else: tmp = im * (0.5 * (re * re)) return tmp
function code(re, im) tmp = 0.0 if (re <= 1.7e-6) tmp = im; else tmp = Float64(im * Float64(0.5 * Float64(re * re))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 1.7e-6) tmp = im; else tmp = im * (0.5 * (re * re)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 1.7e-6], im, N[(im * N[(0.5 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 1.7 \cdot 10^{-6}:\\
\;\;\;\;im\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(0.5 \cdot \left(re \cdot re\right)\right)\\
\end{array}
\end{array}
if re < 1.70000000000000003e-6Initial program 100.0%
Taylor expanded in im around 0
Simplified67.1%
Taylor expanded in re around 0
Simplified31.9%
if 1.70000000000000003e-6 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified76.1%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6446.0%
Simplified46.0%
Taylor expanded in re around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6446.1%
Simplified46.1%
Final simplification35.1%
(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
Simplified69.1%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6426.3%
Simplified26.3%
Final simplification26.3%
(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
Simplified69.1%
Taylor expanded in re around 0
Simplified25.2%
herbie shell --seed 2024159
(FPCore (re im)
:name "math.exp on complex, imaginary part"
:precision binary64
(* (exp re) (sin im)))