
(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 -5.2e+103) (not (<= x.im 2e+95))) (+ (+ x.im x.im) (* x.im (* (- x.re x.im) (+ x.im x.re)))) (fma (* x.re 3.0) (* x.im x.re) (- (pow x.im 3.0)))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -5.2e+103) || !(x_46_im <= 2e+95)) {
tmp = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re)));
} else {
tmp = fma((x_46_re * 3.0), (x_46_im * x_46_re), -pow(x_46_im, 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -5.2e+103) || !(x_46_im <= 2e+95)) tmp = Float64(Float64(x_46_im + x_46_im) + Float64(x_46_im * Float64(Float64(x_46_re - x_46_im) * Float64(x_46_im + x_46_re)))); else tmp = fma(Float64(x_46_re * 3.0), Float64(x_46_im * x_46_re), Float64(-(x_46_im ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -5.2e+103], N[Not[LessEqual[x$46$im, 2e+95]], $MachinePrecision]], N[(N[(x$46$im + x$46$im), $MachinePrecision] + N[(x$46$im * N[(N[(x$46$re - x$46$im), $MachinePrecision] * N[(x$46$im + x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * 3.0), $MachinePrecision] * N[(x$46$im * x$46$re), $MachinePrecision] + (-N[Power[x$46$im, 3.0], $MachinePrecision])), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -5.2 \cdot 10^{+103} \lor \neg \left(x.im \leq 2 \cdot 10^{+95}\right):\\
\;\;\;\;\left(x.im + x.im\right) + x.im \cdot \left(\left(x.re - x.im\right) \cdot \left(x.im + x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x.re \cdot 3, x.im \cdot x.re, -{x.im}^{3}\right)\\
\end{array}
\end{array}
if x.im < -5.2000000000000003e103 or 2.00000000000000004e95 < x.im Initial program 71.8%
+-commutative71.8%
*-commutative71.8%
fma-def77.6%
*-commutative77.6%
distribute-rgt-out77.6%
*-commutative77.6%
Simplified77.6%
fma-udef71.8%
distribute-lft-in71.8%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
associate-*r/0.0%
+-inverses0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+85.9%
Applied egg-rr85.9%
difference-of-squares100.0%
*-commutative100.0%
Applied egg-rr100.0%
if -5.2000000000000003e103 < x.im < 2.00000000000000004e95Initial program 87.1%
+-commutative87.1%
*-commutative87.1%
sub-neg87.1%
distribute-lft-in87.1%
associate-+r+87.1%
distribute-rgt-neg-out87.1%
unsub-neg87.1%
associate-*r*99.6%
distribute-rgt-out99.6%
*-commutative99.6%
count-299.6%
distribute-lft1-in99.6%
metadata-eval99.6%
*-commutative99.6%
*-commutative99.6%
associate-*r*99.6%
cube-unmult99.7%
Simplified99.7%
Taylor expanded in x.re around 0 99.7%
associate-*r*99.8%
fma-neg99.8%
Applied egg-rr99.8%
Final simplification99.9%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -5.2e+103) (not (<= x.im 2e+88))) (+ (+ x.im x.im) (* x.im (* (- x.re x.im) (+ x.im x.re)))) (- (* x.re (* 3.0 (* x.im x.re))) (pow x.im 3.0))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -5.2e+103) || !(x_46_im <= 2e+88)) {
tmp = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re)));
} else {
tmp = (x_46_re * (3.0 * (x_46_im * x_46_re))) - 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 <= (-5.2d+103)) .or. (.not. (x_46im <= 2d+88))) then
tmp = (x_46im + x_46im) + (x_46im * ((x_46re - x_46im) * (x_46im + x_46re)))
else
tmp = (x_46re * (3.0d0 * (x_46im * x_46re))) - (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 <= -5.2e+103) || !(x_46_im <= 2e+88)) {
tmp = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re)));
} else {
tmp = (x_46_re * (3.0 * (x_46_im * x_46_re))) - Math.pow(x_46_im, 3.0);
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_im <= -5.2e+103) or not (x_46_im <= 2e+88): tmp = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))) else: tmp = (x_46_re * (3.0 * (x_46_im * x_46_re))) - math.pow(x_46_im, 3.0) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -5.2e+103) || !(x_46_im <= 2e+88)) tmp = Float64(Float64(x_46_im + x_46_im) + Float64(x_46_im * Float64(Float64(x_46_re - x_46_im) * Float64(x_46_im + x_46_re)))); else tmp = Float64(Float64(x_46_re * Float64(3.0 * Float64(x_46_im * x_46_re))) - (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 <= -5.2e+103) || ~((x_46_im <= 2e+88))) tmp = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))); else tmp = (x_46_re * (3.0 * (x_46_im * x_46_re))) - (x_46_im ^ 3.0); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -5.2e+103], N[Not[LessEqual[x$46$im, 2e+88]], $MachinePrecision]], N[(N[(x$46$im + x$46$im), $MachinePrecision] + N[(x$46$im * N[(N[(x$46$re - x$46$im), $MachinePrecision] * N[(x$46$im + x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * N[(3.0 * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Power[x$46$im, 3.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -5.2 \cdot 10^{+103} \lor \neg \left(x.im \leq 2 \cdot 10^{+88}\right):\\
\;\;\;\;\left(x.im + x.im\right) + x.im \cdot \left(\left(x.re - x.im\right) \cdot \left(x.im + x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.re \cdot \left(3 \cdot \left(x.im \cdot x.re\right)\right) - {x.im}^{3}\\
\end{array}
\end{array}
if x.im < -5.2000000000000003e103 or 1.99999999999999992e88 < x.im Initial program 71.8%
+-commutative71.8%
*-commutative71.8%
fma-def77.6%
*-commutative77.6%
distribute-rgt-out77.6%
*-commutative77.6%
Simplified77.6%
fma-udef71.8%
distribute-lft-in71.8%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
associate-*r/0.0%
+-inverses0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+85.9%
Applied egg-rr85.9%
difference-of-squares100.0%
*-commutative100.0%
Applied egg-rr100.0%
if -5.2000000000000003e103 < x.im < 1.99999999999999992e88Initial program 87.1%
+-commutative87.1%
*-commutative87.1%
sub-neg87.1%
distribute-lft-in87.1%
associate-+r+87.1%
distribute-rgt-neg-out87.1%
unsub-neg87.1%
associate-*r*99.6%
distribute-rgt-out99.6%
*-commutative99.6%
count-299.6%
distribute-lft1-in99.6%
metadata-eval99.6%
*-commutative99.6%
*-commutative99.6%
associate-*r*99.6%
cube-unmult99.7%
Simplified99.7%
Taylor expanded in x.re around 0 99.7%
Final simplification99.8%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -5.2e+103) (not (<= x.im 2e+95))) (+ (+ x.im x.im) (* x.im (* (- x.re x.im) (+ x.im x.re)))) (- (* 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 <= -5.2e+103) || !(x_46_im <= 2e+95)) {
tmp = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re)));
} 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 <= (-5.2d+103)) .or. (.not. (x_46im <= 2d+95))) then
tmp = (x_46im + x_46im) + (x_46im * ((x_46re - x_46im) * (x_46im + x_46re)))
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 <= -5.2e+103) || !(x_46_im <= 2e+95)) {
tmp = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re)));
} 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 <= -5.2e+103) or not (x_46_im <= 2e+95): tmp = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))) 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 <= -5.2e+103) || !(x_46_im <= 2e+95)) tmp = Float64(Float64(x_46_im + x_46_im) + Float64(x_46_im * Float64(Float64(x_46_re - x_46_im) * Float64(x_46_im + x_46_re)))); else tmp = Float64(Float64(x_46_re * Float64(x_46_im * Float64(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 <= -5.2e+103) || ~((x_46_im <= 2e+95))) tmp = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))); 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, -5.2e+103], N[Not[LessEqual[x$46$im, 2e+95]], $MachinePrecision]], N[(N[(x$46$im + x$46$im), $MachinePrecision] + N[(x$46$im * N[(N[(x$46$re - x$46$im), $MachinePrecision] * N[(x$46$im + x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * N[(x$46$im * N[(x$46$re * 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 -5.2 \cdot 10^{+103} \lor \neg \left(x.im \leq 2 \cdot 10^{+95}\right):\\
\;\;\;\;\left(x.im + x.im\right) + x.im \cdot \left(\left(x.re - x.im\right) \cdot \left(x.im + x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.re \cdot \left(x.im \cdot \left(x.re \cdot 3\right)\right) - {x.im}^{3}\\
\end{array}
\end{array}
if x.im < -5.2000000000000003e103 or 2.00000000000000004e95 < x.im Initial program 71.8%
+-commutative71.8%
*-commutative71.8%
fma-def77.6%
*-commutative77.6%
distribute-rgt-out77.6%
*-commutative77.6%
Simplified77.6%
fma-udef71.8%
distribute-lft-in71.8%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
associate-*r/0.0%
+-inverses0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+85.9%
Applied egg-rr85.9%
difference-of-squares100.0%
*-commutative100.0%
Applied egg-rr100.0%
if -5.2000000000000003e103 < x.im < 2.00000000000000004e95Initial program 87.1%
+-commutative87.1%
*-commutative87.1%
sub-neg87.1%
distribute-lft-in87.1%
associate-+r+87.1%
distribute-rgt-neg-out87.1%
unsub-neg87.1%
associate-*r*99.6%
distribute-rgt-out99.6%
*-commutative99.6%
count-299.6%
distribute-lft1-in99.6%
metadata-eval99.6%
*-commutative99.6%
*-commutative99.6%
associate-*r*99.6%
cube-unmult99.7%
Simplified99.7%
Taylor expanded in x.re around 0 99.7%
expm1-log1p-u82.8%
expm1-udef57.7%
Applied egg-rr57.7%
expm1-def82.8%
expm1-log1p99.7%
associate-*r*99.7%
Simplified99.7%
Final simplification99.8%
(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))))))
(if (<= t_0 INFINITY)
t_0
(+ (+ x.im x.im) (* x.im (* (- x.re x.im) (+ x.im x.re)))))))
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 tmp;
if (t_0 <= ((double) INFINITY)) {
tmp = t_0;
} else {
tmp = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re)));
}
return tmp;
}
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 tmp;
if (t_0 <= Double.POSITIVE_INFINITY) {
tmp = t_0;
} else {
tmp = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re)));
}
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))) tmp = 0 if t_0 <= math.inf: tmp = t_0 else: tmp = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))) 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)))) tmp = 0.0 if (t_0 <= Inf) tmp = t_0; else tmp = Float64(Float64(x_46_im + x_46_im) + Float64(x_46_im * Float64(Float64(x_46_re - x_46_im) * Float64(x_46_im + x_46_re)))); 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))); tmp = 0.0; if (t_0 <= Inf) tmp = t_0; else tmp = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))); 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]}, If[LessEqual[t$95$0, Infinity], t$95$0, N[(N[(x$46$im + x$46$im), $MachinePrecision] + N[(x$46$im * N[(N[(x$46$re - x$46$im), $MachinePrecision] * N[(x$46$im + x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\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)\\
\mathbf{if}\;t_0 \leq \infty:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\left(x.im + x.im\right) + x.im \cdot \left(\left(x.re - x.im\right) \cdot \left(x.im + x.re\right)\right)\\
\end{array}
\end{array}
if (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) < +inf.0Initial program 90.5%
if +inf.0 < (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) Initial program 0.0%
+-commutative0.0%
*-commutative0.0%
fma-def20.8%
*-commutative20.8%
distribute-rgt-out20.8%
*-commutative20.8%
Simplified20.8%
fma-udef0.0%
distribute-lft-in0.0%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
associate-*r/0.0%
+-inverses0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+50.0%
Applied egg-rr50.0%
difference-of-squares100.0%
*-commutative100.0%
Applied egg-rr100.0%
Final simplification91.4%
(FPCore (x.re x.im)
:precision binary64
(let* ((t_0 (* x.im (- (* x.re x.re) (* x.im x.im))))
(t_1 (+ (+ x.im x.im) (* x.im (* (- x.re x.im) (+ x.im x.re))))))
(if (<= x.im -5.6e+181)
t_1
(if (<= x.im -3.2e-158)
(+ t_0 (* x.re (+ (* x.im x.re) (* x.im x.re))))
(if (<= x.im 1.5e-89)
(* x.re (* 3.0 (* x.im x.re)))
(if (<= x.im 2e+80) (+ t_0 (* (+ x.im x.im) (* x.re x.re))) 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));
double t_1 = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re)));
double tmp;
if (x_46_im <= -5.6e+181) {
tmp = t_1;
} else if (x_46_im <= -3.2e-158) {
tmp = t_0 + (x_46_re * ((x_46_im * x_46_re) + (x_46_im * x_46_re)));
} else if (x_46_im <= 1.5e-89) {
tmp = x_46_re * (3.0 * (x_46_im * x_46_re));
} else if (x_46_im <= 2e+80) {
tmp = t_0 + ((x_46_im + x_46_im) * (x_46_re * x_46_re));
} 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))
t_1 = (x_46im + x_46im) + (x_46im * ((x_46re - x_46im) * (x_46im + x_46re)))
if (x_46im <= (-5.6d+181)) then
tmp = t_1
else if (x_46im <= (-3.2d-158)) then
tmp = t_0 + (x_46re * ((x_46im * x_46re) + (x_46im * x_46re)))
else if (x_46im <= 1.5d-89) then
tmp = x_46re * (3.0d0 * (x_46im * x_46re))
else if (x_46im <= 2d+80) then
tmp = t_0 + ((x_46im + x_46im) * (x_46re * x_46re))
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));
double t_1 = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re)));
double tmp;
if (x_46_im <= -5.6e+181) {
tmp = t_1;
} else if (x_46_im <= -3.2e-158) {
tmp = t_0 + (x_46_re * ((x_46_im * x_46_re) + (x_46_im * x_46_re)));
} else if (x_46_im <= 1.5e-89) {
tmp = x_46_re * (3.0 * (x_46_im * x_46_re));
} else if (x_46_im <= 2e+80) {
tmp = t_0 + ((x_46_im + x_46_im) * (x_46_re * x_46_re));
} 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)) t_1 = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))) tmp = 0 if x_46_im <= -5.6e+181: tmp = t_1 elif x_46_im <= -3.2e-158: tmp = t_0 + (x_46_re * ((x_46_im * x_46_re) + (x_46_im * x_46_re))) elif x_46_im <= 1.5e-89: tmp = x_46_re * (3.0 * (x_46_im * x_46_re)) elif x_46_im <= 2e+80: tmp = t_0 + ((x_46_im + x_46_im) * (x_46_re * x_46_re)) else: tmp = t_1 return tmp
function code(x_46_re, x_46_im) t_0 = Float64(x_46_im * Float64(Float64(x_46_re * x_46_re) - Float64(x_46_im * x_46_im))) t_1 = Float64(Float64(x_46_im + x_46_im) + Float64(x_46_im * Float64(Float64(x_46_re - x_46_im) * Float64(x_46_im + x_46_re)))) tmp = 0.0 if (x_46_im <= -5.6e+181) tmp = t_1; elseif (x_46_im <= -3.2e-158) tmp = Float64(t_0 + Float64(x_46_re * Float64(Float64(x_46_im * x_46_re) + Float64(x_46_im * x_46_re)))); elseif (x_46_im <= 1.5e-89) tmp = Float64(x_46_re * Float64(3.0 * Float64(x_46_im * x_46_re))); elseif (x_46_im <= 2e+80) tmp = Float64(t_0 + Float64(Float64(x_46_im + x_46_im) * Float64(x_46_re * x_46_re))); 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)); t_1 = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))); tmp = 0.0; if (x_46_im <= -5.6e+181) tmp = t_1; elseif (x_46_im <= -3.2e-158) tmp = t_0 + (x_46_re * ((x_46_im * x_46_re) + (x_46_im * x_46_re))); elseif (x_46_im <= 1.5e-89) tmp = x_46_re * (3.0 * (x_46_im * x_46_re)); elseif (x_46_im <= 2e+80) tmp = t_0 + ((x_46_im + x_46_im) * (x_46_re * x_46_re)); else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := Block[{t$95$0 = N[(x$46$im * N[(N[(x$46$re * x$46$re), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x$46$im + x$46$im), $MachinePrecision] + N[(x$46$im * N[(N[(x$46$re - x$46$im), $MachinePrecision] * N[(x$46$im + x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, -5.6e+181], t$95$1, If[LessEqual[x$46$im, -3.2e-158], N[(t$95$0 + N[(x$46$re * N[(N[(x$46$im * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 1.5e-89], N[(x$46$re * N[(3.0 * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2e+80], N[(t$95$0 + N[(N[(x$46$im + x$46$im), $MachinePrecision] * N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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)\\
t_1 := \left(x.im + x.im\right) + x.im \cdot \left(\left(x.re - x.im\right) \cdot \left(x.im + x.re\right)\right)\\
\mathbf{if}\;x.im \leq -5.6 \cdot 10^{+181}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x.im \leq -3.2 \cdot 10^{-158}:\\
\;\;\;\;t_0 + x.re \cdot \left(x.im \cdot x.re + x.im \cdot x.re\right)\\
\mathbf{elif}\;x.im \leq 1.5 \cdot 10^{-89}:\\
\;\;\;\;x.re \cdot \left(3 \cdot \left(x.im \cdot x.re\right)\right)\\
\mathbf{elif}\;x.im \leq 2 \cdot 10^{+80}:\\
\;\;\;\;t_0 + \left(x.im + x.im\right) \cdot \left(x.re \cdot x.re\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x.im < -5.59999999999999968e181 or 2e80 < x.im Initial program 66.2%
+-commutative66.2%
*-commutative66.2%
fma-def73.2%
*-commutative73.2%
distribute-rgt-out73.2%
*-commutative73.2%
Simplified73.2%
fma-udef66.2%
distribute-lft-in66.2%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
associate-*r/0.0%
+-inverses0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+83.1%
Applied egg-rr83.1%
difference-of-squares100.0%
*-commutative100.0%
Applied egg-rr100.0%
if -5.59999999999999968e181 < x.im < -3.19999999999999996e-158Initial program 98.6%
if -3.19999999999999996e-158 < x.im < 1.5e-89Initial program 72.7%
+-commutative72.7%
*-commutative72.7%
sub-neg72.7%
distribute-lft-in72.7%
associate-+r+72.7%
distribute-rgt-neg-out72.7%
unsub-neg72.7%
associate-*r*99.6%
distribute-rgt-out99.6%
*-commutative99.6%
count-299.6%
distribute-lft1-in99.6%
metadata-eval99.6%
*-commutative99.6%
*-commutative99.6%
associate-*r*99.6%
cube-unmult99.6%
Simplified99.6%
Taylor expanded in x.re around 0 99.6%
Taylor expanded in x.re around inf 72.7%
associate-*r*72.8%
*-commutative72.8%
unpow272.8%
Simplified72.8%
pow172.8%
associate-*r*72.8%
metadata-eval72.8%
distribute-rgt-out72.8%
*-un-lft-identity72.8%
*-commutative72.8%
associate-*l*99.6%
distribute-rgt1-in99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in x.re around 0 99.6%
if 1.5e-89 < x.im < 2e80Initial program 97.2%
*-commutative97.2%
*-commutative97.2%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+81.4%
distribute-lft-in81.4%
Applied egg-rr81.4%
flip-+0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
+-inverses0.0%
frac-times0.0%
flip-+0.0%
flip-+83.7%
distribute-lft-out83.7%
distribute-lft-out83.7%
swap-sqr83.7%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
Applied egg-rr97.2%
Final simplification99.1%
(FPCore (x.re x.im)
:precision binary64
(let* ((t_0 (* x.im (+ (- (* x.re x.re) (* x.im x.im)) (+ x.re x.re))))
(t_1 (+ (+ x.im x.im) (* x.im (* (- x.re x.im) (+ x.im x.re))))))
(if (<= x.im -5.6e+181)
t_1
(if (<= x.im -2.2e-91)
t_0
(if (<= x.im 9e-73)
(* (* x.re x.re) (+ x.im (* x.im 2.0)))
(if (<= x.im 100000.0) 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_re));
double t_1 = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re)));
double tmp;
if (x_46_im <= -5.6e+181) {
tmp = t_1;
} else if (x_46_im <= -2.2e-91) {
tmp = t_0;
} else if (x_46_im <= 9e-73) {
tmp = (x_46_re * x_46_re) * (x_46_im + (x_46_im * 2.0));
} else if (x_46_im <= 100000.0) {
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_46re))
t_1 = (x_46im + x_46im) + (x_46im * ((x_46re - x_46im) * (x_46im + x_46re)))
if (x_46im <= (-5.6d+181)) then
tmp = t_1
else if (x_46im <= (-2.2d-91)) then
tmp = t_0
else if (x_46im <= 9d-73) then
tmp = (x_46re * x_46re) * (x_46im + (x_46im * 2.0d0))
else if (x_46im <= 100000.0d0) 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_re));
double t_1 = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re)));
double tmp;
if (x_46_im <= -5.6e+181) {
tmp = t_1;
} else if (x_46_im <= -2.2e-91) {
tmp = t_0;
} else if (x_46_im <= 9e-73) {
tmp = (x_46_re * x_46_re) * (x_46_im + (x_46_im * 2.0));
} else if (x_46_im <= 100000.0) {
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_re)) t_1 = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))) tmp = 0 if x_46_im <= -5.6e+181: tmp = t_1 elif x_46_im <= -2.2e-91: tmp = t_0 elif x_46_im <= 9e-73: tmp = (x_46_re * x_46_re) * (x_46_im + (x_46_im * 2.0)) elif x_46_im <= 100000.0: tmp = t_0 else: tmp = t_1 return tmp
function code(x_46_re, x_46_im) t_0 = 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))) t_1 = Float64(Float64(x_46_im + x_46_im) + Float64(x_46_im * Float64(Float64(x_46_re - x_46_im) * Float64(x_46_im + x_46_re)))) tmp = 0.0 if (x_46_im <= -5.6e+181) tmp = t_1; elseif (x_46_im <= -2.2e-91) tmp = t_0; elseif (x_46_im <= 9e-73) tmp = Float64(Float64(x_46_re * x_46_re) * Float64(x_46_im + Float64(x_46_im * 2.0))); elseif (x_46_im <= 100000.0) 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_re)); t_1 = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))); tmp = 0.0; if (x_46_im <= -5.6e+181) tmp = t_1; elseif (x_46_im <= -2.2e-91) tmp = t_0; elseif (x_46_im <= 9e-73) tmp = (x_46_re * x_46_re) * (x_46_im + (x_46_im * 2.0)); elseif (x_46_im <= 100000.0) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := Block[{t$95$0 = 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]}, Block[{t$95$1 = N[(N[(x$46$im + x$46$im), $MachinePrecision] + N[(x$46$im * N[(N[(x$46$re - x$46$im), $MachinePrecision] * N[(x$46$im + x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, -5.6e+181], t$95$1, If[LessEqual[x$46$im, -2.2e-91], t$95$0, If[LessEqual[x$46$im, 9e-73], N[(N[(x$46$re * x$46$re), $MachinePrecision] * N[(x$46$im + N[(x$46$im * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 100000.0], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x.im \cdot \left(\left(x.re \cdot x.re - x.im \cdot x.im\right) + \left(x.re + x.re\right)\right)\\
t_1 := \left(x.im + x.im\right) + x.im \cdot \left(\left(x.re - x.im\right) \cdot \left(x.im + x.re\right)\right)\\
\mathbf{if}\;x.im \leq -5.6 \cdot 10^{+181}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x.im \leq -2.2 \cdot 10^{-91}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x.im \leq 9 \cdot 10^{-73}:\\
\;\;\;\;\left(x.re \cdot x.re\right) \cdot \left(x.im + x.im \cdot 2\right)\\
\mathbf{elif}\;x.im \leq 100000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x.im < -5.59999999999999968e181 or 1e5 < x.im Initial program 72.7%
+-commutative72.7%
*-commutative72.7%
fma-def78.4%
*-commutative78.4%
distribute-rgt-out78.4%
*-commutative78.4%
Simplified78.4%
fma-udef72.7%
distribute-lft-in72.7%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
associate-*r/0.0%
+-inverses0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+84.5%
Applied egg-rr84.5%
difference-of-squares98.1%
*-commutative98.1%
Applied egg-rr98.1%
if -5.59999999999999968e181 < x.im < -2.2000000000000001e-91 or 9e-73 < x.im < 1e5Initial program 97.4%
*-commutative97.4%
*-commutative97.4%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+80.4%
distribute-lft-in80.4%
Applied egg-rr80.4%
*-commutative80.4%
distribute-rgt-out80.4%
distribute-lft-out82.9%
Applied egg-rr82.9%
if -2.2000000000000001e-91 < x.im < 9e-73Initial program 77.8%
Taylor expanded in x.re around inf 77.1%
pow277.1%
*-un-lft-identity77.1%
*-commutative77.1%
Applied egg-rr77.1%
Final simplification86.1%
(FPCore (x.re x.im)
:precision binary64
(if (or (<= x.im -5.6e+181) (not (<= x.im 2e+92)))
(+ (+ x.im x.im) (* x.im (* (- x.re x.im) (+ x.im x.re))))
(+
(* x.im (- (* x.re x.re) (* x.im x.im)))
(* (+ x.im x.im) (* x.re x.re)))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -5.6e+181) || !(x_46_im <= 2e+92)) {
tmp = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re)));
} else {
tmp = (x_46_im * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) + ((x_46_im + 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 <= (-5.6d+181)) .or. (.not. (x_46im <= 2d+92))) then
tmp = (x_46im + x_46im) + (x_46im * ((x_46re - x_46im) * (x_46im + x_46re)))
else
tmp = (x_46im * ((x_46re * x_46re) - (x_46im * x_46im))) + ((x_46im + 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 <= -5.6e+181) || !(x_46_im <= 2e+92)) {
tmp = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re)));
} else {
tmp = (x_46_im * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) + ((x_46_im + 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 <= -5.6e+181) or not (x_46_im <= 2e+92): tmp = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))) else: tmp = (x_46_im * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) + ((x_46_im + 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 <= -5.6e+181) || !(x_46_im <= 2e+92)) tmp = Float64(Float64(x_46_im + x_46_im) + Float64(x_46_im * Float64(Float64(x_46_re - x_46_im) * Float64(x_46_im + x_46_re)))); else tmp = Float64(Float64(x_46_im * Float64(Float64(x_46_re * x_46_re) - Float64(x_46_im * x_46_im))) + Float64(Float64(x_46_im + 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 <= -5.6e+181) || ~((x_46_im <= 2e+92))) tmp = (x_46_im + x_46_im) + (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))); else tmp = (x_46_im * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) + ((x_46_im + 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, -5.6e+181], N[Not[LessEqual[x$46$im, 2e+92]], $MachinePrecision]], N[(N[(x$46$im + x$46$im), $MachinePrecision] + N[(x$46$im * N[(N[(x$46$re - x$46$im), $MachinePrecision] * N[(x$46$im + x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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] + N[(N[(x$46$im + x$46$im), $MachinePrecision] * N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -5.6 \cdot 10^{+181} \lor \neg \left(x.im \leq 2 \cdot 10^{+92}\right):\\
\;\;\;\;\left(x.im + x.im\right) + x.im \cdot \left(\left(x.re - x.im\right) \cdot \left(x.im + x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.im \cdot \left(x.re \cdot x.re - x.im \cdot x.im\right) + \left(x.im + x.im\right) \cdot \left(x.re \cdot x.re\right)\\
\end{array}
\end{array}
if x.im < -5.59999999999999968e181 or 2.0000000000000001e92 < x.im Initial program 66.2%
+-commutative66.2%
*-commutative66.2%
fma-def73.2%
*-commutative73.2%
distribute-rgt-out73.2%
*-commutative73.2%
Simplified73.2%
fma-udef66.2%
distribute-lft-in66.2%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
associate-*r/0.0%
+-inverses0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+83.1%
Applied egg-rr83.1%
difference-of-squares100.0%
*-commutative100.0%
Applied egg-rr100.0%
if -5.59999999999999968e181 < x.im < 2.0000000000000001e92Initial program 88.1%
*-commutative88.1%
*-commutative88.1%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+59.8%
distribute-lft-in59.8%
Applied egg-rr59.8%
flip-+0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
metadata-eval0.0%
+-inverses0.0%
+-inverses0.0%
frac-times0.0%
flip-+0.0%
flip-+57.8%
distribute-lft-out57.8%
distribute-lft-out57.8%
swap-sqr53.5%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
Applied egg-rr88.1%
Final simplification91.4%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -4.8e-90) (not (<= x.im 4.6e-72))) (* x.im (+ (- (* x.re x.re) (* x.im x.im)) (+ x.re x.re))) (* (* x.re x.re) (+ x.im (* x.im 2.0)))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -4.8e-90) || !(x_46_im <= 4.6e-72)) {
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_re) * (x_46_im + (x_46_im * 2.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 <= (-4.8d-90)) .or. (.not. (x_46im <= 4.6d-72))) then
tmp = x_46im * (((x_46re * x_46re) - (x_46im * x_46im)) + (x_46re + x_46re))
else
tmp = (x_46re * x_46re) * (x_46im + (x_46im * 2.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 <= -4.8e-90) || !(x_46_im <= 4.6e-72)) {
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_re) * (x_46_im + (x_46_im * 2.0));
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_im <= -4.8e-90) or not (x_46_im <= 4.6e-72): 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_re) * (x_46_im + (x_46_im * 2.0)) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -4.8e-90) || !(x_46_im <= 4.6e-72)) 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 * x_46_re) * Float64(x_46_im + Float64(x_46_im * 2.0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if ((x_46_im <= -4.8e-90) || ~((x_46_im <= 4.6e-72))) 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_re) * (x_46_im + (x_46_im * 2.0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -4.8e-90], N[Not[LessEqual[x$46$im, 4.6e-72]], $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 * x$46$re), $MachinePrecision] * N[(x$46$im + N[(x$46$im * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -4.8 \cdot 10^{-90} \lor \neg \left(x.im \leq 4.6 \cdot 10^{-72}\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 x.re\right) \cdot \left(x.im + x.im \cdot 2\right)\\
\end{array}
\end{array}
if x.im < -4.8000000000000003e-90 or 4.59999999999999989e-72 < x.im Initial program 84.3%
*-commutative84.3%
*-commutative84.3%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+80.1%
distribute-lft-in80.1%
Applied egg-rr80.1%
*-commutative80.1%
distribute-rgt-out80.1%
distribute-lft-out83.8%
Applied egg-rr83.8%
if -4.8000000000000003e-90 < x.im < 4.59999999999999989e-72Initial program 77.8%
Taylor expanded in x.re around inf 77.1%
pow277.1%
*-un-lft-identity77.1%
*-commutative77.1%
Applied egg-rr77.1%
Final simplification81.4%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -14.0) (not (<= x.im 5.2e+14))) (* x.im (+ (- (* x.re x.re) (* x.im x.im)) 2.0)) (* x.im (* 3.0 (* x.re x.re)))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -14.0) || !(x_46_im <= 5.2e+14)) {
tmp = x_46_im * (((x_46_re * x_46_re) - (x_46_im * x_46_im)) + 2.0);
} else {
tmp = x_46_im * (3.0 * (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 <= (-14.0d0)) .or. (.not. (x_46im <= 5.2d+14))) then
tmp = x_46im * (((x_46re * x_46re) - (x_46im * x_46im)) + 2.0d0)
else
tmp = x_46im * (3.0d0 * (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 <= -14.0) || !(x_46_im <= 5.2e+14)) {
tmp = x_46_im * (((x_46_re * x_46_re) - (x_46_im * x_46_im)) + 2.0);
} else {
tmp = x_46_im * (3.0 * (x_46_re * x_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_im <= -14.0) or not (x_46_im <= 5.2e+14): tmp = x_46_im * (((x_46_re * x_46_re) - (x_46_im * x_46_im)) + 2.0) else: tmp = x_46_im * (3.0 * (x_46_re * x_46_re)) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -14.0) || !(x_46_im <= 5.2e+14)) tmp = Float64(x_46_im * Float64(Float64(Float64(x_46_re * x_46_re) - Float64(x_46_im * x_46_im)) + 2.0)); else tmp = Float64(x_46_im * Float64(3.0 * 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 <= -14.0) || ~((x_46_im <= 5.2e+14))) tmp = x_46_im * (((x_46_re * x_46_re) - (x_46_im * x_46_im)) + 2.0); else tmp = x_46_im * (3.0 * (x_46_re * x_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -14.0], N[Not[LessEqual[x$46$im, 5.2e+14]], $MachinePrecision]], N[(x$46$im * N[(N[(N[(x$46$re * x$46$re), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision], N[(x$46$im * N[(3.0 * N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -14 \lor \neg \left(x.im \leq 5.2 \cdot 10^{+14}\right):\\
\;\;\;\;x.im \cdot \left(\left(x.re \cdot x.re - x.im \cdot x.im\right) + 2\right)\\
\mathbf{else}:\\
\;\;\;\;x.im \cdot \left(3 \cdot \left(x.re \cdot x.re\right)\right)\\
\end{array}
\end{array}
if x.im < -14 or 5.2e14 < x.im Initial program 80.4%
*-commutative80.4%
*-commutative80.4%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+83.3%
distribute-lft-in83.3%
Applied egg-rr83.3%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+87.6%
count-287.6%
distribute-rgt-out87.6%
Applied egg-rr87.6%
if -14 < x.im < 5.2e14Initial program 83.5%
+-commutative83.5%
*-commutative83.5%
sub-neg83.5%
distribute-lft-in83.5%
associate-+r+83.5%
distribute-rgt-neg-out83.5%
unsub-neg83.5%
associate-*r*99.6%
distribute-rgt-out99.6%
*-commutative99.6%
count-299.6%
distribute-lft1-in99.6%
metadata-eval99.6%
*-commutative99.6%
*-commutative99.6%
associate-*r*99.6%
cube-unmult99.7%
Simplified99.7%
Taylor expanded in x.re around 0 99.7%
Taylor expanded in x.re around inf 67.9%
associate-*r*67.9%
*-commutative67.9%
unpow267.9%
Simplified67.9%
Final simplification77.4%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -2.75) (not (<= x.im 5.2e+14))) (* x.im (+ (- (* x.re x.re) (* x.im x.im)) 2.0)) (* (* x.re x.re) (+ x.im (* x.im 2.0)))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -2.75) || !(x_46_im <= 5.2e+14)) {
tmp = x_46_im * (((x_46_re * x_46_re) - (x_46_im * x_46_im)) + 2.0);
} else {
tmp = (x_46_re * x_46_re) * (x_46_im + (x_46_im * 2.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 <= (-2.75d0)) .or. (.not. (x_46im <= 5.2d+14))) then
tmp = x_46im * (((x_46re * x_46re) - (x_46im * x_46im)) + 2.0d0)
else
tmp = (x_46re * x_46re) * (x_46im + (x_46im * 2.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 <= -2.75) || !(x_46_im <= 5.2e+14)) {
tmp = x_46_im * (((x_46_re * x_46_re) - (x_46_im * x_46_im)) + 2.0);
} else {
tmp = (x_46_re * x_46_re) * (x_46_im + (x_46_im * 2.0));
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_im <= -2.75) or not (x_46_im <= 5.2e+14): tmp = x_46_im * (((x_46_re * x_46_re) - (x_46_im * x_46_im)) + 2.0) else: tmp = (x_46_re * x_46_re) * (x_46_im + (x_46_im * 2.0)) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -2.75) || !(x_46_im <= 5.2e+14)) tmp = Float64(x_46_im * Float64(Float64(Float64(x_46_re * x_46_re) - Float64(x_46_im * x_46_im)) + 2.0)); else tmp = Float64(Float64(x_46_re * x_46_re) * Float64(x_46_im + Float64(x_46_im * 2.0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if ((x_46_im <= -2.75) || ~((x_46_im <= 5.2e+14))) tmp = x_46_im * (((x_46_re * x_46_re) - (x_46_im * x_46_im)) + 2.0); else tmp = (x_46_re * x_46_re) * (x_46_im + (x_46_im * 2.0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -2.75], N[Not[LessEqual[x$46$im, 5.2e+14]], $MachinePrecision]], N[(x$46$im * N[(N[(N[(x$46$re * x$46$re), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * x$46$re), $MachinePrecision] * N[(x$46$im + N[(x$46$im * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -2.75 \lor \neg \left(x.im \leq 5.2 \cdot 10^{+14}\right):\\
\;\;\;\;x.im \cdot \left(\left(x.re \cdot x.re - x.im \cdot x.im\right) + 2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re \cdot x.re\right) \cdot \left(x.im + x.im \cdot 2\right)\\
\end{array}
\end{array}
if x.im < -2.75 or 5.2e14 < x.im Initial program 80.4%
*-commutative80.4%
*-commutative80.4%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+83.3%
distribute-lft-in83.3%
Applied egg-rr83.3%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+87.6%
count-287.6%
distribute-rgt-out87.6%
Applied egg-rr87.6%
if -2.75 < x.im < 5.2e14Initial program 83.5%
Taylor expanded in x.re around inf 68.0%
pow268.0%
*-un-lft-identity68.0%
*-commutative68.0%
Applied egg-rr68.0%
Final simplification77.4%
(FPCore (x.re x.im) :precision binary64 (if (<= x.im -1.35e+155) (/ (* x.im (* x.re x.re)) (+ x.im x.im)) (* x.im (* 3.0 (* x.re x.re)))))
double code(double x_46_re, double x_46_im) {
double tmp;
if (x_46_im <= -1.35e+155) {
tmp = (x_46_im * (x_46_re * x_46_re)) / (x_46_im + x_46_im);
} else {
tmp = x_46_im * (3.0 * (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 <= (-1.35d+155)) then
tmp = (x_46im * (x_46re * x_46re)) / (x_46im + x_46im)
else
tmp = x_46im * (3.0d0 * (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 <= -1.35e+155) {
tmp = (x_46_im * (x_46_re * x_46_re)) / (x_46_im + x_46_im);
} else {
tmp = x_46_im * (3.0 * (x_46_re * x_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if x_46_im <= -1.35e+155: tmp = (x_46_im * (x_46_re * x_46_re)) / (x_46_im + x_46_im) else: tmp = x_46_im * (3.0 * (x_46_re * x_46_re)) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if (x_46_im <= -1.35e+155) tmp = Float64(Float64(x_46_im * Float64(x_46_re * x_46_re)) / Float64(x_46_im + x_46_im)); else tmp = Float64(x_46_im * Float64(3.0 * 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 <= -1.35e+155) tmp = (x_46_im * (x_46_re * x_46_re)) / (x_46_im + x_46_im); else tmp = x_46_im * (3.0 * (x_46_re * x_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[LessEqual[x$46$im, -1.35e+155], N[(N[(x$46$im * N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(x$46$im + x$46$im), $MachinePrecision]), $MachinePrecision], N[(x$46$im * N[(3.0 * N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -1.35 \cdot 10^{+155}:\\
\;\;\;\;\frac{x.im \cdot \left(x.re \cdot x.re\right)}{x.im + x.im}\\
\mathbf{else}:\\
\;\;\;\;x.im \cdot \left(3 \cdot \left(x.re \cdot x.re\right)\right)\\
\end{array}
\end{array}
if x.im < -1.34999999999999997e155Initial program 65.6%
+-commutative65.6%
*-commutative65.6%
sub-neg65.6%
distribute-lft-in65.6%
associate-+r+65.6%
distribute-rgt-neg-out65.6%
unsub-neg65.6%
associate-*r*65.6%
distribute-rgt-out65.6%
*-commutative65.6%
count-265.6%
distribute-lft1-in65.6%
metadata-eval65.6%
*-commutative65.6%
*-commutative65.6%
associate-*r*65.6%
cube-unmult65.6%
Simplified65.6%
Taylor expanded in x.re around 0 65.6%
Taylor expanded in x.re around inf 10.0%
associate-*r*10.0%
*-commutative10.0%
unpow210.0%
Simplified10.0%
*-commutative10.0%
*-commutative10.0%
associate-*r*10.0%
metadata-eval10.0%
distribute-rgt1-in10.0%
flip-+0.0%
associate-*r/0.0%
difference-of-squares9.4%
distribute-rgt1-in9.4%
metadata-eval9.4%
*-un-lft-identity9.4%
distribute-rgt-out--9.4%
metadata-eval9.4%
*-un-lft-identity9.4%
distribute-rgt-out--9.4%
metadata-eval9.4%
Applied egg-rr9.4%
Simplified26.4%
if -1.34999999999999997e155 < x.im Initial program 84.4%
+-commutative84.4%
*-commutative84.4%
sub-neg84.4%
distribute-lft-in81.7%
associate-+r+81.7%
distribute-rgt-neg-out81.7%
unsub-neg81.7%
associate-*r*91.2%
distribute-rgt-out91.2%
*-commutative91.2%
count-291.2%
distribute-lft1-in91.2%
metadata-eval91.2%
*-commutative91.2%
*-commutative91.2%
associate-*r*91.2%
cube-unmult91.3%
Simplified91.3%
Taylor expanded in x.re around 0 91.3%
Taylor expanded in x.re around inf 53.8%
associate-*r*53.9%
*-commutative53.9%
unpow253.9%
Simplified53.9%
Final simplification50.4%
(FPCore (x.re x.im) :precision binary64 (* 3.0 (* x.im (* x.re x.re))))
double code(double x_46_re, double x_46_im) {
return 3.0 * (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 = 3.0d0 * (x_46im * (x_46re * x_46re))
end function
public static double code(double x_46_re, double x_46_im) {
return 3.0 * (x_46_im * (x_46_re * x_46_re));
}
def code(x_46_re, x_46_im): return 3.0 * (x_46_im * (x_46_re * x_46_re))
function code(x_46_re, x_46_im) return Float64(3.0 * Float64(x_46_im * Float64(x_46_re * x_46_re))) end
function tmp = code(x_46_re, x_46_im) tmp = 3.0 * (x_46_im * (x_46_re * x_46_re)); end
code[x$46$re_, x$46$im_] := N[(3.0 * N[(x$46$im * N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
3 \cdot \left(x.im \cdot \left(x.re \cdot x.re\right)\right)
\end{array}
Initial program 82.0%
+-commutative82.0%
*-commutative82.0%
sub-neg82.0%
distribute-lft-in79.7%
associate-+r+79.7%
distribute-rgt-neg-out79.7%
unsub-neg79.7%
associate-*r*88.0%
distribute-rgt-out88.0%
*-commutative88.0%
count-288.0%
distribute-lft1-in88.0%
metadata-eval88.0%
*-commutative88.0%
*-commutative88.0%
associate-*r*88.0%
cube-unmult88.1%
Simplified88.1%
Taylor expanded in x.re around 0 88.1%
Taylor expanded in x.re around inf 48.4%
*-commutative48.4%
unpow248.4%
Simplified48.4%
Final simplification48.4%
(FPCore (x.re x.im) :precision binary64 (* x.im (* 3.0 (* x.re x.re))))
double code(double x_46_re, double x_46_im) {
return x_46_im * (3.0 * (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 * (3.0d0 * (x_46re * x_46re))
end function
public static double code(double x_46_re, double x_46_im) {
return x_46_im * (3.0 * (x_46_re * x_46_re));
}
def code(x_46_re, x_46_im): return x_46_im * (3.0 * (x_46_re * x_46_re))
function code(x_46_re, x_46_im) return Float64(x_46_im * Float64(3.0 * Float64(x_46_re * x_46_re))) end
function tmp = code(x_46_re, x_46_im) tmp = x_46_im * (3.0 * (x_46_re * x_46_re)); end
code[x$46$re_, x$46$im_] := N[(x$46$im * N[(3.0 * N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x.im \cdot \left(3 \cdot \left(x.re \cdot x.re\right)\right)
\end{array}
Initial program 82.0%
+-commutative82.0%
*-commutative82.0%
sub-neg82.0%
distribute-lft-in79.7%
associate-+r+79.7%
distribute-rgt-neg-out79.7%
unsub-neg79.7%
associate-*r*88.0%
distribute-rgt-out88.0%
*-commutative88.0%
count-288.0%
distribute-lft1-in88.0%
metadata-eval88.0%
*-commutative88.0%
*-commutative88.0%
associate-*r*88.0%
cube-unmult88.1%
Simplified88.1%
Taylor expanded in x.re around 0 88.1%
Taylor expanded in x.re around inf 48.4%
associate-*r*48.4%
*-commutative48.4%
unpow248.4%
Simplified48.4%
Final simplification48.4%
(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 82.0%
*-commutative82.0%
*-commutative82.0%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
associate-*r/0.0%
+-inverses0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
clear-num0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+51.7%
Applied egg-rr51.7%
Taylor expanded in x.re around inf 32.7%
*-commutative32.7%
unpow232.7%
Simplified32.7%
Final simplification32.7%
(FPCore (x.re x.im) :precision binary64 -10.0)
double code(double x_46_re, double x_46_im) {
return -10.0;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
code = -10.0d0
end function
public static double code(double x_46_re, double x_46_im) {
return -10.0;
}
def code(x_46_re, x_46_im): return -10.0
function code(x_46_re, x_46_im) return -10.0 end
function tmp = code(x_46_re, x_46_im) tmp = -10.0; end
code[x$46$re_, x$46$im_] := -10.0
\begin{array}{l}
\\
-10
\end{array}
Initial program 82.0%
+-commutative82.0%
*-commutative82.0%
sub-neg82.0%
distribute-lft-in79.7%
associate-+r+79.7%
distribute-rgt-neg-out79.7%
unsub-neg79.7%
associate-*r*88.0%
distribute-rgt-out88.0%
*-commutative88.0%
count-288.0%
distribute-lft1-in88.0%
metadata-eval88.0%
*-commutative88.0%
*-commutative88.0%
associate-*r*88.0%
cube-unmult88.1%
Simplified88.1%
associate-*r*88.1%
associate-*l*88.1%
flip--25.3%
div-inv24.4%
swap-sqr24.3%
pow224.3%
metadata-eval24.3%
pow-prod-up24.3%
metadata-eval24.3%
associate-*l*24.2%
associate-*r*24.2%
fma-def24.2%
Applied egg-rr24.2%
Simplified2.7%
Final simplification2.7%
(FPCore (x.re x.im) :precision binary64 0.0)
double code(double x_46_re, double x_46_im) {
return 0.0;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
code = 0.0d0
end function
public static double code(double x_46_re, double x_46_im) {
return 0.0;
}
def code(x_46_re, x_46_im): return 0.0
function code(x_46_re, x_46_im) return 0.0 end
function tmp = code(x_46_re, x_46_im) tmp = 0.0; end
code[x$46$re_, x$46$im_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 82.0%
+-commutative82.0%
*-commutative82.0%
fma-def84.0%
*-commutative84.0%
distribute-rgt-out84.0%
*-commutative84.0%
Simplified84.0%
fma-udef82.0%
distribute-lft-in82.0%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
associate-*r/0.0%
+-inverses0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+53.6%
Applied egg-rr53.6%
Taylor expanded in x.re around 0 37.4%
Simplified11.6%
Final simplification11.6%
(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 2023230
(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)))