
(FPCore (x.re x.im) :precision binary64 (+ (* (- (* x.re x.re) (* x.im x.im)) x.im) (* (+ (* x.re x.im) (* x.im x.re)) x.re)))
double code(double x_46_re, double x_46_im) {
return (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re);
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
code = (((x_46re * x_46re) - (x_46im * x_46im)) * x_46im) + (((x_46re * x_46im) + (x_46im * x_46re)) * x_46re)
end function
public static double code(double x_46_re, double x_46_im) {
return (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re);
}
def code(x_46_re, x_46_im): return (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re)
function code(x_46_re, x_46_im) return Float64(Float64(Float64(Float64(x_46_re * x_46_re) - Float64(x_46_im * x_46_im)) * x_46_im) + Float64(Float64(Float64(x_46_re * x_46_im) + Float64(x_46_im * x_46_re)) * x_46_re)) end
function tmp = code(x_46_re, x_46_im) tmp = (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re); end
code[x$46$re_, x$46$im_] := N[(N[(N[(N[(x$46$re * x$46$re), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] * x$46$im), $MachinePrecision] + N[(N[(N[(x$46$re * x$46$im), $MachinePrecision] + N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] * x$46$re), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \left(x.re \cdot x.im + x.im \cdot x.re\right) \cdot x.re
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im) :precision binary64 (+ (* (- (* x.re x.re) (* x.im x.im)) x.im) (* (+ (* x.re x.im) (* x.im x.re)) x.re)))
double code(double x_46_re, double x_46_im) {
return (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re);
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
code = (((x_46re * x_46re) - (x_46im * x_46im)) * x_46im) + (((x_46re * x_46im) + (x_46im * x_46re)) * x_46re)
end function
public static double code(double x_46_re, double x_46_im) {
return (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re);
}
def code(x_46_re, x_46_im): return (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re)
function code(x_46_re, x_46_im) return Float64(Float64(Float64(Float64(x_46_re * x_46_re) - Float64(x_46_im * x_46_im)) * x_46_im) + Float64(Float64(Float64(x_46_re * x_46_im) + Float64(x_46_im * x_46_re)) * x_46_re)) end
function tmp = code(x_46_re, x_46_im) tmp = (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re); end
code[x$46$re_, x$46$im_] := N[(N[(N[(N[(x$46$re * x$46$re), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] * x$46$im), $MachinePrecision] + N[(N[(N[(x$46$re * x$46$im), $MachinePrecision] + N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] * x$46$re), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \left(x.re \cdot x.im + x.im \cdot x.re\right) \cdot x.re
\end{array}
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -3.4e+103) (not (<= x.im 2e+87))) (+ (+ x.im x.im) (* (+ x.im x.re) (* x.im (- x.re x.im)))) (fma (* x.re (* x.im x.re)) 3.0 (- (pow x.im 3.0)))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -3.4e+103) || !(x_46_im <= 2e+87)) {
tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im)));
} else {
tmp = fma((x_46_re * (x_46_im * x_46_re)), 3.0, -pow(x_46_im, 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -3.4e+103) || !(x_46_im <= 2e+87)) tmp = Float64(Float64(x_46_im + x_46_im) + Float64(Float64(x_46_im + x_46_re) * Float64(x_46_im * Float64(x_46_re - x_46_im)))); else tmp = fma(Float64(x_46_re * Float64(x_46_im * x_46_re)), 3.0, Float64(-(x_46_im ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -3.4e+103], N[Not[LessEqual[x$46$im, 2e+87]], $MachinePrecision]], N[(N[(x$46$im + x$46$im), $MachinePrecision] + N[(N[(x$46$im + x$46$re), $MachinePrecision] * N[(x$46$im * N[(x$46$re - x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] * 3.0 + (-N[Power[x$46$im, 3.0], $MachinePrecision])), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -3.4 \cdot 10^{+103} \lor \neg \left(x.im \leq 2 \cdot 10^{+87}\right):\\
\;\;\;\;\left(x.im + x.im\right) + \left(x.im + x.re\right) \cdot \left(x.im \cdot \left(x.re - x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x.re \cdot \left(x.im \cdot x.re\right), 3, -{x.im}^{3}\right)\\
\end{array}
\end{array}
if x.im < -3.3999999999999998e103 or 1.9999999999999999e87 < x.im Initial program 71.8%
+-commutative71.8%
*-commutative71.8%
fma-def76.5%
*-commutative76.5%
distribute-rgt-out76.5%
*-commutative76.5%
Simplified76.5%
*-commutative76.5%
fma-def71.8%
distribute-lft-in71.8%
flip-+0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
metadata-eval0.0%
associate-*r/0.0%
metadata-eval0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
flip-+83.5%
difference-of-squares100.0%
associate-*l*100.0%
Applied egg-rr100.0%
if -3.3999999999999998e103 < x.im < 1.9999999999999999e87Initial program 88.9%
+-commutative88.9%
*-commutative88.9%
sub-neg88.9%
distribute-lft-in88.9%
associate-+r+88.9%
distribute-rgt-neg-out88.9%
unsub-neg88.9%
associate-*r*99.7%
distribute-rgt-out99.7%
*-commutative99.7%
count-299.7%
distribute-lft1-in99.7%
metadata-eval99.7%
*-commutative99.7%
*-commutative99.7%
associate-*r*99.7%
cube-unmult99.8%
Simplified99.8%
associate-*r*99.8%
associate-*l*99.8%
fma-neg99.8%
Applied egg-rr99.8%
Final simplification99.9%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -3.4e+103) (not (<= x.im 2e+87))) (+ (+ x.im x.im) (* (+ x.im x.re) (* x.im (- x.re x.im)))) (- (* x.re (* (* x.im x.re) 3.0)) (pow x.im 3.0))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -3.4e+103) || !(x_46_im <= 2e+87)) {
tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im)));
} else {
tmp = (x_46_re * ((x_46_im * x_46_re) * 3.0)) - pow(x_46_im, 3.0);
}
return tmp;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8) :: tmp
if ((x_46im <= (-3.4d+103)) .or. (.not. (x_46im <= 2d+87))) then
tmp = (x_46im + x_46im) + ((x_46im + x_46re) * (x_46im * (x_46re - x_46im)))
else
tmp = (x_46re * ((x_46im * x_46re) * 3.0d0)) - (x_46im ** 3.0d0)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -3.4e+103) || !(x_46_im <= 2e+87)) {
tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im)));
} else {
tmp = (x_46_re * ((x_46_im * x_46_re) * 3.0)) - Math.pow(x_46_im, 3.0);
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_im <= -3.4e+103) or not (x_46_im <= 2e+87): tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im))) else: tmp = (x_46_re * ((x_46_im * x_46_re) * 3.0)) - math.pow(x_46_im, 3.0) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -3.4e+103) || !(x_46_im <= 2e+87)) tmp = Float64(Float64(x_46_im + x_46_im) + Float64(Float64(x_46_im + x_46_re) * Float64(x_46_im * Float64(x_46_re - x_46_im)))); else tmp = Float64(Float64(x_46_re * Float64(Float64(x_46_im * x_46_re) * 3.0)) - (x_46_im ^ 3.0)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if ((x_46_im <= -3.4e+103) || ~((x_46_im <= 2e+87))) tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im))); else tmp = (x_46_re * ((x_46_im * x_46_re) * 3.0)) - (x_46_im ^ 3.0); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -3.4e+103], N[Not[LessEqual[x$46$im, 2e+87]], $MachinePrecision]], N[(N[(x$46$im + x$46$im), $MachinePrecision] + N[(N[(x$46$im + x$46$re), $MachinePrecision] * N[(x$46$im * N[(x$46$re - x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * N[(N[(x$46$im * x$46$re), $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision] - N[Power[x$46$im, 3.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -3.4 \cdot 10^{+103} \lor \neg \left(x.im \leq 2 \cdot 10^{+87}\right):\\
\;\;\;\;\left(x.im + x.im\right) + \left(x.im + x.re\right) \cdot \left(x.im \cdot \left(x.re - x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.re \cdot \left(\left(x.im \cdot x.re\right) \cdot 3\right) - {x.im}^{3}\\
\end{array}
\end{array}
if x.im < -3.3999999999999998e103 or 1.9999999999999999e87 < x.im Initial program 71.8%
+-commutative71.8%
*-commutative71.8%
fma-def76.5%
*-commutative76.5%
distribute-rgt-out76.5%
*-commutative76.5%
Simplified76.5%
*-commutative76.5%
fma-def71.8%
distribute-lft-in71.8%
flip-+0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
metadata-eval0.0%
associate-*r/0.0%
metadata-eval0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
flip-+83.5%
difference-of-squares100.0%
associate-*l*100.0%
Applied egg-rr100.0%
if -3.3999999999999998e103 < x.im < 1.9999999999999999e87Initial program 88.9%
+-commutative88.9%
*-commutative88.9%
sub-neg88.9%
distribute-lft-in88.9%
associate-+r+88.9%
distribute-rgt-neg-out88.9%
unsub-neg88.9%
associate-*r*99.7%
distribute-rgt-out99.7%
*-commutative99.7%
count-299.7%
distribute-lft1-in99.7%
metadata-eval99.7%
*-commutative99.7%
*-commutative99.7%
associate-*r*99.7%
cube-unmult99.8%
Simplified99.8%
Taylor expanded in x.re around 0 99.8%
Final simplification99.8%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -3.4e+103) (not (<= x.im 2e+87))) (+ (+ x.im x.im) (* (+ x.im x.re) (* x.im (- x.re x.im)))) (- (* x.re (* x.re (* x.im 3.0))) (pow x.im 3.0))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -3.4e+103) || !(x_46_im <= 2e+87)) {
tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im)));
} else {
tmp = (x_46_re * (x_46_re * (x_46_im * 3.0))) - pow(x_46_im, 3.0);
}
return tmp;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8) :: tmp
if ((x_46im <= (-3.4d+103)) .or. (.not. (x_46im <= 2d+87))) then
tmp = (x_46im + x_46im) + ((x_46im + x_46re) * (x_46im * (x_46re - x_46im)))
else
tmp = (x_46re * (x_46re * (x_46im * 3.0d0))) - (x_46im ** 3.0d0)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -3.4e+103) || !(x_46_im <= 2e+87)) {
tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im)));
} else {
tmp = (x_46_re * (x_46_re * (x_46_im * 3.0))) - Math.pow(x_46_im, 3.0);
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_im <= -3.4e+103) or not (x_46_im <= 2e+87): tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im))) else: tmp = (x_46_re * (x_46_re * (x_46_im * 3.0))) - math.pow(x_46_im, 3.0) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -3.4e+103) || !(x_46_im <= 2e+87)) tmp = Float64(Float64(x_46_im + x_46_im) + Float64(Float64(x_46_im + x_46_re) * Float64(x_46_im * Float64(x_46_re - x_46_im)))); else tmp = Float64(Float64(x_46_re * Float64(x_46_re * Float64(x_46_im * 3.0))) - (x_46_im ^ 3.0)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if ((x_46_im <= -3.4e+103) || ~((x_46_im <= 2e+87))) tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im))); else tmp = (x_46_re * (x_46_re * (x_46_im * 3.0))) - (x_46_im ^ 3.0); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -3.4e+103], N[Not[LessEqual[x$46$im, 2e+87]], $MachinePrecision]], N[(N[(x$46$im + x$46$im), $MachinePrecision] + N[(N[(x$46$im + x$46$re), $MachinePrecision] * N[(x$46$im * N[(x$46$re - x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * N[(x$46$re * N[(x$46$im * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Power[x$46$im, 3.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -3.4 \cdot 10^{+103} \lor \neg \left(x.im \leq 2 \cdot 10^{+87}\right):\\
\;\;\;\;\left(x.im + x.im\right) + \left(x.im + x.re\right) \cdot \left(x.im \cdot \left(x.re - x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.re \cdot \left(x.re \cdot \left(x.im \cdot 3\right)\right) - {x.im}^{3}\\
\end{array}
\end{array}
if x.im < -3.3999999999999998e103 or 1.9999999999999999e87 < x.im Initial program 71.8%
+-commutative71.8%
*-commutative71.8%
fma-def76.5%
*-commutative76.5%
distribute-rgt-out76.5%
*-commutative76.5%
Simplified76.5%
*-commutative76.5%
fma-def71.8%
distribute-lft-in71.8%
flip-+0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
metadata-eval0.0%
associate-*r/0.0%
metadata-eval0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
flip-+83.5%
difference-of-squares100.0%
associate-*l*100.0%
Applied egg-rr100.0%
if -3.3999999999999998e103 < x.im < 1.9999999999999999e87Initial program 88.9%
+-commutative88.9%
*-commutative88.9%
sub-neg88.9%
distribute-lft-in88.9%
associate-+r+88.9%
distribute-rgt-neg-out88.9%
unsub-neg88.9%
associate-*r*99.7%
distribute-rgt-out99.7%
*-commutative99.7%
count-299.7%
distribute-lft1-in99.7%
metadata-eval99.7%
*-commutative99.7%
*-commutative99.7%
associate-*r*99.7%
cube-unmult99.8%
Simplified99.8%
Final simplification99.9%
(FPCore (x.re x.im)
:precision binary64
(let* ((t_0
(+
(* x.im (- (* x.re x.re) (* x.im x.im)))
(* x.re (+ (* x.im x.re) (* x.im x.re)))))
(t_1 (+ (+ x.im x.im) (* (+ x.im x.re) (* x.im (- x.re x.im))))))
(if (<= x.im -1.5e+137)
t_1
(if (<= x.im -1.12e-107)
t_0
(if (<= x.im 2.7e-73)
(* (* x.re (* x.im x.re)) 3.0)
(if (<= x.im 1e+58) t_0 t_1))))))
double code(double x_46_re, double x_46_im) {
double t_0 = (x_46_im * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) + (x_46_re * ((x_46_im * x_46_re) + (x_46_im * x_46_re)));
double t_1 = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im)));
double tmp;
if (x_46_im <= -1.5e+137) {
tmp = t_1;
} else if (x_46_im <= -1.12e-107) {
tmp = t_0;
} else if (x_46_im <= 2.7e-73) {
tmp = (x_46_re * (x_46_im * x_46_re)) * 3.0;
} else if (x_46_im <= 1e+58) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x_46im * ((x_46re * x_46re) - (x_46im * x_46im))) + (x_46re * ((x_46im * x_46re) + (x_46im * x_46re)))
t_1 = (x_46im + x_46im) + ((x_46im + x_46re) * (x_46im * (x_46re - x_46im)))
if (x_46im <= (-1.5d+137)) then
tmp = t_1
else if (x_46im <= (-1.12d-107)) then
tmp = t_0
else if (x_46im <= 2.7d-73) then
tmp = (x_46re * (x_46im * x_46re)) * 3.0d0
else if (x_46im <= 1d+58) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double t_0 = (x_46_im * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) + (x_46_re * ((x_46_im * x_46_re) + (x_46_im * x_46_re)));
double t_1 = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im)));
double tmp;
if (x_46_im <= -1.5e+137) {
tmp = t_1;
} else if (x_46_im <= -1.12e-107) {
tmp = t_0;
} else if (x_46_im <= 2.7e-73) {
tmp = (x_46_re * (x_46_im * x_46_re)) * 3.0;
} else if (x_46_im <= 1e+58) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im): t_0 = (x_46_im * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) + (x_46_re * ((x_46_im * x_46_re) + (x_46_im * x_46_re))) t_1 = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im))) tmp = 0 if x_46_im <= -1.5e+137: tmp = t_1 elif x_46_im <= -1.12e-107: tmp = t_0 elif x_46_im <= 2.7e-73: tmp = (x_46_re * (x_46_im * x_46_re)) * 3.0 elif x_46_im <= 1e+58: tmp = t_0 else: tmp = t_1 return tmp
function code(x_46_re, x_46_im) t_0 = Float64(Float64(x_46_im * Float64(Float64(x_46_re * x_46_re) - Float64(x_46_im * x_46_im))) + Float64(x_46_re * Float64(Float64(x_46_im * x_46_re) + Float64(x_46_im * x_46_re)))) t_1 = Float64(Float64(x_46_im + x_46_im) + Float64(Float64(x_46_im + x_46_re) * Float64(x_46_im * Float64(x_46_re - x_46_im)))) tmp = 0.0 if (x_46_im <= -1.5e+137) tmp = t_1; elseif (x_46_im <= -1.12e-107) tmp = t_0; elseif (x_46_im <= 2.7e-73) tmp = Float64(Float64(x_46_re * Float64(x_46_im * x_46_re)) * 3.0); elseif (x_46_im <= 1e+58) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im) t_0 = (x_46_im * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) + (x_46_re * ((x_46_im * x_46_re) + (x_46_im * x_46_re))); t_1 = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im))); tmp = 0.0; if (x_46_im <= -1.5e+137) tmp = t_1; elseif (x_46_im <= -1.12e-107) tmp = t_0; elseif (x_46_im <= 2.7e-73) tmp = (x_46_re * (x_46_im * x_46_re)) * 3.0; elseif (x_46_im <= 1e+58) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := Block[{t$95$0 = N[(N[(x$46$im * N[(N[(x$46$re * x$46$re), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x$46$re * N[(N[(x$46$im * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x$46$im + x$46$im), $MachinePrecision] + N[(N[(x$46$im + x$46$re), $MachinePrecision] * N[(x$46$im * N[(x$46$re - x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, -1.5e+137], t$95$1, If[LessEqual[x$46$im, -1.12e-107], t$95$0, If[LessEqual[x$46$im, 2.7e-73], N[(N[(x$46$re * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] * 3.0), $MachinePrecision], If[LessEqual[x$46$im, 1e+58], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x.im \cdot \left(x.re \cdot x.re - x.im \cdot x.im\right) + x.re \cdot \left(x.im \cdot x.re + x.im \cdot x.re\right)\\
t_1 := \left(x.im + x.im\right) + \left(x.im + x.re\right) \cdot \left(x.im \cdot \left(x.re - x.im\right)\right)\\
\mathbf{if}\;x.im \leq -1.5 \cdot 10^{+137}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x.im \leq -1.12 \cdot 10^{-107}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x.im \leq 2.7 \cdot 10^{-73}:\\
\;\;\;\;\left(x.re \cdot \left(x.im \cdot x.re\right)\right) \cdot 3\\
\mathbf{elif}\;x.im \leq 10^{+58}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x.im < -1.5e137 or 9.99999999999999944e57 < x.im Initial program 70.4%
+-commutative70.4%
*-commutative70.4%
fma-def75.3%
*-commutative75.3%
distribute-rgt-out75.3%
*-commutative75.3%
Simplified75.3%
*-commutative75.3%
fma-def70.4%
distribute-lft-in70.4%
flip-+0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
metadata-eval0.0%
associate-*r/0.0%
metadata-eval0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
flip-+82.7%
difference-of-squares100.0%
associate-*l*100.0%
Applied egg-rr100.0%
if -1.5e137 < x.im < -1.12e-107 or 2.69999999999999994e-73 < x.im < 9.99999999999999944e57Initial program 97.3%
if -1.12e-107 < x.im < 2.69999999999999994e-73Initial program 83.5%
Taylor expanded in x.re around inf 83.5%
Simplified83.5%
*-commutative83.5%
*-commutative83.5%
distribute-lft-out83.5%
add-log-exp62.7%
add-log-exp62.1%
sum-log62.1%
exp-lft-sqr62.1%
*-commutative62.1%
add-log-exp83.5%
associate-*l*83.5%
distribute-lft-in83.4%
*-un-lft-identity83.4%
distribute-rgt-out83.4%
metadata-eval83.4%
associate-*l*83.5%
associate-*r*99.8%
Applied egg-rr99.8%
Final simplification99.2%
(FPCore (x.re x.im)
:precision binary64
(let* ((t_0 (+ (+ x.im x.im) (* (+ x.im x.re) (* x.im (- x.re x.im))))))
(if (<= x.im -1e+134)
t_0
(if (<= x.im -1.38e-83)
(* x.im (+ (- (* x.re x.re) (* x.im x.im)) (+ x.re x.re)))
(if (<= x.im 10000000.0) (* (* x.re (* x.im x.re)) 3.0) t_0)))))
double code(double x_46_re, double x_46_im) {
double t_0 = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im)));
double tmp;
if (x_46_im <= -1e+134) {
tmp = t_0;
} else if (x_46_im <= -1.38e-83) {
tmp = x_46_im * (((x_46_re * x_46_re) - (x_46_im * x_46_im)) + (x_46_re + x_46_re));
} else if (x_46_im <= 10000000.0) {
tmp = (x_46_re * (x_46_im * x_46_re)) * 3.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8) :: t_0
real(8) :: tmp
t_0 = (x_46im + x_46im) + ((x_46im + x_46re) * (x_46im * (x_46re - x_46im)))
if (x_46im <= (-1d+134)) then
tmp = t_0
else if (x_46im <= (-1.38d-83)) then
tmp = x_46im * (((x_46re * x_46re) - (x_46im * x_46im)) + (x_46re + x_46re))
else if (x_46im <= 10000000.0d0) then
tmp = (x_46re * (x_46im * x_46re)) * 3.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double t_0 = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im)));
double tmp;
if (x_46_im <= -1e+134) {
tmp = t_0;
} else if (x_46_im <= -1.38e-83) {
tmp = x_46_im * (((x_46_re * x_46_re) - (x_46_im * x_46_im)) + (x_46_re + x_46_re));
} else if (x_46_im <= 10000000.0) {
tmp = (x_46_re * (x_46_im * x_46_re)) * 3.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im): t_0 = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im))) tmp = 0 if x_46_im <= -1e+134: tmp = t_0 elif x_46_im <= -1.38e-83: tmp = x_46_im * (((x_46_re * x_46_re) - (x_46_im * x_46_im)) + (x_46_re + x_46_re)) elif x_46_im <= 10000000.0: tmp = (x_46_re * (x_46_im * x_46_re)) * 3.0 else: tmp = t_0 return tmp
function code(x_46_re, x_46_im) t_0 = Float64(Float64(x_46_im + x_46_im) + Float64(Float64(x_46_im + x_46_re) * Float64(x_46_im * Float64(x_46_re - x_46_im)))) tmp = 0.0 if (x_46_im <= -1e+134) tmp = t_0; elseif (x_46_im <= -1.38e-83) tmp = Float64(x_46_im * Float64(Float64(Float64(x_46_re * x_46_re) - Float64(x_46_im * x_46_im)) + Float64(x_46_re + x_46_re))); elseif (x_46_im <= 10000000.0) tmp = Float64(Float64(x_46_re * Float64(x_46_im * x_46_re)) * 3.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im) t_0 = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im))); tmp = 0.0; if (x_46_im <= -1e+134) tmp = t_0; elseif (x_46_im <= -1.38e-83) tmp = x_46_im * (((x_46_re * x_46_re) - (x_46_im * x_46_im)) + (x_46_re + x_46_re)); elseif (x_46_im <= 10000000.0) tmp = (x_46_re * (x_46_im * x_46_re)) * 3.0; else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := Block[{t$95$0 = N[(N[(x$46$im + x$46$im), $MachinePrecision] + N[(N[(x$46$im + x$46$re), $MachinePrecision] * N[(x$46$im * N[(x$46$re - x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, -1e+134], t$95$0, If[LessEqual[x$46$im, -1.38e-83], N[(x$46$im * N[(N[(N[(x$46$re * x$46$re), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] + N[(x$46$re + x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 10000000.0], N[(N[(x$46$re * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] * 3.0), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x.im + x.im\right) + \left(x.im + x.re\right) \cdot \left(x.im \cdot \left(x.re - x.im\right)\right)\\
\mathbf{if}\;x.im \leq -1 \cdot 10^{+134}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x.im \leq -1.38 \cdot 10^{-83}:\\
\;\;\;\;x.im \cdot \left(\left(x.re \cdot x.re - x.im \cdot x.im\right) + \left(x.re + x.re\right)\right)\\
\mathbf{elif}\;x.im \leq 10000000:\\
\;\;\;\;\left(x.re \cdot \left(x.im \cdot x.re\right)\right) \cdot 3\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x.im < -9.99999999999999921e133 or 1e7 < x.im Initial program 73.0%
+-commutative73.0%
*-commutative73.0%
fma-def77.5%
*-commutative77.5%
distribute-rgt-out77.5%
*-commutative77.5%
Simplified77.5%
*-commutative77.5%
fma-def73.0%
distribute-lft-in73.0%
flip-+0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
metadata-eval0.0%
associate-*r/0.0%
metadata-eval0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
flip-+83.3%
difference-of-squares99.0%
associate-*l*99.0%
Applied egg-rr99.0%
if -9.99999999999999921e133 < x.im < -1.37999999999999997e-83Initial program 97.9%
*-commutative97.9%
*-commutative97.9%
flip-+0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
metadata-eval0.0%
associate-*r/0.0%
metadata-eval0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
flip-+90.4%
Applied egg-rr90.4%
*-commutative90.4%
distribute-rgt-out90.4%
distribute-lft-out92.7%
Applied egg-rr92.7%
if -1.37999999999999997e-83 < x.im < 1e7Initial program 85.4%
Taylor expanded in x.re around inf 80.9%
Simplified80.9%
*-commutative80.9%
*-commutative80.9%
distribute-lft-out80.9%
add-log-exp58.2%
add-log-exp57.6%
sum-log57.6%
exp-lft-sqr57.6%
*-commutative57.6%
add-log-exp80.9%
associate-*l*80.8%
distribute-lft-in80.8%
*-un-lft-identity80.8%
distribute-rgt-out80.8%
metadata-eval80.8%
associate-*l*80.8%
associate-*r*95.2%
Applied egg-rr95.2%
Final simplification96.1%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -1.3e-82) (not (<= x.im 1.25e-40))) (* x.im (+ (- (* x.re x.re) (* x.im x.im)) (+ x.re x.re))) (* (* x.re (* x.im x.re)) 3.0)))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -1.3e-82) || !(x_46_im <= 1.25e-40)) {
tmp = x_46_im * (((x_46_re * x_46_re) - (x_46_im * x_46_im)) + (x_46_re + x_46_re));
} else {
tmp = (x_46_re * (x_46_im * x_46_re)) * 3.0;
}
return tmp;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8) :: tmp
if ((x_46im <= (-1.3d-82)) .or. (.not. (x_46im <= 1.25d-40))) then
tmp = x_46im * (((x_46re * x_46re) - (x_46im * x_46im)) + (x_46re + x_46re))
else
tmp = (x_46re * (x_46im * x_46re)) * 3.0d0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -1.3e-82) || !(x_46_im <= 1.25e-40)) {
tmp = x_46_im * (((x_46_re * x_46_re) - (x_46_im * x_46_im)) + (x_46_re + x_46_re));
} else {
tmp = (x_46_re * (x_46_im * x_46_re)) * 3.0;
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_im <= -1.3e-82) or not (x_46_im <= 1.25e-40): tmp = x_46_im * (((x_46_re * x_46_re) - (x_46_im * x_46_im)) + (x_46_re + x_46_re)) else: tmp = (x_46_re * (x_46_im * x_46_re)) * 3.0 return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -1.3e-82) || !(x_46_im <= 1.25e-40)) tmp = Float64(x_46_im * Float64(Float64(Float64(x_46_re * x_46_re) - Float64(x_46_im * x_46_im)) + Float64(x_46_re + x_46_re))); else tmp = Float64(Float64(x_46_re * Float64(x_46_im * x_46_re)) * 3.0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if ((x_46_im <= -1.3e-82) || ~((x_46_im <= 1.25e-40))) tmp = x_46_im * (((x_46_re * x_46_re) - (x_46_im * x_46_im)) + (x_46_re + x_46_re)); else tmp = (x_46_re * (x_46_im * x_46_re)) * 3.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -1.3e-82], N[Not[LessEqual[x$46$im, 1.25e-40]], $MachinePrecision]], N[(x$46$im * N[(N[(N[(x$46$re * x$46$re), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] + N[(x$46$re + x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] * 3.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -1.3 \cdot 10^{-82} \lor \neg \left(x.im \leq 1.25 \cdot 10^{-40}\right):\\
\;\;\;\;x.im \cdot \left(\left(x.re \cdot x.re - x.im \cdot x.im\right) + \left(x.re + x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re \cdot \left(x.im \cdot x.re\right)\right) \cdot 3\\
\end{array}
\end{array}
if x.im < -1.3e-82 or 1.24999999999999991e-40 < x.im Initial program 82.2%
*-commutative82.2%
*-commutative82.2%
flip-+0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
metadata-eval0.0%
associate-*r/0.0%
metadata-eval0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
flip-+81.0%
Applied egg-rr81.0%
*-commutative81.0%
distribute-rgt-out81.0%
distribute-lft-out84.6%
Applied egg-rr84.6%
if -1.3e-82 < x.im < 1.24999999999999991e-40Initial program 84.5%
Taylor expanded in x.re around inf 82.9%
Simplified82.9%
*-commutative82.9%
*-commutative82.9%
distribute-lft-out82.9%
add-log-exp59.4%
add-log-exp58.7%
sum-log58.7%
exp-lft-sqr58.7%
*-commutative58.7%
add-log-exp82.9%
associate-*l*82.8%
distribute-lft-in82.8%
*-un-lft-identity82.8%
distribute-rgt-out82.8%
metadata-eval82.8%
associate-*l*82.8%
associate-*r*98.2%
Applied egg-rr98.2%
Final simplification90.7%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -31000000.0) (not (<= x.im 8000.0))) (+ (* x.im (- (* x.re x.re) (* x.im x.im))) -3.0) (* (* x.re (* x.im x.re)) 3.0)))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -31000000.0) || !(x_46_im <= 8000.0)) {
tmp = (x_46_im * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) + -3.0;
} else {
tmp = (x_46_re * (x_46_im * x_46_re)) * 3.0;
}
return tmp;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8) :: tmp
if ((x_46im <= (-31000000.0d0)) .or. (.not. (x_46im <= 8000.0d0))) then
tmp = (x_46im * ((x_46re * x_46re) - (x_46im * x_46im))) + (-3.0d0)
else
tmp = (x_46re * (x_46im * x_46re)) * 3.0d0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -31000000.0) || !(x_46_im <= 8000.0)) {
tmp = (x_46_im * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) + -3.0;
} else {
tmp = (x_46_re * (x_46_im * x_46_re)) * 3.0;
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_im <= -31000000.0) or not (x_46_im <= 8000.0): tmp = (x_46_im * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) + -3.0 else: tmp = (x_46_re * (x_46_im * x_46_re)) * 3.0 return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -31000000.0) || !(x_46_im <= 8000.0)) tmp = Float64(Float64(x_46_im * Float64(Float64(x_46_re * x_46_re) - Float64(x_46_im * x_46_im))) + -3.0); else tmp = Float64(Float64(x_46_re * Float64(x_46_im * x_46_re)) * 3.0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if ((x_46_im <= -31000000.0) || ~((x_46_im <= 8000.0))) tmp = (x_46_im * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) + -3.0; else tmp = (x_46_re * (x_46_im * x_46_re)) * 3.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -31000000.0], N[Not[LessEqual[x$46$im, 8000.0]], $MachinePrecision]], N[(N[(x$46$im * N[(N[(x$46$re * x$46$re), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -3.0), $MachinePrecision], N[(N[(x$46$re * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] * 3.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -31000000 \lor \neg \left(x.im \leq 8000\right):\\
\;\;\;\;x.im \cdot \left(x.re \cdot x.re - x.im \cdot x.im\right) + -3\\
\mathbf{else}:\\
\;\;\;\;\left(x.re \cdot \left(x.im \cdot x.re\right)\right) \cdot 3\\
\end{array}
\end{array}
if x.im < -3.1e7 or 8e3 < x.im Initial program 78.9%
*-commutative78.9%
*-commutative78.9%
flip-+0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
metadata-eval0.0%
associate-*r/0.0%
metadata-eval0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
flip-+81.7%
Applied egg-rr81.7%
expm1-log1p-u51.8%
expm1-udef51.8%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
Applied egg-rr0.0%
Simplified86.9%
if -3.1e7 < x.im < 8e3Initial program 86.8%
Taylor expanded in x.re around inf 76.7%
Simplified76.7%
*-commutative76.7%
*-commutative76.7%
distribute-lft-out76.7%
add-log-exp56.4%
add-log-exp55.8%
sum-log55.8%
exp-lft-sqr55.8%
*-commutative55.8%
add-log-exp76.7%
associate-*l*76.7%
distribute-lft-in76.7%
*-un-lft-identity76.7%
distribute-rgt-out76.7%
metadata-eval76.7%
associate-*l*76.7%
associate-*r*89.8%
Applied egg-rr89.8%
Final simplification88.5%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -3.4e+192) (not (<= x.im 1.6e+248))) (* x.re (* x.im (- x.re))) (* x.re (* (* x.im x.re) 3.0))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -3.4e+192) || !(x_46_im <= 1.6e+248)) {
tmp = x_46_re * (x_46_im * -x_46_re);
} else {
tmp = x_46_re * ((x_46_im * x_46_re) * 3.0);
}
return tmp;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8) :: tmp
if ((x_46im <= (-3.4d+192)) .or. (.not. (x_46im <= 1.6d+248))) then
tmp = x_46re * (x_46im * -x_46re)
else
tmp = x_46re * ((x_46im * x_46re) * 3.0d0)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -3.4e+192) || !(x_46_im <= 1.6e+248)) {
tmp = x_46_re * (x_46_im * -x_46_re);
} else {
tmp = x_46_re * ((x_46_im * x_46_re) * 3.0);
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_im <= -3.4e+192) or not (x_46_im <= 1.6e+248): tmp = x_46_re * (x_46_im * -x_46_re) else: tmp = x_46_re * ((x_46_im * x_46_re) * 3.0) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -3.4e+192) || !(x_46_im <= 1.6e+248)) tmp = Float64(x_46_re * Float64(x_46_im * Float64(-x_46_re))); else tmp = Float64(x_46_re * Float64(Float64(x_46_im * x_46_re) * 3.0)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if ((x_46_im <= -3.4e+192) || ~((x_46_im <= 1.6e+248))) tmp = x_46_re * (x_46_im * -x_46_re); else tmp = x_46_re * ((x_46_im * x_46_re) * 3.0); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -3.4e+192], N[Not[LessEqual[x$46$im, 1.6e+248]], $MachinePrecision]], N[(x$46$re * N[(x$46$im * (-x$46$re)), $MachinePrecision]), $MachinePrecision], N[(x$46$re * N[(N[(x$46$im * x$46$re), $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -3.4 \cdot 10^{+192} \lor \neg \left(x.im \leq 1.6 \cdot 10^{+248}\right):\\
\;\;\;\;x.re \cdot \left(x.im \cdot \left(-x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.re \cdot \left(\left(x.im \cdot x.re\right) \cdot 3\right)\\
\end{array}
\end{array}
if x.im < -3.39999999999999996e192 or 1.59999999999999992e248 < x.im Initial program 58.1%
+-commutative58.1%
*-commutative58.1%
sub-neg58.1%
distribute-lft-in58.1%
associate-+r+58.1%
distribute-rgt-neg-out58.1%
unsub-neg58.1%
associate-*r*58.1%
distribute-rgt-out58.1%
*-commutative58.1%
count-258.1%
distribute-lft1-in58.1%
metadata-eval58.1%
*-commutative58.1%
*-commutative58.1%
associate-*r*58.1%
cube-unmult58.1%
Simplified58.1%
associate-*r*58.1%
associate-*l*58.1%
fma-neg58.1%
Applied egg-rr58.1%
Taylor expanded in x.re around inf 0.6%
Simplified43.6%
distribute-rgt-neg-out43.6%
*-commutative43.6%
associate-*r*43.8%
Applied egg-rr43.8%
if -3.39999999999999996e192 < x.im < 1.59999999999999992e248Initial program 86.7%
Taylor expanded in x.re around inf 58.9%
Simplified58.9%
*-commutative58.9%
*-commutative58.9%
distribute-lft-out58.9%
add-log-exp45.4%
add-log-exp45.0%
sum-log45.1%
exp-lft-sqr45.1%
*-commutative45.1%
add-log-exp58.9%
associate-*l*58.9%
distribute-lft-in58.9%
*-un-lft-identity58.9%
distribute-rgt-out58.9%
metadata-eval58.9%
associate-*l*58.9%
associate-*r*67.1%
*-commutative67.1%
associate-*l*67.1%
*-commutative67.1%
Applied egg-rr67.1%
Final simplification64.3%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -6.9e+187) (not (<= x.im 1.6e+248))) (* x.re (* x.im (- x.re))) (* (* x.im x.re) (* x.re 3.0))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -6.9e+187) || !(x_46_im <= 1.6e+248)) {
tmp = x_46_re * (x_46_im * -x_46_re);
} else {
tmp = (x_46_im * x_46_re) * (x_46_re * 3.0);
}
return tmp;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8) :: tmp
if ((x_46im <= (-6.9d+187)) .or. (.not. (x_46im <= 1.6d+248))) then
tmp = x_46re * (x_46im * -x_46re)
else
tmp = (x_46im * x_46re) * (x_46re * 3.0d0)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -6.9e+187) || !(x_46_im <= 1.6e+248)) {
tmp = x_46_re * (x_46_im * -x_46_re);
} else {
tmp = (x_46_im * x_46_re) * (x_46_re * 3.0);
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_im <= -6.9e+187) or not (x_46_im <= 1.6e+248): tmp = x_46_re * (x_46_im * -x_46_re) else: tmp = (x_46_im * x_46_re) * (x_46_re * 3.0) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -6.9e+187) || !(x_46_im <= 1.6e+248)) tmp = Float64(x_46_re * Float64(x_46_im * Float64(-x_46_re))); else tmp = Float64(Float64(x_46_im * x_46_re) * Float64(x_46_re * 3.0)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if ((x_46_im <= -6.9e+187) || ~((x_46_im <= 1.6e+248))) tmp = x_46_re * (x_46_im * -x_46_re); else tmp = (x_46_im * x_46_re) * (x_46_re * 3.0); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -6.9e+187], N[Not[LessEqual[x$46$im, 1.6e+248]], $MachinePrecision]], N[(x$46$re * N[(x$46$im * (-x$46$re)), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im * x$46$re), $MachinePrecision] * N[(x$46$re * 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -6.9 \cdot 10^{+187} \lor \neg \left(x.im \leq 1.6 \cdot 10^{+248}\right):\\
\;\;\;\;x.re \cdot \left(x.im \cdot \left(-x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.im \cdot x.re\right) \cdot \left(x.re \cdot 3\right)\\
\end{array}
\end{array}
if x.im < -6.8999999999999997e187 or 1.59999999999999992e248 < x.im Initial program 58.1%
+-commutative58.1%
*-commutative58.1%
sub-neg58.1%
distribute-lft-in58.1%
associate-+r+58.1%
distribute-rgt-neg-out58.1%
unsub-neg58.1%
associate-*r*58.1%
distribute-rgt-out58.1%
*-commutative58.1%
count-258.1%
distribute-lft1-in58.1%
metadata-eval58.1%
*-commutative58.1%
*-commutative58.1%
associate-*r*58.1%
cube-unmult58.1%
Simplified58.1%
associate-*r*58.1%
associate-*l*58.1%
fma-neg58.1%
Applied egg-rr58.1%
Taylor expanded in x.re around inf 0.6%
Simplified43.6%
distribute-rgt-neg-out43.6%
*-commutative43.6%
associate-*r*43.8%
Applied egg-rr43.8%
if -6.8999999999999997e187 < x.im < 1.59999999999999992e248Initial program 86.7%
Taylor expanded in x.re around inf 58.9%
Simplified58.9%
*-commutative58.9%
*-commutative58.9%
distribute-lft-out58.9%
add-log-exp45.4%
add-log-exp45.0%
sum-log45.1%
exp-lft-sqr45.1%
*-commutative45.1%
add-log-exp58.9%
associate-*l*58.9%
distribute-lft-in58.9%
*-un-lft-identity58.9%
distribute-rgt-out58.9%
metadata-eval58.9%
associate-*l*58.9%
associate-*r*67.1%
*-commutative67.1%
*-commutative67.1%
associate-*l*67.1%
*-commutative67.1%
Applied egg-rr67.1%
Final simplification64.3%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -1.8e+190) (not (<= x.im 1.65e+248))) (* x.re (* x.im (- x.re))) (* (* x.re (* x.im x.re)) 3.0)))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -1.8e+190) || !(x_46_im <= 1.65e+248)) {
tmp = x_46_re * (x_46_im * -x_46_re);
} else {
tmp = (x_46_re * (x_46_im * x_46_re)) * 3.0;
}
return tmp;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8) :: tmp
if ((x_46im <= (-1.8d+190)) .or. (.not. (x_46im <= 1.65d+248))) then
tmp = x_46re * (x_46im * -x_46re)
else
tmp = (x_46re * (x_46im * x_46re)) * 3.0d0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -1.8e+190) || !(x_46_im <= 1.65e+248)) {
tmp = x_46_re * (x_46_im * -x_46_re);
} else {
tmp = (x_46_re * (x_46_im * x_46_re)) * 3.0;
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_im <= -1.8e+190) or not (x_46_im <= 1.65e+248): tmp = x_46_re * (x_46_im * -x_46_re) else: tmp = (x_46_re * (x_46_im * x_46_re)) * 3.0 return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -1.8e+190) || !(x_46_im <= 1.65e+248)) tmp = Float64(x_46_re * Float64(x_46_im * Float64(-x_46_re))); else tmp = Float64(Float64(x_46_re * Float64(x_46_im * x_46_re)) * 3.0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if ((x_46_im <= -1.8e+190) || ~((x_46_im <= 1.65e+248))) tmp = x_46_re * (x_46_im * -x_46_re); else tmp = (x_46_re * (x_46_im * x_46_re)) * 3.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -1.8e+190], N[Not[LessEqual[x$46$im, 1.65e+248]], $MachinePrecision]], N[(x$46$re * N[(x$46$im * (-x$46$re)), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] * 3.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -1.8 \cdot 10^{+190} \lor \neg \left(x.im \leq 1.65 \cdot 10^{+248}\right):\\
\;\;\;\;x.re \cdot \left(x.im \cdot \left(-x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re \cdot \left(x.im \cdot x.re\right)\right) \cdot 3\\
\end{array}
\end{array}
if x.im < -1.79999999999999989e190 or 1.6500000000000001e248 < x.im Initial program 58.1%
+-commutative58.1%
*-commutative58.1%
sub-neg58.1%
distribute-lft-in58.1%
associate-+r+58.1%
distribute-rgt-neg-out58.1%
unsub-neg58.1%
associate-*r*58.1%
distribute-rgt-out58.1%
*-commutative58.1%
count-258.1%
distribute-lft1-in58.1%
metadata-eval58.1%
*-commutative58.1%
*-commutative58.1%
associate-*r*58.1%
cube-unmult58.1%
Simplified58.1%
associate-*r*58.1%
associate-*l*58.1%
fma-neg58.1%
Applied egg-rr58.1%
Taylor expanded in x.re around inf 0.6%
Simplified43.6%
distribute-rgt-neg-out43.6%
*-commutative43.6%
associate-*r*43.8%
Applied egg-rr43.8%
if -1.79999999999999989e190 < x.im < 1.6500000000000001e248Initial program 86.7%
Taylor expanded in x.re around inf 58.9%
Simplified58.9%
*-commutative58.9%
*-commutative58.9%
distribute-lft-out58.9%
add-log-exp45.4%
add-log-exp45.0%
sum-log45.1%
exp-lft-sqr45.1%
*-commutative45.1%
add-log-exp58.9%
associate-*l*58.9%
distribute-lft-in58.9%
*-un-lft-identity58.9%
distribute-rgt-out58.9%
metadata-eval58.9%
associate-*l*58.9%
associate-*r*67.1%
Applied egg-rr67.1%
Final simplification64.3%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -6e+187) (not (<= x.im 1.6e+248))) (* x.re (* x.im (- x.re))) (* x.im (* x.re x.re))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -6e+187) || !(x_46_im <= 1.6e+248)) {
tmp = x_46_re * (x_46_im * -x_46_re);
} else {
tmp = x_46_im * (x_46_re * x_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8) :: tmp
if ((x_46im <= (-6d+187)) .or. (.not. (x_46im <= 1.6d+248))) then
tmp = x_46re * (x_46im * -x_46re)
else
tmp = x_46im * (x_46re * x_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -6e+187) || !(x_46_im <= 1.6e+248)) {
tmp = x_46_re * (x_46_im * -x_46_re);
} else {
tmp = x_46_im * (x_46_re * x_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_im <= -6e+187) or not (x_46_im <= 1.6e+248): tmp = x_46_re * (x_46_im * -x_46_re) else: tmp = x_46_im * (x_46_re * x_46_re) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -6e+187) || !(x_46_im <= 1.6e+248)) tmp = Float64(x_46_re * Float64(x_46_im * Float64(-x_46_re))); else tmp = Float64(x_46_im * Float64(x_46_re * x_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if ((x_46_im <= -6e+187) || ~((x_46_im <= 1.6e+248))) tmp = x_46_re * (x_46_im * -x_46_re); else tmp = x_46_im * (x_46_re * x_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -6e+187], N[Not[LessEqual[x$46$im, 1.6e+248]], $MachinePrecision]], N[(x$46$re * N[(x$46$im * (-x$46$re)), $MachinePrecision]), $MachinePrecision], N[(x$46$im * N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -6 \cdot 10^{+187} \lor \neg \left(x.im \leq 1.6 \cdot 10^{+248}\right):\\
\;\;\;\;x.re \cdot \left(x.im \cdot \left(-x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.im \cdot \left(x.re \cdot x.re\right)\\
\end{array}
\end{array}
if x.im < -5.9999999999999998e187 or 1.59999999999999992e248 < x.im Initial program 58.1%
+-commutative58.1%
*-commutative58.1%
sub-neg58.1%
distribute-lft-in58.1%
associate-+r+58.1%
distribute-rgt-neg-out58.1%
unsub-neg58.1%
associate-*r*58.1%
distribute-rgt-out58.1%
*-commutative58.1%
count-258.1%
distribute-lft1-in58.1%
metadata-eval58.1%
*-commutative58.1%
*-commutative58.1%
associate-*r*58.1%
cube-unmult58.1%
Simplified58.1%
associate-*r*58.1%
associate-*l*58.1%
fma-neg58.1%
Applied egg-rr58.1%
Taylor expanded in x.re around inf 0.6%
Simplified43.6%
distribute-rgt-neg-out43.6%
*-commutative43.6%
associate-*r*43.8%
Applied egg-rr43.8%
if -5.9999999999999998e187 < x.im < 1.59999999999999992e248Initial program 86.7%
*-commutative86.7%
*-commutative86.7%
flip-+0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
metadata-eval0.0%
associate-*r/0.0%
metadata-eval0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
flip-+66.1%
Applied egg-rr66.1%
Taylor expanded in x.re around inf 44.8%
Simplified44.8%
Final simplification44.6%
(FPCore (x.re x.im) :precision binary64 (* x.im (* x.re x.re)))
double code(double x_46_re, double x_46_im) {
return x_46_im * (x_46_re * x_46_re);
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
code = x_46im * (x_46re * x_46re)
end function
public static double code(double x_46_re, double x_46_im) {
return x_46_im * (x_46_re * x_46_re);
}
def code(x_46_re, x_46_im): return x_46_im * (x_46_re * x_46_re)
function code(x_46_re, x_46_im) return Float64(x_46_im * Float64(x_46_re * x_46_re)) end
function tmp = code(x_46_re, x_46_im) tmp = x_46_im * (x_46_re * x_46_re); end
code[x$46$re_, x$46$im_] := N[(x$46$im * N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x.im \cdot \left(x.re \cdot x.re\right)
\end{array}
Initial program 83.2%
*-commutative83.2%
*-commutative83.2%
flip-+0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
metadata-eval0.0%
associate-*r/0.0%
metadata-eval0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
flip-+66.7%
Applied egg-rr66.7%
Taylor expanded in x.re around inf 39.4%
Simplified39.4%
Final simplification39.4%
(FPCore (x.re x.im) :precision binary64 (* x.re -3.0))
double code(double x_46_re, double x_46_im) {
return x_46_re * -3.0;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
code = x_46re * (-3.0d0)
end function
public static double code(double x_46_re, double x_46_im) {
return x_46_re * -3.0;
}
def code(x_46_re, x_46_im): return x_46_re * -3.0
function code(x_46_re, x_46_im) return Float64(x_46_re * -3.0) end
function tmp = code(x_46_re, x_46_im) tmp = x_46_re * -3.0; end
code[x$46$re_, x$46$im_] := N[(x$46$re * -3.0), $MachinePrecision]
\begin{array}{l}
\\
x.re \cdot -3
\end{array}
Initial program 83.2%
Taylor expanded in x.re around inf 51.9%
Simplified51.9%
expm1-log1p-u41.5%
expm1-udef31.0%
*-commutative31.0%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
Applied egg-rr0.0%
Simplified19.5%
Taylor expanded in x.re around 0 3.5%
Final simplification3.5%
(FPCore (x.re x.im) :precision binary64 (+ x.re x.re))
double code(double x_46_re, double x_46_im) {
return x_46_re + x_46_re;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
code = x_46re + x_46re
end function
public static double code(double x_46_re, double x_46_im) {
return x_46_re + x_46_re;
}
def code(x_46_re, x_46_im): return x_46_re + x_46_re
function code(x_46_re, x_46_im) return Float64(x_46_re + x_46_re) end
function tmp = code(x_46_re, x_46_im) tmp = x_46_re + x_46_re; end
code[x$46$re_, x$46$im_] := N[(x$46$re + x$46$re), $MachinePrecision]
\begin{array}{l}
\\
x.re + x.re
\end{array}
Initial program 83.2%
Taylor expanded in x.re around inf 51.9%
Simplified51.9%
expm1-log1p-u41.5%
expm1-udef31.0%
*-commutative31.0%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
Applied egg-rr0.0%
Simplified19.5%
Taylor expanded in x.re around 0 3.5%
Simplified3.9%
Final simplification3.9%
(FPCore (x.re x.im) :precision binary64 -3.0)
double code(double x_46_re, double x_46_im) {
return -3.0;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
code = -3.0d0
end function
public static double code(double x_46_re, double x_46_im) {
return -3.0;
}
def code(x_46_re, x_46_im): return -3.0
function code(x_46_re, x_46_im) return -3.0 end
function tmp = code(x_46_re, x_46_im) tmp = -3.0; end
code[x$46$re_, x$46$im_] := -3.0
\begin{array}{l}
\\
-3
\end{array}
Initial program 83.2%
+-commutative83.2%
*-commutative83.2%
sub-neg83.2%
distribute-lft-in80.1%
associate-+r+80.1%
distribute-rgt-neg-out80.1%
unsub-neg80.1%
associate-*r*87.3%
distribute-rgt-out87.3%
*-commutative87.3%
count-287.3%
distribute-lft1-in87.3%
metadata-eval87.3%
*-commutative87.3%
*-commutative87.3%
associate-*r*87.3%
cube-unmult87.4%
Simplified87.4%
Taylor expanded in x.re around 0 61.0%
Simplified2.7%
Final simplification2.7%
(FPCore (x.re x.im) :precision binary64 0.1)
double code(double x_46_re, double x_46_im) {
return 0.1;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
code = 0.1d0
end function
public static double code(double x_46_re, double x_46_im) {
return 0.1;
}
def code(x_46_re, x_46_im): return 0.1
function code(x_46_re, x_46_im) return 0.1 end
function tmp = code(x_46_re, x_46_im) tmp = 0.1; end
code[x$46$re_, x$46$im_] := 0.1
\begin{array}{l}
\\
0.1
\end{array}
Initial program 83.2%
+-commutative83.2%
*-commutative83.2%
sub-neg83.2%
distribute-lft-in80.1%
associate-+r+80.1%
distribute-rgt-neg-out80.1%
unsub-neg80.1%
associate-*r*87.3%
distribute-rgt-out87.3%
*-commutative87.3%
count-287.3%
distribute-lft1-in87.3%
metadata-eval87.3%
*-commutative87.3%
*-commutative87.3%
associate-*r*87.3%
cube-unmult87.4%
Simplified87.4%
sub-neg87.4%
associate-*r*87.3%
associate-*l*87.4%
flip3-+12.1%
associate-*r*11.7%
associate-*r*11.7%
unpow-prod-down7.4%
pow27.4%
pow-pow7.4%
metadata-eval7.4%
Applied egg-rr7.3%
Simplified2.7%
Final simplification2.7%
(FPCore (x.re x.im) :precision binary64 (+ (* (* x.re x.im) (* 2.0 x.re)) (* (* x.im (- x.re x.im)) (+ x.re x.im))))
double code(double x_46_re, double x_46_im) {
return ((x_46_re * x_46_im) * (2.0 * x_46_re)) + ((x_46_im * (x_46_re - x_46_im)) * (x_46_re + x_46_im));
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
code = ((x_46re * x_46im) * (2.0d0 * x_46re)) + ((x_46im * (x_46re - x_46im)) * (x_46re + x_46im))
end function
public static double code(double x_46_re, double x_46_im) {
return ((x_46_re * x_46_im) * (2.0 * x_46_re)) + ((x_46_im * (x_46_re - x_46_im)) * (x_46_re + x_46_im));
}
def code(x_46_re, x_46_im): return ((x_46_re * x_46_im) * (2.0 * x_46_re)) + ((x_46_im * (x_46_re - x_46_im)) * (x_46_re + x_46_im))
function code(x_46_re, x_46_im) return Float64(Float64(Float64(x_46_re * x_46_im) * Float64(2.0 * x_46_re)) + Float64(Float64(x_46_im * Float64(x_46_re - x_46_im)) * Float64(x_46_re + x_46_im))) end
function tmp = code(x_46_re, x_46_im) tmp = ((x_46_re * x_46_im) * (2.0 * x_46_re)) + ((x_46_im * (x_46_re - x_46_im)) * (x_46_re + x_46_im)); end
code[x$46$re_, x$46$im_] := N[(N[(N[(x$46$re * x$46$im), $MachinePrecision] * N[(2.0 * x$46$re), $MachinePrecision]), $MachinePrecision] + N[(N[(x$46$im * N[(x$46$re - x$46$im), $MachinePrecision]), $MachinePrecision] * N[(x$46$re + x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x.re \cdot x.im\right) \cdot \left(2 \cdot x.re\right) + \left(x.im \cdot \left(x.re - x.im\right)\right) \cdot \left(x.re + x.im\right)
\end{array}
herbie shell --seed 2023182
(FPCore (x.re x.im)
:name "math.cube on complex, imaginary part"
:precision binary64
:herbie-target
(+ (* (* x.re x.im) (* 2.0 x.re)) (* (* x.im (- x.re x.im)) (+ x.re x.im)))
(+ (* (- (* x.re x.re) (* x.im x.im)) x.im) (* (+ (* x.re x.im) (* x.im x.re)) x.re)))