
(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 18 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 -9.2e+129) (not (<= x.im 6e+82))) (+ (* x.im (* (- x.re x.im) (+ x.im x.re))) (+ x.im x.im)) (- (* (* 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 <= -9.2e+129) || !(x_46_im <= 6e+82)) {
tmp = (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))) + (x_46_im + x_46_im);
} 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 <= (-9.2d+129)) .or. (.not. (x_46im <= 6d+82))) then
tmp = (x_46im * ((x_46re - x_46im) * (x_46im + x_46re))) + (x_46im + x_46im)
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 <= -9.2e+129) || !(x_46_im <= 6e+82)) {
tmp = (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))) + (x_46_im + x_46_im);
} 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 <= -9.2e+129) or not (x_46_im <= 6e+82): tmp = (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))) + (x_46_im + x_46_im) 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 <= -9.2e+129) || !(x_46_im <= 6e+82)) tmp = Float64(Float64(x_46_im * Float64(Float64(x_46_re - x_46_im) * Float64(x_46_im + x_46_re))) + Float64(x_46_im + x_46_im)); else tmp = Float64(Float64(Float64(x_46_re * 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 <= -9.2e+129) || ~((x_46_im <= 6e+82))) tmp = (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))) + (x_46_im + x_46_im); 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, -9.2e+129], N[Not[LessEqual[x$46$im, 6e+82]], $MachinePrecision]], N[(N[(x$46$im * N[(N[(x$46$re - x$46$im), $MachinePrecision] * N[(x$46$im + x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x$46$im + x$46$im), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$46$re * 3.0), $MachinePrecision] * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] - N[Power[x$46$im, 3.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -9.2 \cdot 10^{+129} \lor \neg \left(x.im \leq 6 \cdot 10^{+82}\right):\\
\;\;\;\;x.im \cdot \left(\left(x.re - x.im\right) \cdot \left(x.im + x.re\right)\right) + \left(x.im + x.im\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re \cdot 3\right) \cdot \left(x.im \cdot x.re\right) - {x.im}^{3}\\
\end{array}
\end{array}
if x.im < -9.19999999999999961e129 or 5.99999999999999978e82 < x.im Initial program 67.1%
*-commutative67.1%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+68.5%
*-commutative68.5%
distribute-lft-in68.5%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+82.2%
Applied egg-rr82.2%
difference-of-squares100.0%
*-commutative100.0%
Applied egg-rr100.0%
if -9.19999999999999961e129 < x.im < 5.99999999999999978e82Initial program 93.8%
+-commutative93.8%
*-commutative93.8%
sub-neg93.8%
distribute-lft-in93.8%
associate-+r+93.8%
distribute-rgt-neg-out93.8%
unsub-neg93.8%
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%
associate-*r*99.9%
*-commutative99.9%
fma-neg99.9%
*-commutative99.9%
Applied egg-rr99.9%
fma-udef99.9%
unsub-neg99.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -9.2e+129) (not (<= x.im 4e+70))) (+ (* x.im (* (- x.re x.im) (+ x.im x.re))) (+ x.im x.im)) (- (* 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 <= -9.2e+129) || !(x_46_im <= 4e+70)) {
tmp = (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))) + (x_46_im + x_46_im);
} 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 <= (-9.2d+129)) .or. (.not. (x_46im <= 4d+70))) then
tmp = (x_46im * ((x_46re - x_46im) * (x_46im + x_46re))) + (x_46im + x_46im)
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 <= -9.2e+129) || !(x_46_im <= 4e+70)) {
tmp = (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))) + (x_46_im + x_46_im);
} 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 <= -9.2e+129) or not (x_46_im <= 4e+70): tmp = (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))) + (x_46_im + x_46_im) 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 <= -9.2e+129) || !(x_46_im <= 4e+70)) tmp = Float64(Float64(x_46_im * Float64(Float64(x_46_re - x_46_im) * Float64(x_46_im + x_46_re))) + Float64(x_46_im + x_46_im)); 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 <= -9.2e+129) || ~((x_46_im <= 4e+70))) tmp = (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))) + (x_46_im + x_46_im); 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, -9.2e+129], N[Not[LessEqual[x$46$im, 4e+70]], $MachinePrecision]], N[(N[(x$46$im * N[(N[(x$46$re - x$46$im), $MachinePrecision] * N[(x$46$im + x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x$46$im + x$46$im), $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 -9.2 \cdot 10^{+129} \lor \neg \left(x.im \leq 4 \cdot 10^{+70}\right):\\
\;\;\;\;x.im \cdot \left(\left(x.re - x.im\right) \cdot \left(x.im + x.re\right)\right) + \left(x.im + x.im\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 < -9.19999999999999961e129 or 4.00000000000000029e70 < x.im Initial program 67.1%
*-commutative67.1%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+68.5%
*-commutative68.5%
distribute-lft-in68.5%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+82.2%
Applied egg-rr82.2%
difference-of-squares100.0%
*-commutative100.0%
Applied egg-rr100.0%
if -9.19999999999999961e129 < x.im < 4.00000000000000029e70Initial program 93.8%
+-commutative93.8%
*-commutative93.8%
sub-neg93.8%
distribute-lft-in93.8%
associate-+r+93.8%
distribute-rgt-neg-out93.8%
unsub-neg93.8%
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.9%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -9.2e+129) (not (<= x.im 7e+82))) (+ (* x.im (* (- x.re x.im) (+ x.im x.re))) (+ x.im 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 <= -9.2e+129) || !(x_46_im <= 7e+82)) {
tmp = (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))) + (x_46_im + 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 <= (-9.2d+129)) .or. (.not. (x_46im <= 7d+82))) then
tmp = (x_46im * ((x_46re - x_46im) * (x_46im + x_46re))) + (x_46im + 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 <= -9.2e+129) || !(x_46_im <= 7e+82)) {
tmp = (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))) + (x_46_im + 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 <= -9.2e+129) or not (x_46_im <= 7e+82): tmp = (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))) + (x_46_im + 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 <= -9.2e+129) || !(x_46_im <= 7e+82)) tmp = Float64(Float64(x_46_im * Float64(Float64(x_46_re - x_46_im) * Float64(x_46_im + x_46_re))) + Float64(x_46_im + 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 <= -9.2e+129) || ~((x_46_im <= 7e+82))) tmp = (x_46_im * ((x_46_re - x_46_im) * (x_46_im + x_46_re))) + (x_46_im + 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, -9.2e+129], N[Not[LessEqual[x$46$im, 7e+82]], $MachinePrecision]], N[(N[(x$46$im * N[(N[(x$46$re - x$46$im), $MachinePrecision] * N[(x$46$im + x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x$46$im + x$46$im), $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 -9.2 \cdot 10^{+129} \lor \neg \left(x.im \leq 7 \cdot 10^{+82}\right):\\
\;\;\;\;x.im \cdot \left(\left(x.re - x.im\right) \cdot \left(x.im + x.re\right)\right) + \left(x.im + x.im\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 < -9.19999999999999961e129 or 7.0000000000000001e82 < x.im Initial program 67.1%
*-commutative67.1%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+68.5%
*-commutative68.5%
distribute-lft-in68.5%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+82.2%
Applied egg-rr82.2%
difference-of-squares100.0%
*-commutative100.0%
Applied egg-rr100.0%
if -9.19999999999999961e129 < x.im < 7.0000000000000001e82Initial program 93.8%
+-commutative93.8%
*-commutative93.8%
sub-neg93.8%
distribute-lft-in93.8%
associate-+r+93.8%
distribute-rgt-neg-out93.8%
unsub-neg93.8%
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 (* 3.0 (* x.re (* x.im x.re)))))
(if (<= x.re -6.9e-28)
t_0
(if (<= x.re 2.25e-48)
(* x.im (- (* x.re (- x.re)) (* x.im x.im)))
(if (<= x.re 2.32e-14)
(* 3.0 (* x.im (* x.re x.re)))
(if (<= x.re 1.36e+103)
(* x.im (+ (- (* x.re x.re) (* x.im x.im)) 2.0))
t_0))))))
double code(double x_46_re, double x_46_im) {
double t_0 = 3.0 * (x_46_re * (x_46_im * x_46_re));
double tmp;
if (x_46_re <= -6.9e-28) {
tmp = t_0;
} else if (x_46_re <= 2.25e-48) {
tmp = x_46_im * ((x_46_re * -x_46_re) - (x_46_im * x_46_im));
} else if (x_46_re <= 2.32e-14) {
tmp = 3.0 * (x_46_im * (x_46_re * x_46_re));
} else if (x_46_re <= 1.36e+103) {
tmp = x_46_im * (((x_46_re * x_46_re) - (x_46_im * x_46_im)) + 2.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 = 3.0d0 * (x_46re * (x_46im * x_46re))
if (x_46re <= (-6.9d-28)) then
tmp = t_0
else if (x_46re <= 2.25d-48) then
tmp = x_46im * ((x_46re * -x_46re) - (x_46im * x_46im))
else if (x_46re <= 2.32d-14) then
tmp = 3.0d0 * (x_46im * (x_46re * x_46re))
else if (x_46re <= 1.36d+103) then
tmp = x_46im * (((x_46re * x_46re) - (x_46im * x_46im)) + 2.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 = 3.0 * (x_46_re * (x_46_im * x_46_re));
double tmp;
if (x_46_re <= -6.9e-28) {
tmp = t_0;
} else if (x_46_re <= 2.25e-48) {
tmp = x_46_im * ((x_46_re * -x_46_re) - (x_46_im * x_46_im));
} else if (x_46_re <= 2.32e-14) {
tmp = 3.0 * (x_46_im * (x_46_re * x_46_re));
} else if (x_46_re <= 1.36e+103) {
tmp = x_46_im * (((x_46_re * x_46_re) - (x_46_im * x_46_im)) + 2.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im): t_0 = 3.0 * (x_46_re * (x_46_im * x_46_re)) tmp = 0 if x_46_re <= -6.9e-28: tmp = t_0 elif x_46_re <= 2.25e-48: tmp = x_46_im * ((x_46_re * -x_46_re) - (x_46_im * x_46_im)) elif x_46_re <= 2.32e-14: tmp = 3.0 * (x_46_im * (x_46_re * x_46_re)) elif x_46_re <= 1.36e+103: tmp = x_46_im * (((x_46_re * x_46_re) - (x_46_im * x_46_im)) + 2.0) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im) t_0 = Float64(3.0 * Float64(x_46_re * Float64(x_46_im * x_46_re))) tmp = 0.0 if (x_46_re <= -6.9e-28) tmp = t_0; elseif (x_46_re <= 2.25e-48) tmp = Float64(x_46_im * Float64(Float64(x_46_re * Float64(-x_46_re)) - Float64(x_46_im * x_46_im))); elseif (x_46_re <= 2.32e-14) tmp = Float64(3.0 * Float64(x_46_im * Float64(x_46_re * x_46_re))); elseif (x_46_re <= 1.36e+103) 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 = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im) t_0 = 3.0 * (x_46_re * (x_46_im * x_46_re)); tmp = 0.0; if (x_46_re <= -6.9e-28) tmp = t_0; elseif (x_46_re <= 2.25e-48) tmp = x_46_im * ((x_46_re * -x_46_re) - (x_46_im * x_46_im)); elseif (x_46_re <= 2.32e-14) tmp = 3.0 * (x_46_im * (x_46_re * x_46_re)); elseif (x_46_re <= 1.36e+103) tmp = x_46_im * (((x_46_re * x_46_re) - (x_46_im * x_46_im)) + 2.0); else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := Block[{t$95$0 = N[(3.0 * N[(x$46$re * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -6.9e-28], t$95$0, If[LessEqual[x$46$re, 2.25e-48], N[(x$46$im * N[(N[(x$46$re * (-x$46$re)), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.32e-14], N[(3.0 * N[(x$46$im * N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.36e+103], 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], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 \cdot \left(x.re \cdot \left(x.im \cdot x.re\right)\right)\\
\mathbf{if}\;x.re \leq -6.9 \cdot 10^{-28}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x.re \leq 2.25 \cdot 10^{-48}:\\
\;\;\;\;x.im \cdot \left(x.re \cdot \left(-x.re\right) - x.im \cdot x.im\right)\\
\mathbf{elif}\;x.re \leq 2.32 \cdot 10^{-14}:\\
\;\;\;\;3 \cdot \left(x.im \cdot \left(x.re \cdot x.re\right)\right)\\
\mathbf{elif}\;x.re \leq 1.36 \cdot 10^{+103}:\\
\;\;\;\;x.im \cdot \left(\left(x.re \cdot x.re - x.im \cdot x.im\right) + 2\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x.re < -6.90000000000000001e-28 or 1.36e103 < x.re Initial program 71.3%
+-commutative71.3%
*-commutative71.3%
sub-neg71.3%
distribute-lft-in65.6%
associate-+r+65.6%
distribute-rgt-neg-out65.6%
unsub-neg65.6%
associate-*r*76.0%
distribute-rgt-out76.0%
*-commutative76.0%
count-276.0%
distribute-lft1-in76.0%
metadata-eval76.0%
*-commutative76.0%
*-commutative76.0%
associate-*r*76.0%
cube-unmult76.0%
Simplified76.0%
Taylor expanded in x.re around 0 76.0%
Taylor expanded in x.re around inf 76.0%
unpow276.0%
*-commutative76.0%
Simplified76.0%
Applied egg-rr86.5%
if -6.90000000000000001e-28 < x.re < 2.24999999999999994e-48Initial program 99.9%
+-commutative99.9%
*-commutative99.9%
sub-neg99.9%
distribute-lft-in99.9%
associate-+r+99.9%
distribute-rgt-neg-out99.9%
unsub-neg99.9%
associate-*r*99.8%
distribute-rgt-out99.8%
*-commutative99.8%
count-299.8%
distribute-lft1-in99.8%
metadata-eval99.8%
*-commutative99.8%
*-commutative99.8%
associate-*r*99.9%
cube-unmult100.0%
Simplified100.0%
Taylor expanded in x.re around 0 100.0%
associate-*r*100.0%
*-commutative100.0%
fma-neg100.0%
*-commutative100.0%
Applied egg-rr100.0%
fma-udef100.0%
unsub-neg100.0%
Applied egg-rr100.0%
associate-*r*100.0%
unpow399.8%
distribute-rgt-out--99.9%
*-commutative99.9%
associate-*l*99.9%
Applied egg-rr99.9%
Simplified97.9%
if 2.24999999999999994e-48 < x.re < 2.32000000000000015e-14Initial program 99.5%
+-commutative99.5%
*-commutative99.5%
sub-neg99.5%
distribute-lft-in99.5%
associate-+r+99.4%
distribute-rgt-neg-out99.4%
unsub-neg99.4%
associate-*r*99.0%
distribute-rgt-out99.2%
*-commutative99.2%
count-299.2%
distribute-lft1-in99.2%
metadata-eval99.2%
*-commutative99.2%
*-commutative99.2%
associate-*r*99.3%
cube-unmult99.3%
Simplified99.3%
Taylor expanded in x.re around 0 99.2%
Taylor expanded in x.re around inf 79.9%
unpow279.9%
*-commutative79.9%
Simplified79.9%
if 2.32000000000000015e-14 < x.re < 1.36e103Initial program 74.8%
*-commutative74.8%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+51.1%
*-commutative51.1%
distribute-lft-in51.1%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+71.1%
Applied egg-rr71.1%
count-271.1%
distribute-rgt-out71.1%
Applied egg-rr71.1%
Final simplification90.5%
(FPCore (x.re x.im)
:precision binary64
(let* ((t_0 (* 3.0 (* x.re (* x.im x.re)))))
(if (<= x.re -1.8e-26)
t_0
(if (<= x.re 3.2e-48)
(* x.im (- (* x.re (- x.re)) (* x.im x.im)))
(if (<= x.re 1.18e-17)
(* 3.0 (* x.im (* x.re x.re)))
(if (<= x.re 1.36e+103) (* x.im (- 2.0 (* x.im x.im))) t_0))))))
double code(double x_46_re, double x_46_im) {
double t_0 = 3.0 * (x_46_re * (x_46_im * x_46_re));
double tmp;
if (x_46_re <= -1.8e-26) {
tmp = t_0;
} else if (x_46_re <= 3.2e-48) {
tmp = x_46_im * ((x_46_re * -x_46_re) - (x_46_im * x_46_im));
} else if (x_46_re <= 1.18e-17) {
tmp = 3.0 * (x_46_im * (x_46_re * x_46_re));
} else if (x_46_re <= 1.36e+103) {
tmp = x_46_im * (2.0 - (x_46_im * x_46_im));
} 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 = 3.0d0 * (x_46re * (x_46im * x_46re))
if (x_46re <= (-1.8d-26)) then
tmp = t_0
else if (x_46re <= 3.2d-48) then
tmp = x_46im * ((x_46re * -x_46re) - (x_46im * x_46im))
else if (x_46re <= 1.18d-17) then
tmp = 3.0d0 * (x_46im * (x_46re * x_46re))
else if (x_46re <= 1.36d+103) then
tmp = x_46im * (2.0d0 - (x_46im * x_46im))
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 = 3.0 * (x_46_re * (x_46_im * x_46_re));
double tmp;
if (x_46_re <= -1.8e-26) {
tmp = t_0;
} else if (x_46_re <= 3.2e-48) {
tmp = x_46_im * ((x_46_re * -x_46_re) - (x_46_im * x_46_im));
} else if (x_46_re <= 1.18e-17) {
tmp = 3.0 * (x_46_im * (x_46_re * x_46_re));
} else if (x_46_re <= 1.36e+103) {
tmp = x_46_im * (2.0 - (x_46_im * x_46_im));
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im): t_0 = 3.0 * (x_46_re * (x_46_im * x_46_re)) tmp = 0 if x_46_re <= -1.8e-26: tmp = t_0 elif x_46_re <= 3.2e-48: tmp = x_46_im * ((x_46_re * -x_46_re) - (x_46_im * x_46_im)) elif x_46_re <= 1.18e-17: tmp = 3.0 * (x_46_im * (x_46_re * x_46_re)) elif x_46_re <= 1.36e+103: tmp = x_46_im * (2.0 - (x_46_im * x_46_im)) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im) t_0 = Float64(3.0 * Float64(x_46_re * Float64(x_46_im * x_46_re))) tmp = 0.0 if (x_46_re <= -1.8e-26) tmp = t_0; elseif (x_46_re <= 3.2e-48) tmp = Float64(x_46_im * Float64(Float64(x_46_re * Float64(-x_46_re)) - Float64(x_46_im * x_46_im))); elseif (x_46_re <= 1.18e-17) tmp = Float64(3.0 * Float64(x_46_im * Float64(x_46_re * x_46_re))); elseif (x_46_re <= 1.36e+103) tmp = Float64(x_46_im * Float64(2.0 - Float64(x_46_im * x_46_im))); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im) t_0 = 3.0 * (x_46_re * (x_46_im * x_46_re)); tmp = 0.0; if (x_46_re <= -1.8e-26) tmp = t_0; elseif (x_46_re <= 3.2e-48) tmp = x_46_im * ((x_46_re * -x_46_re) - (x_46_im * x_46_im)); elseif (x_46_re <= 1.18e-17) tmp = 3.0 * (x_46_im * (x_46_re * x_46_re)); elseif (x_46_re <= 1.36e+103) tmp = x_46_im * (2.0 - (x_46_im * x_46_im)); else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := Block[{t$95$0 = N[(3.0 * N[(x$46$re * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -1.8e-26], t$95$0, If[LessEqual[x$46$re, 3.2e-48], N[(x$46$im * N[(N[(x$46$re * (-x$46$re)), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.18e-17], N[(3.0 * N[(x$46$im * N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.36e+103], N[(x$46$im * N[(2.0 - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 \cdot \left(x.re \cdot \left(x.im \cdot x.re\right)\right)\\
\mathbf{if}\;x.re \leq -1.8 \cdot 10^{-26}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x.re \leq 3.2 \cdot 10^{-48}:\\
\;\;\;\;x.im \cdot \left(x.re \cdot \left(-x.re\right) - x.im \cdot x.im\right)\\
\mathbf{elif}\;x.re \leq 1.18 \cdot 10^{-17}:\\
\;\;\;\;3 \cdot \left(x.im \cdot \left(x.re \cdot x.re\right)\right)\\
\mathbf{elif}\;x.re \leq 1.36 \cdot 10^{+103}:\\
\;\;\;\;x.im \cdot \left(2 - x.im \cdot x.im\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x.re < -1.8000000000000001e-26 or 1.36e103 < x.re Initial program 71.3%
+-commutative71.3%
*-commutative71.3%
sub-neg71.3%
distribute-lft-in65.6%
associate-+r+65.6%
distribute-rgt-neg-out65.6%
unsub-neg65.6%
associate-*r*76.0%
distribute-rgt-out76.0%
*-commutative76.0%
count-276.0%
distribute-lft1-in76.0%
metadata-eval76.0%
*-commutative76.0%
*-commutative76.0%
associate-*r*76.0%
cube-unmult76.0%
Simplified76.0%
Taylor expanded in x.re around 0 76.0%
Taylor expanded in x.re around inf 76.0%
unpow276.0%
*-commutative76.0%
Simplified76.0%
Applied egg-rr86.5%
if -1.8000000000000001e-26 < x.re < 3.1999999999999998e-48Initial program 99.9%
+-commutative99.9%
*-commutative99.9%
sub-neg99.9%
distribute-lft-in99.9%
associate-+r+99.9%
distribute-rgt-neg-out99.9%
unsub-neg99.9%
associate-*r*99.8%
distribute-rgt-out99.8%
*-commutative99.8%
count-299.8%
distribute-lft1-in99.8%
metadata-eval99.8%
*-commutative99.8%
*-commutative99.8%
associate-*r*99.9%
cube-unmult100.0%
Simplified100.0%
Taylor expanded in x.re around 0 100.0%
associate-*r*100.0%
*-commutative100.0%
fma-neg100.0%
*-commutative100.0%
Applied egg-rr100.0%
fma-udef100.0%
unsub-neg100.0%
Applied egg-rr100.0%
associate-*r*100.0%
unpow399.8%
distribute-rgt-out--99.9%
*-commutative99.9%
associate-*l*99.9%
Applied egg-rr99.9%
Simplified97.9%
if 3.1999999999999998e-48 < x.re < 1.18000000000000004e-17Initial program 99.5%
+-commutative99.5%
*-commutative99.5%
sub-neg99.5%
distribute-lft-in99.5%
associate-+r+99.4%
distribute-rgt-neg-out99.4%
unsub-neg99.4%
associate-*r*99.0%
distribute-rgt-out99.2%
*-commutative99.2%
count-299.2%
distribute-lft1-in99.2%
metadata-eval99.2%
*-commutative99.2%
*-commutative99.2%
associate-*r*99.3%
cube-unmult99.3%
Simplified99.3%
Taylor expanded in x.re around 0 99.2%
Taylor expanded in x.re around inf 79.9%
unpow279.9%
*-commutative79.9%
Simplified79.9%
if 1.18000000000000004e-17 < x.re < 1.36e103Initial program 74.8%
*-commutative74.8%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+51.1%
*-commutative51.1%
distribute-lft-in51.1%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+71.1%
Applied egg-rr71.1%
count-271.1%
distribute-rgt-out71.1%
Applied egg-rr71.1%
Taylor expanded in x.re around 0 67.2%
*-commutative67.2%
unpow267.2%
Simplified67.2%
Final simplification90.2%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.re -7.5e+153) (not (<= x.re 4.2e+116))) (* 3.0 (* x.re (* x.im x.re))) (* x.im (- (* 3.0 (* x.re x.re)) (* x.im x.im)))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_re <= -7.5e+153) || !(x_46_re <= 4.2e+116)) {
tmp = 3.0 * (x_46_re * (x_46_im * x_46_re));
} else {
tmp = x_46_im * ((3.0 * (x_46_re * x_46_re)) - (x_46_im * x_46_im));
}
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_46re <= (-7.5d+153)) .or. (.not. (x_46re <= 4.2d+116))) then
tmp = 3.0d0 * (x_46re * (x_46im * x_46re))
else
tmp = x_46im * ((3.0d0 * (x_46re * x_46re)) - (x_46im * x_46im))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_re <= -7.5e+153) || !(x_46_re <= 4.2e+116)) {
tmp = 3.0 * (x_46_re * (x_46_im * x_46_re));
} else {
tmp = x_46_im * ((3.0 * (x_46_re * x_46_re)) - (x_46_im * x_46_im));
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_re <= -7.5e+153) or not (x_46_re <= 4.2e+116): tmp = 3.0 * (x_46_re * (x_46_im * x_46_re)) else: tmp = x_46_im * ((3.0 * (x_46_re * x_46_re)) - (x_46_im * x_46_im)) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_re <= -7.5e+153) || !(x_46_re <= 4.2e+116)) tmp = Float64(3.0 * Float64(x_46_re * Float64(x_46_im * x_46_re))); else tmp = Float64(x_46_im * Float64(Float64(3.0 * Float64(x_46_re * x_46_re)) - Float64(x_46_im * x_46_im))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if ((x_46_re <= -7.5e+153) || ~((x_46_re <= 4.2e+116))) tmp = 3.0 * (x_46_re * (x_46_im * x_46_re)); else tmp = x_46_im * ((3.0 * (x_46_re * x_46_re)) - (x_46_im * x_46_im)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$re, -7.5e+153], N[Not[LessEqual[x$46$re, 4.2e+116]], $MachinePrecision]], N[(3.0 * N[(x$46$re * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$46$im * N[(N[(3.0 * N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq -7.5 \cdot 10^{+153} \lor \neg \left(x.re \leq 4.2 \cdot 10^{+116}\right):\\
\;\;\;\;3 \cdot \left(x.re \cdot \left(x.im \cdot x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.im \cdot \left(3 \cdot \left(x.re \cdot x.re\right) - x.im \cdot x.im\right)\\
\end{array}
\end{array}
if x.re < -7.50000000000000065e153 or 4.2000000000000002e116 < x.re Initial program 63.1%
+-commutative63.1%
*-commutative63.1%
sub-neg63.1%
distribute-lft-in55.4%
associate-+r+55.4%
distribute-rgt-neg-out55.4%
unsub-neg55.4%
associate-*r*72.2%
distribute-rgt-out72.2%
*-commutative72.2%
count-272.2%
distribute-lft1-in72.2%
metadata-eval72.2%
*-commutative72.2%
*-commutative72.2%
associate-*r*72.2%
cube-unmult72.2%
Simplified72.2%
Taylor expanded in x.re around 0 72.2%
Taylor expanded in x.re around inf 75.3%
unpow275.3%
*-commutative75.3%
Simplified75.3%
Applied egg-rr92.2%
if -7.50000000000000065e153 < x.re < 4.2000000000000002e116Initial program 94.0%
+-commutative94.0%
*-commutative94.0%
sub-neg94.0%
distribute-lft-in93.5%
associate-+r+93.5%
distribute-rgt-neg-out93.5%
unsub-neg93.5%
associate-*r*93.5%
distribute-rgt-out93.5%
*-commutative93.5%
count-293.5%
distribute-lft1-in93.5%
metadata-eval93.5%
*-commutative93.5%
*-commutative93.5%
associate-*r*93.5%
cube-unmult93.6%
Simplified93.6%
Taylor expanded in x.re around 0 93.6%
associate-*r*93.6%
*-commutative93.6%
fma-neg94.6%
*-commutative94.6%
Applied egg-rr94.6%
fma-udef93.6%
unsub-neg93.6%
Applied egg-rr93.6%
associate-*r*93.6%
unpow393.5%
distribute-rgt-out--99.8%
*-commutative99.8%
associate-*l*99.8%
Applied egg-rr99.8%
Final simplification97.9%
(FPCore (x.re x.im)
:precision binary64
(let* ((t_0 (* x.re (- x.im))))
(if (<= x.re -2.55e+210)
t_0
(if (<= x.re -2.3e-297)
(* x.im x.re)
(if (<= x.re 4.4e+179) t_0 (* (* x.im x.re) 2.0))))))
double code(double x_46_re, double x_46_im) {
double t_0 = x_46_re * -x_46_im;
double tmp;
if (x_46_re <= -2.55e+210) {
tmp = t_0;
} else if (x_46_re <= -2.3e-297) {
tmp = x_46_im * x_46_re;
} else if (x_46_re <= 4.4e+179) {
tmp = t_0;
} else {
tmp = (x_46_im * x_46_re) * 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) :: t_0
real(8) :: tmp
t_0 = x_46re * -x_46im
if (x_46re <= (-2.55d+210)) then
tmp = t_0
else if (x_46re <= (-2.3d-297)) then
tmp = x_46im * x_46re
else if (x_46re <= 4.4d+179) then
tmp = t_0
else
tmp = (x_46im * x_46re) * 2.0d0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double t_0 = x_46_re * -x_46_im;
double tmp;
if (x_46_re <= -2.55e+210) {
tmp = t_0;
} else if (x_46_re <= -2.3e-297) {
tmp = x_46_im * x_46_re;
} else if (x_46_re <= 4.4e+179) {
tmp = t_0;
} else {
tmp = (x_46_im * x_46_re) * 2.0;
}
return tmp;
}
def code(x_46_re, x_46_im): t_0 = x_46_re * -x_46_im tmp = 0 if x_46_re <= -2.55e+210: tmp = t_0 elif x_46_re <= -2.3e-297: tmp = x_46_im * x_46_re elif x_46_re <= 4.4e+179: tmp = t_0 else: tmp = (x_46_im * x_46_re) * 2.0 return tmp
function code(x_46_re, x_46_im) t_0 = Float64(x_46_re * Float64(-x_46_im)) tmp = 0.0 if (x_46_re <= -2.55e+210) tmp = t_0; elseif (x_46_re <= -2.3e-297) tmp = Float64(x_46_im * x_46_re); elseif (x_46_re <= 4.4e+179) tmp = t_0; else tmp = Float64(Float64(x_46_im * x_46_re) * 2.0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) t_0 = x_46_re * -x_46_im; tmp = 0.0; if (x_46_re <= -2.55e+210) tmp = t_0; elseif (x_46_re <= -2.3e-297) tmp = x_46_im * x_46_re; elseif (x_46_re <= 4.4e+179) tmp = t_0; else tmp = (x_46_im * x_46_re) * 2.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := Block[{t$95$0 = N[(x$46$re * (-x$46$im)), $MachinePrecision]}, If[LessEqual[x$46$re, -2.55e+210], t$95$0, If[LessEqual[x$46$re, -2.3e-297], N[(x$46$im * x$46$re), $MachinePrecision], If[LessEqual[x$46$re, 4.4e+179], t$95$0, N[(N[(x$46$im * x$46$re), $MachinePrecision] * 2.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x.re \cdot \left(-x.im\right)\\
\mathbf{if}\;x.re \leq -2.55 \cdot 10^{+210}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x.re \leq -2.3 \cdot 10^{-297}:\\
\;\;\;\;x.im \cdot x.re\\
\mathbf{elif}\;x.re \leq 4.4 \cdot 10^{+179}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\left(x.im \cdot x.re\right) \cdot 2\\
\end{array}
\end{array}
if x.re < -2.55e210 or -2.2999999999999999e-297 < x.re < 4.4000000000000001e179Initial program 84.4%
Taylor expanded in x.re around inf 46.3%
Simplified46.3%
*-commutative46.3%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+25.1%
*-commutative25.1%
distribute-lft-in25.1%
Applied egg-rr25.1%
Taylor expanded in x.re around 0 14.0%
Simplified26.1%
if -2.55e210 < x.re < -2.2999999999999999e-297Initial program 92.2%
*-commutative92.2%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+65.1%
*-commutative65.1%
distribute-lft-in65.1%
*-un-lft-identity65.1%
fma-def65.1%
Applied egg-rr65.1%
Simplified43.9%
Taylor expanded in x.re around inf 18.4%
unpow218.4%
distribute-rgt-out18.4%
Simplified18.4%
Taylor expanded in x.re around 0 17.7%
if 4.4000000000000001e179 < x.re Initial program 71.9%
Taylor expanded in x.re around inf 93.4%
Simplified93.4%
*-commutative93.4%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+93.4%
*-commutative93.4%
distribute-lft-in93.4%
Applied egg-rr93.4%
Taylor expanded in x.re around 0 46.1%
Final simplification24.9%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -6e+150) (not (<= x.im 5.2e+197))) (* x.re (* x.re (- x.im))) (* 3.0 (* x.im (* x.re x.re)))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -6e+150) || !(x_46_im <= 5.2e+197)) {
tmp = x_46_re * (x_46_re * -x_46_im);
} else {
tmp = 3.0 * (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+150)) .or. (.not. (x_46im <= 5.2d+197))) then
tmp = x_46re * (x_46re * -x_46im)
else
tmp = 3.0d0 * (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+150) || !(x_46_im <= 5.2e+197)) {
tmp = x_46_re * (x_46_re * -x_46_im);
} else {
tmp = 3.0 * (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+150) or not (x_46_im <= 5.2e+197): tmp = x_46_re * (x_46_re * -x_46_im) else: tmp = 3.0 * (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+150) || !(x_46_im <= 5.2e+197)) tmp = Float64(x_46_re * Float64(x_46_re * Float64(-x_46_im))); else tmp = Float64(3.0 * 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+150) || ~((x_46_im <= 5.2e+197))) tmp = x_46_re * (x_46_re * -x_46_im); else tmp = 3.0 * (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+150], N[Not[LessEqual[x$46$im, 5.2e+197]], $MachinePrecision]], N[(x$46$re * N[(x$46$re * (-x$46$im)), $MachinePrecision]), $MachinePrecision], N[(3.0 * N[(x$46$im * N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -6 \cdot 10^{+150} \lor \neg \left(x.im \leq 5.2 \cdot 10^{+197}\right):\\
\;\;\;\;x.re \cdot \left(x.re \cdot \left(-x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;3 \cdot \left(x.im \cdot \left(x.re \cdot x.re\right)\right)\\
\end{array}
\end{array}
if x.im < -6.00000000000000025e150 or 5.19999999999999975e197 < x.im Initial program 57.4%
+-commutative57.4%
*-commutative57.4%
sub-neg57.4%
distribute-lft-in57.4%
associate-+r+57.4%
distribute-rgt-neg-out57.4%
unsub-neg57.4%
associate-*r*57.4%
distribute-rgt-out57.4%
*-commutative57.4%
count-257.4%
distribute-lft1-in57.4%
metadata-eval57.4%
*-commutative57.4%
*-commutative57.4%
associate-*r*57.4%
cube-unmult57.4%
Simplified57.4%
Taylor expanded in x.re around 0 57.4%
associate-*r*57.4%
*-commutative57.4%
fma-neg61.7%
*-commutative61.7%
Applied egg-rr61.7%
fma-udef57.4%
unsub-neg57.4%
Applied egg-rr57.4%
Taylor expanded in x.re around inf 9.0%
Simplified36.3%
if -6.00000000000000025e150 < x.im < 5.19999999999999975e197Initial program 92.6%
+-commutative92.6%
*-commutative92.6%
sub-neg92.6%
distribute-lft-in89.7%
associate-+r+89.7%
distribute-rgt-neg-out89.7%
unsub-neg89.7%
associate-*r*95.0%
distribute-rgt-out95.0%
*-commutative95.0%
count-295.0%
distribute-lft1-in95.0%
metadata-eval95.0%
*-commutative95.0%
*-commutative95.0%
associate-*r*95.0%
cube-unmult95.1%
Simplified95.1%
Taylor expanded in x.re around 0 95.0%
Taylor expanded in x.re around inf 60.0%
unpow260.0%
*-commutative60.0%
Simplified60.0%
Final simplification55.6%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -3e+29) (not (<= x.im 1.26e+39))) (* x.im (- -2.0 (* x.im x.im))) (* 3.0 (* x.im (* x.re x.re)))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -3e+29) || !(x_46_im <= 1.26e+39)) {
tmp = x_46_im * (-2.0 - (x_46_im * x_46_im));
} else {
tmp = 3.0 * (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 <= (-3d+29)) .or. (.not. (x_46im <= 1.26d+39))) then
tmp = x_46im * ((-2.0d0) - (x_46im * x_46im))
else
tmp = 3.0d0 * (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 <= -3e+29) || !(x_46_im <= 1.26e+39)) {
tmp = x_46_im * (-2.0 - (x_46_im * x_46_im));
} else {
tmp = 3.0 * (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 <= -3e+29) or not (x_46_im <= 1.26e+39): tmp = x_46_im * (-2.0 - (x_46_im * x_46_im)) else: tmp = 3.0 * (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 <= -3e+29) || !(x_46_im <= 1.26e+39)) tmp = Float64(x_46_im * Float64(-2.0 - Float64(x_46_im * x_46_im))); else tmp = Float64(3.0 * 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 <= -3e+29) || ~((x_46_im <= 1.26e+39))) tmp = x_46_im * (-2.0 - (x_46_im * x_46_im)); else tmp = 3.0 * (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, -3e+29], N[Not[LessEqual[x$46$im, 1.26e+39]], $MachinePrecision]], N[(x$46$im * N[(-2.0 - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(3.0 * N[(x$46$im * N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -3 \cdot 10^{+29} \lor \neg \left(x.im \leq 1.26 \cdot 10^{+39}\right):\\
\;\;\;\;x.im \cdot \left(-2 - x.im \cdot x.im\right)\\
\mathbf{else}:\\
\;\;\;\;3 \cdot \left(x.im \cdot \left(x.re \cdot x.re\right)\right)\\
\end{array}
\end{array}
if x.im < -2.9999999999999999e29 or 1.26000000000000001e39 < x.im Initial program 77.3%
*-commutative77.3%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+78.2%
*-commutative78.2%
distribute-lft-in78.2%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+87.7%
Applied egg-rr87.7%
count-287.7%
distribute-rgt-out87.7%
Applied egg-rr87.7%
Taylor expanded in x.re around 0 79.2%
*-commutative79.2%
unpow279.2%
Simplified79.2%
expm1-log1p-u49.3%
expm1-udef49.3%
Applied egg-rr49.3%
Simplified79.2%
if -2.9999999999999999e29 < x.im < 1.26000000000000001e39Initial program 92.4%
+-commutative92.4%
*-commutative92.4%
sub-neg92.4%
distribute-lft-in92.4%
associate-+r+92.4%
distribute-rgt-neg-out92.4%
unsub-neg92.4%
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%
Taylor expanded in x.re around inf 71.3%
unpow271.3%
*-commutative71.3%
Simplified71.3%
Final simplification74.5%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -1.5e+27) (not (<= x.im 2.5e+37))) (* x.im (- -2.0 (* 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.5e+27) || !(x_46_im <= 2.5e+37)) {
tmp = x_46_im * (-2.0 - (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.5d+27)) .or. (.not. (x_46im <= 2.5d+37))) then
tmp = x_46im * ((-2.0d0) - (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.5e+27) || !(x_46_im <= 2.5e+37)) {
tmp = x_46_im * (-2.0 - (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.5e+27) or not (x_46_im <= 2.5e+37): tmp = x_46_im * (-2.0 - (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.5e+27) || !(x_46_im <= 2.5e+37)) tmp = Float64(x_46_im * Float64(-2.0 - Float64(x_46_im * x_46_im))); else tmp = Float64(Float64(x_46_im * 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.5e+27) || ~((x_46_im <= 2.5e+37))) tmp = x_46_im * (-2.0 - (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[Or[LessEqual[x$46$im, -1.5e+27], N[Not[LessEqual[x$46$im, 2.5e+37]], $MachinePrecision]], N[(x$46$im * N[(-2.0 - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im * 3.0), $MachinePrecision] * N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -1.5 \cdot 10^{+27} \lor \neg \left(x.im \leq 2.5 \cdot 10^{+37}\right):\\
\;\;\;\;x.im \cdot \left(-2 - x.im \cdot x.im\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.im \cdot 3\right) \cdot \left(x.re \cdot x.re\right)\\
\end{array}
\end{array}
if x.im < -1.49999999999999988e27 or 2.49999999999999994e37 < x.im Initial program 77.3%
*-commutative77.3%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+78.2%
*-commutative78.2%
distribute-lft-in78.2%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+87.7%
Applied egg-rr87.7%
count-287.7%
distribute-rgt-out87.7%
Applied egg-rr87.7%
Taylor expanded in x.re around 0 79.2%
*-commutative79.2%
unpow279.2%
Simplified79.2%
expm1-log1p-u49.3%
expm1-udef49.3%
Applied egg-rr49.3%
Simplified79.2%
if -1.49999999999999988e27 < x.im < 2.49999999999999994e37Initial program 92.4%
+-commutative92.4%
*-commutative92.4%
sub-neg92.4%
distribute-lft-in92.4%
associate-+r+92.4%
distribute-rgt-neg-out92.4%
unsub-neg92.4%
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%
Taylor expanded in x.re around inf 71.3%
unpow271.3%
*-commutative71.3%
associate-*r*71.3%
*-commutative71.3%
Simplified71.3%
Final simplification74.5%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -5e+27) (not (<= x.im 9.6e+33))) (* x.im (- -2.0 (* x.im x.im))) (* 3.0 (* x.re (* x.im x.re)))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -5e+27) || !(x_46_im <= 9.6e+33)) {
tmp = x_46_im * (-2.0 - (x_46_im * x_46_im));
} else {
tmp = 3.0 * (x_46_re * (x_46_im * 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 <= (-5d+27)) .or. (.not. (x_46im <= 9.6d+33))) then
tmp = x_46im * ((-2.0d0) - (x_46im * x_46im))
else
tmp = 3.0d0 * (x_46re * (x_46im * 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 <= -5e+27) || !(x_46_im <= 9.6e+33)) {
tmp = x_46_im * (-2.0 - (x_46_im * x_46_im));
} else {
tmp = 3.0 * (x_46_re * (x_46_im * x_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_im <= -5e+27) or not (x_46_im <= 9.6e+33): tmp = x_46_im * (-2.0 - (x_46_im * x_46_im)) else: tmp = 3.0 * (x_46_re * (x_46_im * x_46_re)) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -5e+27) || !(x_46_im <= 9.6e+33)) tmp = Float64(x_46_im * Float64(-2.0 - Float64(x_46_im * x_46_im))); else tmp = Float64(3.0 * Float64(x_46_re * Float64(x_46_im * x_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if ((x_46_im <= -5e+27) || ~((x_46_im <= 9.6e+33))) tmp = x_46_im * (-2.0 - (x_46_im * x_46_im)); else tmp = 3.0 * (x_46_re * (x_46_im * x_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -5e+27], N[Not[LessEqual[x$46$im, 9.6e+33]], $MachinePrecision]], N[(x$46$im * N[(-2.0 - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(3.0 * N[(x$46$re * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -5 \cdot 10^{+27} \lor \neg \left(x.im \leq 9.6 \cdot 10^{+33}\right):\\
\;\;\;\;x.im \cdot \left(-2 - x.im \cdot x.im\right)\\
\mathbf{else}:\\
\;\;\;\;3 \cdot \left(x.re \cdot \left(x.im \cdot x.re\right)\right)\\
\end{array}
\end{array}
if x.im < -4.99999999999999979e27 or 9.5999999999999999e33 < x.im Initial program 77.3%
*-commutative77.3%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+78.2%
*-commutative78.2%
distribute-lft-in78.2%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+87.7%
Applied egg-rr87.7%
count-287.7%
distribute-rgt-out87.7%
Applied egg-rr87.7%
Taylor expanded in x.re around 0 79.2%
*-commutative79.2%
unpow279.2%
Simplified79.2%
expm1-log1p-u49.3%
expm1-udef49.3%
Applied egg-rr49.3%
Simplified79.2%
if -4.99999999999999979e27 < x.im < 9.5999999999999999e33Initial program 92.4%
+-commutative92.4%
*-commutative92.4%
sub-neg92.4%
distribute-lft-in92.4%
associate-+r+92.4%
distribute-rgt-neg-out92.4%
unsub-neg92.4%
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%
Taylor expanded in x.re around inf 71.3%
unpow271.3%
*-commutative71.3%
Simplified71.3%
Applied egg-rr78.6%
Final simplification78.8%
(FPCore (x.re x.im)
:precision binary64
(if (or (<= x.re -2.1e+209)
(and (not (<= x.re -2.3e-297)) (<= x.re 1.65e+181)))
(* x.re (- x.im))
(* x.im x.re)))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_re <= -2.1e+209) || (!(x_46_re <= -2.3e-297) && (x_46_re <= 1.65e+181))) {
tmp = x_46_re * -x_46_im;
} else {
tmp = x_46_im * 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_46re <= (-2.1d+209)) .or. (.not. (x_46re <= (-2.3d-297))) .and. (x_46re <= 1.65d+181)) then
tmp = x_46re * -x_46im
else
tmp = x_46im * 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_re <= -2.1e+209) || (!(x_46_re <= -2.3e-297) && (x_46_re <= 1.65e+181))) {
tmp = x_46_re * -x_46_im;
} else {
tmp = x_46_im * x_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_re <= -2.1e+209) or (not (x_46_re <= -2.3e-297) and (x_46_re <= 1.65e+181)): tmp = x_46_re * -x_46_im else: tmp = x_46_im * x_46_re return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_re <= -2.1e+209) || (!(x_46_re <= -2.3e-297) && (x_46_re <= 1.65e+181))) tmp = Float64(x_46_re * Float64(-x_46_im)); else tmp = Float64(x_46_im * x_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if ((x_46_re <= -2.1e+209) || (~((x_46_re <= -2.3e-297)) && (x_46_re <= 1.65e+181))) tmp = x_46_re * -x_46_im; else tmp = x_46_im * x_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$re, -2.1e+209], And[N[Not[LessEqual[x$46$re, -2.3e-297]], $MachinePrecision], LessEqual[x$46$re, 1.65e+181]]], N[(x$46$re * (-x$46$im)), $MachinePrecision], N[(x$46$im * x$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq -2.1 \cdot 10^{+209} \lor \neg \left(x.re \leq -2.3 \cdot 10^{-297}\right) \land x.re \leq 1.65 \cdot 10^{+181}:\\
\;\;\;\;x.re \cdot \left(-x.im\right)\\
\mathbf{else}:\\
\;\;\;\;x.im \cdot x.re\\
\end{array}
\end{array}
if x.re < -2.1e209 or -2.2999999999999999e-297 < x.re < 1.65000000000000008e181Initial program 84.4%
Taylor expanded in x.re around inf 46.3%
Simplified46.3%
*-commutative46.3%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+25.1%
*-commutative25.1%
distribute-lft-in25.1%
Applied egg-rr25.1%
Taylor expanded in x.re around 0 14.0%
Simplified26.1%
if -2.1e209 < x.re < -2.2999999999999999e-297 or 1.65000000000000008e181 < x.re Initial program 87.8%
*-commutative87.8%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+66.6%
*-commutative66.6%
distribute-lft-in66.6%
*-un-lft-identity66.6%
fma-def66.6%
Applied egg-rr66.6%
Simplified49.9%
Taylor expanded in x.re around inf 34.4%
unpow234.4%
distribute-rgt-out34.4%
Simplified34.4%
Taylor expanded in x.re around 0 23.7%
Final simplification24.9%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -3.05e+150) (not (<= x.im 1.8e+194))) (* x.re (* x.re (- x.im))) (* x.re (* x.im x.re))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -3.05e+150) || !(x_46_im <= 1.8e+194)) {
tmp = x_46_re * (x_46_re * -x_46_im);
} else {
tmp = x_46_re * (x_46_im * 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 <= (-3.05d+150)) .or. (.not. (x_46im <= 1.8d+194))) then
tmp = x_46re * (x_46re * -x_46im)
else
tmp = x_46re * (x_46im * 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 <= -3.05e+150) || !(x_46_im <= 1.8e+194)) {
tmp = x_46_re * (x_46_re * -x_46_im);
} else {
tmp = x_46_re * (x_46_im * x_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_im <= -3.05e+150) or not (x_46_im <= 1.8e+194): tmp = x_46_re * (x_46_re * -x_46_im) else: tmp = x_46_re * (x_46_im * x_46_re) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -3.05e+150) || !(x_46_im <= 1.8e+194)) tmp = Float64(x_46_re * Float64(x_46_re * Float64(-x_46_im))); else tmp = Float64(x_46_re * Float64(x_46_im * x_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if ((x_46_im <= -3.05e+150) || ~((x_46_im <= 1.8e+194))) tmp = x_46_re * (x_46_re * -x_46_im); else tmp = x_46_re * (x_46_im * x_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -3.05e+150], N[Not[LessEqual[x$46$im, 1.8e+194]], $MachinePrecision]], N[(x$46$re * N[(x$46$re * (-x$46$im)), $MachinePrecision]), $MachinePrecision], N[(x$46$re * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -3.05 \cdot 10^{+150} \lor \neg \left(x.im \leq 1.8 \cdot 10^{+194}\right):\\
\;\;\;\;x.re \cdot \left(x.re \cdot \left(-x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.re \cdot \left(x.im \cdot x.re\right)\\
\end{array}
\end{array}
if x.im < -3.05000000000000013e150 or 1.8e194 < x.im Initial program 57.4%
+-commutative57.4%
*-commutative57.4%
sub-neg57.4%
distribute-lft-in57.4%
associate-+r+57.4%
distribute-rgt-neg-out57.4%
unsub-neg57.4%
associate-*r*57.4%
distribute-rgt-out57.4%
*-commutative57.4%
count-257.4%
distribute-lft1-in57.4%
metadata-eval57.4%
*-commutative57.4%
*-commutative57.4%
associate-*r*57.4%
cube-unmult57.4%
Simplified57.4%
Taylor expanded in x.re around 0 57.4%
associate-*r*57.4%
*-commutative57.4%
fma-neg61.7%
*-commutative61.7%
Applied egg-rr61.7%
fma-udef57.4%
unsub-neg57.4%
Applied egg-rr57.4%
Taylor expanded in x.re around inf 9.0%
Simplified36.3%
if -3.05000000000000013e150 < x.im < 1.8e194Initial program 92.6%
Taylor expanded in x.re around inf 60.1%
Simplified60.1%
add-log-exp38.1%
+-commutative38.1%
exp-sum38.1%
Applied egg-rr41.4%
Final simplification40.4%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -1.75e+156) (not (<= x.im 5.4e+218))) (* x.re (- x.im)) (* x.im (* x.re x.re))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -1.75e+156) || !(x_46_im <= 5.4e+218)) {
tmp = x_46_re * -x_46_im;
} 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 <= (-1.75d+156)) .or. (.not. (x_46im <= 5.4d+218))) then
tmp = x_46re * -x_46im
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 <= -1.75e+156) || !(x_46_im <= 5.4e+218)) {
tmp = x_46_re * -x_46_im;
} 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 <= -1.75e+156) or not (x_46_im <= 5.4e+218): tmp = x_46_re * -x_46_im 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 <= -1.75e+156) || !(x_46_im <= 5.4e+218)) tmp = Float64(x_46_re * Float64(-x_46_im)); 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 <= -1.75e+156) || ~((x_46_im <= 5.4e+218))) tmp = x_46_re * -x_46_im; 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, -1.75e+156], N[Not[LessEqual[x$46$im, 5.4e+218]], $MachinePrecision]], N[(x$46$re * (-x$46$im)), $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 -1.75 \cdot 10^{+156} \lor \neg \left(x.im \leq 5.4 \cdot 10^{+218}\right):\\
\;\;\;\;x.re \cdot \left(-x.im\right)\\
\mathbf{else}:\\
\;\;\;\;x.im \cdot \left(x.re \cdot x.re\right)\\
\end{array}
\end{array}
if x.im < -1.7500000000000002e156 or 5.40000000000000025e218 < x.im Initial program 59.1%
Taylor expanded in x.re around inf 7.2%
Simplified7.2%
*-commutative7.2%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+3.1%
*-commutative3.1%
distribute-lft-in3.1%
Applied egg-rr3.1%
Taylor expanded in x.re around 0 12.6%
Simplified27.1%
if -1.7500000000000002e156 < x.im < 5.40000000000000025e218Initial program 91.8%
*-commutative91.8%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+63.6%
*-commutative63.6%
distribute-lft-in63.6%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+44.0%
Applied egg-rr44.0%
Taylor expanded in x.re around inf 40.7%
unpow240.7%
*-commutative40.7%
Simplified40.7%
Final simplification38.4%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -1.6e+152) (not (<= x.im 3.2e+217))) (* x.re (- x.im)) (* x.re (* x.im x.re))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -1.6e+152) || !(x_46_im <= 3.2e+217)) {
tmp = x_46_re * -x_46_im;
} else {
tmp = x_46_re * (x_46_im * 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.6d+152)) .or. (.not. (x_46im <= 3.2d+217))) then
tmp = x_46re * -x_46im
else
tmp = x_46re * (x_46im * 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.6e+152) || !(x_46_im <= 3.2e+217)) {
tmp = x_46_re * -x_46_im;
} else {
tmp = x_46_re * (x_46_im * x_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_im <= -1.6e+152) or not (x_46_im <= 3.2e+217): tmp = x_46_re * -x_46_im else: tmp = x_46_re * (x_46_im * x_46_re) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -1.6e+152) || !(x_46_im <= 3.2e+217)) tmp = Float64(x_46_re * Float64(-x_46_im)); else tmp = Float64(x_46_re * Float64(x_46_im * 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.6e+152) || ~((x_46_im <= 3.2e+217))) tmp = x_46_re * -x_46_im; else tmp = x_46_re * (x_46_im * x_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -1.6e+152], N[Not[LessEqual[x$46$im, 3.2e+217]], $MachinePrecision]], N[(x$46$re * (-x$46$im)), $MachinePrecision], N[(x$46$re * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -1.6 \cdot 10^{+152} \lor \neg \left(x.im \leq 3.2 \cdot 10^{+217}\right):\\
\;\;\;\;x.re \cdot \left(-x.im\right)\\
\mathbf{else}:\\
\;\;\;\;x.re \cdot \left(x.im \cdot x.re\right)\\
\end{array}
\end{array}
if x.im < -1.60000000000000003e152 or 3.2000000000000001e217 < x.im Initial program 59.1%
Taylor expanded in x.re around inf 7.2%
Simplified7.2%
*-commutative7.2%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+3.1%
*-commutative3.1%
distribute-lft-in3.1%
Applied egg-rr3.1%
Taylor expanded in x.re around 0 12.6%
Simplified27.1%
if -1.60000000000000003e152 < x.im < 3.2000000000000001e217Initial program 91.8%
Taylor expanded in x.re around inf 59.7%
Simplified59.7%
add-log-exp38.1%
+-commutative38.1%
exp-sum38.1%
Applied egg-rr41.3%
Final simplification38.8%
(FPCore (x.re x.im) :precision binary64 (* x.im x.re))
double code(double x_46_re, double x_46_im) {
return x_46_im * 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
end function
public static double code(double x_46_re, double x_46_im) {
return x_46_im * x_46_re;
}
def code(x_46_re, x_46_im): return x_46_im * x_46_re
function code(x_46_re, x_46_im) return Float64(x_46_im * x_46_re) end
function tmp = code(x_46_re, x_46_im) tmp = x_46_im * x_46_re; end
code[x$46$re_, x$46$im_] := N[(x$46$im * x$46$re), $MachinePrecision]
\begin{array}{l}
\\
x.im \cdot x.re
\end{array}
Initial program 86.2%
*-commutative86.2%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+64.4%
*-commutative64.4%
distribute-lft-in64.4%
*-un-lft-identity64.4%
fma-def64.4%
Applied egg-rr64.4%
Simplified45.7%
Taylor expanded in x.re around inf 29.9%
unpow229.9%
distribute-rgt-out31.8%
Simplified31.8%
Taylor expanded in x.re around 0 19.0%
Final simplification19.0%
(FPCore (x.re x.im) :precision binary64 (- x.im))
double code(double x_46_re, double x_46_im) {
return -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_46im
end function
public static double code(double x_46_re, double x_46_im) {
return -x_46_im;
}
def code(x_46_re, x_46_im): return -x_46_im
function code(x_46_re, x_46_im) return Float64(-x_46_im) end
function tmp = code(x_46_re, x_46_im) tmp = -x_46_im; end
code[x$46$re_, x$46$im_] := (-x$46$im)
\begin{array}{l}
\\
-x.im
\end{array}
Initial program 86.2%
*-commutative86.2%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+64.4%
*-commutative64.4%
distribute-lft-in64.4%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
+-inverses0.0%
flip-+50.9%
Applied egg-rr50.9%
count-250.9%
distribute-rgt-out50.9%
Applied egg-rr50.9%
Taylor expanded in x.re around 0 36.3%
*-commutative36.3%
unpow236.3%
Simplified36.3%
Taylor expanded in x.im around 0 3.0%
Simplified4.3%
Final simplification4.3%
(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 86.2%
+-commutative86.2%
*-commutative86.2%
sub-neg86.2%
distribute-lft-in83.8%
associate-+r+83.8%
distribute-rgt-neg-out83.8%
unsub-neg83.8%
associate-*r*88.1%
distribute-rgt-out88.1%
*-commutative88.1%
count-288.1%
distribute-lft1-in88.1%
metadata-eval88.1%
*-commutative88.1%
*-commutative88.1%
associate-*r*88.1%
cube-unmult88.1%
Simplified88.1%
Taylor expanded in x.re around 0 58.9%
Simplified2.8%
Final simplification2.8%
(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 2023193
(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)))