
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (if (<= i -4e+70) (* 2.0 (fma z t (- (* x y) (* i (* c (fma b c a)))))) (* 2.0 (fma y x (- (* z t) (* c (* i (fma b c a))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (i <= -4e+70) {
tmp = 2.0 * fma(z, t, ((x * y) - (i * (c * fma(b, c, a)))));
} else {
tmp = 2.0 * fma(y, x, ((z * t) - (c * (i * fma(b, c, a)))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (i <= -4e+70) tmp = Float64(2.0 * fma(z, t, Float64(Float64(x * y) - Float64(i * Float64(c * fma(b, c, a)))))); else tmp = Float64(2.0 * fma(y, x, Float64(Float64(z * t) - Float64(c * Float64(i * fma(b, c, a)))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[i, -4e+70], N[(2.0 * N[(z * t + N[(N[(x * y), $MachinePrecision] - N[(i * N[(c * N[(b * c + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(y * x + N[(N[(z * t), $MachinePrecision] - N[(c * N[(i * N[(b * c + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -4 \cdot 10^{+70}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(z, t, x \cdot y - i \cdot \left(c \cdot \mathsf{fma}\left(b, c, a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(y, x, z \cdot t - c \cdot \left(i \cdot \mathsf{fma}\left(b, c, a\right)\right)\right)\\
\end{array}
\end{array}
if i < -4.00000000000000029e70Initial program 96.2%
associate--l+96.2%
*-commutative96.2%
associate--l+96.2%
associate--l+96.2%
*-commutative96.2%
associate-*l*96.1%
Simplified96.1%
associate-+r-96.1%
+-commutative96.1%
associate-*r*96.2%
*-commutative96.2%
associate-*r*85.1%
associate-+r-85.1%
fma-define87.1%
+-commutative87.1%
fma-define87.1%
Applied egg-rr87.1%
associate-*r*98.2%
*-commutative98.2%
Simplified98.2%
if -4.00000000000000029e70 < i Initial program 87.1%
associate--l+87.1%
*-commutative87.1%
associate--l+87.1%
associate--l+87.1%
*-commutative87.1%
associate-*l*93.6%
Simplified93.6%
*-commutative93.6%
fma-define96.1%
associate-*r*89.6%
*-commutative89.6%
associate-*r*95.6%
+-commutative95.6%
fma-define95.6%
Applied egg-rr95.6%
Final simplification96.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* c b))))
(if (<= (- (+ (* x y) (* z t)) (* i (* c t_1))) INFINITY)
(* 2.0 (+ (* x y) (- (* z t) (* t_1 (* i c)))))
(* 2.0 (- (* z t) (* i (* c a)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (c * b);
double tmp;
if ((((x * y) + (z * t)) - (i * (c * t_1))) <= ((double) INFINITY)) {
tmp = 2.0 * ((x * y) + ((z * t) - (t_1 * (i * c))));
} else {
tmp = 2.0 * ((z * t) - (i * (c * a)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (c * b);
double tmp;
if ((((x * y) + (z * t)) - (i * (c * t_1))) <= Double.POSITIVE_INFINITY) {
tmp = 2.0 * ((x * y) + ((z * t) - (t_1 * (i * c))));
} else {
tmp = 2.0 * ((z * t) - (i * (c * a)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (c * b) tmp = 0 if (((x * y) + (z * t)) - (i * (c * t_1))) <= math.inf: tmp = 2.0 * ((x * y) + ((z * t) - (t_1 * (i * c)))) else: tmp = 2.0 * ((z * t) - (i * (c * a))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(c * b)) tmp = 0.0 if (Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(c * t_1))) <= Inf) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(t_1 * Float64(i * c))))); else tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(i * Float64(c * a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (c * b); tmp = 0.0; if ((((x * y) + (z * t)) - (i * (c * t_1))) <= Inf) tmp = 2.0 * ((x * y) + ((z * t) - (t_1 * (i * c)))); else tmp = 2.0 * ((z * t) - (i * (c * a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(c * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(t$95$1 * N[(i * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(i * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + c \cdot b\\
\mathbf{if}\;\left(x \cdot y + z \cdot t\right) - i \cdot \left(c \cdot t\_1\right) \leq \infty:\\
\;\;\;\;2 \cdot \left(x \cdot y + \left(z \cdot t - t\_1 \cdot \left(i \cdot c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(c \cdot a\right)\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)) < +inf.0Initial program 93.3%
associate--l+93.3%
*-commutative93.3%
associate--l+93.3%
associate--l+93.3%
*-commutative93.3%
associate-*l*97.9%
Simplified97.9%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)) Initial program 0.0%
Taylor expanded in a around inf 50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in x around 0 43.3%
*-commutative43.3%
*-commutative43.3%
associate-*r*58.9%
Simplified58.9%
Final simplification96.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* z t))) (t_2 (* 2.0 (* x y))))
(if (<= (* x y) -5e+80)
t_2
(if (<= (* x y) 0.0)
t_1
(if (<= (* x y) 5e-217)
(* 2.0 (* i (* a (- c))))
(if (<= (* x y) 4e+59) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (z * t);
double t_2 = 2.0 * (x * y);
double tmp;
if ((x * y) <= -5e+80) {
tmp = t_2;
} else if ((x * y) <= 0.0) {
tmp = t_1;
} else if ((x * y) <= 5e-217) {
tmp = 2.0 * (i * (a * -c));
} else if ((x * y) <= 4e+59) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * (z * t)
t_2 = 2.0d0 * (x * y)
if ((x * y) <= (-5d+80)) then
tmp = t_2
else if ((x * y) <= 0.0d0) then
tmp = t_1
else if ((x * y) <= 5d-217) then
tmp = 2.0d0 * (i * (a * -c))
else if ((x * y) <= 4d+59) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (z * t);
double t_2 = 2.0 * (x * y);
double tmp;
if ((x * y) <= -5e+80) {
tmp = t_2;
} else if ((x * y) <= 0.0) {
tmp = t_1;
} else if ((x * y) <= 5e-217) {
tmp = 2.0 * (i * (a * -c));
} else if ((x * y) <= 4e+59) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (z * t) t_2 = 2.0 * (x * y) tmp = 0 if (x * y) <= -5e+80: tmp = t_2 elif (x * y) <= 0.0: tmp = t_1 elif (x * y) <= 5e-217: tmp = 2.0 * (i * (a * -c)) elif (x * y) <= 4e+59: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(z * t)) t_2 = Float64(2.0 * Float64(x * y)) tmp = 0.0 if (Float64(x * y) <= -5e+80) tmp = t_2; elseif (Float64(x * y) <= 0.0) tmp = t_1; elseif (Float64(x * y) <= 5e-217) tmp = Float64(2.0 * Float64(i * Float64(a * Float64(-c)))); elseif (Float64(x * y) <= 4e+59) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * (z * t); t_2 = 2.0 * (x * y); tmp = 0.0; if ((x * y) <= -5e+80) tmp = t_2; elseif ((x * y) <= 0.0) tmp = t_1; elseif ((x * y) <= 5e-217) tmp = 2.0 * (i * (a * -c)); elseif ((x * y) <= 4e+59) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -5e+80], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 0.0], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 5e-217], N[(2.0 * N[(i * N[(a * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e+59], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
t_2 := 2 \cdot \left(x \cdot y\right)\\
\mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+80}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq 0:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{-217}:\\
\;\;\;\;2 \cdot \left(i \cdot \left(a \cdot \left(-c\right)\right)\right)\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{+59}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 x y) < -4.99999999999999961e80 or 3.99999999999999989e59 < (*.f64 x y) Initial program 88.8%
associate--l+88.8%
*-commutative88.8%
associate--l+88.8%
associate--l+88.8%
*-commutative88.8%
associate-*l*91.5%
Simplified91.5%
Taylor expanded in x around inf 65.1%
if -4.99999999999999961e80 < (*.f64 x y) < 0.0 or 5.0000000000000002e-217 < (*.f64 x y) < 3.99999999999999989e59Initial program 89.2%
associate--l+89.2%
*-commutative89.2%
associate--l+89.2%
associate--l+89.2%
*-commutative89.2%
associate-*l*97.0%
Simplified97.0%
Taylor expanded in z around inf 41.4%
if 0.0 < (*.f64 x y) < 5.0000000000000002e-217Initial program 88.1%
Taylor expanded in a around inf 63.8%
*-commutative63.8%
Simplified63.8%
Taylor expanded in x around 0 52.6%
*-commutative52.6%
associate-*l*40.5%
Simplified40.5%
Taylor expanded in t around 0 40.3%
neg-mul-140.3%
distribute-rgt-neg-in40.3%
*-commutative40.3%
distribute-rgt-neg-out40.3%
*-commutative40.3%
associate-*l*45.8%
Simplified45.8%
Final simplification51.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* c (* i (+ a (* c b)))) -2.0)))
(if (<= c -5.2e+34)
t_1
(if (<= c 2.35e-77)
(* 2.0 (+ (* x y) (* z t)))
(if (<= c 1.12e+148)
(* 2.0 (- (* x y) (* a (* i c))))
(if (<= c 3.4e+185) (* 2.0 (- (* z t) (* (* c b) (* i c)))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * (i * (a + (c * b)))) * -2.0;
double tmp;
if (c <= -5.2e+34) {
tmp = t_1;
} else if (c <= 2.35e-77) {
tmp = 2.0 * ((x * y) + (z * t));
} else if (c <= 1.12e+148) {
tmp = 2.0 * ((x * y) - (a * (i * c)));
} else if (c <= 3.4e+185) {
tmp = 2.0 * ((z * t) - ((c * b) * (i * c)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (c * (i * (a + (c * b)))) * (-2.0d0)
if (c <= (-5.2d+34)) then
tmp = t_1
else if (c <= 2.35d-77) then
tmp = 2.0d0 * ((x * y) + (z * t))
else if (c <= 1.12d+148) then
tmp = 2.0d0 * ((x * y) - (a * (i * c)))
else if (c <= 3.4d+185) then
tmp = 2.0d0 * ((z * t) - ((c * b) * (i * c)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * (i * (a + (c * b)))) * -2.0;
double tmp;
if (c <= -5.2e+34) {
tmp = t_1;
} else if (c <= 2.35e-77) {
tmp = 2.0 * ((x * y) + (z * t));
} else if (c <= 1.12e+148) {
tmp = 2.0 * ((x * y) - (a * (i * c)));
} else if (c <= 3.4e+185) {
tmp = 2.0 * ((z * t) - ((c * b) * (i * c)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (c * (i * (a + (c * b)))) * -2.0 tmp = 0 if c <= -5.2e+34: tmp = t_1 elif c <= 2.35e-77: tmp = 2.0 * ((x * y) + (z * t)) elif c <= 1.12e+148: tmp = 2.0 * ((x * y) - (a * (i * c))) elif c <= 3.4e+185: tmp = 2.0 * ((z * t) - ((c * b) * (i * c))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(c * Float64(i * Float64(a + Float64(c * b)))) * -2.0) tmp = 0.0 if (c <= -5.2e+34) tmp = t_1; elseif (c <= 2.35e-77) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); elseif (c <= 1.12e+148) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(a * Float64(i * c)))); elseif (c <= 3.4e+185) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(Float64(c * b) * Float64(i * c)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (c * (i * (a + (c * b)))) * -2.0; tmp = 0.0; if (c <= -5.2e+34) tmp = t_1; elseif (c <= 2.35e-77) tmp = 2.0 * ((x * y) + (z * t)); elseif (c <= 1.12e+148) tmp = 2.0 * ((x * y) - (a * (i * c))); elseif (c <= 3.4e+185) tmp = 2.0 * ((z * t) - ((c * b) * (i * c))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * N[(i * N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]}, If[LessEqual[c, -5.2e+34], t$95$1, If[LessEqual[c, 2.35e-77], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.12e+148], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(a * N[(i * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.4e+185], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(N[(c * b), $MachinePrecision] * N[(i * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot \left(i \cdot \left(a + c \cdot b\right)\right)\right) \cdot -2\\
\mathbf{if}\;c \leq -5.2 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 2.35 \cdot 10^{-77}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{elif}\;c \leq 1.12 \cdot 10^{+148}:\\
\;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(i \cdot c\right)\right)\\
\mathbf{elif}\;c \leq 3.4 \cdot 10^{+185}:\\
\;\;\;\;2 \cdot \left(z \cdot t - \left(c \cdot b\right) \cdot \left(i \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -5.19999999999999995e34 or 3.40000000000000017e185 < c Initial program 73.7%
associate--l+73.7%
*-commutative73.7%
associate--l+73.7%
associate--l+73.7%
*-commutative73.7%
associate-*l*87.2%
Simplified87.2%
Taylor expanded in z around 0 80.5%
associate-*r*78.3%
Simplified78.3%
Taylor expanded in x around 0 79.4%
if -5.19999999999999995e34 < c < 2.3499999999999999e-77Initial program 99.2%
associate--l+99.2%
*-commutative99.2%
associate--l+99.2%
associate--l+99.2%
*-commutative99.2%
associate-*l*98.2%
Simplified98.2%
Taylor expanded in c around 0 80.4%
+-commutative80.4%
Simplified80.4%
if 2.3499999999999999e-77 < c < 1.12e148Initial program 93.2%
associate--l+93.2%
*-commutative93.2%
associate--l+93.2%
associate--l+93.2%
*-commutative93.2%
associate-*l*97.6%
Simplified97.6%
Taylor expanded in z around 0 82.4%
associate-*r*84.5%
Simplified84.5%
Taylor expanded in a around inf 65.6%
if 1.12e148 < c < 3.40000000000000017e185Initial program 80.5%
associate--l+80.5%
*-commutative80.5%
associate--l+80.5%
associate--l+80.5%
*-commutative80.5%
associate-*l*90.0%
Simplified90.0%
associate-+r-90.0%
+-commutative90.0%
associate-*r*80.5%
*-commutative80.5%
associate-*r*89.8%
associate-+r-89.8%
fma-define89.8%
+-commutative89.8%
fma-define89.8%
Applied egg-rr89.8%
associate-*r*80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in x around 0 70.5%
*-commutative70.5%
*-commutative70.5%
associate-*l*70.7%
*-commutative70.7%
*-commutative70.7%
Simplified70.7%
Taylor expanded in a around 0 70.7%
Final simplification77.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (+ (* x y) (* z t))))
(t_2 (* (* c (* i (+ a (* c b)))) -2.0)))
(if (<= c -1.9e+29)
t_2
(if (<= c 2.6e-77)
t_1
(if (<= c 5.4e+159)
(* 2.0 (- (* x y) (* a (* i c))))
(if (<= c 5.4e+183) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) + (z * t));
double t_2 = (c * (i * (a + (c * b)))) * -2.0;
double tmp;
if (c <= -1.9e+29) {
tmp = t_2;
} else if (c <= 2.6e-77) {
tmp = t_1;
} else if (c <= 5.4e+159) {
tmp = 2.0 * ((x * y) - (a * (i * c)));
} else if (c <= 5.4e+183) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * ((x * y) + (z * t))
t_2 = (c * (i * (a + (c * b)))) * (-2.0d0)
if (c <= (-1.9d+29)) then
tmp = t_2
else if (c <= 2.6d-77) then
tmp = t_1
else if (c <= 5.4d+159) then
tmp = 2.0d0 * ((x * y) - (a * (i * c)))
else if (c <= 5.4d+183) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) + (z * t));
double t_2 = (c * (i * (a + (c * b)))) * -2.0;
double tmp;
if (c <= -1.9e+29) {
tmp = t_2;
} else if (c <= 2.6e-77) {
tmp = t_1;
} else if (c <= 5.4e+159) {
tmp = 2.0 * ((x * y) - (a * (i * c)));
} else if (c <= 5.4e+183) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((x * y) + (z * t)) t_2 = (c * (i * (a + (c * b)))) * -2.0 tmp = 0 if c <= -1.9e+29: tmp = t_2 elif c <= 2.6e-77: tmp = t_1 elif c <= 5.4e+159: tmp = 2.0 * ((x * y) - (a * (i * c))) elif c <= 5.4e+183: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))) t_2 = Float64(Float64(c * Float64(i * Float64(a + Float64(c * b)))) * -2.0) tmp = 0.0 if (c <= -1.9e+29) tmp = t_2; elseif (c <= 2.6e-77) tmp = t_1; elseif (c <= 5.4e+159) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(a * Float64(i * c)))); elseif (c <= 5.4e+183) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((x * y) + (z * t)); t_2 = (c * (i * (a + (c * b)))) * -2.0; tmp = 0.0; if (c <= -1.9e+29) tmp = t_2; elseif (c <= 2.6e-77) tmp = t_1; elseif (c <= 5.4e+159) tmp = 2.0 * ((x * y) - (a * (i * c))); elseif (c <= 5.4e+183) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * N[(i * N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]}, If[LessEqual[c, -1.9e+29], t$95$2, If[LessEqual[c, 2.6e-77], t$95$1, If[LessEqual[c, 5.4e+159], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(a * N[(i * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 5.4e+183], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\
t_2 := \left(c \cdot \left(i \cdot \left(a + c \cdot b\right)\right)\right) \cdot -2\\
\mathbf{if}\;c \leq -1.9 \cdot 10^{+29}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq 2.6 \cdot 10^{-77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 5.4 \cdot 10^{+159}:\\
\;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(i \cdot c\right)\right)\\
\mathbf{elif}\;c \leq 5.4 \cdot 10^{+183}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if c < -1.89999999999999985e29 or 5.39999999999999964e183 < c Initial program 73.7%
associate--l+73.7%
*-commutative73.7%
associate--l+73.7%
associate--l+73.7%
*-commutative73.7%
associate-*l*87.2%
Simplified87.2%
Taylor expanded in z around 0 80.5%
associate-*r*78.3%
Simplified78.3%
Taylor expanded in x around 0 79.4%
if -1.89999999999999985e29 < c < 2.6000000000000001e-77 or 5.40000000000000016e159 < c < 5.39999999999999964e183Initial program 97.7%
associate--l+97.7%
*-commutative97.7%
associate--l+97.7%
associate--l+97.7%
*-commutative97.7%
associate-*l*97.5%
Simplified97.5%
Taylor expanded in c around 0 80.1%
+-commutative80.1%
Simplified80.1%
if 2.6000000000000001e-77 < c < 5.40000000000000016e159Initial program 93.5%
associate--l+93.5%
*-commutative93.5%
associate--l+93.5%
associate--l+93.5%
*-commutative93.5%
associate-*l*97.7%
Simplified97.7%
Taylor expanded in z around 0 83.2%
associate-*r*85.2%
Simplified85.2%
Taylor expanded in a around inf 63.0%
Final simplification76.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (+ a (* c b)) (* i c))))
(if (or (<= (* x y) -5e+80) (not (<= (* x y) 4e+59)))
(* 2.0 (- (* x y) t_1))
(* 2.0 (- (* z t) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (a + (c * b)) * (i * c);
double tmp;
if (((x * y) <= -5e+80) || !((x * y) <= 4e+59)) {
tmp = 2.0 * ((x * y) - t_1);
} else {
tmp = 2.0 * ((z * t) - t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (a + (c * b)) * (i * c)
if (((x * y) <= (-5d+80)) .or. (.not. ((x * y) <= 4d+59))) then
tmp = 2.0d0 * ((x * y) - t_1)
else
tmp = 2.0d0 * ((z * t) - t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (a + (c * b)) * (i * c);
double tmp;
if (((x * y) <= -5e+80) || !((x * y) <= 4e+59)) {
tmp = 2.0 * ((x * y) - t_1);
} else {
tmp = 2.0 * ((z * t) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (a + (c * b)) * (i * c) tmp = 0 if ((x * y) <= -5e+80) or not ((x * y) <= 4e+59): tmp = 2.0 * ((x * y) - t_1) else: tmp = 2.0 * ((z * t) - t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(a + Float64(c * b)) * Float64(i * c)) tmp = 0.0 if ((Float64(x * y) <= -5e+80) || !(Float64(x * y) <= 4e+59)) tmp = Float64(2.0 * Float64(Float64(x * y) - t_1)); else tmp = Float64(2.0 * Float64(Float64(z * t) - t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (a + (c * b)) * (i * c); tmp = 0.0; if (((x * y) <= -5e+80) || ~(((x * y) <= 4e+59))) tmp = 2.0 * ((x * y) - t_1); else tmp = 2.0 * ((z * t) - t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision] * N[(i * c), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[N[(x * y), $MachinePrecision], -5e+80], N[Not[LessEqual[N[(x * y), $MachinePrecision], 4e+59]], $MachinePrecision]], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + c \cdot b\right) \cdot \left(i \cdot c\right)\\
\mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+80} \lor \neg \left(x \cdot y \leq 4 \cdot 10^{+59}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_1\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -4.99999999999999961e80 or 3.99999999999999989e59 < (*.f64 x y) Initial program 88.8%
associate--l+88.8%
*-commutative88.8%
associate--l+88.8%
associate--l+88.8%
*-commutative88.8%
associate-*l*91.5%
Simplified91.5%
Taylor expanded in z around 0 85.0%
associate-*r*86.9%
Simplified86.9%
if -4.99999999999999961e80 < (*.f64 x y) < 3.99999999999999989e59Initial program 89.1%
associate--l+89.1%
*-commutative89.1%
associate--l+89.1%
associate--l+89.1%
*-commutative89.1%
associate-*l*96.0%
Simplified96.0%
associate-+r-96.0%
+-commutative96.0%
associate-*r*89.1%
*-commutative89.1%
associate-*r*92.8%
associate-+r-92.8%
fma-define92.9%
+-commutative92.9%
fma-define92.9%
Applied egg-rr92.9%
associate-*r*89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in x around 0 86.8%
*-commutative86.8%
*-commutative86.8%
associate-*l*89.9%
*-commutative89.9%
*-commutative89.9%
Simplified89.9%
Final simplification88.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* x y) -2e+96)
(* 2.0 (+ (* x y) (* z t)))
(if (<= (* x y) 5e+115)
(* 2.0 (- (* z t) (* c (* i (+ a (* c b))))))
(* 2.0 (- (* x y) (* (* c b) (* i c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -2e+96) {
tmp = 2.0 * ((x * y) + (z * t));
} else if ((x * y) <= 5e+115) {
tmp = 2.0 * ((z * t) - (c * (i * (a + (c * b)))));
} else {
tmp = 2.0 * ((x * y) - ((c * b) * (i * c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x * y) <= (-2d+96)) then
tmp = 2.0d0 * ((x * y) + (z * t))
else if ((x * y) <= 5d+115) then
tmp = 2.0d0 * ((z * t) - (c * (i * (a + (c * b)))))
else
tmp = 2.0d0 * ((x * y) - ((c * b) * (i * c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -2e+96) {
tmp = 2.0 * ((x * y) + (z * t));
} else if ((x * y) <= 5e+115) {
tmp = 2.0 * ((z * t) - (c * (i * (a + (c * b)))));
} else {
tmp = 2.0 * ((x * y) - ((c * b) * (i * c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -2e+96: tmp = 2.0 * ((x * y) + (z * t)) elif (x * y) <= 5e+115: tmp = 2.0 * ((z * t) - (c * (i * (a + (c * b))))) else: tmp = 2.0 * ((x * y) - ((c * b) * (i * c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -2e+96) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); elseif (Float64(x * y) <= 5e+115) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(i * Float64(a + Float64(c * b)))))); else tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(Float64(c * b) * Float64(i * c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x * y) <= -2e+96) tmp = 2.0 * ((x * y) + (z * t)); elseif ((x * y) <= 5e+115) tmp = 2.0 * ((z * t) - (c * (i * (a + (c * b))))); else tmp = 2.0 * ((x * y) - ((c * b) * (i * c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e+96], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e+115], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(i * N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(N[(c * b), $MachinePrecision] * N[(i * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+96}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+115}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(a + c \cdot b\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - \left(c \cdot b\right) \cdot \left(i \cdot c\right)\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -2.0000000000000001e96Initial program 90.2%
associate--l+90.2%
*-commutative90.2%
associate--l+90.2%
associate--l+90.2%
*-commutative90.2%
associate-*l*92.6%
Simplified92.6%
Taylor expanded in c around 0 83.9%
+-commutative83.9%
Simplified83.9%
if -2.0000000000000001e96 < (*.f64 x y) < 5.00000000000000008e115Initial program 89.5%
associate--l+89.5%
*-commutative89.5%
associate--l+89.5%
associate--l+89.5%
*-commutative89.5%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in x around 0 85.6%
if 5.00000000000000008e115 < (*.f64 x y) Initial program 86.3%
associate--l+86.3%
*-commutative86.3%
associate--l+86.3%
associate--l+86.3%
*-commutative86.3%
associate-*l*88.2%
Simplified88.2%
Taylor expanded in z around 0 86.3%
associate-*r*88.2%
Simplified88.2%
Taylor expanded in a around 0 84.5%
Final simplification85.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* x y) -2e+96)
(* 2.0 (+ (* x y) (* z t)))
(if (<= (* x y) 5e+115)
(* 2.0 (- (* z t) (* (+ a (* c b)) (* i c))))
(* 2.0 (- (* x y) (* (* c b) (* i c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -2e+96) {
tmp = 2.0 * ((x * y) + (z * t));
} else if ((x * y) <= 5e+115) {
tmp = 2.0 * ((z * t) - ((a + (c * b)) * (i * c)));
} else {
tmp = 2.0 * ((x * y) - ((c * b) * (i * c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x * y) <= (-2d+96)) then
tmp = 2.0d0 * ((x * y) + (z * t))
else if ((x * y) <= 5d+115) then
tmp = 2.0d0 * ((z * t) - ((a + (c * b)) * (i * c)))
else
tmp = 2.0d0 * ((x * y) - ((c * b) * (i * c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -2e+96) {
tmp = 2.0 * ((x * y) + (z * t));
} else if ((x * y) <= 5e+115) {
tmp = 2.0 * ((z * t) - ((a + (c * b)) * (i * c)));
} else {
tmp = 2.0 * ((x * y) - ((c * b) * (i * c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -2e+96: tmp = 2.0 * ((x * y) + (z * t)) elif (x * y) <= 5e+115: tmp = 2.0 * ((z * t) - ((a + (c * b)) * (i * c))) else: tmp = 2.0 * ((x * y) - ((c * b) * (i * c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -2e+96) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); elseif (Float64(x * y) <= 5e+115) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(Float64(a + Float64(c * b)) * Float64(i * c)))); else tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(Float64(c * b) * Float64(i * c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x * y) <= -2e+96) tmp = 2.0 * ((x * y) + (z * t)); elseif ((x * y) <= 5e+115) tmp = 2.0 * ((z * t) - ((a + (c * b)) * (i * c))); else tmp = 2.0 * ((x * y) - ((c * b) * (i * c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e+96], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e+115], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision] * N[(i * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(N[(c * b), $MachinePrecision] * N[(i * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+96}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+115}:\\
\;\;\;\;2 \cdot \left(z \cdot t - \left(a + c \cdot b\right) \cdot \left(i \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - \left(c \cdot b\right) \cdot \left(i \cdot c\right)\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -2.0000000000000001e96Initial program 90.2%
associate--l+90.2%
*-commutative90.2%
associate--l+90.2%
associate--l+90.2%
*-commutative90.2%
associate-*l*92.6%
Simplified92.6%
Taylor expanded in c around 0 83.9%
+-commutative83.9%
Simplified83.9%
if -2.0000000000000001e96 < (*.f64 x y) < 5.00000000000000008e115Initial program 89.5%
associate--l+89.5%
*-commutative89.5%
associate--l+89.5%
associate--l+89.5%
*-commutative89.5%
associate-*l*96.3%
Simplified96.3%
associate-+r-96.3%
+-commutative96.3%
associate-*r*89.5%
*-commutative89.5%
associate-*r*93.5%
associate-+r-93.5%
fma-define93.5%
+-commutative93.5%
fma-define93.5%
Applied egg-rr93.5%
associate-*r*89.5%
*-commutative89.5%
Simplified89.5%
Taylor expanded in x around 0 85.6%
*-commutative85.6%
*-commutative85.6%
associate-*l*88.4%
*-commutative88.4%
*-commutative88.4%
Simplified88.4%
if 5.00000000000000008e115 < (*.f64 x y) Initial program 86.3%
associate--l+86.3%
*-commutative86.3%
associate--l+86.3%
associate--l+86.3%
*-commutative86.3%
associate-*l*88.2%
Simplified88.2%
Taylor expanded in z around 0 86.3%
associate-*r*88.2%
Simplified88.2%
Taylor expanded in a around 0 84.5%
Final simplification86.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* c b))))
(if (<= (* x y) -2e+96)
(* 2.0 (+ (* x y) (* z t)))
(if (<= (* x y) 1e+72)
(* 2.0 (- (* z t) (* t_1 (* i c))))
(* 2.0 (- (* x y) (* i (* c t_1))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (c * b);
double tmp;
if ((x * y) <= -2e+96) {
tmp = 2.0 * ((x * y) + (z * t));
} else if ((x * y) <= 1e+72) {
tmp = 2.0 * ((z * t) - (t_1 * (i * c)));
} else {
tmp = 2.0 * ((x * y) - (i * (c * t_1)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = a + (c * b)
if ((x * y) <= (-2d+96)) then
tmp = 2.0d0 * ((x * y) + (z * t))
else if ((x * y) <= 1d+72) then
tmp = 2.0d0 * ((z * t) - (t_1 * (i * c)))
else
tmp = 2.0d0 * ((x * y) - (i * (c * t_1)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (c * b);
double tmp;
if ((x * y) <= -2e+96) {
tmp = 2.0 * ((x * y) + (z * t));
} else if ((x * y) <= 1e+72) {
tmp = 2.0 * ((z * t) - (t_1 * (i * c)));
} else {
tmp = 2.0 * ((x * y) - (i * (c * t_1)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (c * b) tmp = 0 if (x * y) <= -2e+96: tmp = 2.0 * ((x * y) + (z * t)) elif (x * y) <= 1e+72: tmp = 2.0 * ((z * t) - (t_1 * (i * c))) else: tmp = 2.0 * ((x * y) - (i * (c * t_1))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(c * b)) tmp = 0.0 if (Float64(x * y) <= -2e+96) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); elseif (Float64(x * y) <= 1e+72) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(t_1 * Float64(i * c)))); else tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(i * Float64(c * t_1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (c * b); tmp = 0.0; if ((x * y) <= -2e+96) tmp = 2.0 * ((x * y) + (z * t)); elseif ((x * y) <= 1e+72) tmp = 2.0 * ((z * t) - (t_1 * (i * c))); else tmp = 2.0 * ((x * y) - (i * (c * t_1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2e+96], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1e+72], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(t$95$1 * N[(i * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(i * N[(c * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + c \cdot b\\
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+96}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{elif}\;x \cdot y \leq 10^{+72}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_1 \cdot \left(i \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - i \cdot \left(c \cdot t\_1\right)\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -2.0000000000000001e96Initial program 90.2%
associate--l+90.2%
*-commutative90.2%
associate--l+90.2%
associate--l+90.2%
*-commutative90.2%
associate-*l*92.6%
Simplified92.6%
Taylor expanded in c around 0 83.9%
+-commutative83.9%
Simplified83.9%
if -2.0000000000000001e96 < (*.f64 x y) < 9.99999999999999944e71Initial program 88.9%
associate--l+88.9%
*-commutative88.9%
associate--l+88.9%
associate--l+88.9%
*-commutative88.9%
associate-*l*96.1%
Simplified96.1%
associate-+r-96.1%
+-commutative96.1%
associate-*r*88.9%
*-commutative88.9%
associate-*r*93.1%
associate-+r-93.1%
fma-define93.1%
+-commutative93.1%
fma-define93.1%
Applied egg-rr93.1%
associate-*r*88.9%
*-commutative88.9%
Simplified88.9%
Taylor expanded in x around 0 86.6%
*-commutative86.6%
*-commutative86.6%
associate-*l*89.6%
*-commutative89.6%
*-commutative89.6%
Simplified89.6%
if 9.99999999999999944e71 < (*.f64 x y) Initial program 88.4%
associate--l+88.4%
*-commutative88.4%
associate--l+88.4%
associate--l+88.4%
*-commutative88.4%
associate-*l*90.0%
Simplified90.0%
*-commutative90.0%
fma-define96.7%
associate-*r*95.1%
*-commutative95.1%
associate-*r*95.0%
+-commutative95.0%
fma-define95.0%
Applied egg-rr95.0%
Taylor expanded in z around 0 93.3%
mul-1-neg93.3%
associate-*r*95.0%
distribute-rgt-neg-in95.0%
*-commutative95.0%
Simplified95.0%
Taylor expanded in y around 0 86.7%
+-commutative86.7%
mul-1-neg86.7%
unsub-neg86.7%
associate-*r*88.3%
*-commutative88.3%
associate-*l*86.7%
Simplified86.7%
Final simplification88.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (+ a (* c b)) (* i c))))
(if (<= (* x y) -5e-19)
(* 2.0 (+ (* z t) (- (* x y) (* c (* b (* i c))))))
(if (<= (* x y) 4e+59) (* 2.0 (- (* z t) t_1)) (* 2.0 (- (* x y) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (a + (c * b)) * (i * c);
double tmp;
if ((x * y) <= -5e-19) {
tmp = 2.0 * ((z * t) + ((x * y) - (c * (b * (i * c)))));
} else if ((x * y) <= 4e+59) {
tmp = 2.0 * ((z * t) - t_1);
} else {
tmp = 2.0 * ((x * y) - t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (a + (c * b)) * (i * c)
if ((x * y) <= (-5d-19)) then
tmp = 2.0d0 * ((z * t) + ((x * y) - (c * (b * (i * c)))))
else if ((x * y) <= 4d+59) then
tmp = 2.0d0 * ((z * t) - t_1)
else
tmp = 2.0d0 * ((x * y) - t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (a + (c * b)) * (i * c);
double tmp;
if ((x * y) <= -5e-19) {
tmp = 2.0 * ((z * t) + ((x * y) - (c * (b * (i * c)))));
} else if ((x * y) <= 4e+59) {
tmp = 2.0 * ((z * t) - t_1);
} else {
tmp = 2.0 * ((x * y) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (a + (c * b)) * (i * c) tmp = 0 if (x * y) <= -5e-19: tmp = 2.0 * ((z * t) + ((x * y) - (c * (b * (i * c))))) elif (x * y) <= 4e+59: tmp = 2.0 * ((z * t) - t_1) else: tmp = 2.0 * ((x * y) - t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(a + Float64(c * b)) * Float64(i * c)) tmp = 0.0 if (Float64(x * y) <= -5e-19) tmp = Float64(2.0 * Float64(Float64(z * t) + Float64(Float64(x * y) - Float64(c * Float64(b * Float64(i * c)))))); elseif (Float64(x * y) <= 4e+59) tmp = Float64(2.0 * Float64(Float64(z * t) - t_1)); else tmp = Float64(2.0 * Float64(Float64(x * y) - t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (a + (c * b)) * (i * c); tmp = 0.0; if ((x * y) <= -5e-19) tmp = 2.0 * ((z * t) + ((x * y) - (c * (b * (i * c))))); elseif ((x * y) <= 4e+59) tmp = 2.0 * ((z * t) - t_1); else tmp = 2.0 * ((x * y) - t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision] * N[(i * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -5e-19], N[(2.0 * N[(N[(z * t), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] - N[(c * N[(b * N[(i * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e+59], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + c \cdot b\right) \cdot \left(i \cdot c\right)\\
\mathbf{if}\;x \cdot y \leq -5 \cdot 10^{-19}:\\
\;\;\;\;2 \cdot \left(z \cdot t + \left(x \cdot y - c \cdot \left(b \cdot \left(i \cdot c\right)\right)\right)\right)\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{+59}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -5.0000000000000004e-19Initial program 89.8%
+-commutative89.8%
associate--l+89.8%
*-commutative89.8%
associate-*l*93.9%
Simplified93.9%
Taylor expanded in a around 0 92.4%
if -5.0000000000000004e-19 < (*.f64 x y) < 3.99999999999999989e59Initial program 89.3%
associate--l+89.3%
*-commutative89.3%
associate--l+89.3%
associate--l+89.3%
*-commutative89.3%
associate-*l*95.3%
Simplified95.3%
associate-+r-95.3%
+-commutative95.3%
associate-*r*89.3%
*-commutative89.3%
associate-*r*91.6%
associate-+r-91.6%
fma-define91.6%
+-commutative91.6%
fma-define91.6%
Applied egg-rr91.6%
associate-*r*89.3%
*-commutative89.3%
Simplified89.3%
Taylor expanded in x around 0 88.1%
*-commutative88.1%
*-commutative88.1%
associate-*l*91.9%
*-commutative91.9%
*-commutative91.9%
Simplified91.9%
if 3.99999999999999989e59 < (*.f64 x y) Initial program 87.3%
associate--l+87.3%
*-commutative87.3%
associate--l+87.3%
associate--l+87.3%
*-commutative87.3%
associate-*l*90.3%
Simplified90.3%
Taylor expanded in z around 0 87.1%
associate-*r*88.7%
Simplified88.7%
Final simplification91.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* c (* i (+ a (* c b)))) -2.0)))
(if (<= c -4e+32)
t_1
(if (<= c 2.9e-53)
(* 2.0 (+ (* x y) (* z t)))
(if (<= c 1e+198) (* 2.0 (- (* x y) (* (* c b) (* i c)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * (i * (a + (c * b)))) * -2.0;
double tmp;
if (c <= -4e+32) {
tmp = t_1;
} else if (c <= 2.9e-53) {
tmp = 2.0 * ((x * y) + (z * t));
} else if (c <= 1e+198) {
tmp = 2.0 * ((x * y) - ((c * b) * (i * c)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (c * (i * (a + (c * b)))) * (-2.0d0)
if (c <= (-4d+32)) then
tmp = t_1
else if (c <= 2.9d-53) then
tmp = 2.0d0 * ((x * y) + (z * t))
else if (c <= 1d+198) then
tmp = 2.0d0 * ((x * y) - ((c * b) * (i * c)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * (i * (a + (c * b)))) * -2.0;
double tmp;
if (c <= -4e+32) {
tmp = t_1;
} else if (c <= 2.9e-53) {
tmp = 2.0 * ((x * y) + (z * t));
} else if (c <= 1e+198) {
tmp = 2.0 * ((x * y) - ((c * b) * (i * c)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (c * (i * (a + (c * b)))) * -2.0 tmp = 0 if c <= -4e+32: tmp = t_1 elif c <= 2.9e-53: tmp = 2.0 * ((x * y) + (z * t)) elif c <= 1e+198: tmp = 2.0 * ((x * y) - ((c * b) * (i * c))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(c * Float64(i * Float64(a + Float64(c * b)))) * -2.0) tmp = 0.0 if (c <= -4e+32) tmp = t_1; elseif (c <= 2.9e-53) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); elseif (c <= 1e+198) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(Float64(c * b) * Float64(i * c)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (c * (i * (a + (c * b)))) * -2.0; tmp = 0.0; if (c <= -4e+32) tmp = t_1; elseif (c <= 2.9e-53) tmp = 2.0 * ((x * y) + (z * t)); elseif (c <= 1e+198) tmp = 2.0 * ((x * y) - ((c * b) * (i * c))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * N[(i * N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]}, If[LessEqual[c, -4e+32], t$95$1, If[LessEqual[c, 2.9e-53], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1e+198], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(N[(c * b), $MachinePrecision] * N[(i * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot \left(i \cdot \left(a + c \cdot b\right)\right)\right) \cdot -2\\
\mathbf{if}\;c \leq -4 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 2.9 \cdot 10^{-53}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{elif}\;c \leq 10^{+198}:\\
\;\;\;\;2 \cdot \left(x \cdot y - \left(c \cdot b\right) \cdot \left(i \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -4.00000000000000021e32 or 1.00000000000000002e198 < c Initial program 72.4%
associate--l+72.4%
*-commutative72.4%
associate--l+72.4%
associate--l+72.4%
*-commutative72.4%
associate-*l*86.6%
Simplified86.6%
Taylor expanded in z around 0 79.5%
associate-*r*77.2%
Simplified77.2%
Taylor expanded in x around 0 80.8%
if -4.00000000000000021e32 < c < 2.8999999999999998e-53Initial program 99.2%
associate--l+99.2%
*-commutative99.2%
associate--l+99.2%
associate--l+99.2%
*-commutative99.2%
associate-*l*98.2%
Simplified98.2%
Taylor expanded in c around 0 79.3%
+-commutative79.3%
Simplified79.3%
if 2.8999999999999998e-53 < c < 1.00000000000000002e198Initial program 91.0%
associate--l+91.0%
*-commutative91.0%
associate--l+91.0%
associate--l+91.0%
*-commutative91.0%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in z around 0 82.4%
associate-*r*82.5%
Simplified82.5%
Taylor expanded in a around 0 70.1%
Final simplification77.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* c b))))
(if (<= c -4.2e+71)
(* 2.0 (- (* z t) (* c (* i t_1))))
(if (<= c 3.3e-53)
(* 2.0 (- (+ (* x y) (* z t)) (* i (* c a))))
(* 2.0 (- (* x y) (* t_1 (* i c))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (c * b);
double tmp;
if (c <= -4.2e+71) {
tmp = 2.0 * ((z * t) - (c * (i * t_1)));
} else if (c <= 3.3e-53) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a)));
} else {
tmp = 2.0 * ((x * y) - (t_1 * (i * c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = a + (c * b)
if (c <= (-4.2d+71)) then
tmp = 2.0d0 * ((z * t) - (c * (i * t_1)))
else if (c <= 3.3d-53) then
tmp = 2.0d0 * (((x * y) + (z * t)) - (i * (c * a)))
else
tmp = 2.0d0 * ((x * y) - (t_1 * (i * c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (c * b);
double tmp;
if (c <= -4.2e+71) {
tmp = 2.0 * ((z * t) - (c * (i * t_1)));
} else if (c <= 3.3e-53) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a)));
} else {
tmp = 2.0 * ((x * y) - (t_1 * (i * c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (c * b) tmp = 0 if c <= -4.2e+71: tmp = 2.0 * ((z * t) - (c * (i * t_1))) elif c <= 3.3e-53: tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a))) else: tmp = 2.0 * ((x * y) - (t_1 * (i * c))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(c * b)) tmp = 0.0 if (c <= -4.2e+71) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(i * t_1)))); elseif (c <= 3.3e-53) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(c * a)))); else tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(t_1 * Float64(i * c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (c * b); tmp = 0.0; if (c <= -4.2e+71) tmp = 2.0 * ((z * t) - (c * (i * t_1))); elseif (c <= 3.3e-53) tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a))); else tmp = 2.0 * ((x * y) - (t_1 * (i * c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -4.2e+71], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(i * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.3e-53], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(t$95$1 * N[(i * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + c \cdot b\\
\mathbf{if}\;c \leq -4.2 \cdot 10^{+71}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot t\_1\right)\right)\\
\mathbf{elif}\;c \leq 3.3 \cdot 10^{-53}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(c \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_1 \cdot \left(i \cdot c\right)\right)\\
\end{array}
\end{array}
if c < -4.19999999999999978e71Initial program 73.9%
associate--l+73.9%
*-commutative73.9%
associate--l+73.9%
associate--l+73.9%
*-commutative73.9%
associate-*l*91.8%
Simplified91.8%
Taylor expanded in x around 0 91.9%
if -4.19999999999999978e71 < c < 3.30000000000000004e-53Initial program 98.4%
Taylor expanded in a around inf 93.9%
*-commutative93.9%
Simplified93.9%
if 3.30000000000000004e-53 < c Initial program 83.0%
associate--l+83.0%
*-commutative83.0%
associate--l+83.0%
associate--l+83.0%
*-commutative83.0%
associate-*l*90.2%
Simplified90.2%
Taylor expanded in z around 0 82.0%
associate-*r*80.9%
Simplified80.9%
Final simplification89.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -2.15e+33) (not (<= c 18.5))) (* (* c (* i (+ a (* c b)))) -2.0) (* 2.0 (+ (* x y) (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -2.15e+33) || !(c <= 18.5)) {
tmp = (c * (i * (a + (c * b)))) * -2.0;
} else {
tmp = 2.0 * ((x * y) + (z * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c <= (-2.15d+33)) .or. (.not. (c <= 18.5d0))) then
tmp = (c * (i * (a + (c * b)))) * (-2.0d0)
else
tmp = 2.0d0 * ((x * y) + (z * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -2.15e+33) || !(c <= 18.5)) {
tmp = (c * (i * (a + (c * b)))) * -2.0;
} else {
tmp = 2.0 * ((x * y) + (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -2.15e+33) or not (c <= 18.5): tmp = (c * (i * (a + (c * b)))) * -2.0 else: tmp = 2.0 * ((x * y) + (z * t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -2.15e+33) || !(c <= 18.5)) tmp = Float64(Float64(c * Float64(i * Float64(a + Float64(c * b)))) * -2.0); else tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -2.15e+33) || ~((c <= 18.5))) tmp = (c * (i * (a + (c * b)))) * -2.0; else tmp = 2.0 * ((x * y) + (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -2.15e+33], N[Not[LessEqual[c, 18.5]], $MachinePrecision]], N[(N[(c * N[(i * N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.15 \cdot 10^{+33} \lor \neg \left(c \leq 18.5\right):\\
\;\;\;\;\left(c \cdot \left(i \cdot \left(a + c \cdot b\right)\right)\right) \cdot -2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\end{array}
\end{array}
if c < -2.15000000000000014e33 or 18.5 < c Initial program 78.4%
associate--l+78.4%
*-commutative78.4%
associate--l+78.4%
associate--l+78.4%
*-commutative78.4%
associate-*l*89.7%
Simplified89.7%
Taylor expanded in z around 0 80.6%
associate-*r*79.2%
Simplified79.2%
Taylor expanded in x around 0 71.7%
if -2.15000000000000014e33 < c < 18.5Initial program 99.2%
associate--l+99.2%
*-commutative99.2%
associate--l+99.2%
associate--l+99.2%
*-commutative99.2%
associate-*l*98.4%
Simplified98.4%
Taylor expanded in c around 0 77.9%
+-commutative77.9%
Simplified77.9%
Final simplification74.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* x y) -5e+80) (not (<= (* x y) 4e+59))) (* 2.0 (* x y)) (* 2.0 (* z t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((x * y) <= -5e+80) || !((x * y) <= 4e+59)) {
tmp = 2.0 * (x * y);
} else {
tmp = 2.0 * (z * t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (((x * y) <= (-5d+80)) .or. (.not. ((x * y) <= 4d+59))) then
tmp = 2.0d0 * (x * y)
else
tmp = 2.0d0 * (z * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((x * y) <= -5e+80) || !((x * y) <= 4e+59)) {
tmp = 2.0 * (x * y);
} else {
tmp = 2.0 * (z * t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((x * y) <= -5e+80) or not ((x * y) <= 4e+59): tmp = 2.0 * (x * y) else: tmp = 2.0 * (z * t) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(x * y) <= -5e+80) || !(Float64(x * y) <= 4e+59)) tmp = Float64(2.0 * Float64(x * y)); else tmp = Float64(2.0 * Float64(z * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((x * y) <= -5e+80) || ~(((x * y) <= 4e+59))) tmp = 2.0 * (x * y); else tmp = 2.0 * (z * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -5e+80], N[Not[LessEqual[N[(x * y), $MachinePrecision], 4e+59]], $MachinePrecision]], N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+80} \lor \neg \left(x \cdot y \leq 4 \cdot 10^{+59}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -4.99999999999999961e80 or 3.99999999999999989e59 < (*.f64 x y) Initial program 88.8%
associate--l+88.8%
*-commutative88.8%
associate--l+88.8%
associate--l+88.8%
*-commutative88.8%
associate-*l*91.5%
Simplified91.5%
Taylor expanded in x around inf 65.1%
if -4.99999999999999961e80 < (*.f64 x y) < 3.99999999999999989e59Initial program 89.1%
associate--l+89.1%
*-commutative89.1%
associate--l+89.1%
associate--l+89.1%
*-commutative89.1%
associate-*l*96.0%
Simplified96.0%
Taylor expanded in z around inf 38.6%
Final simplification49.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= i -1.3e+154) (* a (* (* i c) -2.0)) (* 2.0 (+ (* x y) (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (i <= -1.3e+154) {
tmp = a * ((i * c) * -2.0);
} else {
tmp = 2.0 * ((x * y) + (z * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (i <= (-1.3d+154)) then
tmp = a * ((i * c) * (-2.0d0))
else
tmp = 2.0d0 * ((x * y) + (z * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (i <= -1.3e+154) {
tmp = a * ((i * c) * -2.0);
} else {
tmp = 2.0 * ((x * y) + (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if i <= -1.3e+154: tmp = a * ((i * c) * -2.0) else: tmp = 2.0 * ((x * y) + (z * t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (i <= -1.3e+154) tmp = Float64(a * Float64(Float64(i * c) * -2.0)); else tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (i <= -1.3e+154) tmp = a * ((i * c) * -2.0); else tmp = 2.0 * ((x * y) + (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[i, -1.3e+154], N[(a * N[(N[(i * c), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -1.3 \cdot 10^{+154}:\\
\;\;\;\;a \cdot \left(\left(i \cdot c\right) \cdot -2\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\end{array}
\end{array}
if i < -1.29999999999999994e154Initial program 94.4%
associate--l+94.4%
*-commutative94.4%
associate--l+94.4%
associate--l+94.4%
*-commutative94.4%
associate-*l*97.0%
Simplified97.0%
Taylor expanded in z around 0 78.1%
associate-*r*89.2%
Simplified89.2%
Taylor expanded in a around inf 57.3%
associate-*r*53.7%
*-commutative53.7%
associate-*r*57.3%
associate-*l*57.3%
Simplified57.3%
if -1.29999999999999994e154 < i Initial program 88.1%
associate--l+88.1%
*-commutative88.1%
associate--l+88.1%
associate--l+88.1%
*-commutative88.1%
associate-*l*93.7%
Simplified93.7%
Taylor expanded in c around 0 61.5%
+-commutative61.5%
Simplified61.5%
Final simplification60.9%
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (* z t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (z * t);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (z * t)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (z * t);
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (z * t)
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(z * t)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (z * t); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(z \cdot t\right)
\end{array}
Initial program 89.0%
associate--l+89.0%
*-commutative89.0%
associate--l+89.0%
associate--l+89.0%
*-commutative89.0%
associate-*l*94.1%
Simplified94.1%
Taylor expanded in z around inf 27.9%
Final simplification27.9%
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(a + Float64(b * c)) * Float64(c * i)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)
\end{array}
herbie shell --seed 2024048
(FPCore (x y z t a b c i)
:name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A"
:precision binary64
:alt
(* 2.0 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i))))
(* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))