
(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 14 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 -1.35e+103) (not (<= x.im 1e+96))) (+ (+ x.im x.im) (* (+ x.im x.re) (* x.im (- x.re x.im)))) (- (* (* x.re (* x.im x.re)) 3.0) (pow x.im 3.0))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -1.35e+103) || !(x_46_im <= 1e+96)) {
tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im)));
} else {
tmp = ((x_46_re * (x_46_im * x_46_re)) * 3.0) - pow(x_46_im, 3.0);
}
return tmp;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8) :: tmp
if ((x_46im <= (-1.35d+103)) .or. (.not. (x_46im <= 1d+96))) then
tmp = (x_46im + x_46im) + ((x_46im + x_46re) * (x_46im * (x_46re - x_46im)))
else
tmp = ((x_46re * (x_46im * x_46re)) * 3.0d0) - (x_46im ** 3.0d0)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -1.35e+103) || !(x_46_im <= 1e+96)) {
tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im)));
} else {
tmp = ((x_46_re * (x_46_im * x_46_re)) * 3.0) - Math.pow(x_46_im, 3.0);
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_im <= -1.35e+103) or not (x_46_im <= 1e+96): tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im))) else: tmp = ((x_46_re * (x_46_im * x_46_re)) * 3.0) - math.pow(x_46_im, 3.0) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -1.35e+103) || !(x_46_im <= 1e+96)) tmp = Float64(Float64(x_46_im + x_46_im) + Float64(Float64(x_46_im + x_46_re) * Float64(x_46_im * Float64(x_46_re - x_46_im)))); else tmp = Float64(Float64(Float64(x_46_re * Float64(x_46_im * x_46_re)) * 3.0) - (x_46_im ^ 3.0)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if ((x_46_im <= -1.35e+103) || ~((x_46_im <= 1e+96))) tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im))); else tmp = ((x_46_re * (x_46_im * x_46_re)) * 3.0) - (x_46_im ^ 3.0); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -1.35e+103], N[Not[LessEqual[x$46$im, 1e+96]], $MachinePrecision]], N[(N[(x$46$im + x$46$im), $MachinePrecision] + N[(N[(x$46$im + x$46$re), $MachinePrecision] * N[(x$46$im * N[(x$46$re - x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$46$re * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] * 3.0), $MachinePrecision] - N[Power[x$46$im, 3.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -1.35 \cdot 10^{+103} \lor \neg \left(x.im \leq 10^{+96}\right):\\
\;\;\;\;\left(x.im + x.im\right) + \left(x.im + x.re\right) \cdot \left(x.im \cdot \left(x.re - x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x.re \cdot \left(x.im \cdot x.re\right)\right) \cdot 3 - {x.im}^{3}\\
\end{array}
\end{array}
if x.im < -1.34999999999999996e103 or 1.00000000000000005e96 < x.im Initial program 58.0%
+-commutative58.0%
*-commutative58.0%
fma-def64.2%
*-commutative64.2%
distribute-rgt-out64.2%
*-commutative64.2%
Simplified64.2%
fma-udef58.0%
distribute-lft-in58.0%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
*-commutative0.0%
associate-*r/0.0%
*-commutative0.0%
+-inverses0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
+-inverses0.0%
+-inverses0.0%
flip-+75.3%
*-commutative75.3%
difference-of-squares100.0%
associate-*l*100.0%
Applied egg-rr100.0%
if -1.34999999999999996e103 < x.im < 1.00000000000000005e96Initial program 90.8%
+-commutative90.8%
*-commutative90.8%
sub-neg90.8%
distribute-lft-in90.8%
associate-+r+90.8%
distribute-rgt-neg-out90.8%
unsub-neg90.8%
Simplified99.8%
Final simplification99.9%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -1.35e+103) (not (<= x.im 1e+96))) (+ (+ x.im x.im) (* (+ x.im x.re) (* x.im (- x.re x.im)))) (- (* x.re (* (* x.im x.re) 3.0)) (pow x.im 3.0))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -1.35e+103) || !(x_46_im <= 1e+96)) {
tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im)));
} else {
tmp = (x_46_re * ((x_46_im * x_46_re) * 3.0)) - pow(x_46_im, 3.0);
}
return tmp;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8) :: tmp
if ((x_46im <= (-1.35d+103)) .or. (.not. (x_46im <= 1d+96))) then
tmp = (x_46im + x_46im) + ((x_46im + x_46re) * (x_46im * (x_46re - x_46im)))
else
tmp = (x_46re * ((x_46im * x_46re) * 3.0d0)) - (x_46im ** 3.0d0)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -1.35e+103) || !(x_46_im <= 1e+96)) {
tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im)));
} else {
tmp = (x_46_re * ((x_46_im * x_46_re) * 3.0)) - Math.pow(x_46_im, 3.0);
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_im <= -1.35e+103) or not (x_46_im <= 1e+96): tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im))) else: tmp = (x_46_re * ((x_46_im * x_46_re) * 3.0)) - math.pow(x_46_im, 3.0) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -1.35e+103) || !(x_46_im <= 1e+96)) tmp = Float64(Float64(x_46_im + x_46_im) + Float64(Float64(x_46_im + x_46_re) * Float64(x_46_im * Float64(x_46_re - x_46_im)))); else tmp = Float64(Float64(x_46_re * Float64(Float64(x_46_im * x_46_re) * 3.0)) - (x_46_im ^ 3.0)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im) tmp = 0.0; if ((x_46_im <= -1.35e+103) || ~((x_46_im <= 1e+96))) tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im))); else tmp = (x_46_re * ((x_46_im * x_46_re) * 3.0)) - (x_46_im ^ 3.0); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -1.35e+103], N[Not[LessEqual[x$46$im, 1e+96]], $MachinePrecision]], N[(N[(x$46$im + x$46$im), $MachinePrecision] + N[(N[(x$46$im + x$46$re), $MachinePrecision] * N[(x$46$im * N[(x$46$re - x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * N[(N[(x$46$im * x$46$re), $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision] - N[Power[x$46$im, 3.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -1.35 \cdot 10^{+103} \lor \neg \left(x.im \leq 10^{+96}\right):\\
\;\;\;\;\left(x.im + x.im\right) + \left(x.im + x.re\right) \cdot \left(x.im \cdot \left(x.re - x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.re \cdot \left(\left(x.im \cdot x.re\right) \cdot 3\right) - {x.im}^{3}\\
\end{array}
\end{array}
if x.im < -1.34999999999999996e103 or 1.00000000000000005e96 < x.im Initial program 58.0%
+-commutative58.0%
*-commutative58.0%
fma-def64.2%
*-commutative64.2%
distribute-rgt-out64.2%
*-commutative64.2%
Simplified64.2%
fma-udef58.0%
distribute-lft-in58.0%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
*-commutative0.0%
associate-*r/0.0%
*-commutative0.0%
+-inverses0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
+-inverses0.0%
+-inverses0.0%
flip-+75.3%
*-commutative75.3%
difference-of-squares100.0%
associate-*l*100.0%
Applied egg-rr100.0%
if -1.34999999999999996e103 < x.im < 1.00000000000000005e96Initial program 90.8%
+-commutative90.8%
*-commutative90.8%
sub-neg90.8%
distribute-lft-in90.8%
associate-+r+90.8%
distribute-rgt-neg-out90.8%
unsub-neg90.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.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)))))
(t_1 (+ (+ x.im x.im) (* (+ x.im x.re) (* x.im (- x.re x.im))))))
(if (<= x.im -2e+138)
t_1
(if (<= x.im -1.05e-107)
t_0
(if (<= x.im 2e-68)
(+ (* x.re (* x.im x.re)) (* x.re (* x.re (* x.im 2.0))))
(if (<= x.im 1e+85) t_0 t_1))))))
double code(double x_46_re, double x_46_im) {
double t_0 = (x_46_im * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) + (x_46_re * ((x_46_im * x_46_re) + (x_46_im * x_46_re)));
double t_1 = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im)));
double tmp;
if (x_46_im <= -2e+138) {
tmp = t_1;
} else if (x_46_im <= -1.05e-107) {
tmp = t_0;
} else if (x_46_im <= 2e-68) {
tmp = (x_46_re * (x_46_im * x_46_re)) + (x_46_re * (x_46_re * (x_46_im * 2.0)));
} else if (x_46_im <= 1e+85) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x_46im * ((x_46re * x_46re) - (x_46im * x_46im))) + (x_46re * ((x_46im * x_46re) + (x_46im * x_46re)))
t_1 = (x_46im + x_46im) + ((x_46im + x_46re) * (x_46im * (x_46re - x_46im)))
if (x_46im <= (-2d+138)) then
tmp = t_1
else if (x_46im <= (-1.05d-107)) then
tmp = t_0
else if (x_46im <= 2d-68) then
tmp = (x_46re * (x_46im * x_46re)) + (x_46re * (x_46re * (x_46im * 2.0d0)))
else if (x_46im <= 1d+85) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
double t_0 = (x_46_im * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) + (x_46_re * ((x_46_im * x_46_re) + (x_46_im * x_46_re)));
double t_1 = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im)));
double tmp;
if (x_46_im <= -2e+138) {
tmp = t_1;
} else if (x_46_im <= -1.05e-107) {
tmp = t_0;
} else if (x_46_im <= 2e-68) {
tmp = (x_46_re * (x_46_im * x_46_re)) + (x_46_re * (x_46_re * (x_46_im * 2.0)));
} else if (x_46_im <= 1e+85) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im): t_0 = (x_46_im * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) + (x_46_re * ((x_46_im * x_46_re) + (x_46_im * x_46_re))) t_1 = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im))) tmp = 0 if x_46_im <= -2e+138: tmp = t_1 elif x_46_im <= -1.05e-107: tmp = t_0 elif x_46_im <= 2e-68: tmp = (x_46_re * (x_46_im * x_46_re)) + (x_46_re * (x_46_re * (x_46_im * 2.0))) elif x_46_im <= 1e+85: tmp = t_0 else: tmp = t_1 return tmp
function code(x_46_re, x_46_im) t_0 = Float64(Float64(x_46_im * Float64(Float64(x_46_re * x_46_re) - Float64(x_46_im * x_46_im))) + Float64(x_46_re * Float64(Float64(x_46_im * x_46_re) + Float64(x_46_im * x_46_re)))) t_1 = Float64(Float64(x_46_im + x_46_im) + Float64(Float64(x_46_im + x_46_re) * Float64(x_46_im * Float64(x_46_re - x_46_im)))) tmp = 0.0 if (x_46_im <= -2e+138) tmp = t_1; elseif (x_46_im <= -1.05e-107) tmp = t_0; elseif (x_46_im <= 2e-68) tmp = Float64(Float64(x_46_re * Float64(x_46_im * x_46_re)) + Float64(x_46_re * Float64(x_46_re * Float64(x_46_im * 2.0)))); elseif (x_46_im <= 1e+85) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im) t_0 = (x_46_im * ((x_46_re * x_46_re) - (x_46_im * x_46_im))) + (x_46_re * ((x_46_im * x_46_re) + (x_46_im * x_46_re))); t_1 = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im))); tmp = 0.0; if (x_46_im <= -2e+138) tmp = t_1; elseif (x_46_im <= -1.05e-107) tmp = t_0; elseif (x_46_im <= 2e-68) tmp = (x_46_re * (x_46_im * x_46_re)) + (x_46_re * (x_46_re * (x_46_im * 2.0))); elseif (x_46_im <= 1e+85) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := Block[{t$95$0 = N[(N[(x$46$im * N[(N[(x$46$re * x$46$re), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x$46$re * N[(N[(x$46$im * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x$46$im + x$46$im), $MachinePrecision] + N[(N[(x$46$im + x$46$re), $MachinePrecision] * N[(x$46$im * N[(x$46$re - x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, -2e+138], t$95$1, If[LessEqual[x$46$im, -1.05e-107], t$95$0, If[LessEqual[x$46$im, 2e-68], N[(N[(x$46$re * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] + N[(x$46$re * N[(x$46$re * N[(x$46$im * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 1e+85], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x.im \cdot \left(x.re \cdot x.re - x.im \cdot x.im\right) + x.re \cdot \left(x.im \cdot x.re + x.im \cdot x.re\right)\\
t_1 := \left(x.im + x.im\right) + \left(x.im + x.re\right) \cdot \left(x.im \cdot \left(x.re - x.im\right)\right)\\
\mathbf{if}\;x.im \leq -2 \cdot 10^{+138}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x.im \leq -1.05 \cdot 10^{-107}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x.im \leq 2 \cdot 10^{-68}:\\
\;\;\;\;x.re \cdot \left(x.im \cdot x.re\right) + x.re \cdot \left(x.re \cdot \left(x.im \cdot 2\right)\right)\\
\mathbf{elif}\;x.im \leq 10^{+85}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x.im < -2.0000000000000001e138 or 1e85 < x.im Initial program 57.5%
+-commutative57.5%
*-commutative57.5%
fma-def63.7%
*-commutative63.7%
distribute-rgt-out63.7%
*-commutative63.7%
Simplified63.7%
fma-udef57.5%
distribute-lft-in57.5%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
*-commutative0.0%
associate-*r/0.0%
*-commutative0.0%
+-inverses0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
+-inverses0.0%
+-inverses0.0%
flip-+75.0%
*-commutative75.0%
difference-of-squares100.0%
associate-*l*100.0%
Applied egg-rr100.0%
if -2.0000000000000001e138 < x.im < -1.05e-107 or 2.00000000000000013e-68 < x.im < 1e85Initial program 99.7%
if -1.05e-107 < x.im < 2.00000000000000013e-68Initial program 84.7%
Taylor expanded in x.re around inf 83.4%
Simplified83.4%
Taylor expanded in x.re around 0 83.4%
*-commutative83.4%
associate-*l*83.4%
Simplified83.4%
add-log-exp55.0%
*-un-lft-identity55.0%
Applied egg-rr98.5%
Final simplification99.3%
(FPCore (x.re x.im)
:precision binary64
(let* ((t_0 (* x.im (+ (- (* x.re x.re) (* x.im x.im)) 2.0))))
(if (<= x.im -2000000000000.0)
t_0
(if (<= x.im 0.0035)
(* (* x.re x.re) (* x.im 3.0))
(if (or (<= x.im 2.3e+176) (not (<= x.im 1.4e+214)))
t_0
(* x.im (+ (* x.re x.re) (+ x.re 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)) + 2.0);
double tmp;
if (x_46_im <= -2000000000000.0) {
tmp = t_0;
} else if (x_46_im <= 0.0035) {
tmp = (x_46_re * x_46_re) * (x_46_im * 3.0);
} else if ((x_46_im <= 2.3e+176) || !(x_46_im <= 1.4e+214)) {
tmp = t_0;
} else {
tmp = x_46_im * ((x_46_re * x_46_re) + (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) :: t_0
real(8) :: tmp
t_0 = x_46im * (((x_46re * x_46re) - (x_46im * x_46im)) + 2.0d0)
if (x_46im <= (-2000000000000.0d0)) then
tmp = t_0
else if (x_46im <= 0.0035d0) then
tmp = (x_46re * x_46re) * (x_46im * 3.0d0)
else if ((x_46im <= 2.3d+176) .or. (.not. (x_46im <= 1.4d+214))) then
tmp = t_0
else
tmp = x_46im * ((x_46re * x_46re) + (x_46re + x_46re))
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)) + 2.0);
double tmp;
if (x_46_im <= -2000000000000.0) {
tmp = t_0;
} else if (x_46_im <= 0.0035) {
tmp = (x_46_re * x_46_re) * (x_46_im * 3.0);
} else if ((x_46_im <= 2.3e+176) || !(x_46_im <= 1.4e+214)) {
tmp = t_0;
} else {
tmp = x_46_im * ((x_46_re * x_46_re) + (x_46_re + 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)) + 2.0) tmp = 0 if x_46_im <= -2000000000000.0: tmp = t_0 elif x_46_im <= 0.0035: tmp = (x_46_re * x_46_re) * (x_46_im * 3.0) elif (x_46_im <= 2.3e+176) or not (x_46_im <= 1.4e+214): tmp = t_0 else: tmp = x_46_im * ((x_46_re * x_46_re) + (x_46_re + x_46_re)) 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)) + 2.0)) tmp = 0.0 if (x_46_im <= -2000000000000.0) tmp = t_0; elseif (x_46_im <= 0.0035) tmp = Float64(Float64(x_46_re * x_46_re) * Float64(x_46_im * 3.0)); elseif ((x_46_im <= 2.3e+176) || !(x_46_im <= 1.4e+214)) tmp = t_0; else tmp = Float64(x_46_im * Float64(Float64(x_46_re * x_46_re) + Float64(x_46_re + 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)) + 2.0); tmp = 0.0; if (x_46_im <= -2000000000000.0) tmp = t_0; elseif (x_46_im <= 0.0035) tmp = (x_46_re * x_46_re) * (x_46_im * 3.0); elseif ((x_46_im <= 2.3e+176) || ~((x_46_im <= 1.4e+214))) tmp = t_0; else tmp = x_46_im * ((x_46_re * x_46_re) + (x_46_re + x_46_re)); 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] + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, -2000000000000.0], t$95$0, If[LessEqual[x$46$im, 0.0035], N[(N[(x$46$re * x$46$re), $MachinePrecision] * N[(x$46$im * 3.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x$46$im, 2.3e+176], N[Not[LessEqual[x$46$im, 1.4e+214]], $MachinePrecision]], t$95$0, N[(x$46$im * N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$re + x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x.im \cdot \left(\left(x.re \cdot x.re - x.im \cdot x.im\right) + 2\right)\\
\mathbf{if}\;x.im \leq -2000000000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x.im \leq 0.0035:\\
\;\;\;\;\left(x.re \cdot x.re\right) \cdot \left(x.im \cdot 3\right)\\
\mathbf{elif}\;x.im \leq 2.3 \cdot 10^{+176} \lor \neg \left(x.im \leq 1.4 \cdot 10^{+214}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x.im \cdot \left(x.re \cdot x.re + \left(x.re + x.re\right)\right)\\
\end{array}
\end{array}
if x.im < -2e12 or 0.00350000000000000007 < x.im < 2.29999999999999996e176 or 1.3999999999999999e214 < x.im Initial program 74.7%
+-commutative74.7%
*-commutative74.7%
fma-def79.0%
*-commutative79.0%
distribute-rgt-out79.0%
*-commutative79.0%
Simplified79.0%
fma-udef74.7%
distribute-lft-in74.7%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
*-commutative0.0%
associate-*r/0.0%
*-commutative0.0%
+-inverses0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
+-inverses0.0%
+-inverses0.0%
flip-+83.3%
*-commutative83.3%
difference-of-squares96.4%
associate-*l*96.4%
Applied egg-rr96.4%
+-commutative96.4%
associate-*r*96.4%
difference-of-squares83.3%
count-283.3%
distribute-rgt-out83.3%
Applied egg-rr83.3%
if -2e12 < x.im < 0.00350000000000000007Initial program 88.2%
+-commutative88.2%
*-commutative88.2%
sub-neg88.2%
distribute-lft-in88.2%
associate-+r+88.2%
distribute-rgt-neg-out88.2%
unsub-neg88.2%
Simplified99.8%
sub-neg99.8%
associate-*l*99.7%
associate-*r*99.7%
associate-*r*99.7%
*-commutative99.7%
associate-*l*99.7%
Applied egg-rr99.7%
Taylor expanded in x.re around inf 79.4%
*-commutative79.4%
associate-*l*79.4%
unpow279.4%
Simplified79.4%
if 2.29999999999999996e176 < x.im < 1.3999999999999999e214Initial program 16.7%
*-commutative16.7%
*-commutative16.7%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
*-commutative0.0%
associate-*r/0.0%
*-commutative0.0%
+-inverses0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
flip-+16.7%
Applied egg-rr16.7%
*-commutative16.7%
distribute-rgt-out16.7%
distribute-lft-out16.7%
Applied egg-rr16.7%
Taylor expanded in x.re around inf 84.2%
Simplified84.2%
Final simplification81.3%
(FPCore (x.re x.im)
:precision binary64
(let* ((t_0 (* x.im (+ (- (* x.re x.re) (* x.im x.im)) (+ x.re x.re)))))
(if (<= x.im -1.85e-66)
t_0
(if (<= x.im 1.8e-18)
(* x.im (* x.re (* x.re 3.0)))
(if (<= x.im 2.3e+176)
t_0
(+ (+ x.im x.im) (* (+ x.im x.re) (* 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_re));
double tmp;
if (x_46_im <= -1.85e-66) {
tmp = t_0;
} else if (x_46_im <= 1.8e-18) {
tmp = x_46_im * (x_46_re * (x_46_re * 3.0));
} else if (x_46_im <= 2.3e+176) {
tmp = t_0;
} else {
tmp = (x_46_im + x_46_im) + ((x_46_im + 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) :: t_0
real(8) :: tmp
t_0 = x_46im * (((x_46re * x_46re) - (x_46im * x_46im)) + (x_46re + x_46re))
if (x_46im <= (-1.85d-66)) then
tmp = t_0
else if (x_46im <= 1.8d-18) then
tmp = x_46im * (x_46re * (x_46re * 3.0d0))
else if (x_46im <= 2.3d+176) then
tmp = t_0
else
tmp = (x_46im + x_46im) + ((x_46im + 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 t_0 = x_46_im * (((x_46_re * x_46_re) - (x_46_im * x_46_im)) + (x_46_re + x_46_re));
double tmp;
if (x_46_im <= -1.85e-66) {
tmp = t_0;
} else if (x_46_im <= 1.8e-18) {
tmp = x_46_im * (x_46_re * (x_46_re * 3.0));
} else if (x_46_im <= 2.3e+176) {
tmp = t_0;
} else {
tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (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_re)) tmp = 0 if x_46_im <= -1.85e-66: tmp = t_0 elif x_46_im <= 1.8e-18: tmp = x_46_im * (x_46_re * (x_46_re * 3.0)) elif x_46_im <= 2.3e+176: tmp = t_0 else: tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * x_46_re)) 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))) tmp = 0.0 if (x_46_im <= -1.85e-66) tmp = t_0; elseif (x_46_im <= 1.8e-18) tmp = Float64(x_46_im * Float64(x_46_re * Float64(x_46_re * 3.0))); elseif (x_46_im <= 2.3e+176) tmp = t_0; else tmp = Float64(Float64(x_46_im + x_46_im) + Float64(Float64(x_46_im + x_46_re) * 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_re)); tmp = 0.0; if (x_46_im <= -1.85e-66) tmp = t_0; elseif (x_46_im <= 1.8e-18) tmp = x_46_im * (x_46_re * (x_46_re * 3.0)); elseif (x_46_im <= 2.3e+176) tmp = t_0; else tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * x_46_re)); 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]}, If[LessEqual[x$46$im, -1.85e-66], t$95$0, If[LessEqual[x$46$im, 1.8e-18], N[(x$46$im * N[(x$46$re * N[(x$46$re * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.3e+176], t$95$0, N[(N[(x$46$im + x$46$im), $MachinePrecision] + N[(N[(x$46$im + x$46$re), $MachinePrecision] * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\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)\\
\mathbf{if}\;x.im \leq -1.85 \cdot 10^{-66}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x.im \leq 1.8 \cdot 10^{-18}:\\
\;\;\;\;x.im \cdot \left(x.re \cdot \left(x.re \cdot 3\right)\right)\\
\mathbf{elif}\;x.im \leq 2.3 \cdot 10^{+176}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\left(x.im + x.im\right) + \left(x.im + x.re\right) \cdot \left(x.im \cdot x.re\right)\\
\end{array}
\end{array}
if x.im < -1.8500000000000001e-66 or 1.80000000000000005e-18 < x.im < 2.29999999999999996e176Initial program 83.6%
*-commutative83.6%
*-commutative83.6%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
*-commutative0.0%
associate-*r/0.0%
*-commutative0.0%
+-inverses0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
flip-+81.0%
Applied egg-rr81.0%
*-commutative81.0%
distribute-rgt-out81.0%
distribute-lft-out85.3%
Applied egg-rr85.3%
if -1.8500000000000001e-66 < x.im < 1.80000000000000005e-18Initial program 86.2%
+-commutative86.2%
*-commutative86.2%
sub-neg86.2%
distribute-lft-in86.2%
associate-+r+86.2%
distribute-rgt-neg-out86.2%
unsub-neg86.2%
Simplified99.8%
sub-neg99.8%
associate-*l*99.7%
associate-*r*99.7%
associate-*r*99.7%
*-commutative99.7%
associate-*l*99.7%
Applied egg-rr99.7%
Taylor expanded in x.re around inf 83.4%
*-commutative83.4%
unpow283.4%
associate-*r*97.0%
*-commutative97.0%
associate-*r*97.0%
*-commutative97.0%
associate-*l*83.4%
*-commutative83.4%
Simplified83.4%
if 2.29999999999999996e176 < x.im Initial program 37.5%
+-commutative37.5%
*-commutative37.5%
fma-def41.7%
*-commutative41.7%
distribute-rgt-out41.7%
*-commutative41.7%
Simplified41.7%
fma-udef37.5%
distribute-lft-in37.5%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
*-commutative0.0%
associate-*r/0.0%
*-commutative0.0%
+-inverses0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
+-inverses0.0%
+-inverses0.0%
flip-+50.0%
*-commutative50.0%
difference-of-squares100.0%
associate-*l*100.0%
Applied egg-rr100.0%
Taylor expanded in x.re around inf 71.2%
Final simplification83.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)))))
(if (<= x.im -8e-66)
t_0
(if (<= x.im 3.7e-18)
(+ (* x.re (* x.re (* x.im 2.0))) (* x.im (* x.re x.re)))
(if (<= x.im 2.8e+169)
t_0
(+ (+ x.im x.im) (* (+ x.im x.re) (* 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_re));
double tmp;
if (x_46_im <= -8e-66) {
tmp = t_0;
} else if (x_46_im <= 3.7e-18) {
tmp = (x_46_re * (x_46_re * (x_46_im * 2.0))) + (x_46_im * (x_46_re * x_46_re));
} else if (x_46_im <= 2.8e+169) {
tmp = t_0;
} else {
tmp = (x_46_im + x_46_im) + ((x_46_im + 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) :: t_0
real(8) :: tmp
t_0 = x_46im * (((x_46re * x_46re) - (x_46im * x_46im)) + (x_46re + x_46re))
if (x_46im <= (-8d-66)) then
tmp = t_0
else if (x_46im <= 3.7d-18) then
tmp = (x_46re * (x_46re * (x_46im * 2.0d0))) + (x_46im * (x_46re * x_46re))
else if (x_46im <= 2.8d+169) then
tmp = t_0
else
tmp = (x_46im + x_46im) + ((x_46im + 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 t_0 = x_46_im * (((x_46_re * x_46_re) - (x_46_im * x_46_im)) + (x_46_re + x_46_re));
double tmp;
if (x_46_im <= -8e-66) {
tmp = t_0;
} else if (x_46_im <= 3.7e-18) {
tmp = (x_46_re * (x_46_re * (x_46_im * 2.0))) + (x_46_im * (x_46_re * x_46_re));
} else if (x_46_im <= 2.8e+169) {
tmp = t_0;
} else {
tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (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_re)) tmp = 0 if x_46_im <= -8e-66: tmp = t_0 elif x_46_im <= 3.7e-18: tmp = (x_46_re * (x_46_re * (x_46_im * 2.0))) + (x_46_im * (x_46_re * x_46_re)) elif x_46_im <= 2.8e+169: tmp = t_0 else: tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * x_46_re)) 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))) tmp = 0.0 if (x_46_im <= -8e-66) tmp = t_0; elseif (x_46_im <= 3.7e-18) tmp = Float64(Float64(x_46_re * Float64(x_46_re * Float64(x_46_im * 2.0))) + Float64(x_46_im * Float64(x_46_re * x_46_re))); elseif (x_46_im <= 2.8e+169) tmp = t_0; else tmp = Float64(Float64(x_46_im + x_46_im) + Float64(Float64(x_46_im + x_46_re) * 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_re)); tmp = 0.0; if (x_46_im <= -8e-66) tmp = t_0; elseif (x_46_im <= 3.7e-18) tmp = (x_46_re * (x_46_re * (x_46_im * 2.0))) + (x_46_im * (x_46_re * x_46_re)); elseif (x_46_im <= 2.8e+169) tmp = t_0; else tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * x_46_re)); 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]}, If[LessEqual[x$46$im, -8e-66], t$95$0, If[LessEqual[x$46$im, 3.7e-18], N[(N[(x$46$re * N[(x$46$re * N[(x$46$im * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x$46$im * N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.8e+169], t$95$0, N[(N[(x$46$im + x$46$im), $MachinePrecision] + N[(N[(x$46$im + x$46$re), $MachinePrecision] * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\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)\\
\mathbf{if}\;x.im \leq -8 \cdot 10^{-66}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x.im \leq 3.7 \cdot 10^{-18}:\\
\;\;\;\;x.re \cdot \left(x.re \cdot \left(x.im \cdot 2\right)\right) + x.im \cdot \left(x.re \cdot x.re\right)\\
\mathbf{elif}\;x.im \leq 2.8 \cdot 10^{+169}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\left(x.im + x.im\right) + \left(x.im + x.re\right) \cdot \left(x.im \cdot x.re\right)\\
\end{array}
\end{array}
if x.im < -7.9999999999999998e-66 or 3.7000000000000003e-18 < x.im < 2.8000000000000002e169Initial program 83.6%
*-commutative83.6%
*-commutative83.6%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
*-commutative0.0%
associate-*r/0.0%
*-commutative0.0%
+-inverses0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
flip-+81.0%
Applied egg-rr81.0%
*-commutative81.0%
distribute-rgt-out81.0%
distribute-lft-out85.3%
Applied egg-rr85.3%
if -7.9999999999999998e-66 < x.im < 3.7000000000000003e-18Initial program 86.2%
Taylor expanded in x.re around inf 83.5%
Simplified83.5%
Taylor expanded in x.re around 0 83.5%
*-commutative83.5%
associate-*l*83.5%
Simplified83.5%
if 2.8000000000000002e169 < x.im Initial program 37.5%
+-commutative37.5%
*-commutative37.5%
fma-def41.7%
*-commutative41.7%
distribute-rgt-out41.7%
*-commutative41.7%
Simplified41.7%
fma-udef37.5%
distribute-lft-in37.5%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
*-commutative0.0%
associate-*r/0.0%
*-commutative0.0%
+-inverses0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
+-inverses0.0%
+-inverses0.0%
flip-+50.0%
*-commutative50.0%
difference-of-squares100.0%
associate-*l*100.0%
Applied egg-rr100.0%
Taylor expanded in x.re around inf 71.2%
Final simplification83.2%
(FPCore (x.re x.im)
:precision binary64
(let* ((t_0 (* x.im (+ (- (* x.re x.re) (* x.im x.im)) 2.0))))
(if (<= x.im -2000000000000.0)
t_0
(if (<= x.im 0.0035)
(* (* x.re x.re) (* x.im 3.0))
(if (<= x.im 2.2e+176)
t_0
(+ (+ x.im x.im) (* (+ x.im x.re) (* 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)) + 2.0);
double tmp;
if (x_46_im <= -2000000000000.0) {
tmp = t_0;
} else if (x_46_im <= 0.0035) {
tmp = (x_46_re * x_46_re) * (x_46_im * 3.0);
} else if (x_46_im <= 2.2e+176) {
tmp = t_0;
} else {
tmp = (x_46_im + x_46_im) + ((x_46_im + 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) :: t_0
real(8) :: tmp
t_0 = x_46im * (((x_46re * x_46re) - (x_46im * x_46im)) + 2.0d0)
if (x_46im <= (-2000000000000.0d0)) then
tmp = t_0
else if (x_46im <= 0.0035d0) then
tmp = (x_46re * x_46re) * (x_46im * 3.0d0)
else if (x_46im <= 2.2d+176) then
tmp = t_0
else
tmp = (x_46im + x_46im) + ((x_46im + 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 t_0 = x_46_im * (((x_46_re * x_46_re) - (x_46_im * x_46_im)) + 2.0);
double tmp;
if (x_46_im <= -2000000000000.0) {
tmp = t_0;
} else if (x_46_im <= 0.0035) {
tmp = (x_46_re * x_46_re) * (x_46_im * 3.0);
} else if (x_46_im <= 2.2e+176) {
tmp = t_0;
} else {
tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (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)) + 2.0) tmp = 0 if x_46_im <= -2000000000000.0: tmp = t_0 elif x_46_im <= 0.0035: tmp = (x_46_re * x_46_re) * (x_46_im * 3.0) elif x_46_im <= 2.2e+176: tmp = t_0 else: tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * x_46_re)) 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)) + 2.0)) tmp = 0.0 if (x_46_im <= -2000000000000.0) tmp = t_0; elseif (x_46_im <= 0.0035) tmp = Float64(Float64(x_46_re * x_46_re) * Float64(x_46_im * 3.0)); elseif (x_46_im <= 2.2e+176) tmp = t_0; else tmp = Float64(Float64(x_46_im + x_46_im) + Float64(Float64(x_46_im + x_46_re) * 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)) + 2.0); tmp = 0.0; if (x_46_im <= -2000000000000.0) tmp = t_0; elseif (x_46_im <= 0.0035) tmp = (x_46_re * x_46_re) * (x_46_im * 3.0); elseif (x_46_im <= 2.2e+176) tmp = t_0; else tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * x_46_re)); 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] + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, -2000000000000.0], t$95$0, If[LessEqual[x$46$im, 0.0035], N[(N[(x$46$re * x$46$re), $MachinePrecision] * N[(x$46$im * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.2e+176], t$95$0, N[(N[(x$46$im + x$46$im), $MachinePrecision] + N[(N[(x$46$im + x$46$re), $MachinePrecision] * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x.im \cdot \left(\left(x.re \cdot x.re - x.im \cdot x.im\right) + 2\right)\\
\mathbf{if}\;x.im \leq -2000000000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x.im \leq 0.0035:\\
\;\;\;\;\left(x.re \cdot x.re\right) \cdot \left(x.im \cdot 3\right)\\
\mathbf{elif}\;x.im \leq 2.2 \cdot 10^{+176}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\left(x.im + x.im\right) + \left(x.im + x.re\right) \cdot \left(x.im \cdot x.re\right)\\
\end{array}
\end{array}
if x.im < -2e12 or 0.00350000000000000007 < x.im < 2.20000000000000007e176Initial program 80.3%
+-commutative80.3%
*-commutative80.3%
fma-def84.4%
*-commutative84.4%
distribute-rgt-out84.4%
*-commutative84.4%
Simplified84.4%
fma-udef80.3%
distribute-lft-in80.3%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
*-commutative0.0%
associate-*r/0.0%
*-commutative0.0%
+-inverses0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
+-inverses0.0%
+-inverses0.0%
flip-+87.4%
*-commutative87.4%
difference-of-squares95.7%
associate-*l*95.7%
Applied egg-rr95.7%
+-commutative95.7%
associate-*r*95.7%
difference-of-squares87.4%
count-287.4%
distribute-rgt-out87.4%
Applied egg-rr87.4%
if -2e12 < x.im < 0.00350000000000000007Initial program 88.2%
+-commutative88.2%
*-commutative88.2%
sub-neg88.2%
distribute-lft-in88.2%
associate-+r+88.2%
distribute-rgt-neg-out88.2%
unsub-neg88.2%
Simplified99.8%
sub-neg99.8%
associate-*l*99.7%
associate-*r*99.7%
associate-*r*99.7%
*-commutative99.7%
associate-*l*99.7%
Applied egg-rr99.7%
Taylor expanded in x.re around inf 79.4%
*-commutative79.4%
associate-*l*79.4%
unpow279.4%
Simplified79.4%
if 2.20000000000000007e176 < x.im Initial program 37.5%
+-commutative37.5%
*-commutative37.5%
fma-def41.7%
*-commutative41.7%
distribute-rgt-out41.7%
*-commutative41.7%
Simplified41.7%
fma-udef37.5%
distribute-lft-in37.5%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
*-commutative0.0%
associate-*r/0.0%
*-commutative0.0%
+-inverses0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
+-inverses0.0%
+-inverses0.0%
flip-+50.0%
*-commutative50.0%
difference-of-squares100.0%
associate-*l*100.0%
Applied egg-rr100.0%
Taylor expanded in x.re around inf 71.2%
Final simplification81.7%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -2000000000000.0) (not (<= x.im 0.0035))) (+ (+ x.im x.im) (* (+ x.im x.re) (* x.im (- x.re x.im)))) (+ (* x.re (* x.re (* x.im 2.0))) (* x.im (* x.re x.re)))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -2000000000000.0) || !(x_46_im <= 0.0035)) {
tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im)));
} else {
tmp = (x_46_re * (x_46_re * (x_46_im * 2.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 <= (-2000000000000.0d0)) .or. (.not. (x_46im <= 0.0035d0))) then
tmp = (x_46im + x_46im) + ((x_46im + x_46re) * (x_46im * (x_46re - x_46im)))
else
tmp = (x_46re * (x_46re * (x_46im * 2.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 <= -2000000000000.0) || !(x_46_im <= 0.0035)) {
tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im)));
} else {
tmp = (x_46_re * (x_46_re * (x_46_im * 2.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 <= -2000000000000.0) or not (x_46_im <= 0.0035): tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im))) else: tmp = (x_46_re * (x_46_re * (x_46_im * 2.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 <= -2000000000000.0) || !(x_46_im <= 0.0035)) tmp = Float64(Float64(x_46_im + x_46_im) + Float64(Float64(x_46_im + x_46_re) * Float64(x_46_im * Float64(x_46_re - x_46_im)))); else tmp = Float64(Float64(x_46_re * Float64(x_46_re * Float64(x_46_im * 2.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 <= -2000000000000.0) || ~((x_46_im <= 0.0035))) tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im))); else tmp = (x_46_re * (x_46_re * (x_46_im * 2.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, -2000000000000.0], N[Not[LessEqual[x$46$im, 0.0035]], $MachinePrecision]], N[(N[(x$46$im + x$46$im), $MachinePrecision] + N[(N[(x$46$im + x$46$re), $MachinePrecision] * N[(x$46$im * N[(x$46$re - x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * N[(x$46$re * N[(x$46$im * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 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 -2000000000000 \lor \neg \left(x.im \leq 0.0035\right):\\
\;\;\;\;\left(x.im + x.im\right) + \left(x.im + x.re\right) \cdot \left(x.im \cdot \left(x.re - x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.re \cdot \left(x.re \cdot \left(x.im \cdot 2\right)\right) + x.im \cdot \left(x.re \cdot x.re\right)\\
\end{array}
\end{array}
if x.im < -2e12 or 0.00350000000000000007 < x.im Initial program 71.8%
+-commutative71.8%
*-commutative71.8%
fma-def76.0%
*-commutative76.0%
distribute-rgt-out76.0%
*-commutative76.0%
Simplified76.0%
fma-udef71.8%
distribute-lft-in71.8%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
*-commutative0.0%
associate-*r/0.0%
*-commutative0.0%
+-inverses0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
+-inverses0.0%
+-inverses0.0%
flip-+80.0%
*-commutative80.0%
difference-of-squares96.5%
associate-*l*96.5%
Applied egg-rr96.5%
if -2e12 < x.im < 0.00350000000000000007Initial program 88.2%
Taylor expanded in x.re around inf 79.5%
Simplified79.5%
Taylor expanded in x.re around 0 79.5%
*-commutative79.5%
associate-*l*79.5%
Simplified79.5%
Final simplification87.6%
(FPCore (x.re x.im) :precision binary64 (if (or (<= x.im -2000000000000.0) (not (<= x.im 0.0035))) (+ (+ x.im x.im) (* (+ x.im x.re) (* x.im (- x.re x.im)))) (+ (* x.re (* x.im x.re)) (* x.re (* x.re (* x.im 2.0))))))
double code(double x_46_re, double x_46_im) {
double tmp;
if ((x_46_im <= -2000000000000.0) || !(x_46_im <= 0.0035)) {
tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im)));
} else {
tmp = (x_46_re * (x_46_im * x_46_re)) + (x_46_re * (x_46_re * (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 <= (-2000000000000.0d0)) .or. (.not. (x_46im <= 0.0035d0))) then
tmp = (x_46im + x_46im) + ((x_46im + x_46re) * (x_46im * (x_46re - x_46im)))
else
tmp = (x_46re * (x_46im * x_46re)) + (x_46re * (x_46re * (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 <= -2000000000000.0) || !(x_46_im <= 0.0035)) {
tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im)));
} else {
tmp = (x_46_re * (x_46_im * x_46_re)) + (x_46_re * (x_46_re * (x_46_im * 2.0)));
}
return tmp;
}
def code(x_46_re, x_46_im): tmp = 0 if (x_46_im <= -2000000000000.0) or not (x_46_im <= 0.0035): tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im))) else: tmp = (x_46_re * (x_46_im * x_46_re)) + (x_46_re * (x_46_re * (x_46_im * 2.0))) return tmp
function code(x_46_re, x_46_im) tmp = 0.0 if ((x_46_im <= -2000000000000.0) || !(x_46_im <= 0.0035)) tmp = Float64(Float64(x_46_im + x_46_im) + Float64(Float64(x_46_im + x_46_re) * Float64(x_46_im * Float64(x_46_re - x_46_im)))); else tmp = Float64(Float64(x_46_re * Float64(x_46_im * x_46_re)) + Float64(x_46_re * Float64(x_46_re * 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 <= -2000000000000.0) || ~((x_46_im <= 0.0035))) tmp = (x_46_im + x_46_im) + ((x_46_im + x_46_re) * (x_46_im * (x_46_re - x_46_im))); else tmp = (x_46_re * (x_46_im * x_46_re)) + (x_46_re * (x_46_re * (x_46_im * 2.0))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_] := If[Or[LessEqual[x$46$im, -2000000000000.0], N[Not[LessEqual[x$46$im, 0.0035]], $MachinePrecision]], N[(N[(x$46$im + x$46$im), $MachinePrecision] + N[(N[(x$46$im + x$46$re), $MachinePrecision] * N[(x$46$im * N[(x$46$re - x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] + N[(x$46$re * N[(x$46$re * N[(x$46$im * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -2000000000000 \lor \neg \left(x.im \leq 0.0035\right):\\
\;\;\;\;\left(x.im + x.im\right) + \left(x.im + x.re\right) \cdot \left(x.im \cdot \left(x.re - x.im\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x.re \cdot \left(x.im \cdot x.re\right) + x.re \cdot \left(x.re \cdot \left(x.im \cdot 2\right)\right)\\
\end{array}
\end{array}
if x.im < -2e12 or 0.00350000000000000007 < x.im Initial program 71.8%
+-commutative71.8%
*-commutative71.8%
fma-def76.0%
*-commutative76.0%
distribute-rgt-out76.0%
*-commutative76.0%
Simplified76.0%
fma-udef71.8%
distribute-lft-in71.8%
flip-+0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
*-commutative0.0%
associate-*r/0.0%
*-commutative0.0%
+-inverses0.0%
+-inverses0.0%
distribute-lft-out--0.0%
+-inverses0.0%
+-inverses0.0%
*-commutative0.0%
+-inverses0.0%
+-inverses0.0%
flip-+80.0%
*-commutative80.0%
difference-of-squares96.5%
associate-*l*96.5%
Applied egg-rr96.5%
if -2e12 < x.im < 0.00350000000000000007Initial program 88.2%
Taylor expanded in x.re around inf 79.5%
Simplified79.5%
Taylor expanded in x.re around 0 79.5%
*-commutative79.5%
associate-*l*79.5%
Simplified79.5%
add-log-exp49.5%
*-un-lft-identity49.5%
Applied egg-rr91.0%
Final simplification93.6%
(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 80.5%
+-commutative80.5%
*-commutative80.5%
sub-neg80.5%
distribute-lft-in78.5%
associate-+r+78.5%
distribute-rgt-neg-out78.5%
unsub-neg78.5%
Simplified84.6%
sub-neg84.6%
associate-*l*84.6%
associate-*r*84.6%
associate-*r*84.6%
*-commutative84.6%
associate-*l*84.6%
Applied egg-rr84.6%
Taylor expanded in x.re around inf 53.9%
*-commutative53.9%
*-commutative53.9%
associate-*l*53.9%
*-commutative53.9%
unpow253.9%
Simplified53.9%
Final simplification53.9%
(FPCore (x.re x.im) :precision binary64 (* x.im (* x.re (* x.re 3.0))))
double code(double x_46_re, double x_46_im) {
return x_46_im * (x_46_re * (x_46_re * 3.0));
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
code = x_46im * (x_46re * (x_46re * 3.0d0))
end function
public static double code(double x_46_re, double x_46_im) {
return x_46_im * (x_46_re * (x_46_re * 3.0));
}
def code(x_46_re, x_46_im): return x_46_im * (x_46_re * (x_46_re * 3.0))
function code(x_46_re, x_46_im) return Float64(x_46_im * Float64(x_46_re * Float64(x_46_re * 3.0))) end
function tmp = code(x_46_re, x_46_im) tmp = x_46_im * (x_46_re * (x_46_re * 3.0)); end
code[x$46$re_, x$46$im_] := N[(x$46$im * N[(x$46$re * N[(x$46$re * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x.im \cdot \left(x.re \cdot \left(x.re \cdot 3\right)\right)
\end{array}
Initial program 80.5%
+-commutative80.5%
*-commutative80.5%
sub-neg80.5%
distribute-lft-in78.5%
associate-+r+78.5%
distribute-rgt-neg-out78.5%
unsub-neg78.5%
Simplified84.6%
sub-neg84.6%
associate-*l*84.6%
associate-*r*84.6%
associate-*r*84.6%
*-commutative84.6%
associate-*l*84.6%
Applied egg-rr84.6%
Taylor expanded in x.re around inf 53.9%
*-commutative53.9%
unpow253.9%
associate-*r*60.0%
*-commutative60.0%
associate-*r*60.0%
*-commutative60.0%
associate-*l*53.9%
*-commutative53.9%
Simplified53.9%
Final simplification53.9%
(FPCore (x.re x.im) :precision binary64 (* x.re (* x.im x.re)))
double code(double x_46_re, double x_46_im) {
return x_46_re * (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_46re * (x_46im * x_46re)
end function
public static double code(double x_46_re, double x_46_im) {
return x_46_re * (x_46_im * x_46_re);
}
def code(x_46_re, x_46_im): return x_46_re * (x_46_im * x_46_re)
function code(x_46_re, x_46_im) return Float64(x_46_re * Float64(x_46_im * x_46_re)) end
function tmp = code(x_46_re, x_46_im) tmp = x_46_re * (x_46_im * x_46_re); end
code[x$46$re_, x$46$im_] := N[(x$46$re * N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x.re \cdot \left(x.im \cdot x.re\right)
\end{array}
Initial program 80.5%
Taylor expanded in x.re around inf 53.9%
Simplified53.9%
add-log-exp35.0%
+-commutative35.0%
exp-sum35.0%
Applied egg-rr37.5%
Final simplification37.5%
(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 80.5%
+-commutative80.5%
*-commutative80.5%
sub-neg80.5%
distribute-lft-in78.5%
associate-+r+78.5%
distribute-rgt-neg-out78.5%
unsub-neg78.5%
Simplified84.6%
Taylor expanded in x.re around 0 56.3%
Simplified2.6%
Final simplification2.6%
(FPCore (x.re x.im) :precision binary64 0.1)
double code(double x_46_re, double x_46_im) {
return 0.1;
}
real(8) function code(x_46re, x_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
code = 0.1d0
end function
public static double code(double x_46_re, double x_46_im) {
return 0.1;
}
def code(x_46_re, x_46_im): return 0.1
function code(x_46_re, x_46_im) return 0.1 end
function tmp = code(x_46_re, x_46_im) tmp = 0.1; end
code[x$46$re_, x$46$im_] := 0.1
\begin{array}{l}
\\
0.1
\end{array}
Initial program 80.5%
+-commutative80.5%
*-commutative80.5%
sub-neg80.5%
distribute-lft-in78.5%
associate-+r+78.5%
distribute-rgt-neg-out78.5%
unsub-neg78.5%
Simplified84.6%
sub-neg84.6%
flip3-+14.1%
associate-*l*14.0%
associate-*r*14.1%
associate-*r*14.0%
*-commutative14.0%
associate-*l*14.0%
Applied egg-rr8.4%
Simplified2.9%
Final simplification2.9%
(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 2023187
(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)))