
(FPCore (re im) :precision binary64 (* (* 0.5 (sin re)) (- (exp (- im)) (exp im))))
double code(double re, double im) {
return (0.5 * sin(re)) * (exp(-im) - exp(im));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = (0.5d0 * sin(re)) * (exp(-im) - exp(im))
end function
public static double code(double re, double im) {
return (0.5 * Math.sin(re)) * (Math.exp(-im) - Math.exp(im));
}
def code(re, im): return (0.5 * math.sin(re)) * (math.exp(-im) - math.exp(im))
function code(re, im) return Float64(Float64(0.5 * sin(re)) * Float64(exp(Float64(-im)) - exp(im))) end
function tmp = code(re, im) tmp = (0.5 * sin(re)) * (exp(-im) - exp(im)); end
code[re_, im_] := N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[Exp[(-im)], $MachinePrecision] - N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 27 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (re im) :precision binary64 (* (* 0.5 (sin re)) (- (exp (- im)) (exp im))))
double code(double re, double im) {
return (0.5 * sin(re)) * (exp(-im) - exp(im));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = (0.5d0 * sin(re)) * (exp(-im) - exp(im))
end function
public static double code(double re, double im) {
return (0.5 * Math.sin(re)) * (Math.exp(-im) - Math.exp(im));
}
def code(re, im): return (0.5 * math.sin(re)) * (math.exp(-im) - math.exp(im))
function code(re, im) return Float64(Float64(0.5 * sin(re)) * Float64(exp(Float64(-im)) - exp(im))) end
function tmp = code(re, im) tmp = (0.5 * sin(re)) * (exp(-im) - exp(im)); end
code[re_, im_] := N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[Exp[(-im)], $MachinePrecision] - N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right)
\end{array}
(FPCore (re im) :precision binary64 (* (sin re) (- 0.0 (sinh im))))
double code(double re, double im) {
return sin(re) * (0.0 - sinh(im));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = sin(re) * (0.0d0 - sinh(im))
end function
public static double code(double re, double im) {
return Math.sin(re) * (0.0 - Math.sinh(im));
}
def code(re, im): return math.sin(re) * (0.0 - math.sinh(im))
function code(re, im) return Float64(sin(re) * Float64(0.0 - sinh(im))) end
function tmp = code(re, im) tmp = sin(re) * (0.0 - sinh(im)); end
code[re_, im_] := N[(N[Sin[re], $MachinePrecision] * N[(0.0 - N[Sinh[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin re \cdot \left(0 - \sinh im\right)
\end{array}
Initial program 66.3%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
remove-double-divN/A
exp-negN/A
rec-expN/A
sinh-undefN/A
sinh-negN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
metadata-evalN/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (re im)
:precision binary64
(if (<= re 2e-36)
(- 0.0 (* re (sinh im)))
(*
(* (sin re) 0.5)
(*
im
(+
-2.0
(*
im
(*
im
(+
-0.3333333333333333
(*
im
(*
im
(+
-0.016666666666666666
(* im (* im -0.0003968253968253968)))))))))))))
double code(double re, double im) {
double tmp;
if (re <= 2e-36) {
tmp = 0.0 - (re * sinh(im));
} else {
tmp = (sin(re) * 0.5) * (im * (-2.0 + (im * (im * (-0.3333333333333333 + (im * (im * (-0.016666666666666666 + (im * (im * -0.0003968253968253968))))))))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 2d-36) then
tmp = 0.0d0 - (re * sinh(im))
else
tmp = (sin(re) * 0.5d0) * (im * ((-2.0d0) + (im * (im * ((-0.3333333333333333d0) + (im * (im * ((-0.016666666666666666d0) + (im * (im * (-0.0003968253968253968d0)))))))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 2e-36) {
tmp = 0.0 - (re * Math.sinh(im));
} else {
tmp = (Math.sin(re) * 0.5) * (im * (-2.0 + (im * (im * (-0.3333333333333333 + (im * (im * (-0.016666666666666666 + (im * (im * -0.0003968253968253968))))))))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 2e-36: tmp = 0.0 - (re * math.sinh(im)) else: tmp = (math.sin(re) * 0.5) * (im * (-2.0 + (im * (im * (-0.3333333333333333 + (im * (im * (-0.016666666666666666 + (im * (im * -0.0003968253968253968)))))))))) return tmp
function code(re, im) tmp = 0.0 if (re <= 2e-36) tmp = Float64(0.0 - Float64(re * sinh(im))); else tmp = Float64(Float64(sin(re) * 0.5) * Float64(im * Float64(-2.0 + Float64(im * Float64(im * Float64(-0.3333333333333333 + Float64(im * Float64(im * Float64(-0.016666666666666666 + Float64(im * Float64(im * -0.0003968253968253968))))))))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 2e-36) tmp = 0.0 - (re * sinh(im)); else tmp = (sin(re) * 0.5) * (im * (-2.0 + (im * (im * (-0.3333333333333333 + (im * (im * (-0.016666666666666666 + (im * (im * -0.0003968253968253968)))))))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 2e-36], N[(0.0 - N[(re * N[Sinh[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sin[re], $MachinePrecision] * 0.5), $MachinePrecision] * N[(im * N[(-2.0 + N[(im * N[(im * N[(-0.3333333333333333 + N[(im * N[(im * N[(-0.016666666666666666 + N[(im * N[(im * -0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 2 \cdot 10^{-36}:\\
\;\;\;\;0 - re \cdot \sinh im\\
\mathbf{else}:\\
\;\;\;\;\left(\sin re \cdot 0.5\right) \cdot \left(im \cdot \left(-2 + im \cdot \left(im \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if re < 1.9999999999999999e-36Initial program 69.4%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
remove-double-divN/A
exp-negN/A
rec-expN/A
sinh-undefN/A
sinh-negN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in re around 0
Simplified66.5%
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
metadata-evalN/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f6466.5%
Applied egg-rr66.5%
if 1.9999999999999999e-36 < re Initial program 58.5%
Taylor expanded in im around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified97.1%
Final simplification75.1%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* (sin re) 0.5)))
(if (<= im 360.0)
(* t_0 (+ (* im (* -0.3333333333333333 (* im im))) (* im -2.0)))
(if (<= im 5e+61)
(- 0.0 (* re (sinh im)))
(if (<= im 8.2e+102)
(*
(*
re
(+
0.5
(*
re
(*
re
(+
-0.08333333333333333
(*
(* re re)
(+
0.004166666666666667
(* (* re re) -9.92063492063492e-5))))))))
(*
im
(+
-2.0
(*
(* im im)
(+ -0.3333333333333333 (* -0.016666666666666666 (* im im)))))))
(* t_0 (* im (+ -2.0 (* im (* im -0.3333333333333333))))))))))
double code(double re, double im) {
double t_0 = sin(re) * 0.5;
double tmp;
if (im <= 360.0) {
tmp = t_0 * ((im * (-0.3333333333333333 * (im * im))) + (im * -2.0));
} else if (im <= 5e+61) {
tmp = 0.0 - (re * sinh(im));
} else if (im <= 8.2e+102) {
tmp = (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + (-0.016666666666666666 * (im * im))))));
} else {
tmp = t_0 * (im * (-2.0 + (im * (im * -0.3333333333333333))));
}
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(re) * 0.5d0
if (im <= 360.0d0) then
tmp = t_0 * ((im * ((-0.3333333333333333d0) * (im * im))) + (im * (-2.0d0)))
else if (im <= 5d+61) then
tmp = 0.0d0 - (re * sinh(im))
else if (im <= 8.2d+102) then
tmp = (re * (0.5d0 + (re * (re * ((-0.08333333333333333d0) + ((re * re) * (0.004166666666666667d0 + ((re * re) * (-9.92063492063492d-5))))))))) * (im * ((-2.0d0) + ((im * im) * ((-0.3333333333333333d0) + ((-0.016666666666666666d0) * (im * im))))))
else
tmp = t_0 * (im * ((-2.0d0) + (im * (im * (-0.3333333333333333d0)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = Math.sin(re) * 0.5;
double tmp;
if (im <= 360.0) {
tmp = t_0 * ((im * (-0.3333333333333333 * (im * im))) + (im * -2.0));
} else if (im <= 5e+61) {
tmp = 0.0 - (re * Math.sinh(im));
} else if (im <= 8.2e+102) {
tmp = (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + (-0.016666666666666666 * (im * im))))));
} else {
tmp = t_0 * (im * (-2.0 + (im * (im * -0.3333333333333333))));
}
return tmp;
}
def code(re, im): t_0 = math.sin(re) * 0.5 tmp = 0 if im <= 360.0: tmp = t_0 * ((im * (-0.3333333333333333 * (im * im))) + (im * -2.0)) elif im <= 5e+61: tmp = 0.0 - (re * math.sinh(im)) elif im <= 8.2e+102: tmp = (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + (-0.016666666666666666 * (im * im)))))) else: tmp = t_0 * (im * (-2.0 + (im * (im * -0.3333333333333333)))) return tmp
function code(re, im) t_0 = Float64(sin(re) * 0.5) tmp = 0.0 if (im <= 360.0) tmp = Float64(t_0 * Float64(Float64(im * Float64(-0.3333333333333333 * Float64(im * im))) + Float64(im * -2.0))); elseif (im <= 5e+61) tmp = Float64(0.0 - Float64(re * sinh(im))); elseif (im <= 8.2e+102) tmp = Float64(Float64(re * Float64(0.5 + Float64(re * Float64(re * Float64(-0.08333333333333333 + Float64(Float64(re * re) * Float64(0.004166666666666667 + Float64(Float64(re * re) * -9.92063492063492e-5)))))))) * Float64(im * Float64(-2.0 + Float64(Float64(im * im) * Float64(-0.3333333333333333 + Float64(-0.016666666666666666 * Float64(im * im))))))); else tmp = Float64(t_0 * Float64(im * Float64(-2.0 + Float64(im * Float64(im * -0.3333333333333333))))); end return tmp end
function tmp_2 = code(re, im) t_0 = sin(re) * 0.5; tmp = 0.0; if (im <= 360.0) tmp = t_0 * ((im * (-0.3333333333333333 * (im * im))) + (im * -2.0)); elseif (im <= 5e+61) tmp = 0.0 - (re * sinh(im)); elseif (im <= 8.2e+102) tmp = (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + (-0.016666666666666666 * (im * im)))))); else tmp = t_0 * (im * (-2.0 + (im * (im * -0.3333333333333333)))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(N[Sin[re], $MachinePrecision] * 0.5), $MachinePrecision]}, If[LessEqual[im, 360.0], N[(t$95$0 * N[(N[(im * N[(-0.3333333333333333 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(im * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 5e+61], N[(0.0 - N[(re * N[Sinh[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 8.2e+102], N[(N[(re * N[(0.5 + N[(re * N[(re * N[(-0.08333333333333333 + N[(N[(re * re), $MachinePrecision] * N[(0.004166666666666667 + N[(N[(re * re), $MachinePrecision] * -9.92063492063492e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(-2.0 + N[(N[(im * im), $MachinePrecision] * N[(-0.3333333333333333 + N[(-0.016666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(im * N[(-2.0 + N[(im * N[(im * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin re \cdot 0.5\\
\mathbf{if}\;im \leq 360:\\
\;\;\;\;t\_0 \cdot \left(im \cdot \left(-0.3333333333333333 \cdot \left(im \cdot im\right)\right) + im \cdot -2\right)\\
\mathbf{elif}\;im \leq 5 \cdot 10^{+61}:\\
\;\;\;\;0 - re \cdot \sinh im\\
\mathbf{elif}\;im \leq 8.2 \cdot 10^{+102}:\\
\;\;\;\;\left(re \cdot \left(0.5 + re \cdot \left(re \cdot \left(-0.08333333333333333 + \left(re \cdot re\right) \cdot \left(0.004166666666666667 + \left(re \cdot re\right) \cdot -9.92063492063492 \cdot 10^{-5}\right)\right)\right)\right)\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + -0.016666666666666666 \cdot \left(im \cdot im\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(im \cdot \left(-2 + im \cdot \left(im \cdot -0.3333333333333333\right)\right)\right)\\
\end{array}
\end{array}
if im < 360Initial program 54.9%
Taylor expanded in im around 0
*-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-*.f6492.8%
Simplified92.8%
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6492.8%
Applied egg-rr92.8%
if 360 < im < 5.00000000000000018e61Initial program 100.0%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
remove-double-divN/A
exp-negN/A
rec-expN/A
sinh-undefN/A
sinh-negN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
sinh-lowering-sinh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in re around 0
Simplified87.5%
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
metadata-evalN/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f6487.5%
Applied egg-rr87.5%
if 5.00000000000000018e61 < im < 8.1999999999999999e102Initial program 100.0%
Taylor expanded in im around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6484.6%
Simplified84.6%
if 8.1999999999999999e102 < im Initial program 100.0%
Taylor expanded in im around 0
*-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-*.f64100.0%
Simplified100.0%
Final simplification93.5%
(FPCore (re im)
:precision binary64
(if (<= im 360.0)
(* im (* (sin re) (+ -1.0 (* (* im im) -0.16666666666666666))))
(if (<= im 1.1e+63)
(- 0.0 (* re (sinh im)))
(if (<= im 8.2e+102)
(*
(*
re
(+
0.5
(*
re
(*
re
(+
-0.08333333333333333
(*
(* re re)
(+ 0.004166666666666667 (* (* re re) -9.92063492063492e-5))))))))
(*
im
(+
-2.0
(*
(* im im)
(+ -0.3333333333333333 (* -0.016666666666666666 (* im im)))))))
(*
(* (sin re) 0.5)
(* im (+ -2.0 (* im (* im -0.3333333333333333)))))))))
double code(double re, double im) {
double tmp;
if (im <= 360.0) {
tmp = im * (sin(re) * (-1.0 + ((im * im) * -0.16666666666666666)));
} else if (im <= 1.1e+63) {
tmp = 0.0 - (re * sinh(im));
} else if (im <= 8.2e+102) {
tmp = (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + (-0.016666666666666666 * (im * im))))));
} else {
tmp = (sin(re) * 0.5) * (im * (-2.0 + (im * (im * -0.3333333333333333))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 360.0d0) then
tmp = im * (sin(re) * ((-1.0d0) + ((im * im) * (-0.16666666666666666d0))))
else if (im <= 1.1d+63) then
tmp = 0.0d0 - (re * sinh(im))
else if (im <= 8.2d+102) then
tmp = (re * (0.5d0 + (re * (re * ((-0.08333333333333333d0) + ((re * re) * (0.004166666666666667d0 + ((re * re) * (-9.92063492063492d-5))))))))) * (im * ((-2.0d0) + ((im * im) * ((-0.3333333333333333d0) + ((-0.016666666666666666d0) * (im * im))))))
else
tmp = (sin(re) * 0.5d0) * (im * ((-2.0d0) + (im * (im * (-0.3333333333333333d0)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 360.0) {
tmp = im * (Math.sin(re) * (-1.0 + ((im * im) * -0.16666666666666666)));
} else if (im <= 1.1e+63) {
tmp = 0.0 - (re * Math.sinh(im));
} else if (im <= 8.2e+102) {
tmp = (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + (-0.016666666666666666 * (im * im))))));
} else {
tmp = (Math.sin(re) * 0.5) * (im * (-2.0 + (im * (im * -0.3333333333333333))));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 360.0: tmp = im * (math.sin(re) * (-1.0 + ((im * im) * -0.16666666666666666))) elif im <= 1.1e+63: tmp = 0.0 - (re * math.sinh(im)) elif im <= 8.2e+102: tmp = (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + (-0.016666666666666666 * (im * im)))))) else: tmp = (math.sin(re) * 0.5) * (im * (-2.0 + (im * (im * -0.3333333333333333)))) return tmp
function code(re, im) tmp = 0.0 if (im <= 360.0) tmp = Float64(im * Float64(sin(re) * Float64(-1.0 + Float64(Float64(im * im) * -0.16666666666666666)))); elseif (im <= 1.1e+63) tmp = Float64(0.0 - Float64(re * sinh(im))); elseif (im <= 8.2e+102) tmp = Float64(Float64(re * Float64(0.5 + Float64(re * Float64(re * Float64(-0.08333333333333333 + Float64(Float64(re * re) * Float64(0.004166666666666667 + Float64(Float64(re * re) * -9.92063492063492e-5)))))))) * Float64(im * Float64(-2.0 + Float64(Float64(im * im) * Float64(-0.3333333333333333 + Float64(-0.016666666666666666 * Float64(im * im))))))); else tmp = Float64(Float64(sin(re) * 0.5) * Float64(im * Float64(-2.0 + Float64(im * Float64(im * -0.3333333333333333))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 360.0) tmp = im * (sin(re) * (-1.0 + ((im * im) * -0.16666666666666666))); elseif (im <= 1.1e+63) tmp = 0.0 - (re * sinh(im)); elseif (im <= 8.2e+102) tmp = (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + (-0.016666666666666666 * (im * im)))))); else tmp = (sin(re) * 0.5) * (im * (-2.0 + (im * (im * -0.3333333333333333)))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 360.0], N[(im * N[(N[Sin[re], $MachinePrecision] * N[(-1.0 + N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 1.1e+63], N[(0.0 - N[(re * N[Sinh[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 8.2e+102], N[(N[(re * N[(0.5 + N[(re * N[(re * N[(-0.08333333333333333 + N[(N[(re * re), $MachinePrecision] * N[(0.004166666666666667 + N[(N[(re * re), $MachinePrecision] * -9.92063492063492e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(-2.0 + N[(N[(im * im), $MachinePrecision] * N[(-0.3333333333333333 + N[(-0.016666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sin[re], $MachinePrecision] * 0.5), $MachinePrecision] * N[(im * N[(-2.0 + N[(im * N[(im * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 360:\\
\;\;\;\;im \cdot \left(\sin re \cdot \left(-1 + \left(im \cdot im\right) \cdot -0.16666666666666666\right)\right)\\
\mathbf{elif}\;im \leq 1.1 \cdot 10^{+63}:\\
\;\;\;\;0 - re \cdot \sinh im\\
\mathbf{elif}\;im \leq 8.2 \cdot 10^{+102}:\\
\;\;\;\;\left(re \cdot \left(0.5 + re \cdot \left(re \cdot \left(-0.08333333333333333 + \left(re \cdot re\right) \cdot \left(0.004166666666666667 + \left(re \cdot re\right) \cdot -9.92063492063492 \cdot 10^{-5}\right)\right)\right)\right)\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + -0.016666666666666666 \cdot \left(im \cdot im\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\sin re \cdot 0.5\right) \cdot \left(im \cdot \left(-2 + im \cdot \left(im \cdot -0.3333333333333333\right)\right)\right)\\
\end{array}
\end{array}
if im < 360Initial program 54.9%
Taylor expanded in im around 0
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6489.4%
Simplified89.4%
if 360 < im < 1.0999999999999999e63Initial program 100.0%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
remove-double-divN/A
exp-negN/A
rec-expN/A
sinh-undefN/A
sinh-negN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
sinh-lowering-sinh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in re around 0
Simplified87.5%
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
metadata-evalN/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f6487.5%
Applied egg-rr87.5%
if 1.0999999999999999e63 < im < 8.1999999999999999e102Initial program 100.0%
Taylor expanded in im around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6484.6%
Simplified84.6%
if 8.1999999999999999e102 < im Initial program 100.0%
Taylor expanded in im around 0
*-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-*.f64100.0%
Simplified100.0%
Final simplification90.9%
(FPCore (re im)
:precision binary64
(if (<= re 0.0132)
(- 0.0 (* re (sinh im)))
(*
im
(*
(sin re)
(+
-1.0
(*
(* im im)
(+ -0.16666666666666666 (* (* im im) -0.008333333333333333))))))))
double code(double re, double im) {
double tmp;
if (re <= 0.0132) {
tmp = 0.0 - (re * sinh(im));
} else {
tmp = im * (sin(re) * (-1.0 + ((im * im) * (-0.16666666666666666 + ((im * im) * -0.008333333333333333)))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 0.0132d0) then
tmp = 0.0d0 - (re * sinh(im))
else
tmp = im * (sin(re) * ((-1.0d0) + ((im * im) * ((-0.16666666666666666d0) + ((im * im) * (-0.008333333333333333d0))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 0.0132) {
tmp = 0.0 - (re * Math.sinh(im));
} else {
tmp = im * (Math.sin(re) * (-1.0 + ((im * im) * (-0.16666666666666666 + ((im * im) * -0.008333333333333333)))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 0.0132: tmp = 0.0 - (re * math.sinh(im)) else: tmp = im * (math.sin(re) * (-1.0 + ((im * im) * (-0.16666666666666666 + ((im * im) * -0.008333333333333333))))) return tmp
function code(re, im) tmp = 0.0 if (re <= 0.0132) tmp = Float64(0.0 - Float64(re * sinh(im))); else tmp = Float64(im * Float64(sin(re) * Float64(-1.0 + Float64(Float64(im * im) * Float64(-0.16666666666666666 + Float64(Float64(im * im) * -0.008333333333333333)))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 0.0132) tmp = 0.0 - (re * sinh(im)); else tmp = im * (sin(re) * (-1.0 + ((im * im) * (-0.16666666666666666 + ((im * im) * -0.008333333333333333))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 0.0132], N[(0.0 - N[(re * N[Sinh[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(N[Sin[re], $MachinePrecision] * N[(-1.0 + N[(N[(im * im), $MachinePrecision] * N[(-0.16666666666666666 + N[(N[(im * im), $MachinePrecision] * -0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 0.0132:\\
\;\;\;\;0 - re \cdot \sinh im\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(\sin re \cdot \left(-1 + \left(im \cdot im\right) \cdot \left(-0.16666666666666666 + \left(im \cdot im\right) \cdot -0.008333333333333333\right)\right)\right)\\
\end{array}
\end{array}
if re < 0.0132Initial program 67.9%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
remove-double-divN/A
exp-negN/A
rec-expN/A
sinh-undefN/A
sinh-negN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in re around 0
Simplified68.1%
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
metadata-evalN/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f6468.1%
Applied egg-rr68.1%
if 0.0132 < re Initial program 61.3%
Taylor expanded in im around 0
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
associate-*r*N/A
+-commutativeN/A
distribute-lft-outN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
Simplified95.3%
Final simplification74.8%
(FPCore (re im) :precision binary64 (if (<= re 0.064) (- 0.0 (* re (sinh im))) (* im (* (sin re) (+ -1.0 (* (* im im) -0.16666666666666666))))))
double code(double re, double im) {
double tmp;
if (re <= 0.064) {
tmp = 0.0 - (re * sinh(im));
} else {
tmp = im * (sin(re) * (-1.0 + ((im * im) * -0.16666666666666666)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 0.064d0) then
tmp = 0.0d0 - (re * sinh(im))
else
tmp = im * (sin(re) * ((-1.0d0) + ((im * im) * (-0.16666666666666666d0))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 0.064) {
tmp = 0.0 - (re * Math.sinh(im));
} else {
tmp = im * (Math.sin(re) * (-1.0 + ((im * im) * -0.16666666666666666)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 0.064: tmp = 0.0 - (re * math.sinh(im)) else: tmp = im * (math.sin(re) * (-1.0 + ((im * im) * -0.16666666666666666))) return tmp
function code(re, im) tmp = 0.0 if (re <= 0.064) tmp = Float64(0.0 - Float64(re * sinh(im))); else tmp = Float64(im * Float64(sin(re) * Float64(-1.0 + Float64(Float64(im * im) * -0.16666666666666666)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 0.064) tmp = 0.0 - (re * sinh(im)); else tmp = im * (sin(re) * (-1.0 + ((im * im) * -0.16666666666666666))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 0.064], N[(0.0 - N[(re * N[Sinh[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(N[Sin[re], $MachinePrecision] * N[(-1.0 + N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 0.064:\\
\;\;\;\;0 - re \cdot \sinh im\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(\sin re \cdot \left(-1 + \left(im \cdot im\right) \cdot -0.16666666666666666\right)\right)\\
\end{array}
\end{array}
if re < 0.064000000000000001Initial program 67.9%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
remove-double-divN/A
exp-negN/A
rec-expN/A
sinh-undefN/A
sinh-negN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in re around 0
Simplified68.1%
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
metadata-evalN/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f6468.1%
Applied egg-rr68.1%
if 0.064000000000000001 < re Initial program 61.3%
Taylor expanded in im around 0
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6490.8%
Simplified90.8%
Final simplification73.7%
(FPCore (re im)
:precision binary64
(if (<= im 0.00013)
(- 0.0 (* (sin re) im))
(if (<= im 2e+56)
(- 0.0 (* re (sinh im)))
(*
im
(*
(*
re
(+
1.0
(*
re
(*
re
(+
-0.16666666666666666
(*
(* re re)
(+
0.008333333333333333
(* (* re re) -0.0001984126984126984))))))))
(+
(+ -1.0 (* (* im im) -0.16666666666666666))
(*
(+ -0.008333333333333333 (* im (* im -0.0001984126984126984)))
(* im (* im (* im im))))))))))
double code(double re, double im) {
double tmp;
if (im <= 0.00013) {
tmp = 0.0 - (sin(re) * im);
} else if (im <= 2e+56) {
tmp = 0.0 - (re * sinh(im));
} else {
tmp = im * ((re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))) * ((-1.0 + ((im * im) * -0.16666666666666666)) + ((-0.008333333333333333 + (im * (im * -0.0001984126984126984))) * (im * (im * (im * im))))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (im <= 0.00013d0) then
tmp = 0.0d0 - (sin(re) * im)
else if (im <= 2d+56) then
tmp = 0.0d0 - (re * sinh(im))
else
tmp = im * ((re * (1.0d0 + (re * (re * ((-0.16666666666666666d0) + ((re * re) * (0.008333333333333333d0 + ((re * re) * (-0.0001984126984126984d0))))))))) * (((-1.0d0) + ((im * im) * (-0.16666666666666666d0))) + (((-0.008333333333333333d0) + (im * (im * (-0.0001984126984126984d0)))) * (im * (im * (im * im))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 0.00013) {
tmp = 0.0 - (Math.sin(re) * im);
} else if (im <= 2e+56) {
tmp = 0.0 - (re * Math.sinh(im));
} else {
tmp = im * ((re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))) * ((-1.0 + ((im * im) * -0.16666666666666666)) + ((-0.008333333333333333 + (im * (im * -0.0001984126984126984))) * (im * (im * (im * im))))));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 0.00013: tmp = 0.0 - (math.sin(re) * im) elif im <= 2e+56: tmp = 0.0 - (re * math.sinh(im)) else: tmp = im * ((re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))) * ((-1.0 + ((im * im) * -0.16666666666666666)) + ((-0.008333333333333333 + (im * (im * -0.0001984126984126984))) * (im * (im * (im * im)))))) return tmp
function code(re, im) tmp = 0.0 if (im <= 0.00013) tmp = Float64(0.0 - Float64(sin(re) * im)); elseif (im <= 2e+56) tmp = Float64(0.0 - Float64(re * sinh(im))); else tmp = Float64(im * Float64(Float64(re * Float64(1.0 + Float64(re * Float64(re * Float64(-0.16666666666666666 + Float64(Float64(re * re) * Float64(0.008333333333333333 + Float64(Float64(re * re) * -0.0001984126984126984)))))))) * Float64(Float64(-1.0 + Float64(Float64(im * im) * -0.16666666666666666)) + Float64(Float64(-0.008333333333333333 + Float64(im * Float64(im * -0.0001984126984126984))) * Float64(im * Float64(im * Float64(im * im))))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 0.00013) tmp = 0.0 - (sin(re) * im); elseif (im <= 2e+56) tmp = 0.0 - (re * sinh(im)); else tmp = im * ((re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))) * ((-1.0 + ((im * im) * -0.16666666666666666)) + ((-0.008333333333333333 + (im * (im * -0.0001984126984126984))) * (im * (im * (im * im)))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 0.00013], N[(0.0 - N[(N[Sin[re], $MachinePrecision] * im), $MachinePrecision]), $MachinePrecision], If[LessEqual[im, 2e+56], N[(0.0 - N[(re * N[Sinh[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(N[(re * N[(1.0 + N[(re * N[(re * N[(-0.16666666666666666 + N[(N[(re * re), $MachinePrecision] * N[(0.008333333333333333 + N[(N[(re * re), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(-1.0 + N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.008333333333333333 + N[(im * N[(im * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(im * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 0.00013:\\
\;\;\;\;0 - \sin re \cdot im\\
\mathbf{elif}\;im \leq 2 \cdot 10^{+56}:\\
\;\;\;\;0 - re \cdot \sinh im\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(\left(re \cdot \left(1 + re \cdot \left(re \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot \left(0.008333333333333333 + \left(re \cdot re\right) \cdot -0.0001984126984126984\right)\right)\right)\right)\right) \cdot \left(\left(-1 + \left(im \cdot im\right) \cdot -0.16666666666666666\right) + \left(-0.008333333333333333 + im \cdot \left(im \cdot -0.0001984126984126984\right)\right) \cdot \left(im \cdot \left(im \cdot \left(im \cdot im\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if im < 1.29999999999999989e-4Initial program 54.6%
Taylor expanded in im around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f6465.6%
Simplified65.6%
sub0-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f6465.6%
Applied egg-rr65.6%
if 1.29999999999999989e-4 < im < 2.00000000000000018e56Initial program 100.0%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
remove-double-divN/A
exp-negN/A
rec-expN/A
sinh-undefN/A
sinh-negN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
sinh-lowering-sinh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in re around 0
Simplified77.8%
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
metadata-evalN/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f6477.8%
Applied egg-rr77.8%
if 2.00000000000000018e56 < im Initial program 100.0%
Taylor expanded in im around 0
Simplified100.0%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6480.7%
Simplified80.7%
Final simplification69.4%
(FPCore (re im)
:precision binary64
(if (<= re 2.5e+34)
(- 0.0 (* re (sinh im)))
(*
(+
0.5
(*
(* re re)
(+
-0.08333333333333333
(*
(* re re)
(+ 0.004166666666666667 (* (* re re) -9.92063492063492e-5))))))
(*
re
(*
im
(+
-2.0
(*
(* im im)
(+ -0.3333333333333333 (* -0.016666666666666666 (* im im))))))))))
double code(double re, double im) {
double tmp;
if (re <= 2.5e+34) {
tmp = 0.0 - (re * sinh(im));
} else {
tmp = (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))) * (re * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + (-0.016666666666666666 * (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.5d+34) then
tmp = 0.0d0 - (re * sinh(im))
else
tmp = (0.5d0 + ((re * re) * ((-0.08333333333333333d0) + ((re * re) * (0.004166666666666667d0 + ((re * re) * (-9.92063492063492d-5))))))) * (re * (im * ((-2.0d0) + ((im * im) * ((-0.3333333333333333d0) + ((-0.016666666666666666d0) * (im * im)))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 2.5e+34) {
tmp = 0.0 - (re * Math.sinh(im));
} else {
tmp = (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))) * (re * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + (-0.016666666666666666 * (im * im)))))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 2.5e+34: tmp = 0.0 - (re * math.sinh(im)) else: tmp = (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))) * (re * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + (-0.016666666666666666 * (im * im))))))) return tmp
function code(re, im) tmp = 0.0 if (re <= 2.5e+34) tmp = Float64(0.0 - Float64(re * sinh(im))); else tmp = Float64(Float64(0.5 + Float64(Float64(re * re) * Float64(-0.08333333333333333 + Float64(Float64(re * re) * Float64(0.004166666666666667 + Float64(Float64(re * re) * -9.92063492063492e-5)))))) * Float64(re * Float64(im * Float64(-2.0 + Float64(Float64(im * im) * Float64(-0.3333333333333333 + Float64(-0.016666666666666666 * Float64(im * im)))))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 2.5e+34) tmp = 0.0 - (re * sinh(im)); else tmp = (0.5 + ((re * re) * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))) * (re * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + (-0.016666666666666666 * (im * im))))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 2.5e+34], N[(0.0 - N[(re * N[Sinh[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 + N[(N[(re * re), $MachinePrecision] * N[(-0.08333333333333333 + N[(N[(re * re), $MachinePrecision] * N[(0.004166666666666667 + N[(N[(re * re), $MachinePrecision] * -9.92063492063492e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(im * N[(-2.0 + N[(N[(im * im), $MachinePrecision] * N[(-0.3333333333333333 + N[(-0.016666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 2.5 \cdot 10^{+34}:\\
\;\;\;\;0 - re \cdot \sinh im\\
\mathbf{else}:\\
\;\;\;\;\left(0.5 + \left(re \cdot re\right) \cdot \left(-0.08333333333333333 + \left(re \cdot re\right) \cdot \left(0.004166666666666667 + \left(re \cdot re\right) \cdot -9.92063492063492 \cdot 10^{-5}\right)\right)\right) \cdot \left(re \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + -0.016666666666666666 \cdot \left(im \cdot im\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if re < 2.4999999999999999e34Initial program 67.6%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
remove-double-divN/A
exp-negN/A
rec-expN/A
sinh-undefN/A
sinh-negN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in re around 0
Simplified67.3%
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
metadata-evalN/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f6467.3%
Applied egg-rr67.3%
if 2.4999999999999999e34 < re Initial program 61.6%
Taylor expanded in im around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6494.5%
Simplified94.5%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6434.1%
Simplified34.1%
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
Applied egg-rr34.1%
Final simplification60.3%
(FPCore (re im)
:precision binary64
(*
im
(*
(*
re
(+
1.0
(*
re
(*
re
(+
-0.16666666666666666
(*
(* re re)
(+ 0.008333333333333333 (* (* re re) -0.0001984126984126984))))))))
(+
(+ -1.0 (* (* im im) -0.16666666666666666))
(*
(+ -0.008333333333333333 (* im (* im -0.0001984126984126984)))
(* im (* im (* im im))))))))
double code(double re, double im) {
return im * ((re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))) * ((-1.0 + ((im * im) * -0.16666666666666666)) + ((-0.008333333333333333 + (im * (im * -0.0001984126984126984))) * (im * (im * (im * im))))));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = im * ((re * (1.0d0 + (re * (re * ((-0.16666666666666666d0) + ((re * re) * (0.008333333333333333d0 + ((re * re) * (-0.0001984126984126984d0))))))))) * (((-1.0d0) + ((im * im) * (-0.16666666666666666d0))) + (((-0.008333333333333333d0) + (im * (im * (-0.0001984126984126984d0)))) * (im * (im * (im * im))))))
end function
public static double code(double re, double im) {
return im * ((re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))) * ((-1.0 + ((im * im) * -0.16666666666666666)) + ((-0.008333333333333333 + (im * (im * -0.0001984126984126984))) * (im * (im * (im * im))))));
}
def code(re, im): return im * ((re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))) * ((-1.0 + ((im * im) * -0.16666666666666666)) + ((-0.008333333333333333 + (im * (im * -0.0001984126984126984))) * (im * (im * (im * im))))))
function code(re, im) return Float64(im * Float64(Float64(re * Float64(1.0 + Float64(re * Float64(re * Float64(-0.16666666666666666 + Float64(Float64(re * re) * Float64(0.008333333333333333 + Float64(Float64(re * re) * -0.0001984126984126984)))))))) * Float64(Float64(-1.0 + Float64(Float64(im * im) * -0.16666666666666666)) + Float64(Float64(-0.008333333333333333 + Float64(im * Float64(im * -0.0001984126984126984))) * Float64(im * Float64(im * Float64(im * im))))))) end
function tmp = code(re, im) tmp = im * ((re * (1.0 + (re * (re * (-0.16666666666666666 + ((re * re) * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))) * ((-1.0 + ((im * im) * -0.16666666666666666)) + ((-0.008333333333333333 + (im * (im * -0.0001984126984126984))) * (im * (im * (im * im)))))); end
code[re_, im_] := N[(im * N[(N[(re * N[(1.0 + N[(re * N[(re * N[(-0.16666666666666666 + N[(N[(re * re), $MachinePrecision] * N[(0.008333333333333333 + N[(N[(re * re), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(-1.0 + N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.008333333333333333 + N[(im * N[(im * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(im * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
im \cdot \left(\left(re \cdot \left(1 + re \cdot \left(re \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot \left(0.008333333333333333 + \left(re \cdot re\right) \cdot -0.0001984126984126984\right)\right)\right)\right)\right) \cdot \left(\left(-1 + \left(im \cdot im\right) \cdot -0.16666666666666666\right) + \left(-0.008333333333333333 + im \cdot \left(im \cdot -0.0001984126984126984\right)\right) \cdot \left(im \cdot \left(im \cdot \left(im \cdot im\right)\right)\right)\right)\right)
\end{array}
Initial program 66.3%
Taylor expanded in im around 0
Simplified94.6%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6463.0%
Simplified63.0%
Final simplification63.0%
(FPCore (re im)
:precision binary64
(*
(*
re
(+
0.5
(*
re
(*
re
(+
-0.08333333333333333
(*
(* re re)
(+ 0.004166666666666667 (* (* re re) -9.92063492063492e-5))))))))
(*
im
(+
-2.0
(*
(* im im)
(+ -0.3333333333333333 (* -0.016666666666666666 (* im im))))))))
double code(double re, double im) {
return (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + (-0.016666666666666666 * (im * im))))));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = (re * (0.5d0 + (re * (re * ((-0.08333333333333333d0) + ((re * re) * (0.004166666666666667d0 + ((re * re) * (-9.92063492063492d-5))))))))) * (im * ((-2.0d0) + ((im * im) * ((-0.3333333333333333d0) + ((-0.016666666666666666d0) * (im * im))))))
end function
public static double code(double re, double im) {
return (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + (-0.016666666666666666 * (im * im))))));
}
def code(re, im): return (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + (-0.016666666666666666 * (im * im))))))
function code(re, im) return Float64(Float64(re * Float64(0.5 + Float64(re * Float64(re * Float64(-0.08333333333333333 + Float64(Float64(re * re) * Float64(0.004166666666666667 + Float64(Float64(re * re) * -9.92063492063492e-5)))))))) * Float64(im * Float64(-2.0 + Float64(Float64(im * im) * Float64(-0.3333333333333333 + Float64(-0.016666666666666666 * Float64(im * im))))))) end
function tmp = code(re, im) tmp = (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + (-0.016666666666666666 * (im * im)))))); end
code[re_, im_] := N[(N[(re * N[(0.5 + N[(re * N[(re * N[(-0.08333333333333333 + N[(N[(re * re), $MachinePrecision] * N[(0.004166666666666667 + N[(N[(re * re), $MachinePrecision] * -9.92063492063492e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(-2.0 + N[(N[(im * im), $MachinePrecision] * N[(-0.3333333333333333 + N[(-0.016666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(re \cdot \left(0.5 + re \cdot \left(re \cdot \left(-0.08333333333333333 + \left(re \cdot re\right) \cdot \left(0.004166666666666667 + \left(re \cdot re\right) \cdot -9.92063492063492 \cdot 10^{-5}\right)\right)\right)\right)\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + -0.016666666666666666 \cdot \left(im \cdot im\right)\right)\right)\right)
\end{array}
Initial program 66.3%
Taylor expanded in im around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.5%
Simplified93.5%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6462.6%
Simplified62.6%
Final simplification62.6%
(FPCore (re im)
:precision binary64
(if (<= re 2.5e+34)
(*
im
(*
re
(+
(+ -1.0 (* (* im im) -0.16666666666666666))
(*
(+ -0.008333333333333333 (* im (* im -0.0001984126984126984)))
(* im (* im (* im im)))))))
(*
(*
re
(+
0.5
(*
re
(*
re
(+
-0.08333333333333333
(*
(* re re)
(+ 0.004166666666666667 (* (* re re) -9.92063492063492e-5))))))))
(* im (+ -2.0 (* im (* im -0.3333333333333333)))))))
double code(double re, double im) {
double tmp;
if (re <= 2.5e+34) {
tmp = im * (re * ((-1.0 + ((im * im) * -0.16666666666666666)) + ((-0.008333333333333333 + (im * (im * -0.0001984126984126984))) * (im * (im * (im * im))))));
} else {
tmp = (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (im * (-2.0 + (im * (im * -0.3333333333333333))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 2.5d+34) then
tmp = im * (re * (((-1.0d0) + ((im * im) * (-0.16666666666666666d0))) + (((-0.008333333333333333d0) + (im * (im * (-0.0001984126984126984d0)))) * (im * (im * (im * im))))))
else
tmp = (re * (0.5d0 + (re * (re * ((-0.08333333333333333d0) + ((re * re) * (0.004166666666666667d0 + ((re * re) * (-9.92063492063492d-5))))))))) * (im * ((-2.0d0) + (im * (im * (-0.3333333333333333d0)))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 2.5e+34) {
tmp = im * (re * ((-1.0 + ((im * im) * -0.16666666666666666)) + ((-0.008333333333333333 + (im * (im * -0.0001984126984126984))) * (im * (im * (im * im))))));
} else {
tmp = (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (im * (-2.0 + (im * (im * -0.3333333333333333))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 2.5e+34: tmp = im * (re * ((-1.0 + ((im * im) * -0.16666666666666666)) + ((-0.008333333333333333 + (im * (im * -0.0001984126984126984))) * (im * (im * (im * im)))))) else: tmp = (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (im * (-2.0 + (im * (im * -0.3333333333333333)))) return tmp
function code(re, im) tmp = 0.0 if (re <= 2.5e+34) tmp = Float64(im * Float64(re * Float64(Float64(-1.0 + Float64(Float64(im * im) * -0.16666666666666666)) + Float64(Float64(-0.008333333333333333 + Float64(im * Float64(im * -0.0001984126984126984))) * Float64(im * Float64(im * Float64(im * im))))))); else tmp = Float64(Float64(re * Float64(0.5 + Float64(re * Float64(re * Float64(-0.08333333333333333 + Float64(Float64(re * re) * Float64(0.004166666666666667 + Float64(Float64(re * re) * -9.92063492063492e-5)))))))) * Float64(im * Float64(-2.0 + Float64(im * Float64(im * -0.3333333333333333))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 2.5e+34) tmp = im * (re * ((-1.0 + ((im * im) * -0.16666666666666666)) + ((-0.008333333333333333 + (im * (im * -0.0001984126984126984))) * (im * (im * (im * im)))))); else tmp = (re * (0.5 + (re * (re * (-0.08333333333333333 + ((re * re) * (0.004166666666666667 + ((re * re) * -9.92063492063492e-5)))))))) * (im * (-2.0 + (im * (im * -0.3333333333333333)))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 2.5e+34], N[(im * N[(re * N[(N[(-1.0 + N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.008333333333333333 + N[(im * N[(im * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(im * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(re * N[(0.5 + N[(re * N[(re * N[(-0.08333333333333333 + N[(N[(re * re), $MachinePrecision] * N[(0.004166666666666667 + N[(N[(re * re), $MachinePrecision] * -9.92063492063492e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(-2.0 + N[(im * N[(im * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 2.5 \cdot 10^{+34}:\\
\;\;\;\;im \cdot \left(re \cdot \left(\left(-1 + \left(im \cdot im\right) \cdot -0.16666666666666666\right) + \left(-0.008333333333333333 + im \cdot \left(im \cdot -0.0001984126984126984\right)\right) \cdot \left(im \cdot \left(im \cdot \left(im \cdot im\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(re \cdot \left(0.5 + re \cdot \left(re \cdot \left(-0.08333333333333333 + \left(re \cdot re\right) \cdot \left(0.004166666666666667 + \left(re \cdot re\right) \cdot -9.92063492063492 \cdot 10^{-5}\right)\right)\right)\right)\right) \cdot \left(im \cdot \left(-2 + im \cdot \left(im \cdot -0.3333333333333333\right)\right)\right)\\
\end{array}
\end{array}
if re < 2.4999999999999999e34Initial program 67.6%
Taylor expanded in im around 0
Simplified94.2%
Taylor expanded in re around 0
Simplified63.0%
if 2.4999999999999999e34 < re Initial program 61.6%
Taylor expanded in im around 0
*-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-*.f6489.3%
Simplified89.3%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6434.1%
Simplified34.1%
Final simplification56.9%
(FPCore (re im)
:precision binary64
(if (<= re 2.5e+34)
(*
im
(*
re
(+
(+ -1.0 (* (* im im) -0.16666666666666666))
(*
(+ -0.008333333333333333 (* im (* im -0.0001984126984126984)))
(* im (* im (* im im)))))))
(*
im
(*
re
(-
-1.0
(*
re
(*
re
(+
-0.16666666666666666
(*
(* re re)
(+
0.008333333333333333
(* (* re re) -0.0001984126984126984)))))))))))
double code(double re, double im) {
double tmp;
if (re <= 2.5e+34) {
tmp = im * (re * ((-1.0 + ((im * im) * -0.16666666666666666)) + ((-0.008333333333333333 + (im * (im * -0.0001984126984126984))) * (im * (im * (im * im))))));
} else {
tmp = im * (re * (-1.0 - (re * (re * (-0.16666666666666666 + ((re * re) * (0.008333333333333333 + ((re * re) * -0.0001984126984126984))))))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 2.5d+34) then
tmp = im * (re * (((-1.0d0) + ((im * im) * (-0.16666666666666666d0))) + (((-0.008333333333333333d0) + (im * (im * (-0.0001984126984126984d0)))) * (im * (im * (im * im))))))
else
tmp = im * (re * ((-1.0d0) - (re * (re * ((-0.16666666666666666d0) + ((re * re) * (0.008333333333333333d0 + ((re * re) * (-0.0001984126984126984d0)))))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 2.5e+34) {
tmp = im * (re * ((-1.0 + ((im * im) * -0.16666666666666666)) + ((-0.008333333333333333 + (im * (im * -0.0001984126984126984))) * (im * (im * (im * im))))));
} else {
tmp = im * (re * (-1.0 - (re * (re * (-0.16666666666666666 + ((re * re) * (0.008333333333333333 + ((re * re) * -0.0001984126984126984))))))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 2.5e+34: tmp = im * (re * ((-1.0 + ((im * im) * -0.16666666666666666)) + ((-0.008333333333333333 + (im * (im * -0.0001984126984126984))) * (im * (im * (im * im)))))) else: tmp = im * (re * (-1.0 - (re * (re * (-0.16666666666666666 + ((re * re) * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))) return tmp
function code(re, im) tmp = 0.0 if (re <= 2.5e+34) tmp = Float64(im * Float64(re * Float64(Float64(-1.0 + Float64(Float64(im * im) * -0.16666666666666666)) + Float64(Float64(-0.008333333333333333 + Float64(im * Float64(im * -0.0001984126984126984))) * Float64(im * Float64(im * Float64(im * im))))))); else tmp = Float64(im * Float64(re * Float64(-1.0 - Float64(re * Float64(re * Float64(-0.16666666666666666 + Float64(Float64(re * re) * Float64(0.008333333333333333 + Float64(Float64(re * re) * -0.0001984126984126984))))))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 2.5e+34) tmp = im * (re * ((-1.0 + ((im * im) * -0.16666666666666666)) + ((-0.008333333333333333 + (im * (im * -0.0001984126984126984))) * (im * (im * (im * im)))))); else tmp = im * (re * (-1.0 - (re * (re * (-0.16666666666666666 + ((re * re) * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 2.5e+34], N[(im * N[(re * N[(N[(-1.0 + N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.008333333333333333 + N[(im * N[(im * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * N[(im * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(re * N[(-1.0 - N[(re * N[(re * N[(-0.16666666666666666 + N[(N[(re * re), $MachinePrecision] * N[(0.008333333333333333 + N[(N[(re * re), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 2.5 \cdot 10^{+34}:\\
\;\;\;\;im \cdot \left(re \cdot \left(\left(-1 + \left(im \cdot im\right) \cdot -0.16666666666666666\right) + \left(-0.008333333333333333 + im \cdot \left(im \cdot -0.0001984126984126984\right)\right) \cdot \left(im \cdot \left(im \cdot \left(im \cdot im\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(re \cdot \left(-1 - re \cdot \left(re \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot \left(0.008333333333333333 + \left(re \cdot re\right) \cdot -0.0001984126984126984\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if re < 2.4999999999999999e34Initial program 67.6%
Taylor expanded in im around 0
Simplified94.2%
Taylor expanded in re around 0
Simplified63.0%
if 2.4999999999999999e34 < re Initial program 61.6%
Taylor expanded in im around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f6443.7%
Simplified43.7%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6434.1%
Simplified34.1%
Final simplification56.9%
(FPCore (re im)
:precision binary64
(if (<= re 2.5e+34)
(*
0.5
(*
re
(*
im
(+
-2.0
(*
(* im im)
(+
-0.3333333333333333
(*
(+ -0.016666666666666666 (* im (* im -0.0003968253968253968)))
(* im im))))))))
(*
im
(*
re
(-
-1.0
(*
re
(*
re
(+
-0.16666666666666666
(*
(* re re)
(+
0.008333333333333333
(* (* re re) -0.0001984126984126984)))))))))))
double code(double re, double im) {
double tmp;
if (re <= 2.5e+34) {
tmp = 0.5 * (re * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + ((-0.016666666666666666 + (im * (im * -0.0003968253968253968))) * (im * im)))))));
} else {
tmp = im * (re * (-1.0 - (re * (re * (-0.16666666666666666 + ((re * re) * (0.008333333333333333 + ((re * re) * -0.0001984126984126984))))))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 2.5d+34) then
tmp = 0.5d0 * (re * (im * ((-2.0d0) + ((im * im) * ((-0.3333333333333333d0) + (((-0.016666666666666666d0) + (im * (im * (-0.0003968253968253968d0)))) * (im * im)))))))
else
tmp = im * (re * ((-1.0d0) - (re * (re * ((-0.16666666666666666d0) + ((re * re) * (0.008333333333333333d0 + ((re * re) * (-0.0001984126984126984d0)))))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 2.5e+34) {
tmp = 0.5 * (re * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + ((-0.016666666666666666 + (im * (im * -0.0003968253968253968))) * (im * im)))))));
} else {
tmp = im * (re * (-1.0 - (re * (re * (-0.16666666666666666 + ((re * re) * (0.008333333333333333 + ((re * re) * -0.0001984126984126984))))))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 2.5e+34: tmp = 0.5 * (re * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + ((-0.016666666666666666 + (im * (im * -0.0003968253968253968))) * (im * im))))))) else: tmp = im * (re * (-1.0 - (re * (re * (-0.16666666666666666 + ((re * re) * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))) return tmp
function code(re, im) tmp = 0.0 if (re <= 2.5e+34) tmp = Float64(0.5 * Float64(re * Float64(im * Float64(-2.0 + Float64(Float64(im * im) * Float64(-0.3333333333333333 + Float64(Float64(-0.016666666666666666 + Float64(im * Float64(im * -0.0003968253968253968))) * Float64(im * im)))))))); else tmp = Float64(im * Float64(re * Float64(-1.0 - Float64(re * Float64(re * Float64(-0.16666666666666666 + Float64(Float64(re * re) * Float64(0.008333333333333333 + Float64(Float64(re * re) * -0.0001984126984126984))))))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 2.5e+34) tmp = 0.5 * (re * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + ((-0.016666666666666666 + (im * (im * -0.0003968253968253968))) * (im * im))))))); else tmp = im * (re * (-1.0 - (re * (re * (-0.16666666666666666 + ((re * re) * (0.008333333333333333 + ((re * re) * -0.0001984126984126984)))))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 2.5e+34], N[(0.5 * N[(re * N[(im * N[(-2.0 + N[(N[(im * im), $MachinePrecision] * N[(-0.3333333333333333 + N[(N[(-0.016666666666666666 + N[(im * N[(im * -0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(im * N[(re * N[(-1.0 - N[(re * N[(re * N[(-0.16666666666666666 + N[(N[(re * re), $MachinePrecision] * N[(0.008333333333333333 + N[(N[(re * re), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 2.5 \cdot 10^{+34}:\\
\;\;\;\;0.5 \cdot \left(re \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right) \cdot \left(im \cdot im\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;im \cdot \left(re \cdot \left(-1 - re \cdot \left(re \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot \left(0.008333333333333333 + \left(re \cdot re\right) \cdot -0.0001984126984126984\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if re < 2.4999999999999999e34Initial program 67.6%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
remove-double-divN/A
exp-negN/A
rec-expN/A
sinh-undefN/A
sinh-negN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in re around 0
Simplified67.3%
Taylor expanded in im around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/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
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
Simplified63.0%
if 2.4999999999999999e34 < re Initial program 61.6%
Taylor expanded in im around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f6443.7%
Simplified43.7%
Taylor expanded in re around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6434.1%
Simplified34.1%
Final simplification56.9%
(FPCore (re im)
:precision binary64
(if (<= re 2.5e+34)
(*
0.5
(*
re
(*
im
(+
-2.0
(*
(* im im)
(+
-0.3333333333333333
(*
(+ -0.016666666666666666 (* im (* im -0.0003968253968253968)))
(* im im))))))))
(*
(* re (* im im))
(* im (+ -0.16666666666666666 (* (* re re) 0.027777777777777776))))))
double code(double re, double im) {
double tmp;
if (re <= 2.5e+34) {
tmp = 0.5 * (re * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + ((-0.016666666666666666 + (im * (im * -0.0003968253968253968))) * (im * im)))))));
} else {
tmp = (re * (im * im)) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 2.5d+34) then
tmp = 0.5d0 * (re * (im * ((-2.0d0) + ((im * im) * ((-0.3333333333333333d0) + (((-0.016666666666666666d0) + (im * (im * (-0.0003968253968253968d0)))) * (im * im)))))))
else
tmp = (re * (im * im)) * (im * ((-0.16666666666666666d0) + ((re * re) * 0.027777777777777776d0)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 2.5e+34) {
tmp = 0.5 * (re * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + ((-0.016666666666666666 + (im * (im * -0.0003968253968253968))) * (im * im)))))));
} else {
tmp = (re * (im * im)) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 2.5e+34: tmp = 0.5 * (re * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + ((-0.016666666666666666 + (im * (im * -0.0003968253968253968))) * (im * im))))))) else: tmp = (re * (im * im)) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776))) return tmp
function code(re, im) tmp = 0.0 if (re <= 2.5e+34) tmp = Float64(0.5 * Float64(re * Float64(im * Float64(-2.0 + Float64(Float64(im * im) * Float64(-0.3333333333333333 + Float64(Float64(-0.016666666666666666 + Float64(im * Float64(im * -0.0003968253968253968))) * Float64(im * im)))))))); else tmp = Float64(Float64(re * Float64(im * im)) * Float64(im * Float64(-0.16666666666666666 + Float64(Float64(re * re) * 0.027777777777777776)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 2.5e+34) tmp = 0.5 * (re * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + ((-0.016666666666666666 + (im * (im * -0.0003968253968253968))) * (im * im))))))); else tmp = (re * (im * im)) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 2.5e+34], N[(0.5 * N[(re * N[(im * N[(-2.0 + N[(N[(im * im), $MachinePrecision] * N[(-0.3333333333333333 + N[(N[(-0.016666666666666666 + N[(im * N[(im * -0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(re * N[(im * im), $MachinePrecision]), $MachinePrecision] * N[(im * N[(-0.16666666666666666 + N[(N[(re * re), $MachinePrecision] * 0.027777777777777776), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 2.5 \cdot 10^{+34}:\\
\;\;\;\;0.5 \cdot \left(re \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + \left(-0.016666666666666666 + im \cdot \left(im \cdot -0.0003968253968253968\right)\right) \cdot \left(im \cdot im\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(re \cdot \left(im \cdot im\right)\right) \cdot \left(im \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot 0.027777777777777776\right)\right)\\
\end{array}
\end{array}
if re < 2.4999999999999999e34Initial program 67.6%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
remove-double-divN/A
exp-negN/A
rec-expN/A
sinh-undefN/A
sinh-negN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in re around 0
Simplified67.3%
Taylor expanded in im around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/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
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
Simplified63.0%
if 2.4999999999999999e34 < re Initial program 61.6%
Taylor expanded in im around 0
*-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-*.f6489.3%
Simplified89.3%
Taylor expanded in re around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
Simplified6.4%
Taylor expanded in im around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6434.2%
Simplified34.2%
Final simplification56.9%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* re (* im im))))
(if (<= re 2.5e+34)
(*
im
(-
(*
(* im im)
(+
(* re -0.16666666666666666)
(*
t_0
(+ -0.008333333333333333 (* (* im im) -0.0001984126984126984)))))
re))
(*
t_0
(* im (+ -0.16666666666666666 (* (* re re) 0.027777777777777776)))))))
double code(double re, double im) {
double t_0 = re * (im * im);
double tmp;
if (re <= 2.5e+34) {
tmp = im * (((im * im) * ((re * -0.16666666666666666) + (t_0 * (-0.008333333333333333 + ((im * im) * -0.0001984126984126984))))) - re);
} else {
tmp = t_0 * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = re * (im * im)
if (re <= 2.5d+34) then
tmp = im * (((im * im) * ((re * (-0.16666666666666666d0)) + (t_0 * ((-0.008333333333333333d0) + ((im * im) * (-0.0001984126984126984d0)))))) - re)
else
tmp = t_0 * (im * ((-0.16666666666666666d0) + ((re * re) * 0.027777777777777776d0)))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = re * (im * im);
double tmp;
if (re <= 2.5e+34) {
tmp = im * (((im * im) * ((re * -0.16666666666666666) + (t_0 * (-0.008333333333333333 + ((im * im) * -0.0001984126984126984))))) - re);
} else {
tmp = t_0 * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776)));
}
return tmp;
}
def code(re, im): t_0 = re * (im * im) tmp = 0 if re <= 2.5e+34: tmp = im * (((im * im) * ((re * -0.16666666666666666) + (t_0 * (-0.008333333333333333 + ((im * im) * -0.0001984126984126984))))) - re) else: tmp = t_0 * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776))) return tmp
function code(re, im) t_0 = Float64(re * Float64(im * im)) tmp = 0.0 if (re <= 2.5e+34) tmp = Float64(im * Float64(Float64(Float64(im * im) * Float64(Float64(re * -0.16666666666666666) + Float64(t_0 * Float64(-0.008333333333333333 + Float64(Float64(im * im) * -0.0001984126984126984))))) - re)); else tmp = Float64(t_0 * Float64(im * Float64(-0.16666666666666666 + Float64(Float64(re * re) * 0.027777777777777776)))); end return tmp end
function tmp_2 = code(re, im) t_0 = re * (im * im); tmp = 0.0; if (re <= 2.5e+34) tmp = im * (((im * im) * ((re * -0.16666666666666666) + (t_0 * (-0.008333333333333333 + ((im * im) * -0.0001984126984126984))))) - re); else tmp = t_0 * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(re * N[(im * im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, 2.5e+34], N[(im * N[(N[(N[(im * im), $MachinePrecision] * N[(N[(re * -0.16666666666666666), $MachinePrecision] + N[(t$95$0 * N[(-0.008333333333333333 + N[(N[(im * im), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - re), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(im * N[(-0.16666666666666666 + N[(N[(re * re), $MachinePrecision] * 0.027777777777777776), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := re \cdot \left(im \cdot im\right)\\
\mathbf{if}\;re \leq 2.5 \cdot 10^{+34}:\\
\;\;\;\;im \cdot \left(\left(im \cdot im\right) \cdot \left(re \cdot -0.16666666666666666 + t\_0 \cdot \left(-0.008333333333333333 + \left(im \cdot im\right) \cdot -0.0001984126984126984\right)\right) - re\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(im \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot 0.027777777777777776\right)\right)\\
\end{array}
\end{array}
if re < 2.4999999999999999e34Initial program 67.6%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
remove-double-divN/A
exp-negN/A
rec-expN/A
sinh-undefN/A
sinh-negN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in re around 0
Simplified67.3%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
Simplified62.6%
if 2.4999999999999999e34 < re Initial program 61.6%
Taylor expanded in im around 0
*-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-*.f6489.3%
Simplified89.3%
Taylor expanded in re around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
Simplified6.4%
Taylor expanded in im around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6434.2%
Simplified34.2%
Final simplification56.6%
(FPCore (re im)
:precision binary64
(if (<= im 210.0)
(-
(*
(* re im)
(*
(* im im)
(+ -0.16666666666666666 (* (* im im) -0.008333333333333333))))
(* re im))
(*
re
(*
re
(*
(+ -2.0 (* im (* im -0.3333333333333333)))
(* re (* im (+ -0.08333333333333333 (/ 0.5 (* re re))))))))))
double code(double re, double im) {
double tmp;
if (im <= 210.0) {
tmp = ((re * im) * ((im * im) * (-0.16666666666666666 + ((im * im) * -0.008333333333333333)))) - (re * im);
} else {
tmp = re * (re * ((-2.0 + (im * (im * -0.3333333333333333))) * (re * (im * (-0.08333333333333333 + (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 (im <= 210.0d0) then
tmp = ((re * im) * ((im * im) * ((-0.16666666666666666d0) + ((im * im) * (-0.008333333333333333d0))))) - (re * im)
else
tmp = re * (re * (((-2.0d0) + (im * (im * (-0.3333333333333333d0)))) * (re * (im * ((-0.08333333333333333d0) + (0.5d0 / (re * re)))))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (im <= 210.0) {
tmp = ((re * im) * ((im * im) * (-0.16666666666666666 + ((im * im) * -0.008333333333333333)))) - (re * im);
} else {
tmp = re * (re * ((-2.0 + (im * (im * -0.3333333333333333))) * (re * (im * (-0.08333333333333333 + (0.5 / (re * re)))))));
}
return tmp;
}
def code(re, im): tmp = 0 if im <= 210.0: tmp = ((re * im) * ((im * im) * (-0.16666666666666666 + ((im * im) * -0.008333333333333333)))) - (re * im) else: tmp = re * (re * ((-2.0 + (im * (im * -0.3333333333333333))) * (re * (im * (-0.08333333333333333 + (0.5 / (re * re))))))) return tmp
function code(re, im) tmp = 0.0 if (im <= 210.0) tmp = Float64(Float64(Float64(re * im) * Float64(Float64(im * im) * Float64(-0.16666666666666666 + Float64(Float64(im * im) * -0.008333333333333333)))) - Float64(re * im)); else tmp = Float64(re * Float64(re * Float64(Float64(-2.0 + Float64(im * Float64(im * -0.3333333333333333))) * Float64(re * Float64(im * Float64(-0.08333333333333333 + Float64(0.5 / Float64(re * re)))))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (im <= 210.0) tmp = ((re * im) * ((im * im) * (-0.16666666666666666 + ((im * im) * -0.008333333333333333)))) - (re * im); else tmp = re * (re * ((-2.0 + (im * (im * -0.3333333333333333))) * (re * (im * (-0.08333333333333333 + (0.5 / (re * re))))))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[im, 210.0], N[(N[(N[(re * im), $MachinePrecision] * N[(N[(im * im), $MachinePrecision] * N[(-0.16666666666666666 + N[(N[(im * im), $MachinePrecision] * -0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(re * im), $MachinePrecision]), $MachinePrecision], N[(re * N[(re * N[(N[(-2.0 + N[(im * N[(im * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(re * N[(im * N[(-0.08333333333333333 + N[(0.5 / N[(re * re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;im \leq 210:\\
\;\;\;\;\left(re \cdot im\right) \cdot \left(\left(im \cdot im\right) \cdot \left(-0.16666666666666666 + \left(im \cdot im\right) \cdot -0.008333333333333333\right)\right) - re \cdot im\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(re \cdot \left(\left(-2 + im \cdot \left(im \cdot -0.3333333333333333\right)\right) \cdot \left(re \cdot \left(im \cdot \left(-0.08333333333333333 + \frac{0.5}{re \cdot re}\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if im < 210Initial program 54.6%
Taylor expanded in im around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6495.8%
Simplified95.8%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6453.6%
Simplified53.6%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.1%
Simplified51.1%
sub-negN/A
distribute-lft-inN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Applied egg-rr53.1%
if 210 < im Initial program 100.0%
Taylor expanded in im around 0
*-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-*.f6468.4%
Simplified68.4%
Taylor expanded in re around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
Simplified20.4%
Taylor expanded in re around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
Simplified54.9%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr73.1%
Final simplification58.3%
(FPCore (re im)
:precision binary64
(if (<= re 2.5e+34)
(-
(*
(* re 0.5)
(*
im
(*
(* im im)
(+ -0.3333333333333333 (* -0.016666666666666666 (* im im))))))
(* re im))
(*
(* re (* im im))
(* im (+ -0.16666666666666666 (* (* re re) 0.027777777777777776))))))
double code(double re, double im) {
double tmp;
if (re <= 2.5e+34) {
tmp = ((re * 0.5) * (im * ((im * im) * (-0.3333333333333333 + (-0.016666666666666666 * (im * im)))))) - (re * im);
} else {
tmp = (re * (im * im)) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 2.5d+34) then
tmp = ((re * 0.5d0) * (im * ((im * im) * ((-0.3333333333333333d0) + ((-0.016666666666666666d0) * (im * im)))))) - (re * im)
else
tmp = (re * (im * im)) * (im * ((-0.16666666666666666d0) + ((re * re) * 0.027777777777777776d0)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 2.5e+34) {
tmp = ((re * 0.5) * (im * ((im * im) * (-0.3333333333333333 + (-0.016666666666666666 * (im * im)))))) - (re * im);
} else {
tmp = (re * (im * im)) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 2.5e+34: tmp = ((re * 0.5) * (im * ((im * im) * (-0.3333333333333333 + (-0.016666666666666666 * (im * im)))))) - (re * im) else: tmp = (re * (im * im)) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776))) return tmp
function code(re, im) tmp = 0.0 if (re <= 2.5e+34) tmp = Float64(Float64(Float64(re * 0.5) * Float64(im * Float64(Float64(im * im) * Float64(-0.3333333333333333 + Float64(-0.016666666666666666 * Float64(im * im)))))) - Float64(re * im)); else tmp = Float64(Float64(re * Float64(im * im)) * Float64(im * Float64(-0.16666666666666666 + Float64(Float64(re * re) * 0.027777777777777776)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 2.5e+34) tmp = ((re * 0.5) * (im * ((im * im) * (-0.3333333333333333 + (-0.016666666666666666 * (im * im)))))) - (re * im); else tmp = (re * (im * im)) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 2.5e+34], N[(N[(N[(re * 0.5), $MachinePrecision] * N[(im * N[(N[(im * im), $MachinePrecision] * N[(-0.3333333333333333 + N[(-0.016666666666666666 * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(re * im), $MachinePrecision]), $MachinePrecision], N[(N[(re * N[(im * im), $MachinePrecision]), $MachinePrecision] * N[(im * N[(-0.16666666666666666 + N[(N[(re * re), $MachinePrecision] * 0.027777777777777776), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 2.5 \cdot 10^{+34}:\\
\;\;\;\;\left(re \cdot 0.5\right) \cdot \left(im \cdot \left(\left(im \cdot im\right) \cdot \left(-0.3333333333333333 + -0.016666666666666666 \cdot \left(im \cdot im\right)\right)\right)\right) - re \cdot im\\
\mathbf{else}:\\
\;\;\;\;\left(re \cdot \left(im \cdot im\right)\right) \cdot \left(im \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot 0.027777777777777776\right)\right)\\
\end{array}
\end{array}
if re < 2.4999999999999999e34Initial program 67.6%
Taylor expanded in im around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.2%
Simplified93.2%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6462.0%
Simplified62.0%
associate-*r*N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
metadata-evalN/A
neg-mul-1N/A
unsub-negN/A
--lowering--.f64N/A
Applied egg-rr62.1%
if 2.4999999999999999e34 < re Initial program 61.6%
Taylor expanded in im around 0
*-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-*.f6489.3%
Simplified89.3%
Taylor expanded in re around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
Simplified6.4%
Taylor expanded in im around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6434.2%
Simplified34.2%
Final simplification56.2%
(FPCore (re im)
:precision binary64
(if (<= re 2.5e+34)
(*
(* re 0.5)
(*
im
(+
-2.0
(*
(* im im)
(+ -0.3333333333333333 (* im (* im -0.016666666666666666)))))))
(*
(* re (* im im))
(* im (+ -0.16666666666666666 (* (* re re) 0.027777777777777776))))))
double code(double re, double im) {
double tmp;
if (re <= 2.5e+34) {
tmp = (re * 0.5) * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + (im * (im * -0.016666666666666666))))));
} else {
tmp = (re * (im * im)) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 2.5d+34) then
tmp = (re * 0.5d0) * (im * ((-2.0d0) + ((im * im) * ((-0.3333333333333333d0) + (im * (im * (-0.016666666666666666d0)))))))
else
tmp = (re * (im * im)) * (im * ((-0.16666666666666666d0) + ((re * re) * 0.027777777777777776d0)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 2.5e+34) {
tmp = (re * 0.5) * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + (im * (im * -0.016666666666666666))))));
} else {
tmp = (re * (im * im)) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 2.5e+34: tmp = (re * 0.5) * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + (im * (im * -0.016666666666666666)))))) else: tmp = (re * (im * im)) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776))) return tmp
function code(re, im) tmp = 0.0 if (re <= 2.5e+34) tmp = Float64(Float64(re * 0.5) * Float64(im * Float64(-2.0 + Float64(Float64(im * im) * Float64(-0.3333333333333333 + Float64(im * Float64(im * -0.016666666666666666))))))); else tmp = Float64(Float64(re * Float64(im * im)) * Float64(im * Float64(-0.16666666666666666 + Float64(Float64(re * re) * 0.027777777777777776)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 2.5e+34) tmp = (re * 0.5) * (im * (-2.0 + ((im * im) * (-0.3333333333333333 + (im * (im * -0.016666666666666666)))))); else tmp = (re * (im * im)) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 2.5e+34], N[(N[(re * 0.5), $MachinePrecision] * N[(im * N[(-2.0 + N[(N[(im * im), $MachinePrecision] * N[(-0.3333333333333333 + N[(im * N[(im * -0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(re * N[(im * im), $MachinePrecision]), $MachinePrecision] * N[(im * N[(-0.16666666666666666 + N[(N[(re * re), $MachinePrecision] * 0.027777777777777776), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 2.5 \cdot 10^{+34}:\\
\;\;\;\;\left(re \cdot 0.5\right) \cdot \left(im \cdot \left(-2 + \left(im \cdot im\right) \cdot \left(-0.3333333333333333 + im \cdot \left(im \cdot -0.016666666666666666\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(re \cdot \left(im \cdot im\right)\right) \cdot \left(im \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot 0.027777777777777776\right)\right)\\
\end{array}
\end{array}
if re < 2.4999999999999999e34Initial program 67.6%
Taylor expanded in im around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.2%
Simplified93.2%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6462.0%
Simplified62.0%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6462.0%
Applied egg-rr62.0%
if 2.4999999999999999e34 < re Initial program 61.6%
Taylor expanded in im around 0
*-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-*.f6489.3%
Simplified89.3%
Taylor expanded in re around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
Simplified6.4%
Taylor expanded in im around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6434.2%
Simplified34.2%
Final simplification56.2%
(FPCore (re im)
:precision binary64
(if (<= re 2.5e+34)
(*
im
(*
re
(+
-1.0
(*
(* im im)
(+ -0.16666666666666666 (* (* im im) -0.008333333333333333))))))
(*
(* re (* im im))
(* im (+ -0.16666666666666666 (* (* re re) 0.027777777777777776))))))
double code(double re, double im) {
double tmp;
if (re <= 2.5e+34) {
tmp = im * (re * (-1.0 + ((im * im) * (-0.16666666666666666 + ((im * im) * -0.008333333333333333)))));
} else {
tmp = (re * (im * im)) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 2.5d+34) then
tmp = im * (re * ((-1.0d0) + ((im * im) * ((-0.16666666666666666d0) + ((im * im) * (-0.008333333333333333d0))))))
else
tmp = (re * (im * im)) * (im * ((-0.16666666666666666d0) + ((re * re) * 0.027777777777777776d0)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 2.5e+34) {
tmp = im * (re * (-1.0 + ((im * im) * (-0.16666666666666666 + ((im * im) * -0.008333333333333333)))));
} else {
tmp = (re * (im * im)) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 2.5e+34: tmp = im * (re * (-1.0 + ((im * im) * (-0.16666666666666666 + ((im * im) * -0.008333333333333333))))) else: tmp = (re * (im * im)) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776))) return tmp
function code(re, im) tmp = 0.0 if (re <= 2.5e+34) tmp = Float64(im * Float64(re * Float64(-1.0 + Float64(Float64(im * im) * Float64(-0.16666666666666666 + Float64(Float64(im * im) * -0.008333333333333333)))))); else tmp = Float64(Float64(re * Float64(im * im)) * Float64(im * Float64(-0.16666666666666666 + Float64(Float64(re * re) * 0.027777777777777776)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 2.5e+34) tmp = im * (re * (-1.0 + ((im * im) * (-0.16666666666666666 + ((im * im) * -0.008333333333333333))))); else tmp = (re * (im * im)) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 2.5e+34], N[(im * N[(re * N[(-1.0 + N[(N[(im * im), $MachinePrecision] * N[(-0.16666666666666666 + N[(N[(im * im), $MachinePrecision] * -0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(re * N[(im * im), $MachinePrecision]), $MachinePrecision] * N[(im * N[(-0.16666666666666666 + N[(N[(re * re), $MachinePrecision] * 0.027777777777777776), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 2.5 \cdot 10^{+34}:\\
\;\;\;\;im \cdot \left(re \cdot \left(-1 + \left(im \cdot im\right) \cdot \left(-0.16666666666666666 + \left(im \cdot im\right) \cdot -0.008333333333333333\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(re \cdot \left(im \cdot im\right)\right) \cdot \left(im \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot 0.027777777777777776\right)\right)\\
\end{array}
\end{array}
if re < 2.4999999999999999e34Initial program 67.6%
Taylor expanded in im around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.2%
Simplified93.2%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6462.0%
Simplified62.0%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.4%
Simplified58.4%
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
neg-mul-1N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6461.6%
Applied egg-rr61.6%
if 2.4999999999999999e34 < re Initial program 61.6%
Taylor expanded in im around 0
*-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-*.f6489.3%
Simplified89.3%
Taylor expanded in re around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
Simplified6.4%
Taylor expanded in im around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6434.2%
Simplified34.2%
Final simplification55.8%
(FPCore (re im)
:precision binary64
(if (<= re 2.5e+34)
(*
im
(-
(*
(* im im)
(* re (+ -0.16666666666666666 (* im (* im -0.008333333333333333)))))
re))
(*
(* re (* im im))
(* im (+ -0.16666666666666666 (* (* re re) 0.027777777777777776))))))
double code(double re, double im) {
double tmp;
if (re <= 2.5e+34) {
tmp = im * (((im * im) * (re * (-0.16666666666666666 + (im * (im * -0.008333333333333333))))) - re);
} else {
tmp = (re * (im * im)) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 2.5d+34) then
tmp = im * (((im * im) * (re * ((-0.16666666666666666d0) + (im * (im * (-0.008333333333333333d0)))))) - re)
else
tmp = (re * (im * im)) * (im * ((-0.16666666666666666d0) + ((re * re) * 0.027777777777777776d0)))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 2.5e+34) {
tmp = im * (((im * im) * (re * (-0.16666666666666666 + (im * (im * -0.008333333333333333))))) - re);
} else {
tmp = (re * (im * im)) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776)));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 2.5e+34: tmp = im * (((im * im) * (re * (-0.16666666666666666 + (im * (im * -0.008333333333333333))))) - re) else: tmp = (re * (im * im)) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776))) return tmp
function code(re, im) tmp = 0.0 if (re <= 2.5e+34) tmp = Float64(im * Float64(Float64(Float64(im * im) * Float64(re * Float64(-0.16666666666666666 + Float64(im * Float64(im * -0.008333333333333333))))) - re)); else tmp = Float64(Float64(re * Float64(im * im)) * Float64(im * Float64(-0.16666666666666666 + Float64(Float64(re * re) * 0.027777777777777776)))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 2.5e+34) tmp = im * (((im * im) * (re * (-0.16666666666666666 + (im * (im * -0.008333333333333333))))) - re); else tmp = (re * (im * im)) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 2.5e+34], N[(im * N[(N[(N[(im * im), $MachinePrecision] * N[(re * N[(-0.16666666666666666 + N[(im * N[(im * -0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - re), $MachinePrecision]), $MachinePrecision], N[(N[(re * N[(im * im), $MachinePrecision]), $MachinePrecision] * N[(im * N[(-0.16666666666666666 + N[(N[(re * re), $MachinePrecision] * 0.027777777777777776), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 2.5 \cdot 10^{+34}:\\
\;\;\;\;im \cdot \left(\left(im \cdot im\right) \cdot \left(re \cdot \left(-0.16666666666666666 + im \cdot \left(im \cdot -0.008333333333333333\right)\right)\right) - re\right)\\
\mathbf{else}:\\
\;\;\;\;\left(re \cdot \left(im \cdot im\right)\right) \cdot \left(im \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot 0.027777777777777776\right)\right)\\
\end{array}
\end{array}
if re < 2.4999999999999999e34Initial program 67.6%
Taylor expanded in im around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.2%
Simplified93.2%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6462.0%
Simplified62.0%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.4%
Simplified58.4%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6458.4%
Applied egg-rr58.4%
if 2.4999999999999999e34 < re Initial program 61.6%
Taylor expanded in im around 0
*-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-*.f6489.3%
Simplified89.3%
Taylor expanded in re around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
Simplified6.4%
Taylor expanded in im around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6434.2%
Simplified34.2%
Final simplification53.3%
(FPCore (re im)
:precision binary64
(let* ((t_0 (* re (* im im))))
(if (<= re 2.5e+34)
(* im (- (* (* im im) (* -0.008333333333333333 t_0)) re))
(*
t_0
(* im (+ -0.16666666666666666 (* (* re re) 0.027777777777777776)))))))
double code(double re, double im) {
double t_0 = re * (im * im);
double tmp;
if (re <= 2.5e+34) {
tmp = im * (((im * im) * (-0.008333333333333333 * t_0)) - re);
} else {
tmp = t_0 * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776)));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: t_0
real(8) :: tmp
t_0 = re * (im * im)
if (re <= 2.5d+34) then
tmp = im * (((im * im) * ((-0.008333333333333333d0) * t_0)) - re)
else
tmp = t_0 * (im * ((-0.16666666666666666d0) + ((re * re) * 0.027777777777777776d0)))
end if
code = tmp
end function
public static double code(double re, double im) {
double t_0 = re * (im * im);
double tmp;
if (re <= 2.5e+34) {
tmp = im * (((im * im) * (-0.008333333333333333 * t_0)) - re);
} else {
tmp = t_0 * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776)));
}
return tmp;
}
def code(re, im): t_0 = re * (im * im) tmp = 0 if re <= 2.5e+34: tmp = im * (((im * im) * (-0.008333333333333333 * t_0)) - re) else: tmp = t_0 * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776))) return tmp
function code(re, im) t_0 = Float64(re * Float64(im * im)) tmp = 0.0 if (re <= 2.5e+34) tmp = Float64(im * Float64(Float64(Float64(im * im) * Float64(-0.008333333333333333 * t_0)) - re)); else tmp = Float64(t_0 * Float64(im * Float64(-0.16666666666666666 + Float64(Float64(re * re) * 0.027777777777777776)))); end return tmp end
function tmp_2 = code(re, im) t_0 = re * (im * im); tmp = 0.0; if (re <= 2.5e+34) tmp = im * (((im * im) * (-0.008333333333333333 * t_0)) - re); else tmp = t_0 * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776))); end tmp_2 = tmp; end
code[re_, im_] := Block[{t$95$0 = N[(re * N[(im * im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[re, 2.5e+34], N[(im * N[(N[(N[(im * im), $MachinePrecision] * N[(-0.008333333333333333 * t$95$0), $MachinePrecision]), $MachinePrecision] - re), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(im * N[(-0.16666666666666666 + N[(N[(re * re), $MachinePrecision] * 0.027777777777777776), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := re \cdot \left(im \cdot im\right)\\
\mathbf{if}\;re \leq 2.5 \cdot 10^{+34}:\\
\;\;\;\;im \cdot \left(\left(im \cdot im\right) \cdot \left(-0.008333333333333333 \cdot t\_0\right) - re\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(im \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot 0.027777777777777776\right)\right)\\
\end{array}
\end{array}
if re < 2.4999999999999999e34Initial program 67.6%
Taylor expanded in im around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.2%
Simplified93.2%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6462.0%
Simplified62.0%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.4%
Simplified58.4%
Taylor expanded in im around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.1%
Simplified58.1%
if 2.4999999999999999e34 < re Initial program 61.6%
Taylor expanded in im around 0
*-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-*.f6489.3%
Simplified89.3%
Taylor expanded in re around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
Simplified6.4%
Taylor expanded in im around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6434.2%
Simplified34.2%
Final simplification53.0%
(FPCore (re im)
:precision binary64
(if (<= re 2.5e+34)
(* im (- (* (* im im) (* -0.008333333333333333 (* re (* im im)))) re))
(*
re
(*
(* im im)
(* im (+ -0.16666666666666666 (* (* re re) 0.027777777777777776)))))))
double code(double re, double im) {
double tmp;
if (re <= 2.5e+34) {
tmp = im * (((im * im) * (-0.008333333333333333 * (re * (im * im)))) - re);
} else {
tmp = re * ((im * im) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776))));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 2.5d+34) then
tmp = im * (((im * im) * ((-0.008333333333333333d0) * (re * (im * im)))) - re)
else
tmp = re * ((im * im) * (im * ((-0.16666666666666666d0) + ((re * re) * 0.027777777777777776d0))))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 2.5e+34) {
tmp = im * (((im * im) * (-0.008333333333333333 * (re * (im * im)))) - re);
} else {
tmp = re * ((im * im) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776))));
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 2.5e+34: tmp = im * (((im * im) * (-0.008333333333333333 * (re * (im * im)))) - re) else: tmp = re * ((im * im) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776)))) return tmp
function code(re, im) tmp = 0.0 if (re <= 2.5e+34) tmp = Float64(im * Float64(Float64(Float64(im * im) * Float64(-0.008333333333333333 * Float64(re * Float64(im * im)))) - re)); else tmp = Float64(re * Float64(Float64(im * im) * Float64(im * Float64(-0.16666666666666666 + Float64(Float64(re * re) * 0.027777777777777776))))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 2.5e+34) tmp = im * (((im * im) * (-0.008333333333333333 * (re * (im * im)))) - re); else tmp = re * ((im * im) * (im * (-0.16666666666666666 + ((re * re) * 0.027777777777777776)))); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 2.5e+34], N[(im * N[(N[(N[(im * im), $MachinePrecision] * N[(-0.008333333333333333 * N[(re * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - re), $MachinePrecision]), $MachinePrecision], N[(re * N[(N[(im * im), $MachinePrecision] * N[(im * N[(-0.16666666666666666 + N[(N[(re * re), $MachinePrecision] * 0.027777777777777776), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 2.5 \cdot 10^{+34}:\\
\;\;\;\;im \cdot \left(\left(im \cdot im\right) \cdot \left(-0.008333333333333333 \cdot \left(re \cdot \left(im \cdot im\right)\right)\right) - re\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(\left(im \cdot im\right) \cdot \left(im \cdot \left(-0.16666666666666666 + \left(re \cdot re\right) \cdot 0.027777777777777776\right)\right)\right)\\
\end{array}
\end{array}
if re < 2.4999999999999999e34Initial program 67.6%
Taylor expanded in im around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.2%
Simplified93.2%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6462.0%
Simplified62.0%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.4%
Simplified58.4%
Taylor expanded in im around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.1%
Simplified58.1%
if 2.4999999999999999e34 < re Initial program 61.6%
Taylor expanded in im around 0
*-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-*.f6489.3%
Simplified89.3%
Taylor expanded in re around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
Simplified6.4%
Taylor expanded in im around inf
unpow3N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6434.2%
Simplified34.2%
(FPCore (re im) :precision binary64 (if (<= re 5.3e+40) (* im (- (* (* im im) (* -0.008333333333333333 (* re (* im im)))) re)) (* re (- (* im (* (* re re) 0.16666666666666666)) im))))
double code(double re, double im) {
double tmp;
if (re <= 5.3e+40) {
tmp = im * (((im * im) * (-0.008333333333333333 * (re * (im * im)))) - re);
} else {
tmp = re * ((im * ((re * re) * 0.16666666666666666)) - im);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 5.3d+40) then
tmp = im * (((im * im) * ((-0.008333333333333333d0) * (re * (im * im)))) - re)
else
tmp = re * ((im * ((re * re) * 0.16666666666666666d0)) - im)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 5.3e+40) {
tmp = im * (((im * im) * (-0.008333333333333333 * (re * (im * im)))) - re);
} else {
tmp = re * ((im * ((re * re) * 0.16666666666666666)) - im);
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 5.3e+40: tmp = im * (((im * im) * (-0.008333333333333333 * (re * (im * im)))) - re) else: tmp = re * ((im * ((re * re) * 0.16666666666666666)) - im) return tmp
function code(re, im) tmp = 0.0 if (re <= 5.3e+40) tmp = Float64(im * Float64(Float64(Float64(im * im) * Float64(-0.008333333333333333 * Float64(re * Float64(im * im)))) - re)); else tmp = Float64(re * Float64(Float64(im * Float64(Float64(re * re) * 0.16666666666666666)) - im)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 5.3e+40) tmp = im * (((im * im) * (-0.008333333333333333 * (re * (im * im)))) - re); else tmp = re * ((im * ((re * re) * 0.16666666666666666)) - im); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 5.3e+40], N[(im * N[(N[(N[(im * im), $MachinePrecision] * N[(-0.008333333333333333 * N[(re * N[(im * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - re), $MachinePrecision]), $MachinePrecision], N[(re * N[(N[(im * N[(N[(re * re), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] - im), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 5.3 \cdot 10^{+40}:\\
\;\;\;\;im \cdot \left(\left(im \cdot im\right) \cdot \left(-0.008333333333333333 \cdot \left(re \cdot \left(im \cdot im\right)\right)\right) - re\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(im \cdot \left(\left(re \cdot re\right) \cdot 0.16666666666666666\right) - im\right)\\
\end{array}
\end{array}
if re < 5.3e40Initial program 67.9%
Taylor expanded in im around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.3%
Simplified93.3%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6461.9%
Simplified61.9%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.3%
Simplified58.3%
Taylor expanded in im around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.0%
Simplified58.0%
if 5.3e40 < re Initial program 60.1%
Taylor expanded in im around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f6445.2%
Simplified45.2%
Taylor expanded in re around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6433.6%
Simplified33.6%
(FPCore (re im) :precision binary64 (if (<= re 5.3e+40) (* re (* im (+ -1.0 (* (* im im) -0.16666666666666666)))) (* re (- (* im (* (* re re) 0.16666666666666666)) im))))
double code(double re, double im) {
double tmp;
if (re <= 5.3e+40) {
tmp = re * (im * (-1.0 + ((im * im) * -0.16666666666666666)));
} else {
tmp = re * ((im * ((re * re) * 0.16666666666666666)) - im);
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (re <= 5.3d+40) then
tmp = re * (im * ((-1.0d0) + ((im * im) * (-0.16666666666666666d0))))
else
tmp = re * ((im * ((re * re) * 0.16666666666666666d0)) - im)
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (re <= 5.3e+40) {
tmp = re * (im * (-1.0 + ((im * im) * -0.16666666666666666)));
} else {
tmp = re * ((im * ((re * re) * 0.16666666666666666)) - im);
}
return tmp;
}
def code(re, im): tmp = 0 if re <= 5.3e+40: tmp = re * (im * (-1.0 + ((im * im) * -0.16666666666666666))) else: tmp = re * ((im * ((re * re) * 0.16666666666666666)) - im) return tmp
function code(re, im) tmp = 0.0 if (re <= 5.3e+40) tmp = Float64(re * Float64(im * Float64(-1.0 + Float64(Float64(im * im) * -0.16666666666666666)))); else tmp = Float64(re * Float64(Float64(im * Float64(Float64(re * re) * 0.16666666666666666)) - im)); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (re <= 5.3e+40) tmp = re * (im * (-1.0 + ((im * im) * -0.16666666666666666))); else tmp = re * ((im * ((re * re) * 0.16666666666666666)) - im); end tmp_2 = tmp; end
code[re_, im_] := If[LessEqual[re, 5.3e+40], N[(re * N[(im * N[(-1.0 + N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(re * N[(N[(im * N[(N[(re * re), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] - im), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;re \leq 5.3 \cdot 10^{+40}:\\
\;\;\;\;re \cdot \left(im \cdot \left(-1 + \left(im \cdot im\right) \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;re \cdot \left(im \cdot \left(\left(re \cdot re\right) \cdot 0.16666666666666666\right) - im\right)\\
\end{array}
\end{array}
if re < 5.3e40Initial program 67.9%
Taylor expanded in im around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.3%
Simplified93.3%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6461.9%
Simplified61.9%
Taylor expanded in im around 0
Simplified57.7%
if 5.3e40 < re Initial program 60.1%
Taylor expanded in im around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f6445.2%
Simplified45.2%
Taylor expanded in re around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6433.6%
Simplified33.6%
(FPCore (re im) :precision binary64 (* re (* im (+ -1.0 (* (* im im) -0.16666666666666666)))))
double code(double re, double im) {
return re * (im * (-1.0 + ((im * im) * -0.16666666666666666)));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = re * (im * ((-1.0d0) + ((im * im) * (-0.16666666666666666d0))))
end function
public static double code(double re, double im) {
return re * (im * (-1.0 + ((im * im) * -0.16666666666666666)));
}
def code(re, im): return re * (im * (-1.0 + ((im * im) * -0.16666666666666666)))
function code(re, im) return Float64(re * Float64(im * Float64(-1.0 + Float64(Float64(im * im) * -0.16666666666666666)))) end
function tmp = code(re, im) tmp = re * (im * (-1.0 + ((im * im) * -0.16666666666666666))); end
code[re_, im_] := N[(re * N[(im * N[(-1.0 + N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
re \cdot \left(im \cdot \left(-1 + \left(im \cdot im\right) \cdot -0.16666666666666666\right)\right)
\end{array}
Initial program 66.3%
Taylor expanded in im around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.5%
Simplified93.5%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6454.3%
Simplified54.3%
Taylor expanded in im around 0
Simplified50.9%
(FPCore (re im) :precision binary64 (* im (* re (+ -1.0 (* (* im im) -0.16666666666666666)))))
double code(double re, double im) {
return im * (re * (-1.0 + ((im * im) * -0.16666666666666666)));
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = im * (re * ((-1.0d0) + ((im * im) * (-0.16666666666666666d0))))
end function
public static double code(double re, double im) {
return im * (re * (-1.0 + ((im * im) * -0.16666666666666666)));
}
def code(re, im): return im * (re * (-1.0 + ((im * im) * -0.16666666666666666)))
function code(re, im) return Float64(im * Float64(re * Float64(-1.0 + Float64(Float64(im * im) * -0.16666666666666666)))) end
function tmp = code(re, im) tmp = im * (re * (-1.0 + ((im * im) * -0.16666666666666666))); end
code[re_, im_] := N[(im * N[(re * N[(-1.0 + N[(N[(im * im), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
im \cdot \left(re \cdot \left(-1 + \left(im \cdot im\right) \cdot -0.16666666666666666\right)\right)
\end{array}
Initial program 66.3%
Taylor expanded in im around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.5%
Simplified93.5%
Taylor expanded in re around 0
*-commutativeN/A
*-lowering-*.f6454.3%
Simplified54.3%
Taylor expanded in im around 0
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.5%
Simplified51.5%
Taylor expanded in im around 0
*-lowering-*.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6446.9%
Simplified46.9%
Final simplification46.9%
(FPCore (re im) :precision binary64 (* re (- 0.0 im)))
double code(double re, double im) {
return re * (0.0 - im);
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = re * (0.0d0 - im)
end function
public static double code(double re, double im) {
return re * (0.0 - im);
}
def code(re, im): return re * (0.0 - im)
function code(re, im) return Float64(re * Float64(0.0 - im)) end
function tmp = code(re, im) tmp = re * (0.0 - im); end
code[re_, im_] := N[(re * N[(0.0 - im), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
re \cdot \left(0 - im\right)
\end{array}
Initial program 66.3%
Taylor expanded in im around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f6449.8%
Simplified49.8%
Taylor expanded in re around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6431.1%
Simplified31.1%
sub0-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6431.1%
Applied egg-rr31.1%
Final simplification31.1%
(FPCore (re im)
:precision binary64
(if (< (fabs im) 1.0)
(-
(*
(sin re)
(+
(+ im (* (* (* 0.16666666666666666 im) im) im))
(* (* (* (* (* 0.008333333333333333 im) im) im) im) im))))
(* (* 0.5 (sin re)) (- (exp (- im)) (exp im)))))
double code(double re, double im) {
double tmp;
if (fabs(im) < 1.0) {
tmp = -(sin(re) * ((im + (((0.16666666666666666 * im) * im) * im)) + (((((0.008333333333333333 * im) * im) * im) * im) * im)));
} else {
tmp = (0.5 * sin(re)) * (exp(-im) - exp(im));
}
return tmp;
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
real(8) :: tmp
if (abs(im) < 1.0d0) then
tmp = -(sin(re) * ((im + (((0.16666666666666666d0 * im) * im) * im)) + (((((0.008333333333333333d0 * im) * im) * im) * im) * im)))
else
tmp = (0.5d0 * sin(re)) * (exp(-im) - exp(im))
end if
code = tmp
end function
public static double code(double re, double im) {
double tmp;
if (Math.abs(im) < 1.0) {
tmp = -(Math.sin(re) * ((im + (((0.16666666666666666 * im) * im) * im)) + (((((0.008333333333333333 * im) * im) * im) * im) * im)));
} else {
tmp = (0.5 * Math.sin(re)) * (Math.exp(-im) - Math.exp(im));
}
return tmp;
}
def code(re, im): tmp = 0 if math.fabs(im) < 1.0: tmp = -(math.sin(re) * ((im + (((0.16666666666666666 * im) * im) * im)) + (((((0.008333333333333333 * im) * im) * im) * im) * im))) else: tmp = (0.5 * math.sin(re)) * (math.exp(-im) - math.exp(im)) return tmp
function code(re, im) tmp = 0.0 if (abs(im) < 1.0) tmp = Float64(-Float64(sin(re) * Float64(Float64(im + Float64(Float64(Float64(0.16666666666666666 * im) * im) * im)) + Float64(Float64(Float64(Float64(Float64(0.008333333333333333 * im) * im) * im) * im) * im)))); else tmp = Float64(Float64(0.5 * sin(re)) * Float64(exp(Float64(-im)) - exp(im))); end return tmp end
function tmp_2 = code(re, im) tmp = 0.0; if (abs(im) < 1.0) tmp = -(sin(re) * ((im + (((0.16666666666666666 * im) * im) * im)) + (((((0.008333333333333333 * im) * im) * im) * im) * im))); else tmp = (0.5 * sin(re)) * (exp(-im) - exp(im)); end tmp_2 = tmp; end
code[re_, im_] := If[Less[N[Abs[im], $MachinePrecision], 1.0], (-N[(N[Sin[re], $MachinePrecision] * N[(N[(im + N[(N[(N[(0.16666666666666666 * im), $MachinePrecision] * im), $MachinePrecision] * im), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(N[(0.008333333333333333 * im), $MachinePrecision] * im), $MachinePrecision] * im), $MachinePrecision] * im), $MachinePrecision] * im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), N[(N[(0.5 * N[Sin[re], $MachinePrecision]), $MachinePrecision] * N[(N[Exp[(-im)], $MachinePrecision] - N[Exp[im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left|im\right| < 1:\\
\;\;\;\;-\sin re \cdot \left(\left(im + \left(\left(0.16666666666666666 \cdot im\right) \cdot im\right) \cdot im\right) + \left(\left(\left(\left(0.008333333333333333 \cdot im\right) \cdot im\right) \cdot im\right) \cdot im\right) \cdot im\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} - e^{im}\right)\\
\end{array}
\end{array}
herbie shell --seed 2024164
(FPCore (re im)
:name "math.cos on complex, imaginary part"
:precision binary64
:alt
(! :herbie-platform default (if (< (fabs im) 1) (- (* (sin re) (+ im (* 1/6 im im im) (* 1/120 im im im im im)))) (* (* 1/2 (sin re)) (- (exp (- im)) (exp im)))))
(* (* 0.5 (sin re)) (- (exp (- im)) (exp im))))