
(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 25 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))
(t_1 (* (sin im) (+ 1.0 (* re (+ 1.0 (* re 0.5)))))))
(if (<= re -0.027)
t_0
(if (<= re 520.0) t_1 (if (<= re 2.5e+149) 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.027) {
tmp = t_0;
} else if (re <= 520.0) {
tmp = t_1;
} else if (re <= 2.5e+149) {
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.027d0)) then
tmp = t_0
else if (re <= 520.0d0) then
tmp = t_1
else if (re <= 2.5d+149) 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.027) {
tmp = t_0;
} else if (re <= 520.0) {
tmp = t_1;
} else if (re <= 2.5e+149) {
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.027: tmp = t_0 elif re <= 520.0: tmp = t_1 elif re <= 2.5e+149: 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.027) tmp = t_0; elseif (re <= 520.0) tmp = t_1; elseif (re <= 2.5e+149) 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.027) tmp = t_0; elseif (re <= 520.0) tmp = t_1; elseif (re <= 2.5e+149) 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.027], t$95$0, If[LessEqual[re, 520.0], t$95$1, If[LessEqual[re, 2.5e+149], 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.027:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;re \leq 520:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;re \leq 2.5 \cdot 10^{+149}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if re < -0.0269999999999999997 or 520 < re < 2.49999999999999995e149Initial program 100.0%
Taylor expanded in im around 0
Simplified94.1%
if -0.0269999999999999997 < re < 520 or 2.49999999999999995e149 < 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.6%
(FPCore (re im)
:precision binary64
(if (<= re -0.0022)
(* (exp re) im)
(if (<= re 8500000.0)
(* (sin im) (+ re 1.0))
(* (exp re) (* im (+ 1.0 (* -0.16666666666666666 (* im im))))))))
double code(double re, double im) {
double tmp;
if (re <= -0.0022) {
tmp = exp(re) * im;
} else if (re <= 8500000.0) {
tmp = sin(im) * (re + 1.0);
} else {
tmp = exp(re) * (im * (1.0 + (-0.16666666666666666 * (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 <= (-0.0022d0)) then
tmp = exp(re) * im
else if (re <= 8500000.0d0) then
tmp = sin(im) * (re + 1.0d0)
else
tmp = exp(re) * (im * (1.0d0 + ((-0.16666666666666666d0) * (im * im))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -0.0022) {
tmp = Math.exp(re) * im;
} else if (re <= 8500000.0) {
tmp = Math.sin(im) * (re + 1.0);
} else {
tmp = Math.exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -0.0022: tmp = math.exp(re) * im elif re <= 8500000.0: tmp = math.sin(im) * (re + 1.0) else: tmp = math.exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im)))) return tmp
function code(re, im) tmp = 0.0 if (re <= -0.0022) tmp = Float64(exp(re) * im); elseif (re <= 8500000.0) tmp = Float64(sin(im) * Float64(re + 1.0)); else tmp = Float64(exp(re) * Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -0.0022) tmp = exp(re) * im; elseif (re <= 8500000.0) tmp = sin(im) * (re + 1.0); else tmp = exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im)))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -0.0022], N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision], If[LessEqual[re, 8500000.0], N[(N[Sin[im], $MachinePrecision] * N[(re + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[Exp[re], $MachinePrecision] * N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -0.0022:\\
\;\;\;\;e^{re} \cdot im\\
\mathbf{elif}\;re \leq 8500000:\\
\;\;\;\;\sin im \cdot \left(re + 1\right)\\
\mathbf{else}:\\
\;\;\;\;e^{re} \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\
\end{array}
\end{array}
if re < -0.00220000000000000013Initial program 100.0%
Taylor expanded in im around 0
Simplified100.0%
if -0.00220000000000000013 < re < 8.5e6Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6498.4%
Simplified98.4%
if 8.5e6 < 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-*.f6476.2%
Simplified76.2%
Final simplification93.4%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (exp re) im)))
(if (<= re -0.0003)
t_0
(if (<= re 520.0)
(* (sin im) (+ re 1.0))
(if (<= re 2.5e+149)
t_0
(*
(+ 1.0 (* re (+ 1.0 (* re 0.5))))
(* im (+ 1.0 (* -0.16666666666666666 (* im im))))))))))
double code(double re, double im) {
double t_0 = exp(re) * im;
double tmp;
if (re <= -0.0003) {
tmp = t_0;
} else if (re <= 520.0) {
tmp = sin(im) * (re + 1.0);
} else if (re <= 2.5e+149) {
tmp = t_0;
} else {
tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
}
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.0003d0)) then
tmp = t_0
else if (re <= 520.0d0) then
tmp = sin(im) * (re + 1.0d0)
else if (re <= 2.5d+149) then
tmp = t_0
else
tmp = (1.0d0 + (re * (1.0d0 + (re * 0.5d0)))) * (im * (1.0d0 + ((-0.16666666666666666d0) * (im * im))))
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.0003) {
tmp = t_0;
} else if (re <= 520.0) {
tmp = Math.sin(im) * (re + 1.0);
} else if (re <= 2.5e+149) {
tmp = t_0;
} else {
tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
}
return tmp;
}
def code(re, im): t_0 = math.exp(re) * im tmp = 0 if re <= -0.0003: tmp = t_0 elif re <= 520.0: tmp = math.sin(im) * (re + 1.0) elif re <= 2.5e+149: tmp = t_0 else: tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + (-0.16666666666666666 * (im * im)))) return tmp
function code(re, im) t_0 = Float64(exp(re) * im) tmp = 0.0 if (re <= -0.0003) tmp = t_0; elseif (re <= 520.0) tmp = Float64(sin(im) * Float64(re + 1.0)); elseif (re <= 2.5e+149) tmp = t_0; else tmp = Float64(Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5)))) * Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im))))); end return tmp end
function tmp_2 = code(re, im) t_0 = exp(re) * im; tmp = 0.0; if (re <= -0.0003) tmp = t_0; elseif (re <= 520.0) tmp = sin(im) * (re + 1.0); elseif (re <= 2.5e+149) tmp = t_0; else tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + (-0.16666666666666666 * (im * im)))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, If[LessEqual[re, -0.0003], t$95$0, If[LessEqual[re, 520.0], N[(N[Sin[im], $MachinePrecision] * N[(re + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 2.5e+149], t$95$0, N[(N[(1.0 + N[(re * N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{re} \cdot im\\
\mathbf{if}\;re \leq -0.0003:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;re \leq 520:\\
\;\;\;\;\sin im \cdot \left(re + 1\right)\\
\mathbf{elif}\;re \leq 2.5 \cdot 10^{+149}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right) \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\
\end{array}
\end{array}
if re < -2.99999999999999974e-4 or 520 < re < 2.49999999999999995e149Initial program 100.0%
Taylor expanded in im around 0
Simplified94.1%
if -2.99999999999999974e-4 < re < 520Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6499.2%
Simplified99.2%
if 2.49999999999999995e149 < 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-*.f6481.8%
Simplified81.8%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6481.8%
Simplified81.8%
Final simplification94.9%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (exp re) im)))
(if (<= re -2e-6)
t_0
(if (<= re 520.0)
(sin im)
(if (<= re 2.5e+149)
t_0
(*
(+ 1.0 (* re (+ 1.0 (* re 0.5))))
(* im (+ 1.0 (* -0.16666666666666666 (* im im))))))))))
double code(double re, double im) {
double t_0 = exp(re) * im;
double tmp;
if (re <= -2e-6) {
tmp = t_0;
} else if (re <= 520.0) {
tmp = sin(im);
} else if (re <= 2.5e+149) {
tmp = t_0;
} else {
tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
}
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 <= (-2d-6)) then
tmp = t_0
else if (re <= 520.0d0) then
tmp = sin(im)
else if (re <= 2.5d+149) then
tmp = t_0
else
tmp = (1.0d0 + (re * (1.0d0 + (re * 0.5d0)))) * (im * (1.0d0 + ((-0.16666666666666666d0) * (im * im))))
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 <= -2e-6) {
tmp = t_0;
} else if (re <= 520.0) {
tmp = Math.sin(im);
} else if (re <= 2.5e+149) {
tmp = t_0;
} else {
tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
}
return tmp;
}
def code(re, im): t_0 = math.exp(re) * im tmp = 0 if re <= -2e-6: tmp = t_0 elif re <= 520.0: tmp = math.sin(im) elif re <= 2.5e+149: tmp = t_0 else: tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + (-0.16666666666666666 * (im * im)))) return tmp
function code(re, im) t_0 = Float64(exp(re) * im) tmp = 0.0 if (re <= -2e-6) tmp = t_0; elseif (re <= 520.0) tmp = sin(im); elseif (re <= 2.5e+149) tmp = t_0; else tmp = Float64(Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5)))) * Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im))))); end return tmp end
function tmp_2 = code(re, im) t_0 = exp(re) * im; tmp = 0.0; if (re <= -2e-6) tmp = t_0; elseif (re <= 520.0) tmp = sin(im); elseif (re <= 2.5e+149) tmp = t_0; else tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + (-0.16666666666666666 * (im * im)))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, If[LessEqual[re, -2e-6], t$95$0, If[LessEqual[re, 520.0], N[Sin[im], $MachinePrecision], If[LessEqual[re, 2.5e+149], t$95$0, N[(N[(1.0 + N[(re * N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{re} \cdot im\\
\mathbf{if}\;re \leq -2 \cdot 10^{-6}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;re \leq 520:\\
\;\;\;\;\sin im\\
\mathbf{elif}\;re \leq 2.5 \cdot 10^{+149}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right) \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\
\end{array}
\end{array}
if re < -1.99999999999999991e-6 or 520 < re < 2.49999999999999995e149Initial program 100.0%
Taylor expanded in im around 0
Simplified94.1%
if -1.99999999999999991e-6 < re < 520Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6498.6%
Simplified98.6%
if 2.49999999999999995e149 < 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-*.f6481.8%
Simplified81.8%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6481.8%
Simplified81.8%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* im (+ 1.0 (* -0.16666666666666666 (* im im)))))
(t_1 (* re (* re 0.5))))
(if (<= re -400.0)
(/
1.0
(/
(+
(/ 1.0 (+ re 1.0))
(*
(* im im)
(+
(/ 0.16666666666666666 (+ re 1.0))
(*
(* im im)
(+
(/ (* (* im im) 0.00205026455026455) (+ re 1.0))
(/ 0.019444444444444445 (+ re 1.0)))))))
im))
(if (<= re 1.5e+23)
(sin im)
(if (<= re 2.5e+149)
(* t_0 (+ 1.0 (/ (- (* re re) (* t_1 t_1)) (- re t_1))))
(* (+ 1.0 (* re (+ 1.0 (* re 0.5)))) t_0))))))
double code(double re, double im) {
double t_0 = im * (1.0 + (-0.16666666666666666 * (im * im)));
double t_1 = re * (re * 0.5);
double tmp;
if (re <= -400.0) {
tmp = 1.0 / (((1.0 / (re + 1.0)) + ((im * im) * ((0.16666666666666666 / (re + 1.0)) + ((im * im) * ((((im * im) * 0.00205026455026455) / (re + 1.0)) + (0.019444444444444445 / (re + 1.0))))))) / im);
} else if (re <= 1.5e+23) {
tmp = sin(im);
} else if (re <= 2.5e+149) {
tmp = t_0 * (1.0 + (((re * re) - (t_1 * t_1)) / (re - t_1)));
} else {
tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * 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 = im * (1.0d0 + ((-0.16666666666666666d0) * (im * im)))
t_1 = re * (re * 0.5d0)
if (re <= (-400.0d0)) then
tmp = 1.0d0 / (((1.0d0 / (re + 1.0d0)) + ((im * im) * ((0.16666666666666666d0 / (re + 1.0d0)) + ((im * im) * ((((im * im) * 0.00205026455026455d0) / (re + 1.0d0)) + (0.019444444444444445d0 / (re + 1.0d0))))))) / im)
else if (re <= 1.5d+23) then
tmp = sin(im)
else if (re <= 2.5d+149) then
tmp = t_0 * (1.0d0 + (((re * re) - (t_1 * t_1)) / (re - t_1)))
else
tmp = (1.0d0 + (re * (1.0d0 + (re * 0.5d0)))) * t_0
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = im * (1.0 + (-0.16666666666666666 * (im * im)));
double t_1 = re * (re * 0.5);
double tmp;
if (re <= -400.0) {
tmp = 1.0 / (((1.0 / (re + 1.0)) + ((im * im) * ((0.16666666666666666 / (re + 1.0)) + ((im * im) * ((((im * im) * 0.00205026455026455) / (re + 1.0)) + (0.019444444444444445 / (re + 1.0))))))) / im);
} else if (re <= 1.5e+23) {
tmp = Math.sin(im);
} else if (re <= 2.5e+149) {
tmp = t_0 * (1.0 + (((re * re) - (t_1 * t_1)) / (re - t_1)));
} else {
tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * t_0;
}
return tmp;
}
def code(re, im): t_0 = im * (1.0 + (-0.16666666666666666 * (im * im))) t_1 = re * (re * 0.5) tmp = 0 if re <= -400.0: tmp = 1.0 / (((1.0 / (re + 1.0)) + ((im * im) * ((0.16666666666666666 / (re + 1.0)) + ((im * im) * ((((im * im) * 0.00205026455026455) / (re + 1.0)) + (0.019444444444444445 / (re + 1.0))))))) / im) elif re <= 1.5e+23: tmp = math.sin(im) elif re <= 2.5e+149: tmp = t_0 * (1.0 + (((re * re) - (t_1 * t_1)) / (re - t_1))) else: tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * t_0 return tmp
function code(re, im) t_0 = Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im)))) t_1 = Float64(re * Float64(re * 0.5)) tmp = 0.0 if (re <= -400.0) tmp = Float64(1.0 / Float64(Float64(Float64(1.0 / Float64(re + 1.0)) + Float64(Float64(im * im) * Float64(Float64(0.16666666666666666 / Float64(re + 1.0)) + Float64(Float64(im * im) * Float64(Float64(Float64(Float64(im * im) * 0.00205026455026455) / Float64(re + 1.0)) + Float64(0.019444444444444445 / Float64(re + 1.0))))))) / im)); elseif (re <= 1.5e+23) tmp = sin(im); elseif (re <= 2.5e+149) tmp = Float64(t_0 * Float64(1.0 + Float64(Float64(Float64(re * re) - Float64(t_1 * t_1)) / Float64(re - t_1)))); else tmp = Float64(Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5)))) * t_0); end return tmp end
function tmp_2 = code(re, im) t_0 = im * (1.0 + (-0.16666666666666666 * (im * im))); t_1 = re * (re * 0.5); tmp = 0.0; if (re <= -400.0) tmp = 1.0 / (((1.0 / (re + 1.0)) + ((im * im) * ((0.16666666666666666 / (re + 1.0)) + ((im * im) * ((((im * im) * 0.00205026455026455) / (re + 1.0)) + (0.019444444444444445 / (re + 1.0))))))) / im); elseif (re <= 1.5e+23) tmp = sin(im); elseif (re <= 2.5e+149) tmp = t_0 * (1.0 + (((re * re) - (t_1 * t_1)) / (re - t_1))); else tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * t_0; end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(re * N[(re * 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -400.0], N[(1.0 / N[(N[(N[(1.0 / N[(re + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(im * im), $MachinePrecision] * N[(N[(0.16666666666666666 / N[(re + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(im * im), $MachinePrecision] * N[(N[(N[(N[(im * im), $MachinePrecision] * 0.00205026455026455), $MachinePrecision] / N[(re + 1.0), $MachinePrecision]), $MachinePrecision] + N[(0.019444444444444445 / N[(re + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / im), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.5e+23], N[Sin[im], $MachinePrecision], If[LessEqual[re, 2.5e+149], N[(t$95$0 * N[(1.0 + N[(N[(N[(re * re), $MachinePrecision] - N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision] / N[(re - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(re * N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\\
t_1 := re \cdot \left(re \cdot 0.5\right)\\
\mathbf{if}\;re \leq -400:\\
\;\;\;\;\frac{1}{\frac{\frac{1}{re + 1} + \left(im \cdot im\right) \cdot \left(\frac{0.16666666666666666}{re + 1} + \left(im \cdot im\right) \cdot \left(\frac{\left(im \cdot im\right) \cdot 0.00205026455026455}{re + 1} + \frac{0.019444444444444445}{re + 1}\right)\right)}{im}}\\
\mathbf{elif}\;re \leq 1.5 \cdot 10^{+23}:\\
\;\;\;\;\sin im\\
\mathbf{elif}\;re \leq 2.5 \cdot 10^{+149}:\\
\;\;\;\;t\_0 \cdot \left(1 + \frac{re \cdot re - t\_1 \cdot t\_1}{re - t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right) \cdot t\_0\\
\end{array}
\end{array}
if re < -400Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.7%
Simplified2.7%
*-commutativeN/A
distribute-lft-inN/A
flip3-+N/A
/-lowering-/.f64N/A
*-commutativeN/A
+-lowering-+.f64N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-rgt-identityN/A
pow-lowering-pow.f64N/A
sin-lowering-sin.f64N/A
Applied egg-rr4.3%
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
distribute-lft1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sin-lowering-sin.f642.7%
Applied egg-rr2.7%
Taylor expanded in im around 0
/-lowering-/.f64N/A
Simplified47.5%
if -400 < re < 1.5e23Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6494.1%
Simplified94.1%
if 1.5e23 < re < 2.49999999999999995e149Initial 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-*.f6468.0%
Simplified68.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6417.9%
Simplified17.9%
distribute-rgt-inN/A
*-lft-identityN/A
flip-+N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6448.5%
Applied egg-rr48.5%
if 2.49999999999999995e149 < 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-*.f6481.8%
Simplified81.8%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6481.8%
Simplified81.8%
Final simplification75.3%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* re (* re 0.5)))
(t_1 (* im (+ 1.0 (* -0.16666666666666666 (* im im))))))
(if (<= re 1.1e-18)
(/
1.0
(/
(+
(/ 1.0 (+ re 1.0))
(*
(* im im)
(+
(/ 0.16666666666666666 (+ re 1.0))
(*
(* im im)
(+
(/ (* (* im im) 0.00205026455026455) (+ re 1.0))
(/ 0.019444444444444445 (+ re 1.0)))))))
im))
(if (<= re 2.5e+149)
(* t_1 (+ 1.0 (/ (- (* re re) (* t_0 t_0)) (- re t_0))))
(* (+ 1.0 (* re (+ 1.0 (* re 0.5)))) t_1)))))
double code(double re, double im) {
double t_0 = re * (re * 0.5);
double t_1 = im * (1.0 + (-0.16666666666666666 * (im * im)));
double tmp;
if (re <= 1.1e-18) {
tmp = 1.0 / (((1.0 / (re + 1.0)) + ((im * im) * ((0.16666666666666666 / (re + 1.0)) + ((im * im) * ((((im * im) * 0.00205026455026455) / (re + 1.0)) + (0.019444444444444445 / (re + 1.0))))))) / im);
} else if (re <= 2.5e+149) {
tmp = t_1 * (1.0 + (((re * re) - (t_0 * t_0)) / (re - t_0)));
} else {
tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * 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 = re * (re * 0.5d0)
t_1 = im * (1.0d0 + ((-0.16666666666666666d0) * (im * im)))
if (re <= 1.1d-18) then
tmp = 1.0d0 / (((1.0d0 / (re + 1.0d0)) + ((im * im) * ((0.16666666666666666d0 / (re + 1.0d0)) + ((im * im) * ((((im * im) * 0.00205026455026455d0) / (re + 1.0d0)) + (0.019444444444444445d0 / (re + 1.0d0))))))) / im)
else if (re <= 2.5d+149) then
tmp = t_1 * (1.0d0 + (((re * re) - (t_0 * t_0)) / (re - t_0)))
else
tmp = (1.0d0 + (re * (1.0d0 + (re * 0.5d0)))) * t_1
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = re * (re * 0.5);
double t_1 = im * (1.0 + (-0.16666666666666666 * (im * im)));
double tmp;
if (re <= 1.1e-18) {
tmp = 1.0 / (((1.0 / (re + 1.0)) + ((im * im) * ((0.16666666666666666 / (re + 1.0)) + ((im * im) * ((((im * im) * 0.00205026455026455) / (re + 1.0)) + (0.019444444444444445 / (re + 1.0))))))) / im);
} else if (re <= 2.5e+149) {
tmp = t_1 * (1.0 + (((re * re) - (t_0 * t_0)) / (re - t_0)));
} else {
tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * t_1;
}
return tmp;
}
def code(re, im): t_0 = re * (re * 0.5) t_1 = im * (1.0 + (-0.16666666666666666 * (im * im))) tmp = 0 if re <= 1.1e-18: tmp = 1.0 / (((1.0 / (re + 1.0)) + ((im * im) * ((0.16666666666666666 / (re + 1.0)) + ((im * im) * ((((im * im) * 0.00205026455026455) / (re + 1.0)) + (0.019444444444444445 / (re + 1.0))))))) / im) elif re <= 2.5e+149: tmp = t_1 * (1.0 + (((re * re) - (t_0 * t_0)) / (re - t_0))) else: tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * t_1 return tmp
function code(re, im) t_0 = Float64(re * Float64(re * 0.5)) t_1 = Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im)))) tmp = 0.0 if (re <= 1.1e-18) tmp = Float64(1.0 / Float64(Float64(Float64(1.0 / Float64(re + 1.0)) + Float64(Float64(im * im) * Float64(Float64(0.16666666666666666 / Float64(re + 1.0)) + Float64(Float64(im * im) * Float64(Float64(Float64(Float64(im * im) * 0.00205026455026455) / Float64(re + 1.0)) + Float64(0.019444444444444445 / Float64(re + 1.0))))))) / im)); elseif (re <= 2.5e+149) tmp = Float64(t_1 * Float64(1.0 + Float64(Float64(Float64(re * re) - Float64(t_0 * t_0)) / Float64(re - t_0)))); else tmp = Float64(Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5)))) * t_1); end return tmp end
function tmp_2 = code(re, im) t_0 = re * (re * 0.5); t_1 = im * (1.0 + (-0.16666666666666666 * (im * im))); tmp = 0.0; if (re <= 1.1e-18) tmp = 1.0 / (((1.0 / (re + 1.0)) + ((im * im) * ((0.16666666666666666 / (re + 1.0)) + ((im * im) * ((((im * im) * 0.00205026455026455) / (re + 1.0)) + (0.019444444444444445 / (re + 1.0))))))) / im); elseif (re <= 2.5e+149) tmp = t_1 * (1.0 + (((re * re) - (t_0 * t_0)) / (re - t_0))); else tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * t_1; end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(re * N[(re * 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, 1.1e-18], N[(1.0 / N[(N[(N[(1.0 / N[(re + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(im * im), $MachinePrecision] * N[(N[(0.16666666666666666 / N[(re + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(im * im), $MachinePrecision] * N[(N[(N[(N[(im * im), $MachinePrecision] * 0.00205026455026455), $MachinePrecision] / N[(re + 1.0), $MachinePrecision]), $MachinePrecision] + N[(0.019444444444444445 / N[(re + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / im), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 2.5e+149], N[(t$95$1 * N[(1.0 + N[(N[(N[(re * re), $MachinePrecision] - N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(re - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(re * N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := re \cdot \left(re \cdot 0.5\right)\\
t_1 := im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\\
\mathbf{if}\;re \leq 1.1 \cdot 10^{-18}:\\
\;\;\;\;\frac{1}{\frac{\frac{1}{re + 1} + \left(im \cdot im\right) \cdot \left(\frac{0.16666666666666666}{re + 1} + \left(im \cdot im\right) \cdot \left(\frac{\left(im \cdot im\right) \cdot 0.00205026455026455}{re + 1} + \frac{0.019444444444444445}{re + 1}\right)\right)}{im}}\\
\mathbf{elif}\;re \leq 2.5 \cdot 10^{+149}:\\
\;\;\;\;t\_1 \cdot \left(1 + \frac{re \cdot re - t\_0 \cdot t\_0}{re - t\_0}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right) \cdot t\_1\\
\end{array}
\end{array}
if re < 1.0999999999999999e-18Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6464.1%
Simplified64.1%
*-commutativeN/A
distribute-lft-inN/A
flip3-+N/A
/-lowering-/.f64N/A
*-commutativeN/A
+-lowering-+.f64N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-rgt-identityN/A
pow-lowering-pow.f64N/A
sin-lowering-sin.f64N/A
Applied egg-rr44.8%
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
distribute-lft1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sin-lowering-sin.f6463.9%
Applied egg-rr63.9%
Taylor expanded in im around 0
/-lowering-/.f64N/A
Simplified50.0%
if 1.0999999999999999e-18 < re < 2.49999999999999995e149Initial 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-*.f6466.8%
Simplified66.8%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6417.2%
Simplified17.2%
distribute-rgt-inN/A
*-lft-identityN/A
flip-+N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6440.4%
Applied egg-rr40.4%
if 2.49999999999999995e149 < 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-*.f6481.8%
Simplified81.8%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6481.8%
Simplified81.8%
Final simplification52.9%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* re (* re 0.5)))
(t_1 (* im (+ 1.0 (* -0.16666666666666666 (* im im))))))
(if (<= re 2.6e-18)
(/
1.0
(/
(+
(/ 1.0 (+ re 1.0))
(*
(* im im)
(+
(/ 0.16666666666666666 (+ re 1.0))
(* im (* im (/ 0.019444444444444445 (+ re 1.0)))))))
im))
(if (<= re 2.5e+149)
(* t_1 (+ 1.0 (/ (- (* re re) (* t_0 t_0)) (- re t_0))))
(* (+ 1.0 (* re (+ 1.0 (* re 0.5)))) t_1)))))
double code(double re, double im) {
double t_0 = re * (re * 0.5);
double t_1 = im * (1.0 + (-0.16666666666666666 * (im * im)));
double tmp;
if (re <= 2.6e-18) {
tmp = 1.0 / (((1.0 / (re + 1.0)) + ((im * im) * ((0.16666666666666666 / (re + 1.0)) + (im * (im * (0.019444444444444445 / (re + 1.0))))))) / im);
} else if (re <= 2.5e+149) {
tmp = t_1 * (1.0 + (((re * re) - (t_0 * t_0)) / (re - t_0)));
} else {
tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * 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 = re * (re * 0.5d0)
t_1 = im * (1.0d0 + ((-0.16666666666666666d0) * (im * im)))
if (re <= 2.6d-18) then
tmp = 1.0d0 / (((1.0d0 / (re + 1.0d0)) + ((im * im) * ((0.16666666666666666d0 / (re + 1.0d0)) + (im * (im * (0.019444444444444445d0 / (re + 1.0d0))))))) / im)
else if (re <= 2.5d+149) then
tmp = t_1 * (1.0d0 + (((re * re) - (t_0 * t_0)) / (re - t_0)))
else
tmp = (1.0d0 + (re * (1.0d0 + (re * 0.5d0)))) * t_1
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = re * (re * 0.5);
double t_1 = im * (1.0 + (-0.16666666666666666 * (im * im)));
double tmp;
if (re <= 2.6e-18) {
tmp = 1.0 / (((1.0 / (re + 1.0)) + ((im * im) * ((0.16666666666666666 / (re + 1.0)) + (im * (im * (0.019444444444444445 / (re + 1.0))))))) / im);
} else if (re <= 2.5e+149) {
tmp = t_1 * (1.0 + (((re * re) - (t_0 * t_0)) / (re - t_0)));
} else {
tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * t_1;
}
return tmp;
}
def code(re, im): t_0 = re * (re * 0.5) t_1 = im * (1.0 + (-0.16666666666666666 * (im * im))) tmp = 0 if re <= 2.6e-18: tmp = 1.0 / (((1.0 / (re + 1.0)) + ((im * im) * ((0.16666666666666666 / (re + 1.0)) + (im * (im * (0.019444444444444445 / (re + 1.0))))))) / im) elif re <= 2.5e+149: tmp = t_1 * (1.0 + (((re * re) - (t_0 * t_0)) / (re - t_0))) else: tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * t_1 return tmp
function code(re, im) t_0 = Float64(re * Float64(re * 0.5)) t_1 = Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im)))) tmp = 0.0 if (re <= 2.6e-18) tmp = Float64(1.0 / Float64(Float64(Float64(1.0 / Float64(re + 1.0)) + Float64(Float64(im * im) * Float64(Float64(0.16666666666666666 / Float64(re + 1.0)) + Float64(im * Float64(im * Float64(0.019444444444444445 / Float64(re + 1.0))))))) / im)); elseif (re <= 2.5e+149) tmp = Float64(t_1 * Float64(1.0 + Float64(Float64(Float64(re * re) - Float64(t_0 * t_0)) / Float64(re - t_0)))); else tmp = Float64(Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5)))) * t_1); end return tmp end
function tmp_2 = code(re, im) t_0 = re * (re * 0.5); t_1 = im * (1.0 + (-0.16666666666666666 * (im * im))); tmp = 0.0; if (re <= 2.6e-18) tmp = 1.0 / (((1.0 / (re + 1.0)) + ((im * im) * ((0.16666666666666666 / (re + 1.0)) + (im * (im * (0.019444444444444445 / (re + 1.0))))))) / im); elseif (re <= 2.5e+149) tmp = t_1 * (1.0 + (((re * re) - (t_0 * t_0)) / (re - t_0))); else tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * t_1; end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(re * N[(re * 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, 2.6e-18], N[(1.0 / N[(N[(N[(1.0 / N[(re + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(im * im), $MachinePrecision] * N[(N[(0.16666666666666666 / N[(re + 1.0), $MachinePrecision]), $MachinePrecision] + N[(im * N[(im * N[(0.019444444444444445 / N[(re + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / im), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 2.5e+149], N[(t$95$1 * N[(1.0 + N[(N[(N[(re * re), $MachinePrecision] - N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(re - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(re * N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := re \cdot \left(re \cdot 0.5\right)\\
t_1 := im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\\
\mathbf{if}\;re \leq 2.6 \cdot 10^{-18}:\\
\;\;\;\;\frac{1}{\frac{\frac{1}{re + 1} + \left(im \cdot im\right) \cdot \left(\frac{0.16666666666666666}{re + 1} + im \cdot \left(im \cdot \frac{0.019444444444444445}{re + 1}\right)\right)}{im}}\\
\mathbf{elif}\;re \leq 2.5 \cdot 10^{+149}:\\
\;\;\;\;t\_1 \cdot \left(1 + \frac{re \cdot re - t\_0 \cdot t\_0}{re - t\_0}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right) \cdot t\_1\\
\end{array}
\end{array}
if re < 2.6e-18Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6464.1%
Simplified64.1%
*-commutativeN/A
distribute-lft-inN/A
flip3-+N/A
/-lowering-/.f64N/A
*-commutativeN/A
+-lowering-+.f64N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-rgt-identityN/A
pow-lowering-pow.f64N/A
sin-lowering-sin.f64N/A
Applied egg-rr44.8%
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
distribute-lft1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sin-lowering-sin.f6463.9%
Applied egg-rr63.9%
Taylor expanded in im around 0
/-lowering-/.f64N/A
Simplified49.5%
if 2.6e-18 < re < 2.49999999999999995e149Initial 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-*.f6466.8%
Simplified66.8%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6417.2%
Simplified17.2%
distribute-rgt-inN/A
*-lft-identityN/A
flip-+N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6440.4%
Applied egg-rr40.4%
if 2.49999999999999995e149 < 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-*.f6481.8%
Simplified81.8%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6481.8%
Simplified81.8%
Final simplification52.5%
(FPCore (re im)
:precision binary64
(if (<= re -2.6e-146)
(/
1.0
(/
(+
(/ 1.0 (+ re 1.0))
(*
(* im im)
(+
(/ 0.16666666666666666 (+ re 1.0))
(* im (* im (/ 0.019444444444444445 (+ re 1.0)))))))
im))
(if (<= re 2.1e+149)
(* im (+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666)))))))
(*
(+ 1.0 (* re (+ 1.0 (* re 0.5))))
(* im (+ 1.0 (* -0.16666666666666666 (* im im))))))))
double code(double re, double im) {
double tmp;
if (re <= -2.6e-146) {
tmp = 1.0 / (((1.0 / (re + 1.0)) + ((im * im) * ((0.16666666666666666 / (re + 1.0)) + (im * (im * (0.019444444444444445 / (re + 1.0))))))) / im);
} else if (re <= 2.1e+149) {
tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
} else {
tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + (-0.16666666666666666 * (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 <= (-2.6d-146)) then
tmp = 1.0d0 / (((1.0d0 / (re + 1.0d0)) + ((im * im) * ((0.16666666666666666d0 / (re + 1.0d0)) + (im * (im * (0.019444444444444445d0 / (re + 1.0d0))))))) / im)
else if (re <= 2.1d+149) then
tmp = im * (1.0d0 + (re * (1.0d0 + (re * (0.5d0 + (re * 0.16666666666666666d0))))))
else
tmp = (1.0d0 + (re * (1.0d0 + (re * 0.5d0)))) * (im * (1.0d0 + ((-0.16666666666666666d0) * (im * im))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -2.6e-146) {
tmp = 1.0 / (((1.0 / (re + 1.0)) + ((im * im) * ((0.16666666666666666 / (re + 1.0)) + (im * (im * (0.019444444444444445 / (re + 1.0))))))) / im);
} else if (re <= 2.1e+149) {
tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
} else {
tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -2.6e-146: tmp = 1.0 / (((1.0 / (re + 1.0)) + ((im * im) * ((0.16666666666666666 / (re + 1.0)) + (im * (im * (0.019444444444444445 / (re + 1.0))))))) / im) elif re <= 2.1e+149: tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) else: tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + (-0.16666666666666666 * (im * im)))) return tmp
function code(re, im) tmp = 0.0 if (re <= -2.6e-146) tmp = Float64(1.0 / Float64(Float64(Float64(1.0 / Float64(re + 1.0)) + Float64(Float64(im * im) * Float64(Float64(0.16666666666666666 / Float64(re + 1.0)) + Float64(im * Float64(im * Float64(0.019444444444444445 / Float64(re + 1.0))))))) / im)); elseif (re <= 2.1e+149) tmp = Float64(im * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666))))))); else tmp = Float64(Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5)))) * Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -2.6e-146) tmp = 1.0 / (((1.0 / (re + 1.0)) + ((im * im) * ((0.16666666666666666 / (re + 1.0)) + (im * (im * (0.019444444444444445 / (re + 1.0))))))) / im); elseif (re <= 2.1e+149) tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))); else tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + (-0.16666666666666666 * (im * im)))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -2.6e-146], N[(1.0 / N[(N[(N[(1.0 / N[(re + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(im * im), $MachinePrecision] * N[(N[(0.16666666666666666 / N[(re + 1.0), $MachinePrecision]), $MachinePrecision] + N[(im * N[(im * N[(0.019444444444444445 / N[(re + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / im), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 2.1e+149], N[(im * N[(1.0 + N[(re * N[(1.0 + N[(re * N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(re * N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -2.6 \cdot 10^{-146}:\\
\;\;\;\;\frac{1}{\frac{\frac{1}{re + 1} + \left(im \cdot im\right) \cdot \left(\frac{0.16666666666666666}{re + 1} + im \cdot \left(im \cdot \frac{0.019444444444444445}{re + 1}\right)\right)}{im}}\\
\mathbf{elif}\;re \leq 2.1 \cdot 10^{+149}:\\
\;\;\;\;im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right) \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\
\end{array}
\end{array}
if re < -2.59999999999999987e-146Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6431.2%
Simplified31.2%
*-commutativeN/A
distribute-lft-inN/A
flip3-+N/A
/-lowering-/.f64N/A
*-commutativeN/A
+-lowering-+.f64N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-rgt-identityN/A
pow-lowering-pow.f64N/A
sin-lowering-sin.f64N/A
Applied egg-rr26.2%
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
distribute-lft1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sin-lowering-sin.f6431.1%
Applied egg-rr31.1%
Taylor expanded in im around 0
/-lowering-/.f64N/A
Simplified44.3%
if -2.59999999999999987e-146 < re < 2.1000000000000002e149Initial program 100.0%
Taylor expanded in im around 0
Simplified61.6%
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.0%
Simplified50.0%
if 2.1000000000000002e149 < 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-*.f6481.8%
Simplified81.8%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6481.8%
Simplified81.8%
Final simplification51.9%
(FPCore (re im)
:precision binary64
(if (<= re 6200.0)
(/
1.0
(/
(+ (/ 1.0 (+ re 1.0)) (/ (* (* im im) 0.16666666666666666) (+ re 1.0)))
im))
(if (<= re 2.5e+149)
(* im (+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666)))))))
(*
(+ 1.0 (* re (+ 1.0 (* re 0.5))))
(* im (+ 1.0 (* -0.16666666666666666 (* im im))))))))
double code(double re, double im) {
double tmp;
if (re <= 6200.0) {
tmp = 1.0 / (((1.0 / (re + 1.0)) + (((im * im) * 0.16666666666666666) / (re + 1.0))) / im);
} else if (re <= 2.5e+149) {
tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
} else {
tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + (-0.16666666666666666 * (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 <= 6200.0d0) then
tmp = 1.0d0 / (((1.0d0 / (re + 1.0d0)) + (((im * im) * 0.16666666666666666d0) / (re + 1.0d0))) / im)
else if (re <= 2.5d+149) then
tmp = im * (1.0d0 + (re * (1.0d0 + (re * (0.5d0 + (re * 0.16666666666666666d0))))))
else
tmp = (1.0d0 + (re * (1.0d0 + (re * 0.5d0)))) * (im * (1.0d0 + ((-0.16666666666666666d0) * (im * im))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 6200.0) {
tmp = 1.0 / (((1.0 / (re + 1.0)) + (((im * im) * 0.16666666666666666) / (re + 1.0))) / im);
} else if (re <= 2.5e+149) {
tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
} else {
tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 6200.0: tmp = 1.0 / (((1.0 / (re + 1.0)) + (((im * im) * 0.16666666666666666) / (re + 1.0))) / im) elif re <= 2.5e+149: tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) else: tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + (-0.16666666666666666 * (im * im)))) return tmp
function code(re, im) tmp = 0.0 if (re <= 6200.0) tmp = Float64(1.0 / Float64(Float64(Float64(1.0 / Float64(re + 1.0)) + Float64(Float64(Float64(im * im) * 0.16666666666666666) / Float64(re + 1.0))) / im)); elseif (re <= 2.5e+149) tmp = Float64(im * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666))))))); else tmp = Float64(Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5)))) * Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 6200.0) tmp = 1.0 / (((1.0 / (re + 1.0)) + (((im * im) * 0.16666666666666666) / (re + 1.0))) / im); elseif (re <= 2.5e+149) tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))); else tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + (-0.16666666666666666 * (im * im)))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 6200.0], N[(1.0 / N[(N[(N[(1.0 / N[(re + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(im * im), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] / N[(re + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / im), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 2.5e+149], N[(im * N[(1.0 + N[(re * N[(1.0 + N[(re * N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(re * N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 6200:\\
\;\;\;\;\frac{1}{\frac{\frac{1}{re + 1} + \frac{\left(im \cdot im\right) \cdot 0.16666666666666666}{re + 1}}{im}}\\
\mathbf{elif}\;re \leq 2.5 \cdot 10^{+149}:\\
\;\;\;\;im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right) \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\
\end{array}
\end{array}
if re < 6200Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6464.0%
Simplified64.0%
*-commutativeN/A
distribute-lft-inN/A
flip3-+N/A
/-lowering-/.f64N/A
*-commutativeN/A
+-lowering-+.f64N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-rgt-identityN/A
pow-lowering-pow.f64N/A
sin-lowering-sin.f64N/A
Applied egg-rr44.3%
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
distribute-lft1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sin-lowering-sin.f6463.8%
Applied egg-rr63.8%
Taylor expanded in im around 0
*-commutativeN/A
associate-*l/N/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified47.7%
if 6200 < re < 2.49999999999999995e149Initial program 100.0%
Taylor expanded in im around 0
Simplified80.6%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6434.3%
Simplified34.3%
if 2.49999999999999995e149 < 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-*.f6481.8%
Simplified81.8%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6481.8%
Simplified81.8%
Final simplification50.5%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* -0.16666666666666666 (* im im))))
(if (<= re -12000000000.0)
(* (+ re 1.0) (* im t_0))
(if (<= re 2.5e+149)
(* im (+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666)))))))
(* (+ 1.0 (* re (+ 1.0 (* re 0.5)))) (* im (+ 1.0 t_0)))))))
double code(double re, double im) {
double t_0 = -0.16666666666666666 * (im * im);
double tmp;
if (re <= -12000000000.0) {
tmp = (re + 1.0) * (im * t_0);
} else if (re <= 2.5e+149) {
tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
} else {
tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + 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 = (-0.16666666666666666d0) * (im * im)
if (re <= (-12000000000.0d0)) then
tmp = (re + 1.0d0) * (im * t_0)
else if (re <= 2.5d+149) then
tmp = im * (1.0d0 + (re * (1.0d0 + (re * (0.5d0 + (re * 0.16666666666666666d0))))))
else
tmp = (1.0d0 + (re * (1.0d0 + (re * 0.5d0)))) * (im * (1.0d0 + t_0))
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 <= -12000000000.0) {
tmp = (re + 1.0) * (im * t_0);
} else if (re <= 2.5e+149) {
tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
} else {
tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + t_0));
}
return tmp;
}
def code(re, im): t_0 = -0.16666666666666666 * (im * im) tmp = 0 if re <= -12000000000.0: tmp = (re + 1.0) * (im * t_0) elif re <= 2.5e+149: tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) else: tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + t_0)) return tmp
function code(re, im) t_0 = Float64(-0.16666666666666666 * Float64(im * im)) tmp = 0.0 if (re <= -12000000000.0) tmp = Float64(Float64(re + 1.0) * Float64(im * t_0)); elseif (re <= 2.5e+149) tmp = Float64(im * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666))))))); else tmp = Float64(Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5)))) * Float64(im * Float64(1.0 + t_0))); end return tmp end
function tmp_2 = code(re, im) t_0 = -0.16666666666666666 * (im * im); tmp = 0.0; if (re <= -12000000000.0) tmp = (re + 1.0) * (im * t_0); elseif (re <= 2.5e+149) tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))); else tmp = (1.0 + (re * (1.0 + (re * 0.5)))) * (im * (1.0 + t_0)); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -12000000000.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 2.5e+149], N[(im * N[(1.0 + N[(re * N[(1.0 + N[(re * N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(re * N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -0.16666666666666666 \cdot \left(im \cdot im\right)\\
\mathbf{if}\;re \leq -12000000000:\\
\;\;\;\;\left(re + 1\right) \cdot \left(im \cdot t\_0\right)\\
\mathbf{elif}\;re \leq 2.5 \cdot 10^{+149}:\\
\;\;\;\;im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right) \cdot \left(im \cdot \left(1 + t\_0\right)\right)\\
\end{array}
\end{array}
if re < -1.2e10Initial 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-*.f6456.5%
Simplified56.5%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.4%
Simplified2.4%
Taylor expanded in im around inf
associate-*r*N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6426.3%
Simplified26.3%
if -1.2e10 < re < 2.49999999999999995e149Initial program 100.0%
Taylor expanded in im around 0
Simplified57.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-*.f6447.8%
Simplified47.8%
if 2.49999999999999995e149 < 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-*.f6481.8%
Simplified81.8%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6481.8%
Simplified81.8%
Final simplification46.4%
(FPCore (re im)
:precision binary64
(if (<= re -12000000000.0)
(* (+ re 1.0) (* im (* -0.16666666666666666 (* im im))))
(if (<= re 2.5e+149)
(* im (+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666)))))))
(* im (* (* re re) (+ 0.5 (* (* im im) -0.08333333333333333)))))))
double code(double re, double im) {
double tmp;
if (re <= -12000000000.0) {
tmp = (re + 1.0) * (im * (-0.16666666666666666 * (im * im)));
} else if (re <= 2.5e+149) {
tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
} else {
tmp = im * ((re * re) * (0.5 + ((im * im) * -0.08333333333333333)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= (-12000000000.0d0)) then
tmp = (re + 1.0d0) * (im * ((-0.16666666666666666d0) * (im * im)))
else if (re <= 2.5d+149) then
tmp = im * (1.0d0 + (re * (1.0d0 + (re * (0.5d0 + (re * 0.16666666666666666d0))))))
else
tmp = im * ((re * re) * (0.5d0 + ((im * im) * (-0.08333333333333333d0))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -12000000000.0) {
tmp = (re + 1.0) * (im * (-0.16666666666666666 * (im * im)));
} else if (re <= 2.5e+149) {
tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
} else {
tmp = im * ((re * re) * (0.5 + ((im * im) * -0.08333333333333333)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -12000000000.0: tmp = (re + 1.0) * (im * (-0.16666666666666666 * (im * im))) elif re <= 2.5e+149: tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) else: tmp = im * ((re * re) * (0.5 + ((im * im) * -0.08333333333333333))) return tmp
function code(re, im) tmp = 0.0 if (re <= -12000000000.0) tmp = Float64(Float64(re + 1.0) * Float64(im * Float64(-0.16666666666666666 * Float64(im * im)))); elseif (re <= 2.5e+149) tmp = Float64(im * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666))))))); else tmp = Float64(im * Float64(Float64(re * re) * Float64(0.5 + Float64(Float64(im * im) * -0.08333333333333333)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -12000000000.0) tmp = (re + 1.0) * (im * (-0.16666666666666666 * (im * im))); elseif (re <= 2.5e+149) tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))); else tmp = im * ((re * re) * (0.5 + ((im * im) * -0.08333333333333333))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -12000000000.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 2.5e+149], N[(im * N[(1.0 + N[(re * N[(1.0 + N[(re * N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(N[(re * re), $MachinePrecision] * N[(0.5 + N[(N[(im * im), $MachinePrecision] * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -12000000000:\\
\;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(-0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\
\mathbf{elif}\;re \leq 2.5 \cdot 10^{+149}:\\
\;\;\;\;im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(\left(re \cdot re\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot -0.08333333333333333\right)\right)\\
\end{array}
\end{array}
if re < -1.2e10Initial 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-*.f6456.5%
Simplified56.5%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.4%
Simplified2.4%
Taylor expanded in im around inf
associate-*r*N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6426.3%
Simplified26.3%
if -1.2e10 < re < 2.49999999999999995e149Initial program 100.0%
Taylor expanded in im around 0
Simplified57.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-*.f6447.8%
Simplified47.8%
if 2.49999999999999995e149 < 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-*.f6481.8%
Simplified81.8%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6481.8%
Simplified81.8%
Taylor expanded in re around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6456.6%
Simplified56.6%
Taylor expanded in im around 0
*-lowering-*.f64N/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6481.8%
Simplified81.8%
Final simplification46.4%
(FPCore (re im)
:precision binary64
(if (<= re -60.0)
(* (+ re 1.0) (* im (* -0.16666666666666666 (* im im))))
(if (<= re 1.55e+123)
(*
im
(+
1.0
(*
(* im im)
(+ -0.16666666666666666 (* im (* im 0.008333333333333333))))))
(* im (* (* re re) (+ 0.5 (* (* im im) -0.08333333333333333)))))))
double code(double re, double im) {
double tmp;
if (re <= -60.0) {
tmp = (re + 1.0) * (im * (-0.16666666666666666 * (im * im)));
} else if (re <= 1.55e+123) {
tmp = im * (1.0 + ((im * im) * (-0.16666666666666666 + (im * (im * 0.008333333333333333)))));
} else {
tmp = im * ((re * re) * (0.5 + ((im * im) * -0.08333333333333333)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= (-60.0d0)) then
tmp = (re + 1.0d0) * (im * ((-0.16666666666666666d0) * (im * im)))
else if (re <= 1.55d+123) then
tmp = im * (1.0d0 + ((im * im) * ((-0.16666666666666666d0) + (im * (im * 0.008333333333333333d0)))))
else
tmp = im * ((re * re) * (0.5d0 + ((im * im) * (-0.08333333333333333d0))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -60.0) {
tmp = (re + 1.0) * (im * (-0.16666666666666666 * (im * im)));
} else if (re <= 1.55e+123) {
tmp = im * (1.0 + ((im * im) * (-0.16666666666666666 + (im * (im * 0.008333333333333333)))));
} else {
tmp = im * ((re * re) * (0.5 + ((im * im) * -0.08333333333333333)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -60.0: tmp = (re + 1.0) * (im * (-0.16666666666666666 * (im * im))) elif re <= 1.55e+123: tmp = im * (1.0 + ((im * im) * (-0.16666666666666666 + (im * (im * 0.008333333333333333))))) else: tmp = im * ((re * re) * (0.5 + ((im * im) * -0.08333333333333333))) return tmp
function code(re, im) tmp = 0.0 if (re <= -60.0) tmp = Float64(Float64(re + 1.0) * Float64(im * Float64(-0.16666666666666666 * Float64(im * im)))); elseif (re <= 1.55e+123) tmp = Float64(im * Float64(1.0 + Float64(Float64(im * im) * Float64(-0.16666666666666666 + Float64(im * Float64(im * 0.008333333333333333)))))); else tmp = Float64(im * Float64(Float64(re * re) * Float64(0.5 + Float64(Float64(im * im) * -0.08333333333333333)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -60.0) tmp = (re + 1.0) * (im * (-0.16666666666666666 * (im * im))); elseif (re <= 1.55e+123) tmp = im * (1.0 + ((im * im) * (-0.16666666666666666 + (im * (im * 0.008333333333333333))))); else tmp = im * ((re * re) * (0.5 + ((im * im) * -0.08333333333333333))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -60.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.55e+123], N[(im * N[(1.0 + N[(N[(im * im), $MachinePrecision] * N[(-0.16666666666666666 + N[(im * N[(im * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(N[(re * re), $MachinePrecision] * N[(0.5 + N[(N[(im * im), $MachinePrecision] * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -60:\\
\;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(-0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\
\mathbf{elif}\;re \leq 1.55 \cdot 10^{+123}:\\
\;\;\;\;im \cdot \left(1 + \left(im \cdot im\right) \cdot \left(-0.16666666666666666 + im \cdot \left(im \cdot 0.008333333333333333\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(\left(re \cdot re\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot -0.08333333333333333\right)\right)\\
\end{array}
\end{array}
if re < -60Initial 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-*.f6457.1%
Simplified57.1%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.4%
Simplified2.4%
Taylor expanded in im around inf
associate-*r*N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6426.0%
Simplified26.0%
if -60 < re < 1.55000000000000003e123Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6481.2%
Simplified81.2%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6443.9%
Simplified43.9%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/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-*.f6446.0%
Simplified46.0%
if 1.55000000000000003e123 < 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-*.f6481.1%
Simplified81.1%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6476.0%
Simplified76.0%
Taylor expanded in re around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6453.5%
Simplified53.5%
Taylor expanded in im around 0
*-lowering-*.f64N/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6476.0%
Simplified76.0%
Final simplification44.8%
(FPCore (re im)
:precision binary64
(if (<= re -12000000000.0)
(* (+ re 1.0) (* im (* -0.16666666666666666 (* im im))))
(if (<= re 1.95e+23)
(* im (+ 1.0 (* re (+ 1.0 (* re 0.5)))))
(* im (* (* re re) (+ 0.5 (* (* im im) -0.08333333333333333)))))))
double code(double re, double im) {
double tmp;
if (re <= -12000000000.0) {
tmp = (re + 1.0) * (im * (-0.16666666666666666 * (im * im)));
} else if (re <= 1.95e+23) {
tmp = im * (1.0 + (re * (1.0 + (re * 0.5))));
} else {
tmp = im * ((re * re) * (0.5 + ((im * im) * -0.08333333333333333)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= (-12000000000.0d0)) then
tmp = (re + 1.0d0) * (im * ((-0.16666666666666666d0) * (im * im)))
else if (re <= 1.95d+23) then
tmp = im * (1.0d0 + (re * (1.0d0 + (re * 0.5d0))))
else
tmp = im * ((re * re) * (0.5d0 + ((im * im) * (-0.08333333333333333d0))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -12000000000.0) {
tmp = (re + 1.0) * (im * (-0.16666666666666666 * (im * im)));
} else if (re <= 1.95e+23) {
tmp = im * (1.0 + (re * (1.0 + (re * 0.5))));
} else {
tmp = im * ((re * re) * (0.5 + ((im * im) * -0.08333333333333333)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -12000000000.0: tmp = (re + 1.0) * (im * (-0.16666666666666666 * (im * im))) elif re <= 1.95e+23: tmp = im * (1.0 + (re * (1.0 + (re * 0.5)))) else: tmp = im * ((re * re) * (0.5 + ((im * im) * -0.08333333333333333))) return tmp
function code(re, im) tmp = 0.0 if (re <= -12000000000.0) tmp = Float64(Float64(re + 1.0) * Float64(im * Float64(-0.16666666666666666 * Float64(im * im)))); elseif (re <= 1.95e+23) tmp = Float64(im * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5))))); else tmp = Float64(im * Float64(Float64(re * re) * Float64(0.5 + Float64(Float64(im * im) * -0.08333333333333333)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -12000000000.0) tmp = (re + 1.0) * (im * (-0.16666666666666666 * (im * im))); elseif (re <= 1.95e+23) tmp = im * (1.0 + (re * (1.0 + (re * 0.5)))); else tmp = im * ((re * re) * (0.5 + ((im * im) * -0.08333333333333333))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -12000000000.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.95e+23], N[(im * N[(1.0 + N[(re * N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(N[(re * re), $MachinePrecision] * N[(0.5 + N[(N[(im * im), $MachinePrecision] * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -12000000000:\\
\;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(-0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\
\mathbf{elif}\;re \leq 1.95 \cdot 10^{+23}:\\
\;\;\;\;im \cdot \left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(\left(re \cdot re\right) \cdot \left(0.5 + \left(im \cdot im\right) \cdot -0.08333333333333333\right)\right)\\
\end{array}
\end{array}
if re < -1.2e10Initial 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-*.f6456.5%
Simplified56.5%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.4%
Simplified2.4%
Taylor expanded in im around inf
associate-*r*N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6426.3%
Simplified26.3%
if -1.2e10 < re < 1.95e23Initial program 100.0%
Taylor expanded in im around 0
Simplified52.6%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6449.6%
Simplified49.6%
if 1.95e23 < 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-*.f6475.9%
Simplified75.9%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6454.3%
Simplified54.3%
Taylor expanded in re around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6439.9%
Simplified39.9%
Taylor expanded in im around 0
*-lowering-*.f64N/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6454.3%
Simplified54.3%
Final simplification44.4%
(FPCore (re im)
:precision binary64
(if (<= re -12000000000.0)
(* re (* re (* im (* (* im im) -0.08333333333333333))))
(if (<= re 2.2e+33)
(* im (+ 1.0 (* -0.16666666666666666 (* im im))))
(* (* re re) (* im 0.5)))))
double code(double re, double im) {
double tmp;
if (re <= -12000000000.0) {
tmp = re * (re * (im * ((im * im) * -0.08333333333333333)));
} else if (re <= 2.2e+33) {
tmp = im * (1.0 + (-0.16666666666666666 * (im * im)));
} else {
tmp = (re * re) * (im * 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 <= (-12000000000.0d0)) then
tmp = re * (re * (im * ((im * im) * (-0.08333333333333333d0))))
else if (re <= 2.2d+33) then
tmp = im * (1.0d0 + ((-0.16666666666666666d0) * (im * im)))
else
tmp = (re * re) * (im * 0.5d0)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -12000000000.0) {
tmp = re * (re * (im * ((im * im) * -0.08333333333333333)));
} else if (re <= 2.2e+33) {
tmp = im * (1.0 + (-0.16666666666666666 * (im * im)));
} else {
tmp = (re * re) * (im * 0.5);
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -12000000000.0: tmp = re * (re * (im * ((im * im) * -0.08333333333333333))) elif re <= 2.2e+33: tmp = im * (1.0 + (-0.16666666666666666 * (im * im))) else: tmp = (re * re) * (im * 0.5) return tmp
function code(re, im) tmp = 0.0 if (re <= -12000000000.0) tmp = Float64(re * Float64(re * Float64(im * Float64(Float64(im * im) * -0.08333333333333333)))); elseif (re <= 2.2e+33) tmp = Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im)))); else tmp = Float64(Float64(re * re) * Float64(im * 0.5)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -12000000000.0) tmp = re * (re * (im * ((im * im) * -0.08333333333333333))); elseif (re <= 2.2e+33) tmp = im * (1.0 + (-0.16666666666666666 * (im * im))); else tmp = (re * re) * (im * 0.5); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -12000000000.0], N[(re * N[(re * N[(im * N[(N[(im * im), $MachinePrecision] * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 2.2e+33], N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(re * re), $MachinePrecision] * N[(im * 0.5), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -12000000000:\\
\;\;\;\;re \cdot \left(re \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot -0.08333333333333333\right)\right)\right)\\
\mathbf{elif}\;re \leq 2.2 \cdot 10^{+33}:\\
\;\;\;\;im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(re \cdot re\right) \cdot \left(im \cdot 0.5\right)\\
\end{array}
\end{array}
if re < -1.2e10Initial 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-*.f6456.5%
Simplified56.5%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f642.0%
Simplified2.0%
Taylor expanded in re around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f642.0%
Simplified2.0%
Taylor expanded in im around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6426.1%
Simplified26.1%
if -1.2e10 < re < 2.19999999999999994e33Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6491.3%
Simplified91.3%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6449.4%
Simplified49.4%
if 2.19999999999999994e33 < 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-*.f6474.5%
Simplified74.5%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6451.8%
Simplified51.8%
Taylor expanded in re around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.7%
Simplified36.7%
Taylor expanded in im around 0
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6445.3%
Simplified45.3%
(FPCore (re im)
:precision binary64
(if (<= re -12000000000.0)
(* re (* im (* re (* (* im im) -0.08333333333333333))))
(if (<= re 1.85e+32)
(* im (+ 1.0 (* -0.16666666666666666 (* im im))))
(* (* re re) (* im 0.5)))))
double code(double re, double im) {
double tmp;
if (re <= -12000000000.0) {
tmp = re * (im * (re * ((im * im) * -0.08333333333333333)));
} else if (re <= 1.85e+32) {
tmp = im * (1.0 + (-0.16666666666666666 * (im * im)));
} else {
tmp = (re * re) * (im * 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 <= (-12000000000.0d0)) then
tmp = re * (im * (re * ((im * im) * (-0.08333333333333333d0))))
else if (re <= 1.85d+32) then
tmp = im * (1.0d0 + ((-0.16666666666666666d0) * (im * im)))
else
tmp = (re * re) * (im * 0.5d0)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -12000000000.0) {
tmp = re * (im * (re * ((im * im) * -0.08333333333333333)));
} else if (re <= 1.85e+32) {
tmp = im * (1.0 + (-0.16666666666666666 * (im * im)));
} else {
tmp = (re * re) * (im * 0.5);
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -12000000000.0: tmp = re * (im * (re * ((im * im) * -0.08333333333333333))) elif re <= 1.85e+32: tmp = im * (1.0 + (-0.16666666666666666 * (im * im))) else: tmp = (re * re) * (im * 0.5) return tmp
function code(re, im) tmp = 0.0 if (re <= -12000000000.0) tmp = Float64(re * Float64(im * Float64(re * Float64(Float64(im * im) * -0.08333333333333333)))); elseif (re <= 1.85e+32) tmp = Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im)))); else tmp = Float64(Float64(re * re) * Float64(im * 0.5)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -12000000000.0) tmp = re * (im * (re * ((im * im) * -0.08333333333333333))); elseif (re <= 1.85e+32) tmp = im * (1.0 + (-0.16666666666666666 * (im * im))); else tmp = (re * re) * (im * 0.5); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -12000000000.0], N[(re * N[(im * N[(re * N[(N[(im * im), $MachinePrecision] * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.85e+32], N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(re * re), $MachinePrecision] * N[(im * 0.5), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -12000000000:\\
\;\;\;\;re \cdot \left(im \cdot \left(re \cdot \left(\left(im \cdot im\right) \cdot -0.08333333333333333\right)\right)\right)\\
\mathbf{elif}\;re \leq 1.85 \cdot 10^{+32}:\\
\;\;\;\;im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(re \cdot re\right) \cdot \left(im \cdot 0.5\right)\\
\end{array}
\end{array}
if re < -1.2e10Initial 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-*.f6456.5%
Simplified56.5%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f642.0%
Simplified2.0%
Taylor expanded in re around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f642.0%
Simplified2.0%
Taylor expanded in im around inf
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6424.7%
Simplified24.7%
if -1.2e10 < re < 1.85e32Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6491.3%
Simplified91.3%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6449.4%
Simplified49.4%
if 1.85e32 < 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-*.f6474.5%
Simplified74.5%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6451.8%
Simplified51.8%
Taylor expanded in re around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.7%
Simplified36.7%
Taylor expanded in im around 0
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6445.3%
Simplified45.3%
(FPCore (re im)
:precision binary64
(if (<= re -12000000000.0)
(* -0.08333333333333333 (* im (* im (* im (* re re)))))
(if (<= re 1.26e+30)
(* im (+ 1.0 (* -0.16666666666666666 (* im im))))
(* (* re re) (* im 0.5)))))
double code(double re, double im) {
double tmp;
if (re <= -12000000000.0) {
tmp = -0.08333333333333333 * (im * (im * (im * (re * re))));
} else if (re <= 1.26e+30) {
tmp = im * (1.0 + (-0.16666666666666666 * (im * im)));
} else {
tmp = (re * re) * (im * 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 <= (-12000000000.0d0)) then
tmp = (-0.08333333333333333d0) * (im * (im * (im * (re * re))))
else if (re <= 1.26d+30) then
tmp = im * (1.0d0 + ((-0.16666666666666666d0) * (im * im)))
else
tmp = (re * re) * (im * 0.5d0)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -12000000000.0) {
tmp = -0.08333333333333333 * (im * (im * (im * (re * re))));
} else if (re <= 1.26e+30) {
tmp = im * (1.0 + (-0.16666666666666666 * (im * im)));
} else {
tmp = (re * re) * (im * 0.5);
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -12000000000.0: tmp = -0.08333333333333333 * (im * (im * (im * (re * re)))) elif re <= 1.26e+30: tmp = im * (1.0 + (-0.16666666666666666 * (im * im))) else: tmp = (re * re) * (im * 0.5) return tmp
function code(re, im) tmp = 0.0 if (re <= -12000000000.0) tmp = Float64(-0.08333333333333333 * Float64(im * Float64(im * Float64(im * Float64(re * re))))); elseif (re <= 1.26e+30) tmp = Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im)))); else tmp = Float64(Float64(re * re) * Float64(im * 0.5)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -12000000000.0) tmp = -0.08333333333333333 * (im * (im * (im * (re * re)))); elseif (re <= 1.26e+30) tmp = im * (1.0 + (-0.16666666666666666 * (im * im))); else tmp = (re * re) * (im * 0.5); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -12000000000.0], N[(-0.08333333333333333 * N[(im * N[(im * N[(im * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 1.26e+30], N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(re * re), $MachinePrecision] * N[(im * 0.5), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -12000000000:\\
\;\;\;\;-0.08333333333333333 \cdot \left(im \cdot \left(im \cdot \left(im \cdot \left(re \cdot re\right)\right)\right)\right)\\
\mathbf{elif}\;re \leq 1.26 \cdot 10^{+30}:\\
\;\;\;\;im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(re \cdot re\right) \cdot \left(im \cdot 0.5\right)\\
\end{array}
\end{array}
if re < -1.2e10Initial 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-*.f6456.5%
Simplified56.5%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f642.0%
Simplified2.0%
Taylor expanded in re around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f642.0%
Simplified2.0%
Taylor expanded in im around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6413.5%
Simplified13.5%
if -1.2e10 < re < 1.26e30Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6491.3%
Simplified91.3%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6449.4%
Simplified49.4%
if 1.26e30 < 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-*.f6474.5%
Simplified74.5%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6451.8%
Simplified51.8%
Taylor expanded in re around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.7%
Simplified36.7%
Taylor expanded in im around 0
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6445.3%
Simplified45.3%
(FPCore (re im) :precision binary64 (if (<= re -12000000000.0) (* (+ re 1.0) (* im (* -0.16666666666666666 (* im im)))) (* im (+ 1.0 (* re (+ 1.0 (* re 0.5)))))))
double code(double re, double im) {
double tmp;
if (re <= -12000000000.0) {
tmp = (re + 1.0) * (im * (-0.16666666666666666 * (im * im)));
} 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 <= (-12000000000.0d0)) then
tmp = (re + 1.0d0) * (im * ((-0.16666666666666666d0) * (im * im)))
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 <= -12000000000.0) {
tmp = (re + 1.0) * (im * (-0.16666666666666666 * (im * im)));
} else {
tmp = im * (1.0 + (re * (1.0 + (re * 0.5))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -12000000000.0: tmp = (re + 1.0) * (im * (-0.16666666666666666 * (im * im))) else: tmp = im * (1.0 + (re * (1.0 + (re * 0.5)))) return tmp
function code(re, im) tmp = 0.0 if (re <= -12000000000.0) tmp = Float64(Float64(re + 1.0) * Float64(im * Float64(-0.16666666666666666 * Float64(im * im)))); 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 <= -12000000000.0) tmp = (re + 1.0) * (im * (-0.16666666666666666 * (im * im))); else tmp = im * (1.0 + (re * (1.0 + (re * 0.5)))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -12000000000.0], N[(N[(re + 1.0), $MachinePrecision] * N[(im * N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $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 -12000000000:\\
\;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(-0.16666666666666666 \cdot \left(im \cdot im\right)\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.2e10Initial 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-*.f6456.5%
Simplified56.5%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f642.4%
Simplified2.4%
Taylor expanded in im around inf
associate-*r*N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6426.3%
Simplified26.3%
if -1.2e10 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified59.3%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6447.6%
Simplified47.6%
Final simplification41.8%
(FPCore (re im) :precision binary64 (if (<= re -13500000000.0) (* re (* re (* im (* (* im im) -0.08333333333333333)))) (* im (+ 1.0 (* re (+ 1.0 (* re 0.5)))))))
double code(double re, double im) {
double tmp;
if (re <= -13500000000.0) {
tmp = re * (re * (im * ((im * im) * -0.08333333333333333)));
} 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 <= (-13500000000.0d0)) then
tmp = re * (re * (im * ((im * im) * (-0.08333333333333333d0))))
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 <= -13500000000.0) {
tmp = re * (re * (im * ((im * im) * -0.08333333333333333)));
} else {
tmp = im * (1.0 + (re * (1.0 + (re * 0.5))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -13500000000.0: tmp = re * (re * (im * ((im * im) * -0.08333333333333333))) else: tmp = im * (1.0 + (re * (1.0 + (re * 0.5)))) return tmp
function code(re, im) tmp = 0.0 if (re <= -13500000000.0) tmp = Float64(re * Float64(re * Float64(im * Float64(Float64(im * im) * -0.08333333333333333)))); 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 <= -13500000000.0) tmp = re * (re * (im * ((im * im) * -0.08333333333333333))); else tmp = im * (1.0 + (re * (1.0 + (re * 0.5)))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -13500000000.0], N[(re * N[(re * N[(im * N[(N[(im * im), $MachinePrecision] * -0.08333333333333333), $MachinePrecision]), $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 -13500000000:\\
\;\;\;\;re \cdot \left(re \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot -0.08333333333333333\right)\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.35e10Initial 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-*.f6456.5%
Simplified56.5%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f642.0%
Simplified2.0%
Taylor expanded in re around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f642.0%
Simplified2.0%
Taylor expanded in im around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6426.1%
Simplified26.1%
if -1.35e10 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified59.3%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6447.6%
Simplified47.6%
Final simplification41.8%
(FPCore (re im) :precision binary64 (if (<= re 2.85e+32) (* im (+ 1.0 (* -0.16666666666666666 (* im im)))) (* (* re re) (* im 0.5))))
double code(double re, double im) {
double tmp;
if (re <= 2.85e+32) {
tmp = im * (1.0 + (-0.16666666666666666 * (im * im)));
} else {
tmp = (re * re) * (im * 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 <= 2.85d+32) then
tmp = im * (1.0d0 + ((-0.16666666666666666d0) * (im * im)))
else
tmp = (re * re) * (im * 0.5d0)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 2.85e+32) {
tmp = im * (1.0 + (-0.16666666666666666 * (im * im)));
} else {
tmp = (re * re) * (im * 0.5);
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 2.85e+32: tmp = im * (1.0 + (-0.16666666666666666 * (im * im))) else: tmp = (re * re) * (im * 0.5) return tmp
function code(re, im) tmp = 0.0 if (re <= 2.85e+32) tmp = Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im)))); else tmp = Float64(Float64(re * re) * Float64(im * 0.5)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 2.85e+32) tmp = im * (1.0 + (-0.16666666666666666 * (im * im))); else tmp = (re * re) * (im * 0.5); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 2.85e+32], N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(re * re), $MachinePrecision] * N[(im * 0.5), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 2.85 \cdot 10^{+32}:\\
\;\;\;\;im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(re \cdot re\right) \cdot \left(im \cdot 0.5\right)\\
\end{array}
\end{array}
if re < 2.85e32Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6461.4%
Simplified61.4%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6433.6%
Simplified33.6%
if 2.85e32 < 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-*.f6474.5%
Simplified74.5%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6451.8%
Simplified51.8%
Taylor expanded in re around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.7%
Simplified36.7%
Taylor expanded in im around 0
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6445.3%
Simplified45.3%
(FPCore (re im) :precision binary64 (if (<= re 680.0) im (* (* re re) (* im 0.5))))
double code(double re, double im) {
double tmp;
if (re <= 680.0) {
tmp = im;
} else {
tmp = (re * re) * (im * 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 <= 680.0d0) then
tmp = im
else
tmp = (re * re) * (im * 0.5d0)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 680.0) {
tmp = im;
} else {
tmp = (re * re) * (im * 0.5);
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 680.0: tmp = im else: tmp = (re * re) * (im * 0.5) return tmp
function code(re, im) tmp = 0.0 if (re <= 680.0) tmp = im; else tmp = Float64(Float64(re * re) * Float64(im * 0.5)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 680.0) tmp = im; else tmp = (re * re) * (im * 0.5); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 680.0], im, N[(N[(re * re), $MachinePrecision] * N[(im * 0.5), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 680:\\
\;\;\;\;im\\
\mathbf{else}:\\
\;\;\;\;\left(re \cdot re\right) \cdot \left(im \cdot 0.5\right)\\
\end{array}
\end{array}
if re < 680Initial program 100.0%
Taylor expanded in im around 0
Simplified69.2%
Taylor expanded in re around 0
Simplified33.9%
if 680 < 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-*.f6475.0%
Simplified75.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6449.4%
Simplified49.4%
Taylor expanded in re around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.4%
Simplified36.4%
Taylor expanded in im around 0
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6440.6%
Simplified40.6%
(FPCore (re im) :precision binary64 (if (<= re 600.0) im (* re (* re (* im 0.5)))))
double code(double re, double im) {
double tmp;
if (re <= 600.0) {
tmp = im;
} else {
tmp = re * (re * (im * 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 <= 600.0d0) then
tmp = im
else
tmp = re * (re * (im * 0.5d0))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 600.0) {
tmp = im;
} else {
tmp = re * (re * (im * 0.5));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 600.0: tmp = im else: tmp = re * (re * (im * 0.5)) return tmp
function code(re, im) tmp = 0.0 if (re <= 600.0) tmp = im; else tmp = Float64(re * Float64(re * Float64(im * 0.5))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 600.0) tmp = im; else tmp = re * (re * (im * 0.5)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 600.0], im, N[(re * N[(re * N[(im * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 600:\\
\;\;\;\;im\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(re \cdot \left(im \cdot 0.5\right)\right)\\
\end{array}
\end{array}
if re < 600Initial program 100.0%
Taylor expanded in im around 0
Simplified69.2%
Taylor expanded in re around 0
Simplified33.9%
if 600 < 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-*.f6475.0%
Simplified75.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6449.4%
Simplified49.4%
Taylor expanded in re around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.4%
Simplified36.4%
Taylor expanded in im around 0
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6427.6%
Simplified27.6%
(FPCore (re im) :precision binary64 (if (<= im 23000000000000.0) im (* re im)))
double code(double re, double im) {
double tmp;
if (im <= 23000000000000.0) {
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 <= 23000000000000.0d0) 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 <= 23000000000000.0) {
tmp = im;
} else {
tmp = re * im;
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 23000000000000.0: tmp = im else: tmp = re * im return tmp
function code(re, im) tmp = 0.0 if (im <= 23000000000000.0) tmp = im; else tmp = Float64(re * im); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 23000000000000.0) tmp = im; else tmp = re * im; end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 23000000000000.0], im, N[(re * im), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 23000000000000:\\
\;\;\;\;im\\
\mathbf{else}:\\
\;\;\;\;re \cdot im\\
\end{array}
\end{array}
if im < 2.3e13Initial program 100.0%
Taylor expanded in im around 0
Simplified78.9%
Taylor expanded in re around 0
Simplified32.7%
if 2.3e13 < im Initial program 100.0%
Taylor expanded in im around 0
Simplified40.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f646.0%
Simplified6.0%
Taylor expanded in re around inf
Simplified6.4%
(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
Simplified70.3%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6428.6%
Simplified28.6%
Final simplification28.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
Simplified70.3%
Taylor expanded in re around 0
Simplified26.0%
herbie shell --seed 2024154
(FPCore (re im)
:name "math.exp on complex, imaginary part"
:precision binary64
(* (exp re) (sin im)))