
(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 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (re im) :precision binary64 (* (exp re) (sin im)))
double code(double re, double im) {
return exp(re) * sin(im);
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = exp(re) * sin(im)
end function
public static double code(double re, double im) {
return Math.exp(re) * Math.sin(im);
}
def code(re, im): return math.exp(re) * math.sin(im)
function code(re, im) return Float64(exp(re) * sin(im)) end
function tmp = code(re, im) tmp = exp(re) * sin(im); end
code[re_, im_] := N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
e^{re} \cdot \sin im
\end{array}
(FPCore (re im) :precision binary64 (* (exp re) (sin im)))
double code(double re, double im) {
return exp(re) * sin(im);
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = exp(re) * sin(im)
end function
public static double code(double re, double im) {
return Math.exp(re) * Math.sin(im);
}
def code(re, im): return math.exp(re) * math.sin(im)
function code(re, im) return Float64(exp(re) * sin(im)) end
function tmp = code(re, im) tmp = exp(re) * sin(im); end
code[re_, im_] := N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
e^{re} \cdot \sin im
\end{array}
Initial program 100.0%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (exp re) im)))
(if (<= (exp re) 0.9998845436550344)
t_0
(if (<= (exp re) 1.0005) (* (sin im) (+ re 1.0)) t_0))))
double code(double re, double im) {
double t_0 = exp(re) * im;
double tmp;
if (exp(re) <= 0.9998845436550344) {
tmp = t_0;
} else if (exp(re) <= 1.0005) {
tmp = sin(im) * (re + 1.0);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = exp(re) * im
if (exp(re) <= 0.9998845436550344d0) then
tmp = t_0
else if (exp(re) <= 1.0005d0) then
tmp = sin(im) * (re + 1.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = Math.exp(re) * im;
double tmp;
if (Math.exp(re) <= 0.9998845436550344) {
tmp = t_0;
} else if (Math.exp(re) <= 1.0005) {
tmp = Math.sin(im) * (re + 1.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(re, im): t_0 = math.exp(re) * im tmp = 0 if math.exp(re) <= 0.9998845436550344: tmp = t_0 elif math.exp(re) <= 1.0005: tmp = math.sin(im) * (re + 1.0) else: tmp = t_0 return tmp
function code(re, im) t_0 = Float64(exp(re) * im) tmp = 0.0 if (exp(re) <= 0.9998845436550344) tmp = t_0; elseif (exp(re) <= 1.0005) tmp = Float64(sin(im) * Float64(re + 1.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(re, im) t_0 = exp(re) * im; tmp = 0.0; if (exp(re) <= 0.9998845436550344) tmp = t_0; elseif (exp(re) <= 1.0005) tmp = sin(im) * (re + 1.0); else tmp = t_0; end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, If[LessEqual[N[Exp[re], $MachinePrecision], 0.9998845436550344], t$95$0, If[LessEqual[N[Exp[re], $MachinePrecision], 1.0005], N[(N[Sin[im], $MachinePrecision] * N[(re + 1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{re} \cdot im\\
\mathbf{if}\;e^{re} \leq 0.9998845436550344:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;e^{re} \leq 1.0005:\\
\;\;\;\;\sin im \cdot \left(re + 1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (exp.f64 re) < 0.99988454365503443 or 1.00049999999999994 < (exp.f64 re) Initial program 100.0%
Taylor expanded in im around 0
Simplified87.6%
if 0.99988454365503443 < (exp.f64 re) < 1.00049999999999994Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f64100.0%
Simplified100.0%
Final simplification94.1%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (exp re) im)))
(if (<= (exp re) 0.9998845436550344)
t_0
(if (<= (exp re) 1.0005) (sin im) t_0))))
double code(double re, double im) {
double t_0 = exp(re) * im;
double tmp;
if (exp(re) <= 0.9998845436550344) {
tmp = t_0;
} else if (exp(re) <= 1.0005) {
tmp = sin(im);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = exp(re) * im
if (exp(re) <= 0.9998845436550344d0) then
tmp = t_0
else if (exp(re) <= 1.0005d0) then
tmp = sin(im)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = Math.exp(re) * im;
double tmp;
if (Math.exp(re) <= 0.9998845436550344) {
tmp = t_0;
} else if (Math.exp(re) <= 1.0005) {
tmp = Math.sin(im);
} else {
tmp = t_0;
}
return tmp;
}
def code(re, im): t_0 = math.exp(re) * im tmp = 0 if math.exp(re) <= 0.9998845436550344: tmp = t_0 elif math.exp(re) <= 1.0005: tmp = math.sin(im) else: tmp = t_0 return tmp
function code(re, im) t_0 = Float64(exp(re) * im) tmp = 0.0 if (exp(re) <= 0.9998845436550344) tmp = t_0; elseif (exp(re) <= 1.0005) tmp = sin(im); else tmp = t_0; end return tmp end
function tmp_2 = code(re, im) t_0 = exp(re) * im; tmp = 0.0; if (exp(re) <= 0.9998845436550344) tmp = t_0; elseif (exp(re) <= 1.0005) tmp = sin(im); else tmp = t_0; end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision]}, If[LessEqual[N[Exp[re], $MachinePrecision], 0.9998845436550344], t$95$0, If[LessEqual[N[Exp[re], $MachinePrecision], 1.0005], N[Sin[im], $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{re} \cdot im\\
\mathbf{if}\;e^{re} \leq 0.9998845436550344:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;e^{re} \leq 1.0005:\\
\;\;\;\;\sin im\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (exp.f64 re) < 0.99988454365503443 or 1.00049999999999994 < (exp.f64 re) Initial program 100.0%
Taylor expanded in im around 0
Simplified87.6%
if 0.99988454365503443 < (exp.f64 re) < 1.00049999999999994Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6499.5%
Simplified99.5%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (sin im) (+ 1.0 (* re (+ 1.0 (* re 0.5)))))))
(if (<= re -0.000115)
(* (exp re) im)
(if (<= re 0.0005)
t_0
(if (<= re 4.1e+145)
(* (exp re) (* im (+ 1.0 (* -0.16666666666666666 (* im im)))))
t_0)))))
double code(double re, double im) {
double t_0 = sin(im) * (1.0 + (re * (1.0 + (re * 0.5))));
double tmp;
if (re <= -0.000115) {
tmp = exp(re) * im;
} else if (re <= 0.0005) {
tmp = t_0;
} else if (re <= 4.1e+145) {
tmp = exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = sin(im) * (1.0d0 + (re * (1.0d0 + (re * 0.5d0))))
if (re <= (-0.000115d0)) then
tmp = exp(re) * im
else if (re <= 0.0005d0) then
tmp = t_0
else if (re <= 4.1d+145) then
tmp = exp(re) * (im * (1.0d0 + ((-0.16666666666666666d0) * (im * im))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = Math.sin(im) * (1.0 + (re * (1.0 + (re * 0.5))));
double tmp;
if (re <= -0.000115) {
tmp = Math.exp(re) * im;
} else if (re <= 0.0005) {
tmp = t_0;
} else if (re <= 4.1e+145) {
tmp = Math.exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im))));
} else {
tmp = t_0;
}
return tmp;
}
def code(re, im): t_0 = math.sin(im) * (1.0 + (re * (1.0 + (re * 0.5)))) tmp = 0 if re <= -0.000115: tmp = math.exp(re) * im elif re <= 0.0005: tmp = t_0 elif re <= 4.1e+145: tmp = math.exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im)))) else: tmp = t_0 return tmp
function code(re, im) t_0 = Float64(sin(im) * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5))))) tmp = 0.0 if (re <= -0.000115) tmp = Float64(exp(re) * im); elseif (re <= 0.0005) tmp = t_0; elseif (re <= 4.1e+145) tmp = Float64(exp(re) * Float64(im * Float64(1.0 + Float64(-0.16666666666666666 * Float64(im * im))))); else tmp = t_0; end return tmp end
function tmp_2 = code(re, im) t_0 = sin(im) * (1.0 + (re * (1.0 + (re * 0.5)))); tmp = 0.0; if (re <= -0.000115) tmp = exp(re) * im; elseif (re <= 0.0005) tmp = t_0; elseif (re <= 4.1e+145) tmp = exp(re) * (im * (1.0 + (-0.16666666666666666 * (im * im)))); else tmp = t_0; end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[Sin[im], $MachinePrecision] * N[(1.0 + N[(re * N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -0.000115], N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision], If[LessEqual[re, 0.0005], t$95$0, If[LessEqual[re, 4.1e+145], N[(N[Exp[re], $MachinePrecision] * N[(im * N[(1.0 + N[(-0.16666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin im \cdot \left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)\\
\mathbf{if}\;re \leq -0.000115:\\
\;\;\;\;e^{re} \cdot im\\
\mathbf{elif}\;re \leq 0.0005:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;re \leq 4.1 \cdot 10^{+145}:\\
\;\;\;\;e^{re} \cdot \left(im \cdot \left(1 + -0.16666666666666666 \cdot \left(im \cdot im\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if re < -1.15e-4Initial program 100.0%
Taylor expanded in im around 0
Simplified100.0%
if -1.15e-4 < re < 5.0000000000000001e-4 or 4.1000000000000001e145 < re Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.5%
Simplified99.5%
if 5.0000000000000001e-4 < re < 4.1000000000000001e145Initial 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-*.f6473.1%
Simplified73.1%
Final simplification96.9%
(FPCore (re im)
:precision binary64
(if (<= re -7.4e-5)
(* (exp re) im)
(if (<= re 0.00034)
(* (sin im) (+ re 1.0))
(* (exp re) (* im (+ 1.0 (* -0.16666666666666666 (* im im))))))))
double code(double re, double im) {
double tmp;
if (re <= -7.4e-5) {
tmp = exp(re) * im;
} else if (re <= 0.00034) {
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 <= (-7.4d-5)) then
tmp = exp(re) * im
else if (re <= 0.00034d0) 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 <= -7.4e-5) {
tmp = Math.exp(re) * im;
} else if (re <= 0.00034) {
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 <= -7.4e-5: tmp = math.exp(re) * im elif re <= 0.00034: 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 <= -7.4e-5) tmp = Float64(exp(re) * im); elseif (re <= 0.00034) 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 <= -7.4e-5) tmp = exp(re) * im; elseif (re <= 0.00034) 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, -7.4e-5], N[(N[Exp[re], $MachinePrecision] * im), $MachinePrecision], If[LessEqual[re, 0.00034], 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 -7.4 \cdot 10^{-5}:\\
\;\;\;\;e^{re} \cdot im\\
\mathbf{elif}\;re \leq 0.00034:\\
\;\;\;\;\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 < -7.39999999999999962e-5Initial program 100.0%
Taylor expanded in im around 0
Simplified100.0%
if -7.39999999999999962e-5 < re < 3.4e-4Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f64100.0%
Simplified100.0%
if 3.4e-4 < 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-*.f6479.3%
Simplified79.3%
Final simplification95.3%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* im (* im -0.16666666666666666))))
(if (<= re -4600.0)
(* im t_0)
(if (<= re 1.75e-5)
(sin im)
(if (<= re 7.5e+154)
(*
im
(+
re
(+
1.0
(/
(* (* re re) (+ 0.125 (* (* re (* re re)) 0.004629629629629629)))
(+
0.25
(*
(* re 0.16666666666666666)
(- (* re 0.16666666666666666) 0.5)))))))
(* (* 0.5 (* re re)) (* im (+ 1.0 t_0))))))))
double code(double re, double im) {
double t_0 = im * (im * -0.16666666666666666);
double tmp;
if (re <= -4600.0) {
tmp = im * t_0;
} else if (re <= 1.75e-5) {
tmp = sin(im);
} else if (re <= 7.5e+154) {
tmp = im * (re + (1.0 + (((re * re) * (0.125 + ((re * (re * re)) * 0.004629629629629629))) / (0.25 + ((re * 0.16666666666666666) * ((re * 0.16666666666666666) - 0.5))))));
} else {
tmp = (0.5 * (re * re)) * (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 = im * (im * (-0.16666666666666666d0))
if (re <= (-4600.0d0)) then
tmp = im * t_0
else if (re <= 1.75d-5) then
tmp = sin(im)
else if (re <= 7.5d+154) then
tmp = im * (re + (1.0d0 + (((re * re) * (0.125d0 + ((re * (re * re)) * 0.004629629629629629d0))) / (0.25d0 + ((re * 0.16666666666666666d0) * ((re * 0.16666666666666666d0) - 0.5d0))))))
else
tmp = (0.5d0 * (re * re)) * (im * (1.0d0 + t_0))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = im * (im * -0.16666666666666666);
double tmp;
if (re <= -4600.0) {
tmp = im * t_0;
} else if (re <= 1.75e-5) {
tmp = Math.sin(im);
} else if (re <= 7.5e+154) {
tmp = im * (re + (1.0 + (((re * re) * (0.125 + ((re * (re * re)) * 0.004629629629629629))) / (0.25 + ((re * 0.16666666666666666) * ((re * 0.16666666666666666) - 0.5))))));
} else {
tmp = (0.5 * (re * re)) * (im * (1.0 + t_0));
}
return tmp;
}
def code(re, im): t_0 = im * (im * -0.16666666666666666) tmp = 0 if re <= -4600.0: tmp = im * t_0 elif re <= 1.75e-5: tmp = math.sin(im) elif re <= 7.5e+154: tmp = im * (re + (1.0 + (((re * re) * (0.125 + ((re * (re * re)) * 0.004629629629629629))) / (0.25 + ((re * 0.16666666666666666) * ((re * 0.16666666666666666) - 0.5)))))) else: tmp = (0.5 * (re * re)) * (im * (1.0 + t_0)) return tmp
function code(re, im) t_0 = Float64(im * Float64(im * -0.16666666666666666)) tmp = 0.0 if (re <= -4600.0) tmp = Float64(im * t_0); elseif (re <= 1.75e-5) tmp = sin(im); elseif (re <= 7.5e+154) tmp = Float64(im * Float64(re + Float64(1.0 + Float64(Float64(Float64(re * re) * Float64(0.125 + Float64(Float64(re * Float64(re * re)) * 0.004629629629629629))) / Float64(0.25 + Float64(Float64(re * 0.16666666666666666) * Float64(Float64(re * 0.16666666666666666) - 0.5))))))); else tmp = Float64(Float64(0.5 * Float64(re * re)) * Float64(im * Float64(1.0 + t_0))); end return tmp end
function tmp_2 = code(re, im) t_0 = im * (im * -0.16666666666666666); tmp = 0.0; if (re <= -4600.0) tmp = im * t_0; elseif (re <= 1.75e-5) tmp = sin(im); elseif (re <= 7.5e+154) tmp = im * (re + (1.0 + (((re * re) * (0.125 + ((re * (re * re)) * 0.004629629629629629))) / (0.25 + ((re * 0.16666666666666666) * ((re * 0.16666666666666666) - 0.5)))))); else tmp = (0.5 * (re * re)) * (im * (1.0 + t_0)); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -4600.0], N[(im * t$95$0), $MachinePrecision], If[LessEqual[re, 1.75e-5], N[Sin[im], $MachinePrecision], If[LessEqual[re, 7.5e+154], N[(im * N[(re + N[(1.0 + N[(N[(N[(re * re), $MachinePrecision] * N[(0.125 + N[(N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision] * 0.004629629629629629), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.25 + N[(N[(re * 0.16666666666666666), $MachinePrecision] * N[(N[(re * 0.16666666666666666), $MachinePrecision] - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 * N[(re * re), $MachinePrecision]), $MachinePrecision] * N[(im * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := im \cdot \left(im \cdot -0.16666666666666666\right)\\
\mathbf{if}\;re \leq -4600:\\
\;\;\;\;im \cdot t\_0\\
\mathbf{elif}\;re \leq 1.75 \cdot 10^{-5}:\\
\;\;\;\;\sin im\\
\mathbf{elif}\;re \leq 7.5 \cdot 10^{+154}:\\
\;\;\;\;im \cdot \left(re + \left(1 + \frac{\left(re \cdot re\right) \cdot \left(0.125 + \left(re \cdot \left(re \cdot re\right)\right) \cdot 0.004629629629629629\right)}{0.25 + \left(re \cdot 0.16666666666666666\right) \cdot \left(re \cdot 0.16666666666666666 - 0.5\right)}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.5 \cdot \left(re \cdot re\right)\right) \cdot \left(im \cdot \left(1 + t\_0\right)\right)\\
\end{array}
\end{array}
if re < -4600Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f644.4%
Simplified4.4%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f643.7%
Simplified3.7%
Taylor expanded in im around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6436.1%
Simplified36.1%
if -4600 < re < 1.7499999999999998e-5Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6498.4%
Simplified98.4%
if 1.7499999999999998e-5 < re < 7.5000000000000004e154Initial program 100.0%
Taylor expanded in im around 0
Simplified70.4%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6448.7%
Simplified48.7%
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/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
*-lowering-*.f6448.7%
Applied egg-rr48.7%
flip3-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
Applied egg-rr55.8%
if 7.5000000000000004e154 < re Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6487.1%
Simplified87.1%
Taylor expanded in re around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.1%
Simplified87.1%
Final simplification77.7%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* im (* im -0.16666666666666666))))
(if (<= re -4600.0)
(* im t_0)
(if (<= re 1.4e+154)
(*
im
(+
re
(+
1.0
(/
(* (* re re) (+ 0.125 (* (* re (* re re)) 0.004629629629629629)))
(+
0.25
(*
(* re 0.16666666666666666)
(- (* re 0.16666666666666666) 0.5)))))))
(* (* 0.5 (* re re)) (* im (+ 1.0 t_0)))))))
double code(double re, double im) {
double t_0 = im * (im * -0.16666666666666666);
double tmp;
if (re <= -4600.0) {
tmp = im * t_0;
} else if (re <= 1.4e+154) {
tmp = im * (re + (1.0 + (((re * re) * (0.125 + ((re * (re * re)) * 0.004629629629629629))) / (0.25 + ((re * 0.16666666666666666) * ((re * 0.16666666666666666) - 0.5))))));
} else {
tmp = (0.5 * (re * re)) * (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 = im * (im * (-0.16666666666666666d0))
if (re <= (-4600.0d0)) then
tmp = im * t_0
else if (re <= 1.4d+154) then
tmp = im * (re + (1.0d0 + (((re * re) * (0.125d0 + ((re * (re * re)) * 0.004629629629629629d0))) / (0.25d0 + ((re * 0.16666666666666666d0) * ((re * 0.16666666666666666d0) - 0.5d0))))))
else
tmp = (0.5d0 * (re * re)) * (im * (1.0d0 + t_0))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = im * (im * -0.16666666666666666);
double tmp;
if (re <= -4600.0) {
tmp = im * t_0;
} else if (re <= 1.4e+154) {
tmp = im * (re + (1.0 + (((re * re) * (0.125 + ((re * (re * re)) * 0.004629629629629629))) / (0.25 + ((re * 0.16666666666666666) * ((re * 0.16666666666666666) - 0.5))))));
} else {
tmp = (0.5 * (re * re)) * (im * (1.0 + t_0));
}
return tmp;
}
def code(re, im): t_0 = im * (im * -0.16666666666666666) tmp = 0 if re <= -4600.0: tmp = im * t_0 elif re <= 1.4e+154: tmp = im * (re + (1.0 + (((re * re) * (0.125 + ((re * (re * re)) * 0.004629629629629629))) / (0.25 + ((re * 0.16666666666666666) * ((re * 0.16666666666666666) - 0.5)))))) else: tmp = (0.5 * (re * re)) * (im * (1.0 + t_0)) return tmp
function code(re, im) t_0 = Float64(im * Float64(im * -0.16666666666666666)) tmp = 0.0 if (re <= -4600.0) tmp = Float64(im * t_0); elseif (re <= 1.4e+154) tmp = Float64(im * Float64(re + Float64(1.0 + Float64(Float64(Float64(re * re) * Float64(0.125 + Float64(Float64(re * Float64(re * re)) * 0.004629629629629629))) / Float64(0.25 + Float64(Float64(re * 0.16666666666666666) * Float64(Float64(re * 0.16666666666666666) - 0.5))))))); else tmp = Float64(Float64(0.5 * Float64(re * re)) * Float64(im * Float64(1.0 + t_0))); end return tmp end
function tmp_2 = code(re, im) t_0 = im * (im * -0.16666666666666666); tmp = 0.0; if (re <= -4600.0) tmp = im * t_0; elseif (re <= 1.4e+154) tmp = im * (re + (1.0 + (((re * re) * (0.125 + ((re * (re * re)) * 0.004629629629629629))) / (0.25 + ((re * 0.16666666666666666) * ((re * 0.16666666666666666) - 0.5)))))); else tmp = (0.5 * (re * re)) * (im * (1.0 + t_0)); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -4600.0], N[(im * t$95$0), $MachinePrecision], If[LessEqual[re, 1.4e+154], N[(im * N[(re + N[(1.0 + N[(N[(N[(re * re), $MachinePrecision] * N[(0.125 + N[(N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision] * 0.004629629629629629), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.25 + N[(N[(re * 0.16666666666666666), $MachinePrecision] * N[(N[(re * 0.16666666666666666), $MachinePrecision] - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 * N[(re * re), $MachinePrecision]), $MachinePrecision] * N[(im * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := im \cdot \left(im \cdot -0.16666666666666666\right)\\
\mathbf{if}\;re \leq -4600:\\
\;\;\;\;im \cdot t\_0\\
\mathbf{elif}\;re \leq 1.4 \cdot 10^{+154}:\\
\;\;\;\;im \cdot \left(re + \left(1 + \frac{\left(re \cdot re\right) \cdot \left(0.125 + \left(re \cdot \left(re \cdot re\right)\right) \cdot 0.004629629629629629\right)}{0.25 + \left(re \cdot 0.16666666666666666\right) \cdot \left(re \cdot 0.16666666666666666 - 0.5\right)}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.5 \cdot \left(re \cdot re\right)\right) \cdot \left(im \cdot \left(1 + t\_0\right)\right)\\
\end{array}
\end{array}
if re < -4600Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f644.4%
Simplified4.4%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f643.7%
Simplified3.7%
Taylor expanded in im around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6436.1%
Simplified36.1%
if -4600 < re < 1.4e154Initial program 100.0%
Taylor expanded in im around 0
Simplified63.1%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6459.0%
Simplified59.0%
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/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
*-lowering-*.f6459.0%
Applied egg-rr59.0%
flip3-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
Applied egg-rr60.1%
if 1.4e154 < re Initial program 100.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6487.1%
Simplified87.1%
Taylor expanded in re around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.1%
Simplified87.1%
Final simplification57.7%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* im (* im -0.16666666666666666))))
(if (<= re -3.0)
(* im t_0)
(if (<= re 1.9e+94)
(* (+ re 1.0) (* im (+ 1.0 t_0)))
(* 0.16666666666666666 (* im (* re (* re re))))))))
double code(double re, double im) {
double t_0 = im * (im * -0.16666666666666666);
double tmp;
if (re <= -3.0) {
tmp = im * t_0;
} else if (re <= 1.9e+94) {
tmp = (re + 1.0) * (im * (1.0 + t_0));
} else {
tmp = 0.16666666666666666 * (im * (re * (re * re)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = im * (im * (-0.16666666666666666d0))
if (re <= (-3.0d0)) then
tmp = im * t_0
else if (re <= 1.9d+94) then
tmp = (re + 1.0d0) * (im * (1.0d0 + t_0))
else
tmp = 0.16666666666666666d0 * (im * (re * (re * re)))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = im * (im * -0.16666666666666666);
double tmp;
if (re <= -3.0) {
tmp = im * t_0;
} else if (re <= 1.9e+94) {
tmp = (re + 1.0) * (im * (1.0 + t_0));
} else {
tmp = 0.16666666666666666 * (im * (re * (re * re)));
}
return tmp;
}
def code(re, im): t_0 = im * (im * -0.16666666666666666) tmp = 0 if re <= -3.0: tmp = im * t_0 elif re <= 1.9e+94: tmp = (re + 1.0) * (im * (1.0 + t_0)) else: tmp = 0.16666666666666666 * (im * (re * (re * re))) return tmp
function code(re, im) t_0 = Float64(im * Float64(im * -0.16666666666666666)) tmp = 0.0 if (re <= -3.0) tmp = Float64(im * t_0); elseif (re <= 1.9e+94) tmp = Float64(Float64(re + 1.0) * Float64(im * Float64(1.0 + t_0))); else tmp = Float64(0.16666666666666666 * Float64(im * Float64(re * Float64(re * re)))); end return tmp end
function tmp_2 = code(re, im) t_0 = im * (im * -0.16666666666666666); tmp = 0.0; if (re <= -3.0) tmp = im * t_0; elseif (re <= 1.9e+94) tmp = (re + 1.0) * (im * (1.0 + t_0)); else tmp = 0.16666666666666666 * (im * (re * (re * re))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -3.0], N[(im * t$95$0), $MachinePrecision], If[LessEqual[re, 1.9e+94], N[(N[(re + 1.0), $MachinePrecision] * N[(im * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(im * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := im \cdot \left(im \cdot -0.16666666666666666\right)\\
\mathbf{if}\;re \leq -3:\\
\;\;\;\;im \cdot t\_0\\
\mathbf{elif}\;re \leq 1.9 \cdot 10^{+94}:\\
\;\;\;\;\left(re + 1\right) \cdot \left(im \cdot \left(1 + t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \left(im \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\
\end{array}
\end{array}
if re < -3Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f644.4%
Simplified4.4%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f643.7%
Simplified3.7%
Taylor expanded in im around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6435.5%
Simplified35.5%
if -3 < re < 1.8999999999999998e94Initial program 100.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6488.7%
Simplified88.7%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6458.0%
Simplified58.0%
if 1.8999999999999998e94 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified80.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6480.0%
Simplified80.0%
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/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
*-lowering-*.f6480.0%
Applied egg-rr80.0%
Taylor expanded in re around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6480.0%
Simplified80.0%
(FPCore (re im)
:precision binary64
(if (<= re -4600.0)
(* im (* im (* im -0.16666666666666666)))
(if (<= re 6.8e+19)
(+ im (* im (* re (+ 1.0 (* re 0.5)))))
(* 0.16666666666666666 (* im (* re (* re re)))))))
double code(double re, double im) {
double tmp;
if (re <= -4600.0) {
tmp = im * (im * (im * -0.16666666666666666));
} else if (re <= 6.8e+19) {
tmp = im + (im * (re * (1.0 + (re * 0.5))));
} else {
tmp = 0.16666666666666666 * (im * (re * (re * re)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= (-4600.0d0)) then
tmp = im * (im * (im * (-0.16666666666666666d0)))
else if (re <= 6.8d+19) then
tmp = im + (im * (re * (1.0d0 + (re * 0.5d0))))
else
tmp = 0.16666666666666666d0 * (im * (re * (re * re)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -4600.0) {
tmp = im * (im * (im * -0.16666666666666666));
} else if (re <= 6.8e+19) {
tmp = im + (im * (re * (1.0 + (re * 0.5))));
} else {
tmp = 0.16666666666666666 * (im * (re * (re * re)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -4600.0: tmp = im * (im * (im * -0.16666666666666666)) elif re <= 6.8e+19: tmp = im + (im * (re * (1.0 + (re * 0.5)))) else: tmp = 0.16666666666666666 * (im * (re * (re * re))) return tmp
function code(re, im) tmp = 0.0 if (re <= -4600.0) tmp = Float64(im * Float64(im * Float64(im * -0.16666666666666666))); elseif (re <= 6.8e+19) tmp = Float64(im + Float64(im * Float64(re * Float64(1.0 + Float64(re * 0.5))))); else tmp = Float64(0.16666666666666666 * Float64(im * Float64(re * Float64(re * re)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -4600.0) tmp = im * (im * (im * -0.16666666666666666)); elseif (re <= 6.8e+19) tmp = im + (im * (re * (1.0 + (re * 0.5)))); else tmp = 0.16666666666666666 * (im * (re * (re * re))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -4600.0], N[(im * N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 6.8e+19], N[(im + N[(im * N[(re * N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(im * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -4600:\\
\;\;\;\;im \cdot \left(im \cdot \left(im \cdot -0.16666666666666666\right)\right)\\
\mathbf{elif}\;re \leq 6.8 \cdot 10^{+19}:\\
\;\;\;\;im + im \cdot \left(re \cdot \left(1 + re \cdot 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \left(im \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\
\end{array}
\end{array}
if re < -4600Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f644.4%
Simplified4.4%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f643.7%
Simplified3.7%
Taylor expanded in im around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6436.1%
Simplified36.1%
if -4600 < re < 6.8e19Initial program 100.0%
Taylor expanded in im around 0
Simplified61.8%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6460.8%
Simplified60.8%
*-commutativeN/A
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6460.8%
Applied egg-rr60.8%
if 6.8e19 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified74.5%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6464.1%
Simplified64.1%
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/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
*-lowering-*.f6464.1%
Applied egg-rr64.1%
Taylor expanded in re around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6464.1%
Simplified64.1%
Final simplification55.6%
(FPCore (re im)
:precision binary64
(if (<= re -4600.0)
(* im (* im (* im -0.16666666666666666)))
(if (<= re 6.8e+19)
(* im (+ 1.0 (* re (+ 1.0 (* re 0.5)))))
(* 0.16666666666666666 (* im (* re (* re re)))))))
double code(double re, double im) {
double tmp;
if (re <= -4600.0) {
tmp = im * (im * (im * -0.16666666666666666));
} else if (re <= 6.8e+19) {
tmp = im * (1.0 + (re * (1.0 + (re * 0.5))));
} else {
tmp = 0.16666666666666666 * (im * (re * (re * re)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= (-4600.0d0)) then
tmp = im * (im * (im * (-0.16666666666666666d0)))
else if (re <= 6.8d+19) then
tmp = im * (1.0d0 + (re * (1.0d0 + (re * 0.5d0))))
else
tmp = 0.16666666666666666d0 * (im * (re * (re * re)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -4600.0) {
tmp = im * (im * (im * -0.16666666666666666));
} else if (re <= 6.8e+19) {
tmp = im * (1.0 + (re * (1.0 + (re * 0.5))));
} else {
tmp = 0.16666666666666666 * (im * (re * (re * re)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -4600.0: tmp = im * (im * (im * -0.16666666666666666)) elif re <= 6.8e+19: tmp = im * (1.0 + (re * (1.0 + (re * 0.5)))) else: tmp = 0.16666666666666666 * (im * (re * (re * re))) return tmp
function code(re, im) tmp = 0.0 if (re <= -4600.0) tmp = Float64(im * Float64(im * Float64(im * -0.16666666666666666))); elseif (re <= 6.8e+19) tmp = Float64(im * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * 0.5))))); else tmp = Float64(0.16666666666666666 * Float64(im * Float64(re * Float64(re * re)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -4600.0) tmp = im * (im * (im * -0.16666666666666666)); elseif (re <= 6.8e+19) tmp = im * (1.0 + (re * (1.0 + (re * 0.5)))); else tmp = 0.16666666666666666 * (im * (re * (re * re))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -4600.0], N[(im * N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 6.8e+19], N[(im * N[(1.0 + N[(re * N[(1.0 + N[(re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(im * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -4600:\\
\;\;\;\;im \cdot \left(im \cdot \left(im \cdot -0.16666666666666666\right)\right)\\
\mathbf{elif}\;re \leq 6.8 \cdot 10^{+19}:\\
\;\;\;\;im \cdot \left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \left(im \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\
\end{array}
\end{array}
if re < -4600Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f644.4%
Simplified4.4%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f643.7%
Simplified3.7%
Taylor expanded in im around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6436.1%
Simplified36.1%
if -4600 < re < 6.8e19Initial program 100.0%
Taylor expanded in im around 0
Simplified61.8%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6460.8%
Simplified60.8%
if 6.8e19 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified74.5%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6464.1%
Simplified64.1%
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/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
*-lowering-*.f6464.1%
Applied egg-rr64.1%
Taylor expanded in re around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6464.1%
Simplified64.1%
Final simplification55.6%
(FPCore (re im) :precision binary64 (if (<= re -4600.0) (* im (* im (* im -0.16666666666666666))) (* im (+ re (+ 1.0 (* (* re re) (+ 0.5 (* re 0.16666666666666666))))))))
double code(double re, double im) {
double tmp;
if (re <= -4600.0) {
tmp = im * (im * (im * -0.16666666666666666));
} else {
tmp = im * (re + (1.0 + ((re * re) * (0.5 + (re * 0.16666666666666666)))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= (-4600.0d0)) then
tmp = im * (im * (im * (-0.16666666666666666d0)))
else
tmp = im * (re + (1.0d0 + ((re * re) * (0.5d0 + (re * 0.16666666666666666d0)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -4600.0) {
tmp = im * (im * (im * -0.16666666666666666));
} else {
tmp = im * (re + (1.0 + ((re * re) * (0.5 + (re * 0.16666666666666666)))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -4600.0: tmp = im * (im * (im * -0.16666666666666666)) else: tmp = im * (re + (1.0 + ((re * re) * (0.5 + (re * 0.16666666666666666))))) return tmp
function code(re, im) tmp = 0.0 if (re <= -4600.0) tmp = Float64(im * Float64(im * Float64(im * -0.16666666666666666))); else tmp = Float64(im * Float64(re + Float64(1.0 + Float64(Float64(re * re) * Float64(0.5 + Float64(re * 0.16666666666666666)))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -4600.0) tmp = im * (im * (im * -0.16666666666666666)); else tmp = im * (re + (1.0 + ((re * re) * (0.5 + (re * 0.16666666666666666))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -4600.0], N[(im * N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(re + N[(1.0 + N[(N[(re * re), $MachinePrecision] * N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -4600:\\
\;\;\;\;im \cdot \left(im \cdot \left(im \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(re + \left(1 + \left(re \cdot re\right) \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if re < -4600Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f644.4%
Simplified4.4%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f643.7%
Simplified3.7%
Taylor expanded in im around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6436.1%
Simplified36.1%
if -4600 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified65.4%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6461.9%
Simplified61.9%
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/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
*-lowering-*.f6461.9%
Applied egg-rr61.9%
Final simplification55.7%
(FPCore (re im) :precision binary64 (if (<= re -4600.0) (* im (* im (* im -0.16666666666666666))) (* im (+ 1.0 (* re (+ 1.0 (* re (+ 0.5 (* re 0.16666666666666666)))))))))
double code(double re, double im) {
double tmp;
if (re <= -4600.0) {
tmp = im * (im * (im * -0.16666666666666666));
} else {
tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= (-4600.0d0)) then
tmp = im * (im * (im * (-0.16666666666666666d0)))
else
tmp = im * (1.0d0 + (re * (1.0d0 + (re * (0.5d0 + (re * 0.16666666666666666d0))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -4600.0) {
tmp = im * (im * (im * -0.16666666666666666));
} else {
tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666))))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -4600.0: tmp = im * (im * (im * -0.16666666666666666)) else: tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))) return tmp
function code(re, im) tmp = 0.0 if (re <= -4600.0) tmp = Float64(im * Float64(im * Float64(im * -0.16666666666666666))); else tmp = Float64(im * Float64(1.0 + Float64(re * Float64(1.0 + Float64(re * Float64(0.5 + Float64(re * 0.16666666666666666))))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -4600.0) tmp = im * (im * (im * -0.16666666666666666)); else tmp = im * (1.0 + (re * (1.0 + (re * (0.5 + (re * 0.16666666666666666)))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -4600.0], N[(im * N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(1.0 + N[(re * N[(1.0 + N[(re * N[(0.5 + N[(re * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -4600:\\
\;\;\;\;im \cdot \left(im \cdot \left(im \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(1 + re \cdot \left(1 + re \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if re < -4600Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f644.4%
Simplified4.4%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f643.7%
Simplified3.7%
Taylor expanded in im around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6436.1%
Simplified36.1%
if -4600 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified65.4%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6461.9%
Simplified61.9%
Final simplification55.7%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* im (* im (* im -0.16666666666666666)))))
(if (<= re -4600.0)
t_0
(if (<= re 2.3e+93)
(+ im t_0)
(* 0.16666666666666666 (* im (* re (* re re))))))))
double code(double re, double im) {
double t_0 = im * (im * (im * -0.16666666666666666));
double tmp;
if (re <= -4600.0) {
tmp = t_0;
} else if (re <= 2.3e+93) {
tmp = im + t_0;
} else {
tmp = 0.16666666666666666 * (im * (re * (re * re)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = im * (im * (im * (-0.16666666666666666d0)))
if (re <= (-4600.0d0)) then
tmp = t_0
else if (re <= 2.3d+93) then
tmp = im + t_0
else
tmp = 0.16666666666666666d0 * (im * (re * (re * re)))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = im * (im * (im * -0.16666666666666666));
double tmp;
if (re <= -4600.0) {
tmp = t_0;
} else if (re <= 2.3e+93) {
tmp = im + t_0;
} else {
tmp = 0.16666666666666666 * (im * (re * (re * re)));
}
return tmp;
}
def code(re, im): t_0 = im * (im * (im * -0.16666666666666666)) tmp = 0 if re <= -4600.0: tmp = t_0 elif re <= 2.3e+93: tmp = im + t_0 else: tmp = 0.16666666666666666 * (im * (re * (re * re))) return tmp
function code(re, im) t_0 = Float64(im * Float64(im * Float64(im * -0.16666666666666666))) tmp = 0.0 if (re <= -4600.0) tmp = t_0; elseif (re <= 2.3e+93) tmp = Float64(im + t_0); else tmp = Float64(0.16666666666666666 * Float64(im * Float64(re * Float64(re * re)))); end return tmp end
function tmp_2 = code(re, im) t_0 = im * (im * (im * -0.16666666666666666)); tmp = 0.0; if (re <= -4600.0) tmp = t_0; elseif (re <= 2.3e+93) tmp = im + t_0; else tmp = 0.16666666666666666 * (im * (re * (re * re))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(im * N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -4600.0], t$95$0, If[LessEqual[re, 2.3e+93], N[(im + t$95$0), $MachinePrecision], N[(0.16666666666666666 * N[(im * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := im \cdot \left(im \cdot \left(im \cdot -0.16666666666666666\right)\right)\\
\mathbf{if}\;re \leq -4600:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;re \leq 2.3 \cdot 10^{+93}:\\
\;\;\;\;im + t\_0\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \left(im \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\
\end{array}
\end{array}
if re < -4600Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f644.4%
Simplified4.4%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f643.7%
Simplified3.7%
Taylor expanded in im around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6436.1%
Simplified36.1%
if -4600 < re < 2.3000000000000002e93Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6487.5%
Simplified87.5%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6456.7%
Simplified56.7%
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6456.8%
Applied egg-rr56.8%
if 2.3000000000000002e93 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified80.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6480.0%
Simplified80.0%
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/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
*-lowering-*.f6480.0%
Applied egg-rr80.0%
Taylor expanded in re around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6480.0%
Simplified80.0%
Final simplification55.5%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* im (* im -0.16666666666666666))))
(if (<= re -4600.0)
(* im t_0)
(if (<= re 6.8e+94)
(* im (+ 1.0 t_0))
(* 0.16666666666666666 (* im (* re (* re re))))))))
double code(double re, double im) {
double t_0 = im * (im * -0.16666666666666666);
double tmp;
if (re <= -4600.0) {
tmp = im * t_0;
} else if (re <= 6.8e+94) {
tmp = im * (1.0 + t_0);
} else {
tmp = 0.16666666666666666 * (im * (re * (re * re)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = im * (im * (-0.16666666666666666d0))
if (re <= (-4600.0d0)) then
tmp = im * t_0
else if (re <= 6.8d+94) then
tmp = im * (1.0d0 + t_0)
else
tmp = 0.16666666666666666d0 * (im * (re * (re * re)))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = im * (im * -0.16666666666666666);
double tmp;
if (re <= -4600.0) {
tmp = im * t_0;
} else if (re <= 6.8e+94) {
tmp = im * (1.0 + t_0);
} else {
tmp = 0.16666666666666666 * (im * (re * (re * re)));
}
return tmp;
}
def code(re, im): t_0 = im * (im * -0.16666666666666666) tmp = 0 if re <= -4600.0: tmp = im * t_0 elif re <= 6.8e+94: tmp = im * (1.0 + t_0) else: tmp = 0.16666666666666666 * (im * (re * (re * re))) return tmp
function code(re, im) t_0 = Float64(im * Float64(im * -0.16666666666666666)) tmp = 0.0 if (re <= -4600.0) tmp = Float64(im * t_0); elseif (re <= 6.8e+94) tmp = Float64(im * Float64(1.0 + t_0)); else tmp = Float64(0.16666666666666666 * Float64(im * Float64(re * Float64(re * re)))); end return tmp end
function tmp_2 = code(re, im) t_0 = im * (im * -0.16666666666666666); tmp = 0.0; if (re <= -4600.0) tmp = im * t_0; elseif (re <= 6.8e+94) tmp = im * (1.0 + t_0); else tmp = 0.16666666666666666 * (im * (re * (re * re))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -4600.0], N[(im * t$95$0), $MachinePrecision], If[LessEqual[re, 6.8e+94], N[(im * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(im * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := im \cdot \left(im \cdot -0.16666666666666666\right)\\
\mathbf{if}\;re \leq -4600:\\
\;\;\;\;im \cdot t\_0\\
\mathbf{elif}\;re \leq 6.8 \cdot 10^{+94}:\\
\;\;\;\;im \cdot \left(1 + t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \left(im \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\
\end{array}
\end{array}
if re < -4600Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f644.4%
Simplified4.4%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f643.7%
Simplified3.7%
Taylor expanded in im around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6436.1%
Simplified36.1%
if -4600 < re < 6.8000000000000004e94Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f6487.5%
Simplified87.5%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6456.7%
Simplified56.7%
if 6.8000000000000004e94 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified80.0%
Taylor expanded in re around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6480.0%
Simplified80.0%
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/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
*-lowering-*.f6480.0%
Applied egg-rr80.0%
Taylor expanded in re around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6480.0%
Simplified80.0%
(FPCore (re im)
:precision binary64
(if (<= re -4600.0)
(* im (* im (* im -0.16666666666666666)))
(if (<= re 2.8)
(* im (+ re 1.0))
(* 0.16666666666666666 (* im (* re (* re re)))))))
double code(double re, double im) {
double tmp;
if (re <= -4600.0) {
tmp = im * (im * (im * -0.16666666666666666));
} else if (re <= 2.8) {
tmp = im * (re + 1.0);
} else {
tmp = 0.16666666666666666 * (im * (re * (re * re)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= (-4600.0d0)) then
tmp = im * (im * (im * (-0.16666666666666666d0)))
else if (re <= 2.8d0) then
tmp = im * (re + 1.0d0)
else
tmp = 0.16666666666666666d0 * (im * (re * (re * re)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -4600.0) {
tmp = im * (im * (im * -0.16666666666666666));
} else if (re <= 2.8) {
tmp = im * (re + 1.0);
} else {
tmp = 0.16666666666666666 * (im * (re * (re * re)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -4600.0: tmp = im * (im * (im * -0.16666666666666666)) elif re <= 2.8: tmp = im * (re + 1.0) else: tmp = 0.16666666666666666 * (im * (re * (re * re))) return tmp
function code(re, im) tmp = 0.0 if (re <= -4600.0) tmp = Float64(im * Float64(im * Float64(im * -0.16666666666666666))); elseif (re <= 2.8) tmp = Float64(im * Float64(re + 1.0)); else tmp = Float64(0.16666666666666666 * Float64(im * Float64(re * Float64(re * re)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -4600.0) tmp = im * (im * (im * -0.16666666666666666)); elseif (re <= 2.8) tmp = im * (re + 1.0); else tmp = 0.16666666666666666 * (im * (re * (re * re))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -4600.0], N[(im * N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 2.8], N[(im * N[(re + 1.0), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(im * N[(re * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -4600:\\
\;\;\;\;im \cdot \left(im \cdot \left(im \cdot -0.16666666666666666\right)\right)\\
\mathbf{elif}\;re \leq 2.8:\\
\;\;\;\;im \cdot \left(re + 1\right)\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \left(im \cdot \left(re \cdot \left(re \cdot re\right)\right)\right)\\
\end{array}
\end{array}
if re < -4600Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f644.4%
Simplified4.4%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f643.7%
Simplified3.7%
Taylor expanded in im around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6436.1%
Simplified36.1%
if -4600 < re < 2.7999999999999998Initial program 100.0%
Taylor expanded in im around 0
Simplified62.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6460.6%
Simplified60.6%
if 2.7999999999999998 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified73.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-*.f6463.6%
Simplified63.6%
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/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
*-lowering-*.f6463.6%
Applied egg-rr63.6%
Taylor expanded in re around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6463.6%
Simplified63.6%
Final simplification55.4%
(FPCore (re im) :precision binary64 (if (<= re -4600.0) (* im (* im (* im -0.16666666666666666))) (if (<= re 2.75) (* im (+ re 1.0)) (* im (* 0.5 (* re re))))))
double code(double re, double im) {
double tmp;
if (re <= -4600.0) {
tmp = im * (im * (im * -0.16666666666666666));
} else if (re <= 2.75) {
tmp = im * (re + 1.0);
} else {
tmp = im * (0.5 * (re * re));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= (-4600.0d0)) then
tmp = im * (im * (im * (-0.16666666666666666d0)))
else if (re <= 2.75d0) then
tmp = im * (re + 1.0d0)
else
tmp = im * (0.5d0 * (re * re))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= -4600.0) {
tmp = im * (im * (im * -0.16666666666666666));
} else if (re <= 2.75) {
tmp = im * (re + 1.0);
} else {
tmp = im * (0.5 * (re * re));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= -4600.0: tmp = im * (im * (im * -0.16666666666666666)) elif re <= 2.75: tmp = im * (re + 1.0) else: tmp = im * (0.5 * (re * re)) return tmp
function code(re, im) tmp = 0.0 if (re <= -4600.0) tmp = Float64(im * Float64(im * Float64(im * -0.16666666666666666))); elseif (re <= 2.75) tmp = Float64(im * Float64(re + 1.0)); else tmp = Float64(im * Float64(0.5 * Float64(re * re))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= -4600.0) tmp = im * (im * (im * -0.16666666666666666)); elseif (re <= 2.75) tmp = im * (re + 1.0); else tmp = im * (0.5 * (re * re)); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, -4600.0], N[(im * N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[re, 2.75], N[(im * N[(re + 1.0), $MachinePrecision]), $MachinePrecision], N[(im * N[(0.5 * N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq -4600:\\
\;\;\;\;im \cdot \left(im \cdot \left(im \cdot -0.16666666666666666\right)\right)\\
\mathbf{elif}\;re \leq 2.75:\\
\;\;\;\;im \cdot \left(re + 1\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(0.5 \cdot \left(re \cdot re\right)\right)\\
\end{array}
\end{array}
if re < -4600Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f644.4%
Simplified4.4%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f643.7%
Simplified3.7%
Taylor expanded in im around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6436.1%
Simplified36.1%
if -4600 < re < 2.75Initial program 100.0%
Taylor expanded in im around 0
Simplified62.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6460.6%
Simplified60.6%
if 2.75 < re Initial program 100.0%
Taylor expanded in im around 0
Simplified73.7%
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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.8%
Simplified51.8%
Final simplification52.8%
(FPCore (re im) :precision binary64 (let* ((t_0 (* im (* im (* im -0.16666666666666666))))) (if (<= re -4600.0) t_0 (if (<= re 5.1e+57) (* im (+ re 1.0)) t_0))))
double code(double re, double im) {
double t_0 = im * (im * (im * -0.16666666666666666));
double tmp;
if (re <= -4600.0) {
tmp = t_0;
} else if (re <= 5.1e+57) {
tmp = im * (re + 1.0);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = im * (im * (im * (-0.16666666666666666d0)))
if (re <= (-4600.0d0)) then
tmp = t_0
else if (re <= 5.1d+57) then
tmp = im * (re + 1.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = im * (im * (im * -0.16666666666666666));
double tmp;
if (re <= -4600.0) {
tmp = t_0;
} else if (re <= 5.1e+57) {
tmp = im * (re + 1.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(re, im): t_0 = im * (im * (im * -0.16666666666666666)) tmp = 0 if re <= -4600.0: tmp = t_0 elif re <= 5.1e+57: tmp = im * (re + 1.0) else: tmp = t_0 return tmp
function code(re, im) t_0 = Float64(im * Float64(im * Float64(im * -0.16666666666666666))) tmp = 0.0 if (re <= -4600.0) tmp = t_0; elseif (re <= 5.1e+57) tmp = Float64(im * Float64(re + 1.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(re, im) t_0 = im * (im * (im * -0.16666666666666666)); tmp = 0.0; if (re <= -4600.0) tmp = t_0; elseif (re <= 5.1e+57) tmp = im * (re + 1.0); else tmp = t_0; end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(im * N[(im * N[(im * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, -4600.0], t$95$0, If[LessEqual[re, 5.1e+57], N[(im * N[(re + 1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := im \cdot \left(im \cdot \left(im \cdot -0.16666666666666666\right)\right)\\
\mathbf{if}\;re \leq -4600:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;re \leq 5.1 \cdot 10^{+57}:\\
\;\;\;\;im \cdot \left(re + 1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if re < -4600 or 5.10000000000000023e57 < re Initial program 100.0%
Taylor expanded in re around 0
sin-lowering-sin.f643.6%
Simplified3.6%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6411.9%
Simplified11.9%
Taylor expanded in im around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6429.9%
Simplified29.9%
if -4600 < re < 5.10000000000000023e57Initial program 100.0%
Taylor expanded in im around 0
Simplified62.9%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6457.9%
Simplified57.9%
Final simplification46.0%
(FPCore (re im) :precision binary64 (if (<= im 1.12e+42) im (* re im)))
double code(double re, double im) {
double tmp;
if (im <= 1.12e+42) {
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 <= 1.12d+42) 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 <= 1.12e+42) {
tmp = im;
} else {
tmp = re * im;
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 1.12e+42: tmp = im else: tmp = re * im return tmp
function code(re, im) tmp = 0.0 if (im <= 1.12e+42) tmp = im; else tmp = Float64(re * im); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 1.12e+42) tmp = im; else tmp = re * im; end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 1.12e+42], im, N[(re * im), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 1.12 \cdot 10^{+42}:\\
\;\;\;\;im\\
\mathbf{else}:\\
\;\;\;\;re \cdot im\\
\end{array}
\end{array}
if im < 1.12e42Initial program 100.0%
Taylor expanded in im around 0
Simplified82.3%
Taylor expanded in re around 0
Simplified41.6%
if 1.12e42 < im Initial program 100.0%
Taylor expanded in im around 0
Simplified39.0%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f646.9%
Simplified6.9%
Taylor expanded in re around inf
Simplified7.2%
(FPCore (re im) :precision binary64 (* im (+ re 1.0)))
double code(double re, double im) {
return im * (re + 1.0);
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = im * (re + 1.0d0)
end function
public static double code(double re, double im) {
return im * (re + 1.0);
}
def code(re, im): return im * (re + 1.0)
function code(re, im) return Float64(im * Float64(re + 1.0)) end
function tmp = code(re, im) tmp = im * (re + 1.0); end
code[re_, im_] := N[(im * N[(re + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
im \cdot \left(re + 1\right)
\end{array}
Initial program 100.0%
Taylor expanded in im around 0
Simplified73.6%
Taylor expanded in re around 0
+-commutativeN/A
+-lowering-+.f6435.5%
Simplified35.5%
Final simplification35.5%
(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
Simplified73.6%
Taylor expanded in re around 0
Simplified33.9%
herbie shell --seed 2024191
(FPCore (re im)
:name "math.exp on complex, imaginary part"
:precision binary64
(* (exp re) (sin im)))