
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 (- INFINITY))
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(if (<= t_1 INFINITY) t_1 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k) tmp = 0 if t_1 <= -math.inf: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) elif t_1 <= math.inf: tmp = t_1 else: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); elseif (t_1 <= Inf) tmp = t_1; else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
tmp = 0.0;
if (t_1 <= -Inf)
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
elseif (t_1 <= Inf)
tmp = t_1;
else
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < -inf.0Initial program 91.9%
Simplified98.3%
if -inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 98.8%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) Initial program 0.0%
Simplified25.8%
Taylor expanded in x around inf 64.7%
Final simplification94.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -1.05e+186)
(* b c)
(if (<= (* b c) -2.3e+14)
(* x (* i -4.0))
(if (<= (* b c) -55000000000000.0)
(* b c)
(if (<= (* b c) 2.9e-212)
(* a (* t -4.0))
(if (<= (* b c) 1.18e+157) (* 18.0 (* t (* x (* y z)))) (* b c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1.05e+186) {
tmp = b * c;
} else if ((b * c) <= -2.3e+14) {
tmp = x * (i * -4.0);
} else if ((b * c) <= -55000000000000.0) {
tmp = b * c;
} else if ((b * c) <= 2.9e-212) {
tmp = a * (t * -4.0);
} else if ((b * c) <= 1.18e+157) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-1.05d+186)) then
tmp = b * c
else if ((b * c) <= (-2.3d+14)) then
tmp = x * (i * (-4.0d0))
else if ((b * c) <= (-55000000000000.0d0)) then
tmp = b * c
else if ((b * c) <= 2.9d-212) then
tmp = a * (t * (-4.0d0))
else if ((b * c) <= 1.18d+157) then
tmp = 18.0d0 * (t * (x * (y * z)))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1.05e+186) {
tmp = b * c;
} else if ((b * c) <= -2.3e+14) {
tmp = x * (i * -4.0);
} else if ((b * c) <= -55000000000000.0) {
tmp = b * c;
} else if ((b * c) <= 2.9e-212) {
tmp = a * (t * -4.0);
} else if ((b * c) <= 1.18e+157) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -1.05e+186: tmp = b * c elif (b * c) <= -2.3e+14: tmp = x * (i * -4.0) elif (b * c) <= -55000000000000.0: tmp = b * c elif (b * c) <= 2.9e-212: tmp = a * (t * -4.0) elif (b * c) <= 1.18e+157: tmp = 18.0 * (t * (x * (y * z))) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -1.05e+186) tmp = Float64(b * c); elseif (Float64(b * c) <= -2.3e+14) tmp = Float64(x * Float64(i * -4.0)); elseif (Float64(b * c) <= -55000000000000.0) tmp = Float64(b * c); elseif (Float64(b * c) <= 2.9e-212) tmp = Float64(a * Float64(t * -4.0)); elseif (Float64(b * c) <= 1.18e+157) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -1.05e+186)
tmp = b * c;
elseif ((b * c) <= -2.3e+14)
tmp = x * (i * -4.0);
elseif ((b * c) <= -55000000000000.0)
tmp = b * c;
elseif ((b * c) <= 2.9e-212)
tmp = a * (t * -4.0);
elseif ((b * c) <= 1.18e+157)
tmp = 18.0 * (t * (x * (y * z)));
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -1.05e+186], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2.3e+14], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -55000000000000.0], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.9e-212], N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.18e+157], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.05 \cdot 10^{+186}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -2.3 \cdot 10^{+14}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq -55000000000000:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 2.9 \cdot 10^{-212}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 1.18 \cdot 10^{+157}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.05e186 or -2.3e14 < (*.f64 b c) < -5.5e13 or 1.1799999999999999e157 < (*.f64 b c) Initial program 86.1%
Simplified86.2%
associate--l+86.2%
*-commutative86.2%
fma-define87.4%
*-commutative87.4%
fma-neg87.4%
fma-define87.4%
*-commutative87.4%
*-commutative87.4%
Applied egg-rr87.4%
Taylor expanded in b around inf 66.9%
if -1.05e186 < (*.f64 b c) < -2.3e14Initial program 83.0%
Simplified86.4%
associate--l+86.4%
*-commutative86.4%
fma-define86.4%
*-commutative86.4%
fma-neg86.4%
fma-define86.4%
*-commutative86.4%
*-commutative86.4%
Applied egg-rr86.4%
Taylor expanded in i around inf 40.4%
associate-*r*40.4%
*-commutative40.4%
Simplified40.4%
if -5.5e13 < (*.f64 b c) < 2.8999999999999999e-212Initial program 86.1%
Simplified91.8%
associate--l+91.8%
*-commutative91.8%
fma-define91.8%
*-commutative91.8%
fma-neg91.8%
fma-define91.8%
*-commutative91.8%
*-commutative91.8%
Applied egg-rr91.8%
Taylor expanded in i around 0 77.0%
pow177.0%
associate-*r*76.9%
Applied egg-rr76.9%
unpow176.9%
associate-*r*77.0%
*-commutative77.0%
associate-*r*74.8%
associate-*l*74.8%
Simplified74.8%
Taylor expanded in a around inf 38.5%
associate-*r*38.5%
*-commutative38.5%
associate-*l*38.5%
Simplified38.5%
if 2.8999999999999999e-212 < (*.f64 b c) < 1.1799999999999999e157Initial program 84.2%
Simplified81.0%
associate--l+81.0%
*-commutative81.0%
fma-define84.2%
*-commutative84.2%
fma-neg84.2%
fma-define85.7%
*-commutative85.7%
*-commutative85.7%
Applied egg-rr85.7%
Taylor expanded in y around inf 42.6%
Final simplification48.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -2.2e+186)
(* b c)
(if (<= (* b c) -2.3e+14)
(* x (* i -4.0))
(if (<= (* b c) -38000000000000.0)
(* b c)
(if (<= (* b c) 8.2e-209)
(* a (* t -4.0))
(if (<= (* b c) 5e+161) (* (* y (* x z)) (* 18.0 t)) (* b c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -2.2e+186) {
tmp = b * c;
} else if ((b * c) <= -2.3e+14) {
tmp = x * (i * -4.0);
} else if ((b * c) <= -38000000000000.0) {
tmp = b * c;
} else if ((b * c) <= 8.2e-209) {
tmp = a * (t * -4.0);
} else if ((b * c) <= 5e+161) {
tmp = (y * (x * z)) * (18.0 * t);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-2.2d+186)) then
tmp = b * c
else if ((b * c) <= (-2.3d+14)) then
tmp = x * (i * (-4.0d0))
else if ((b * c) <= (-38000000000000.0d0)) then
tmp = b * c
else if ((b * c) <= 8.2d-209) then
tmp = a * (t * (-4.0d0))
else if ((b * c) <= 5d+161) then
tmp = (y * (x * z)) * (18.0d0 * t)
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -2.2e+186) {
tmp = b * c;
} else if ((b * c) <= -2.3e+14) {
tmp = x * (i * -4.0);
} else if ((b * c) <= -38000000000000.0) {
tmp = b * c;
} else if ((b * c) <= 8.2e-209) {
tmp = a * (t * -4.0);
} else if ((b * c) <= 5e+161) {
tmp = (y * (x * z)) * (18.0 * t);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -2.2e+186: tmp = b * c elif (b * c) <= -2.3e+14: tmp = x * (i * -4.0) elif (b * c) <= -38000000000000.0: tmp = b * c elif (b * c) <= 8.2e-209: tmp = a * (t * -4.0) elif (b * c) <= 5e+161: tmp = (y * (x * z)) * (18.0 * t) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -2.2e+186) tmp = Float64(b * c); elseif (Float64(b * c) <= -2.3e+14) tmp = Float64(x * Float64(i * -4.0)); elseif (Float64(b * c) <= -38000000000000.0) tmp = Float64(b * c); elseif (Float64(b * c) <= 8.2e-209) tmp = Float64(a * Float64(t * -4.0)); elseif (Float64(b * c) <= 5e+161) tmp = Float64(Float64(y * Float64(x * z)) * Float64(18.0 * t)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -2.2e+186)
tmp = b * c;
elseif ((b * c) <= -2.3e+14)
tmp = x * (i * -4.0);
elseif ((b * c) <= -38000000000000.0)
tmp = b * c;
elseif ((b * c) <= 8.2e-209)
tmp = a * (t * -4.0);
elseif ((b * c) <= 5e+161)
tmp = (y * (x * z)) * (18.0 * t);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -2.2e+186], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2.3e+14], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -38000000000000.0], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 8.2e-209], N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5e+161], N[(N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2.2 \cdot 10^{+186}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -2.3 \cdot 10^{+14}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq -38000000000000:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 8.2 \cdot 10^{-209}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+161}:\\
\;\;\;\;\left(y \cdot \left(x \cdot z\right)\right) \cdot \left(18 \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -2.1999999999999998e186 or -2.3e14 < (*.f64 b c) < -3.8e13 or 4.9999999999999997e161 < (*.f64 b c) Initial program 86.1%
Simplified86.2%
associate--l+86.2%
*-commutative86.2%
fma-define87.4%
*-commutative87.4%
fma-neg87.4%
fma-define87.4%
*-commutative87.4%
*-commutative87.4%
Applied egg-rr87.4%
Taylor expanded in b around inf 66.9%
if -2.1999999999999998e186 < (*.f64 b c) < -2.3e14Initial program 83.0%
Simplified86.4%
associate--l+86.4%
*-commutative86.4%
fma-define86.4%
*-commutative86.4%
fma-neg86.4%
fma-define86.4%
*-commutative86.4%
*-commutative86.4%
Applied egg-rr86.4%
Taylor expanded in i around inf 40.4%
associate-*r*40.4%
*-commutative40.4%
Simplified40.4%
if -3.8e13 < (*.f64 b c) < 8.19999999999999955e-209Initial program 86.1%
Simplified91.8%
associate--l+91.8%
*-commutative91.8%
fma-define91.8%
*-commutative91.8%
fma-neg91.8%
fma-define91.8%
*-commutative91.8%
*-commutative91.8%
Applied egg-rr91.8%
Taylor expanded in i around 0 77.0%
pow177.0%
associate-*r*76.9%
Applied egg-rr76.9%
unpow176.9%
associate-*r*77.0%
*-commutative77.0%
associate-*r*74.8%
associate-*l*74.8%
Simplified74.8%
Taylor expanded in a around inf 38.5%
associate-*r*38.5%
*-commutative38.5%
associate-*l*38.5%
Simplified38.5%
if 8.19999999999999955e-209 < (*.f64 b c) < 4.9999999999999997e161Initial program 84.2%
Simplified81.0%
associate--l+81.0%
*-commutative81.0%
fma-define84.2%
*-commutative84.2%
fma-neg84.2%
fma-define85.7%
*-commutative85.7%
*-commutative85.7%
Applied egg-rr85.7%
Taylor expanded in i around 0 75.2%
pow175.2%
associate-*r*75.2%
Applied egg-rr75.2%
unpow175.2%
associate-*r*75.2%
*-commutative75.2%
associate-*r*81.5%
associate-*l*81.5%
Simplified81.5%
Taylor expanded in x around inf 42.6%
associate-*r*42.6%
*-commutative42.6%
*-commutative42.6%
associate-*l*39.7%
Simplified39.7%
Final simplification47.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= t_1 -2e+240)
(* j (* k -27.0))
(if (<= t_1 1e+145)
(-
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(* 4.0 (* x i)))
(- (- (* b c) (* 4.0 (* t a))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -2e+240) {
tmp = j * (k * -27.0);
} else if (t_1 <= 1e+145) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} else {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if (t_1 <= (-2d+240)) then
tmp = j * (k * (-27.0d0))
else if (t_1 <= 1d+145) then
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - (4.0d0 * (x * i))
else
tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -2e+240) {
tmp = j * (k * -27.0);
} else if (t_1 <= 1e+145) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} else {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if t_1 <= -2e+240: tmp = j * (k * -27.0) elif t_1 <= 1e+145: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i)) else: tmp = ((b * c) - (4.0 * (t * a))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -2e+240) tmp = Float64(j * Float64(k * -27.0)); elseif (t_1 <= 1e+145) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if (t_1 <= -2e+240)
tmp = j * (k * -27.0);
elseif (t_1 <= 1e+145)
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
else
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+240], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+145], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+240}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+145}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -2.00000000000000003e240Initial program 63.6%
Simplified63.5%
associate--l+63.5%
*-commutative63.5%
fma-define68.0%
*-commutative68.0%
fma-neg68.0%
fma-define72.6%
*-commutative72.6%
*-commutative72.6%
Applied egg-rr72.6%
Taylor expanded in j around inf 73.5%
*-commutative73.5%
associate-*r*73.4%
Simplified73.4%
if -2.00000000000000003e240 < (*.f64 (*.f64 j 27) k) < 9.9999999999999999e144Initial program 87.9%
Simplified90.4%
Taylor expanded in j around 0 86.3%
if 9.9999999999999999e144 < (*.f64 (*.f64 j 27) k) Initial program 84.2%
Taylor expanded in x around 0 81.5%
Final simplification84.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k))
(t_2 (- (* t (- (* -18.0 (* x (- (* y z)))) (* a 4.0))) t_1))
(t_3 (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))))
(if (<= t -5.2e+155)
t_3
(if (<= t -8.8e+95)
t_2
(if (<= t -2.55e-64)
t_3
(if (<= t 2.5e+17) (- (- (* b c) (* 4.0 (* x i))) t_1) t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = (t * ((-18.0 * (x * -(y * z))) - (a * 4.0))) - t_1;
double t_3 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
double tmp;
if (t <= -5.2e+155) {
tmp = t_3;
} else if (t <= -8.8e+95) {
tmp = t_2;
} else if (t <= -2.55e-64) {
tmp = t_3;
} else if (t <= 2.5e+17) {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (j * 27.0d0) * k
t_2 = (t * (((-18.0d0) * (x * -(y * z))) - (a * 4.0d0))) - t_1
t_3 = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
if (t <= (-5.2d+155)) then
tmp = t_3
else if (t <= (-8.8d+95)) then
tmp = t_2
else if (t <= (-2.55d-64)) then
tmp = t_3
else if (t <= 2.5d+17) then
tmp = ((b * c) - (4.0d0 * (x * i))) - t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = (t * ((-18.0 * (x * -(y * z))) - (a * 4.0))) - t_1;
double t_3 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
double tmp;
if (t <= -5.2e+155) {
tmp = t_3;
} else if (t <= -8.8e+95) {
tmp = t_2;
} else if (t <= -2.55e-64) {
tmp = t_3;
} else if (t <= 2.5e+17) {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = (t * ((-18.0 * (x * -(y * z))) - (a * 4.0))) - t_1 t_3 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) tmp = 0 if t <= -5.2e+155: tmp = t_3 elif t <= -8.8e+95: tmp = t_2 elif t <= -2.55e-64: tmp = t_3 elif t <= 2.5e+17: tmp = ((b * c) - (4.0 * (x * i))) - t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(Float64(t * Float64(Float64(-18.0 * Float64(x * Float64(-Float64(y * z)))) - Float64(a * 4.0))) - t_1) t_3 = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) tmp = 0.0 if (t <= -5.2e+155) tmp = t_3; elseif (t <= -8.8e+95) tmp = t_2; elseif (t <= -2.55e-64) tmp = t_3; elseif (t <= 2.5e+17) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_1); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
t_2 = (t * ((-18.0 * (x * -(y * z))) - (a * 4.0))) - t_1;
t_3 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
tmp = 0.0;
if (t <= -5.2e+155)
tmp = t_3;
elseif (t <= -8.8e+95)
tmp = t_2;
elseif (t <= -2.55e-64)
tmp = t_3;
elseif (t <= 2.5e+17)
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t * N[(N[(-18.0 * N[(x * (-N[(y * z), $MachinePrecision])), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.2e+155], t$95$3, If[LessEqual[t, -8.8e+95], t$95$2, If[LessEqual[t, -2.55e-64], t$95$3, If[LessEqual[t, 2.5e+17], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := t \cdot \left(-18 \cdot \left(x \cdot \left(-y \cdot z\right)\right) - a \cdot 4\right) - t\_1\\
t_3 := b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+155}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -8.8 \cdot 10^{+95}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2.55 \cdot 10^{-64}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+17}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -5.2000000000000004e155 or -8.7999999999999996e95 < t < -2.54999999999999992e-64Initial program 86.6%
Simplified88.0%
associate--l+88.0%
*-commutative88.0%
fma-define89.4%
*-commutative89.4%
fma-neg89.4%
fma-define89.4%
*-commutative89.4%
*-commutative89.4%
Applied egg-rr89.4%
Taylor expanded in i around 0 84.2%
Taylor expanded in j around 0 79.6%
if -5.2000000000000004e155 < t < -8.7999999999999996e95 or 2.5e17 < t Initial program 81.6%
Taylor expanded in t around -inf 81.2%
associate-*r*81.2%
neg-mul-181.2%
cancel-sign-sub-inv81.2%
metadata-eval81.2%
*-commutative81.2%
*-commutative81.2%
Simplified81.2%
if -2.54999999999999992e-64 < t < 2.5e17Initial program 87.0%
Taylor expanded in t around 0 81.1%
Final simplification80.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 4.0 (* t a)))) (t_2 (* j (* k -27.0))))
(if (<= (* b c) -1.45e+72)
t_1
(if (<= (* b c) -55000000000000.0)
(+ t_2 (* x (* i -4.0)))
(if (<= (* b c) 2.7e+51)
(+ t_2 (* t (* a -4.0)))
(if (<= (* b c) 6.8e+154) (* 18.0 (* t (* x (* y z)))) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (t * a));
double t_2 = j * (k * -27.0);
double tmp;
if ((b * c) <= -1.45e+72) {
tmp = t_1;
} else if ((b * c) <= -55000000000000.0) {
tmp = t_2 + (x * (i * -4.0));
} else if ((b * c) <= 2.7e+51) {
tmp = t_2 + (t * (a * -4.0));
} else if ((b * c) <= 6.8e+154) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) - (4.0d0 * (t * a))
t_2 = j * (k * (-27.0d0))
if ((b * c) <= (-1.45d+72)) then
tmp = t_1
else if ((b * c) <= (-55000000000000.0d0)) then
tmp = t_2 + (x * (i * (-4.0d0)))
else if ((b * c) <= 2.7d+51) then
tmp = t_2 + (t * (a * (-4.0d0)))
else if ((b * c) <= 6.8d+154) then
tmp = 18.0d0 * (t * (x * (y * z)))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (t * a));
double t_2 = j * (k * -27.0);
double tmp;
if ((b * c) <= -1.45e+72) {
tmp = t_1;
} else if ((b * c) <= -55000000000000.0) {
tmp = t_2 + (x * (i * -4.0));
} else if ((b * c) <= 2.7e+51) {
tmp = t_2 + (t * (a * -4.0));
} else if ((b * c) <= 6.8e+154) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (4.0 * (t * a)) t_2 = j * (k * -27.0) tmp = 0 if (b * c) <= -1.45e+72: tmp = t_1 elif (b * c) <= -55000000000000.0: tmp = t_2 + (x * (i * -4.0)) elif (b * c) <= 2.7e+51: tmp = t_2 + (t * (a * -4.0)) elif (b * c) <= 6.8e+154: tmp = 18.0 * (t * (x * (y * z))) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) t_2 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (Float64(b * c) <= -1.45e+72) tmp = t_1; elseif (Float64(b * c) <= -55000000000000.0) tmp = Float64(t_2 + Float64(x * Float64(i * -4.0))); elseif (Float64(b * c) <= 2.7e+51) tmp = Float64(t_2 + Float64(t * Float64(a * -4.0))); elseif (Float64(b * c) <= 6.8e+154) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (4.0 * (t * a));
t_2 = j * (k * -27.0);
tmp = 0.0;
if ((b * c) <= -1.45e+72)
tmp = t_1;
elseif ((b * c) <= -55000000000000.0)
tmp = t_2 + (x * (i * -4.0));
elseif ((b * c) <= 2.7e+51)
tmp = t_2 + (t * (a * -4.0));
elseif ((b * c) <= 6.8e+154)
tmp = 18.0 * (t * (x * (y * z)));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.45e+72], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -55000000000000.0], N[(t$95$2 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.7e+51], N[(t$95$2 + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 6.8e+154], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(t \cdot a\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -1.45 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq -55000000000000:\\
\;\;\;\;t\_2 + x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 2.7 \cdot 10^{+51}:\\
\;\;\;\;t\_2 + t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 6.8 \cdot 10^{+154}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 b c) < -1.45000000000000009e72 or 6.79999999999999948e154 < (*.f64 b c) Initial program 85.7%
Taylor expanded in x around 0 76.7%
Taylor expanded in j around 0 73.6%
if -1.45000000000000009e72 < (*.f64 b c) < -5.5e13Initial program 82.8%
Simplified82.7%
Taylor expanded in i around inf 60.6%
associate-*r*60.6%
*-commutative60.6%
Simplified60.6%
if -5.5e13 < (*.f64 b c) < 2.69999999999999992e51Initial program 86.9%
Simplified89.0%
Taylor expanded in a around inf 55.8%
*-commutative55.8%
*-commutative55.8%
associate-*r*55.8%
*-commutative55.8%
Simplified55.8%
if 2.69999999999999992e51 < (*.f64 b c) < 6.79999999999999948e154Initial program 67.1%
Simplified75.0%
associate--l+75.0%
*-commutative75.0%
fma-define75.0%
*-commutative75.0%
fma-neg75.0%
fma-define75.0%
*-commutative75.0%
*-commutative75.0%
Applied egg-rr75.0%
Taylor expanded in y around inf 75.4%
Final simplification63.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -3.3e+109)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (or (<= x -1.55e-7) (and (not (<= x -9.5e-35)) (<= x 1.58e-18)))
(- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) k))
(* x (- (* 18.0 (* y (* z t))) (* 4.0 i))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -3.3e+109) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if ((x <= -1.55e-7) || (!(x <= -9.5e-35) && (x <= 1.58e-18))) {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-3.3d+109)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if ((x <= (-1.55d-7)) .or. (.not. (x <= (-9.5d-35))) .and. (x <= 1.58d-18)) then
tmp = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
else
tmp = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -3.3e+109) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if ((x <= -1.55e-7) || (!(x <= -9.5e-35) && (x <= 1.58e-18))) {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -3.3e+109: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif (x <= -1.55e-7) or (not (x <= -9.5e-35) and (x <= 1.58e-18)): tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k) else: tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -3.3e+109) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif ((x <= -1.55e-7) || (!(x <= -9.5e-35) && (x <= 1.58e-18))) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -3.3e+109)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif ((x <= -1.55e-7) || (~((x <= -9.5e-35)) && (x <= 1.58e-18)))
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
else
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -3.3e+109], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -1.55e-7], And[N[Not[LessEqual[x, -9.5e-35]], $MachinePrecision], LessEqual[x, 1.58e-18]]], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.3 \cdot 10^{+109}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;x \leq -1.55 \cdot 10^{-7} \lor \neg \left(x \leq -9.5 \cdot 10^{-35}\right) \land x \leq 1.58 \cdot 10^{-18}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if x < -3.2999999999999999e109Initial program 68.4%
Simplified78.0%
Taylor expanded in x around inf 69.3%
if -3.2999999999999999e109 < x < -1.55e-7 or -9.5000000000000003e-35 < x < 1.5800000000000001e-18Initial program 93.9%
Taylor expanded in x around 0 81.6%
if -1.55e-7 < x < -9.5000000000000003e-35 or 1.5800000000000001e-18 < x Initial program 79.9%
Simplified89.2%
Taylor expanded in x around inf 68.6%
pow168.6%
*-commutative68.6%
Applied egg-rr68.6%
unpow168.6%
associate-*l*70.8%
Simplified70.8%
Final simplification76.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= z 1.25e+98)
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(-
(+ (* b c) (* t (- (* (* x y) (* 18.0 z)) (* a 4.0))))
(* 27.0 (* j k)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= 1.25e+98) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = ((b * c) + (t * (((x * y) * (18.0 * z)) - (a * 4.0)))) - (27.0 * (j * k));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (z <= 1.25d+98) then
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = ((b * c) + (t * (((x * y) * (18.0d0 * z)) - (a * 4.0d0)))) - (27.0d0 * (j * k))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= 1.25e+98) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = ((b * c) + (t * (((x * y) * (18.0 * z)) - (a * 4.0)))) - (27.0 * (j * k));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if z <= 1.25e+98: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = ((b * c) + (t * (((x * y) * (18.0 * z)) - (a * 4.0)))) - (27.0 * (j * k)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (z <= 1.25e+98) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * y) * Float64(18.0 * z)) - Float64(a * 4.0)))) - Float64(27.0 * Float64(j * k))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (z <= 1.25e+98)
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = ((b * c) + (t * (((x * y) * (18.0 * z)) - (a * 4.0)))) - (27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[z, 1.25e+98], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * y), $MachinePrecision] * N[(18.0 * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.25 \cdot 10^{+98}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot y\right) \cdot \left(18 \cdot z\right) - a \cdot 4\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if z < 1.25e98Initial program 86.4%
Simplified89.1%
if 1.25e98 < z Initial program 79.1%
Simplified73.9%
associate--l+73.9%
*-commutative73.9%
fma-define73.9%
*-commutative73.9%
fma-neg73.9%
fma-define73.9%
*-commutative73.9%
*-commutative73.9%
Applied egg-rr73.9%
Taylor expanded in i around 0 71.3%
pow171.3%
associate-*r*71.3%
Applied egg-rr71.3%
unpow171.3%
associate-*r*71.3%
*-commutative71.3%
associate-*r*81.7%
associate-*l*81.7%
Simplified81.7%
Final simplification88.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 4.0 (* t a))))
(t_2 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
(if (<= x -8e+89)
t_2
(if (<= x -3.2e-72)
t_1
(if (<= x 2.25e-243)
(+ (* j (* k -27.0)) (* t (* a -4.0)))
(if (<= x 4.1e-20) t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (t * a));
double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -8e+89) {
tmp = t_2;
} else if (x <= -3.2e-72) {
tmp = t_1;
} else if (x <= 2.25e-243) {
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
} else if (x <= 4.1e-20) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) - (4.0d0 * (t * a))
t_2 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
if (x <= (-8d+89)) then
tmp = t_2
else if (x <= (-3.2d-72)) then
tmp = t_1
else if (x <= 2.25d-243) then
tmp = (j * (k * (-27.0d0))) + (t * (a * (-4.0d0)))
else if (x <= 4.1d-20) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (t * a));
double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -8e+89) {
tmp = t_2;
} else if (x <= -3.2e-72) {
tmp = t_1;
} else if (x <= 2.25e-243) {
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
} else if (x <= 4.1e-20) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (4.0 * (t * a)) t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) tmp = 0 if x <= -8e+89: tmp = t_2 elif x <= -3.2e-72: tmp = t_1 elif x <= 2.25e-243: tmp = (j * (k * -27.0)) + (t * (a * -4.0)) elif x <= 4.1e-20: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) t_2 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) tmp = 0.0 if (x <= -8e+89) tmp = t_2; elseif (x <= -3.2e-72) tmp = t_1; elseif (x <= 2.25e-243) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(a * -4.0))); elseif (x <= 4.1e-20) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (4.0 * (t * a));
t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
tmp = 0.0;
if (x <= -8e+89)
tmp = t_2;
elseif (x <= -3.2e-72)
tmp = t_1;
elseif (x <= 2.25e-243)
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
elseif (x <= 4.1e-20)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8e+89], t$95$2, If[LessEqual[x, -3.2e-72], t$95$1, If[LessEqual[x, 2.25e-243], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.1e-20], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(t \cdot a\right)\\
t_2 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -8 \cdot 10^{+89}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -3.2 \cdot 10^{-72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.25 \cdot 10^{-243}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;x \leq 4.1 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -7.99999999999999996e89 or 4.1000000000000001e-20 < x Initial program 77.8%
Simplified85.9%
Taylor expanded in x around inf 67.0%
if -7.99999999999999996e89 < x < -3.19999999999999999e-72 or 2.25000000000000009e-243 < x < 4.1000000000000001e-20Initial program 90.2%
Taylor expanded in x around 0 73.8%
Taylor expanded in j around 0 65.4%
if -3.19999999999999999e-72 < x < 2.25000000000000009e-243Initial program 94.4%
Simplified85.2%
Taylor expanded in a around inf 68.6%
*-commutative68.6%
*-commutative68.6%
associate-*r*68.6%
*-commutative68.6%
Simplified68.6%
Final simplification66.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 4.0 (* t a)))))
(if (<= x -7.5e+89)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= x -4.2e-73)
t_1
(if (<= x 2.1e-243)
(+ (* j (* k -27.0)) (* t (* a -4.0)))
(if (<= x 1.58e-18)
t_1
(* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (t * a));
double tmp;
if (x <= -7.5e+89) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (x <= -4.2e-73) {
tmp = t_1;
} else if (x <= 2.1e-243) {
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
} else if (x <= 1.58e-18) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) - (4.0d0 * (t * a))
if (x <= (-7.5d+89)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (x <= (-4.2d-73)) then
tmp = t_1
else if (x <= 2.1d-243) then
tmp = (j * (k * (-27.0d0))) + (t * (a * (-4.0d0)))
else if (x <= 1.58d-18) then
tmp = t_1
else
tmp = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (t * a));
double tmp;
if (x <= -7.5e+89) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (x <= -4.2e-73) {
tmp = t_1;
} else if (x <= 2.1e-243) {
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
} else if (x <= 1.58e-18) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (4.0 * (t * a)) tmp = 0 if x <= -7.5e+89: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif x <= -4.2e-73: tmp = t_1 elif x <= 2.1e-243: tmp = (j * (k * -27.0)) + (t * (a * -4.0)) elif x <= 1.58e-18: tmp = t_1 else: tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) tmp = 0.0 if (x <= -7.5e+89) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (x <= -4.2e-73) tmp = t_1; elseif (x <= 2.1e-243) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(a * -4.0))); elseif (x <= 1.58e-18) tmp = t_1; else tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (4.0 * (t * a));
tmp = 0.0;
if (x <= -7.5e+89)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (x <= -4.2e-73)
tmp = t_1;
elseif (x <= 2.1e-243)
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
elseif (x <= 1.58e-18)
tmp = t_1;
else
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.5e+89], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.2e-73], t$95$1, If[LessEqual[x, 2.1e-243], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.58e-18], t$95$1, N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;x \leq -7.5 \cdot 10^{+89}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;x \leq -4.2 \cdot 10^{-73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-243}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;x \leq 1.58 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if x < -7.49999999999999947e89Initial program 71.8%
Simplified80.4%
Taylor expanded in x around inf 66.3%
if -7.49999999999999947e89 < x < -4.1999999999999997e-73 or 2.1000000000000001e-243 < x < 1.5800000000000001e-18Initial program 90.2%
Taylor expanded in x around 0 73.8%
Taylor expanded in j around 0 65.4%
if -4.1999999999999997e-73 < x < 2.1000000000000001e-243Initial program 94.4%
Simplified85.2%
Taylor expanded in a around inf 68.6%
*-commutative68.6%
*-commutative68.6%
associate-*r*68.6%
*-commutative68.6%
Simplified68.6%
if 1.5800000000000001e-18 < x Initial program 81.5%
Simplified89.3%
Taylor expanded in x around inf 67.4%
pow167.4%
*-commutative67.4%
Applied egg-rr67.4%
unpow167.4%
associate-*l*69.9%
Simplified69.9%
Final simplification67.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))))
(if (<= k -9e+56)
(+ (* x (* (* 18.0 z) (* y t))) (* j (* k -27.0)))
(if (<= k 7.8e+80) (- t_1 (* 4.0 (* x i))) (- t_1 (* 27.0 (* j k)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
double tmp;
if (k <= -9e+56) {
tmp = (x * ((18.0 * z) * (y * t))) + (j * (k * -27.0));
} else if (k <= 7.8e+80) {
tmp = t_1 - (4.0 * (x * i));
} else {
tmp = t_1 - (27.0 * (j * k));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
if (k <= (-9d+56)) then
tmp = (x * ((18.0d0 * z) * (y * t))) + (j * (k * (-27.0d0)))
else if (k <= 7.8d+80) then
tmp = t_1 - (4.0d0 * (x * i))
else
tmp = t_1 - (27.0d0 * (j * k))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
double tmp;
if (k <= -9e+56) {
tmp = (x * ((18.0 * z) * (y * t))) + (j * (k * -27.0));
} else if (k <= 7.8e+80) {
tmp = t_1 - (4.0 * (x * i));
} else {
tmp = t_1 - (27.0 * (j * k));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) tmp = 0 if k <= -9e+56: tmp = (x * ((18.0 * z) * (y * t))) + (j * (k * -27.0)) elif k <= 7.8e+80: tmp = t_1 - (4.0 * (x * i)) else: tmp = t_1 - (27.0 * (j * k)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) tmp = 0.0 if (k <= -9e+56) tmp = Float64(Float64(x * Float64(Float64(18.0 * z) * Float64(y * t))) + Float64(j * Float64(k * -27.0))); elseif (k <= 7.8e+80) tmp = Float64(t_1 - Float64(4.0 * Float64(x * i))); else tmp = Float64(t_1 - Float64(27.0 * Float64(j * k))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
tmp = 0.0;
if (k <= -9e+56)
tmp = (x * ((18.0 * z) * (y * t))) + (j * (k * -27.0));
elseif (k <= 7.8e+80)
tmp = t_1 - (4.0 * (x * i));
else
tmp = t_1 - (27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -9e+56], N[(N[(x * N[(N[(18.0 * z), $MachinePrecision] * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7.8e+80], N[(t$95$1 - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;k \leq -9 \cdot 10^{+56}:\\
\;\;\;\;x \cdot \left(\left(18 \cdot z\right) \cdot \left(y \cdot t\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;k \leq 7.8 \cdot 10^{+80}:\\
\;\;\;\;t\_1 - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if k < -9.0000000000000006e56Initial program 83.3%
Simplified88.8%
Taylor expanded in y around inf 61.0%
*-commutative61.0%
associate-*r*61.1%
associate-*l*61.0%
*-commutative61.0%
*-commutative61.0%
associate-*r*64.7%
associate-*l*64.7%
*-commutative64.7%
Simplified64.7%
if -9.0000000000000006e56 < k < 7.79999999999999998e80Initial program 89.5%
Simplified89.6%
Taylor expanded in j around 0 86.2%
if 7.79999999999999998e80 < k Initial program 74.6%
Simplified78.5%
associate--l+78.5%
*-commutative78.5%
fma-define80.4%
*-commutative80.4%
fma-neg80.4%
fma-define82.4%
*-commutative82.4%
*-commutative82.4%
Applied egg-rr82.4%
Taylor expanded in i around 0 80.4%
Final simplification80.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= k -4.2e+58)
(+ (* x (* (* 18.0 z) (* y t))) (* j (* k -27.0)))
(if (<= k 1.95e-25)
(- (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) (* 4.0 (* x i)))
(-
(+ (* b c) (* t (- (* (* x y) (* 18.0 z)) (* a 4.0))))
(* 27.0 (* j k))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -4.2e+58) {
tmp = (x * ((18.0 * z) * (y * t))) + (j * (k * -27.0));
} else if (k <= 1.95e-25) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} else {
tmp = ((b * c) + (t * (((x * y) * (18.0 * z)) - (a * 4.0)))) - (27.0 * (j * k));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (k <= (-4.2d+58)) then
tmp = (x * ((18.0d0 * z) * (y * t))) + (j * (k * (-27.0d0)))
else if (k <= 1.95d-25) then
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - (4.0d0 * (x * i))
else
tmp = ((b * c) + (t * (((x * y) * (18.0d0 * z)) - (a * 4.0d0)))) - (27.0d0 * (j * k))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -4.2e+58) {
tmp = (x * ((18.0 * z) * (y * t))) + (j * (k * -27.0));
} else if (k <= 1.95e-25) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} else {
tmp = ((b * c) + (t * (((x * y) * (18.0 * z)) - (a * 4.0)))) - (27.0 * (j * k));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if k <= -4.2e+58: tmp = (x * ((18.0 * z) * (y * t))) + (j * (k * -27.0)) elif k <= 1.95e-25: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i)) else: tmp = ((b * c) + (t * (((x * y) * (18.0 * z)) - (a * 4.0)))) - (27.0 * (j * k)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -4.2e+58) tmp = Float64(Float64(x * Float64(Float64(18.0 * z) * Float64(y * t))) + Float64(j * Float64(k * -27.0))); elseif (k <= 1.95e-25) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * y) * Float64(18.0 * z)) - Float64(a * 4.0)))) - Float64(27.0 * Float64(j * k))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (k <= -4.2e+58)
tmp = (x * ((18.0 * z) * (y * t))) + (j * (k * -27.0));
elseif (k <= 1.95e-25)
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
else
tmp = ((b * c) + (t * (((x * y) * (18.0 * z)) - (a * 4.0)))) - (27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -4.2e+58], N[(N[(x * N[(N[(18.0 * z), $MachinePrecision] * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.95e-25], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * y), $MachinePrecision] * N[(18.0 * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -4.2 \cdot 10^{+58}:\\
\;\;\;\;x \cdot \left(\left(18 \cdot z\right) \cdot \left(y \cdot t\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;k \leq 1.95 \cdot 10^{-25}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot y\right) \cdot \left(18 \cdot z\right) - a \cdot 4\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if k < -4.20000000000000024e58Initial program 83.3%
Simplified88.8%
Taylor expanded in y around inf 61.0%
*-commutative61.0%
associate-*r*61.1%
associate-*l*61.0%
*-commutative61.0%
*-commutative61.0%
associate-*r*64.7%
associate-*l*64.7%
*-commutative64.7%
Simplified64.7%
if -4.20000000000000024e58 < k < 1.95e-25Initial program 89.5%
Simplified90.3%
Taylor expanded in j around 0 86.3%
if 1.95e-25 < k Initial program 78.9%
Simplified80.3%
associate--l+80.3%
*-commutative80.3%
fma-define81.7%
*-commutative81.7%
fma-neg81.7%
fma-define83.1%
*-commutative83.1%
*-commutative83.1%
Applied egg-rr83.1%
Taylor expanded in i around 0 79.0%
pow179.0%
associate-*r*79.0%
Applied egg-rr79.0%
unpow179.0%
associate-*r*79.0%
*-commutative79.0%
associate-*r*80.4%
associate-*l*80.4%
Simplified80.4%
Final simplification80.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 4.0 (* t a)))))
(if (<= (* b c) -3.4e+43)
t_1
(if (<= (* b c) 7.6e+51)
(+ (* j (* k -27.0)) (* t (* a -4.0)))
(if (<= (* b c) 3.55e+152) (* 18.0 (* t (* x (* y z)))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (t * a));
double tmp;
if ((b * c) <= -3.4e+43) {
tmp = t_1;
} else if ((b * c) <= 7.6e+51) {
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
} else if ((b * c) <= 3.55e+152) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) - (4.0d0 * (t * a))
if ((b * c) <= (-3.4d+43)) then
tmp = t_1
else if ((b * c) <= 7.6d+51) then
tmp = (j * (k * (-27.0d0))) + (t * (a * (-4.0d0)))
else if ((b * c) <= 3.55d+152) then
tmp = 18.0d0 * (t * (x * (y * z)))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (t * a));
double tmp;
if ((b * c) <= -3.4e+43) {
tmp = t_1;
} else if ((b * c) <= 7.6e+51) {
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
} else if ((b * c) <= 3.55e+152) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (4.0 * (t * a)) tmp = 0 if (b * c) <= -3.4e+43: tmp = t_1 elif (b * c) <= 7.6e+51: tmp = (j * (k * -27.0)) + (t * (a * -4.0)) elif (b * c) <= 3.55e+152: tmp = 18.0 * (t * (x * (y * z))) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) tmp = 0.0 if (Float64(b * c) <= -3.4e+43) tmp = t_1; elseif (Float64(b * c) <= 7.6e+51) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(a * -4.0))); elseif (Float64(b * c) <= 3.55e+152) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (4.0 * (t * a));
tmp = 0.0;
if ((b * c) <= -3.4e+43)
tmp = t_1;
elseif ((b * c) <= 7.6e+51)
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
elseif ((b * c) <= 3.55e+152)
tmp = 18.0 * (t * (x * (y * z)));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -3.4e+43], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 7.6e+51], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.55e+152], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;b \cdot c \leq -3.4 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 7.6 \cdot 10^{+51}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 3.55 \cdot 10^{+152}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 b c) < -3.40000000000000012e43 or 3.55000000000000008e152 < (*.f64 b c) Initial program 85.0%
Taylor expanded in x around 0 73.8%
Taylor expanded in j around 0 70.1%
if -3.40000000000000012e43 < (*.f64 b c) < 7.5999999999999994e51Initial program 87.0%
Simplified89.0%
Taylor expanded in a around inf 54.2%
*-commutative54.2%
*-commutative54.2%
associate-*r*54.2%
*-commutative54.2%
Simplified54.2%
if 7.5999999999999994e51 < (*.f64 b c) < 3.55000000000000008e152Initial program 67.1%
Simplified75.0%
associate--l+75.0%
*-commutative75.0%
fma-define75.0%
*-commutative75.0%
fma-neg75.0%
fma-define75.0%
*-commutative75.0%
*-commutative75.0%
Applied egg-rr75.0%
Taylor expanded in y around inf 75.4%
Final simplification61.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k))
(t_2 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -5.2e+72)
t_2
(if (<= t -4.8e-55)
(- (- (* b c) (* 4.0 (* t a))) t_1)
(if (<= t 2.7e+41) (- (- (* b c) (* 4.0 (* x i))) t_1) t_2)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -5.2e+72) {
tmp = t_2;
} else if (t <= -4.8e-55) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (t <= 2.7e+41) {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (j * 27.0d0) * k
t_2 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-5.2d+72)) then
tmp = t_2
else if (t <= (-4.8d-55)) then
tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
else if (t <= 2.7d+41) then
tmp = ((b * c) - (4.0d0 * (x * i))) - t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -5.2e+72) {
tmp = t_2;
} else if (t <= -4.8e-55) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (t <= 2.7e+41) {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -5.2e+72: tmp = t_2 elif t <= -4.8e-55: tmp = ((b * c) - (4.0 * (t * a))) - t_1 elif t <= 2.7e+41: tmp = ((b * c) - (4.0 * (x * i))) - t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -5.2e+72) tmp = t_2; elseif (t <= -4.8e-55) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1); elseif (t <= 2.7e+41) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_1); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -5.2e+72)
tmp = t_2;
elseif (t <= -4.8e-55)
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
elseif (t <= 2.7e+41)
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.2e+72], t$95$2, If[LessEqual[t, -4.8e-55], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, 2.7e+41], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+72}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -4.8 \cdot 10^{-55}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+41}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -5.19999999999999963e72 or 2.7e41 < t Initial program 83.1%
Simplified88.4%
Taylor expanded in t around inf 71.8%
if -5.19999999999999963e72 < t < -4.79999999999999983e-55Initial program 84.8%
Taylor expanded in x around 0 74.3%
if -4.79999999999999983e-55 < t < 2.7e41Initial program 87.6%
Taylor expanded in t around 0 78.6%
Final simplification75.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* j (* k -27.0)))) (t_2 (* a (* t -4.0))))
(if (<= a -5.1e+119)
t_2
(if (<= a -1.8e-46)
t_1
(if (<= a -2.3e-55)
(* t (* (* x y) (* 18.0 z)))
(if (<= a 1.95e+40) t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double t_2 = a * (t * -4.0);
double tmp;
if (a <= -5.1e+119) {
tmp = t_2;
} else if (a <= -1.8e-46) {
tmp = t_1;
} else if (a <= -2.3e-55) {
tmp = t * ((x * y) * (18.0 * z));
} else if (a <= 1.95e+40) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) + (j * (k * (-27.0d0)))
t_2 = a * (t * (-4.0d0))
if (a <= (-5.1d+119)) then
tmp = t_2
else if (a <= (-1.8d-46)) then
tmp = t_1
else if (a <= (-2.3d-55)) then
tmp = t * ((x * y) * (18.0d0 * z))
else if (a <= 1.95d+40) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double t_2 = a * (t * -4.0);
double tmp;
if (a <= -5.1e+119) {
tmp = t_2;
} else if (a <= -1.8e-46) {
tmp = t_1;
} else if (a <= -2.3e-55) {
tmp = t * ((x * y) * (18.0 * z));
} else if (a <= 1.95e+40) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (j * (k * -27.0)) t_2 = a * (t * -4.0) tmp = 0 if a <= -5.1e+119: tmp = t_2 elif a <= -1.8e-46: tmp = t_1 elif a <= -2.3e-55: tmp = t * ((x * y) * (18.0 * z)) elif a <= 1.95e+40: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))) t_2 = Float64(a * Float64(t * -4.0)) tmp = 0.0 if (a <= -5.1e+119) tmp = t_2; elseif (a <= -1.8e-46) tmp = t_1; elseif (a <= -2.3e-55) tmp = Float64(t * Float64(Float64(x * y) * Float64(18.0 * z))); elseif (a <= 1.95e+40) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (j * (k * -27.0));
t_2 = a * (t * -4.0);
tmp = 0.0;
if (a <= -5.1e+119)
tmp = t_2;
elseif (a <= -1.8e-46)
tmp = t_1;
elseif (a <= -2.3e-55)
tmp = t * ((x * y) * (18.0 * z));
elseif (a <= 1.95e+40)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.1e+119], t$95$2, If[LessEqual[a, -1.8e-46], t$95$1, If[LessEqual[a, -2.3e-55], N[(t * N[(N[(x * y), $MachinePrecision] * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.95e+40], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + j \cdot \left(k \cdot -27\right)\\
t_2 := a \cdot \left(t \cdot -4\right)\\
\mathbf{if}\;a \leq -5.1 \cdot 10^{+119}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.3 \cdot 10^{-55}:\\
\;\;\;\;t \cdot \left(\left(x \cdot y\right) \cdot \left(18 \cdot z\right)\right)\\
\mathbf{elif}\;a \leq 1.95 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -5.09999999999999984e119 or 1.95e40 < a Initial program 79.6%
Simplified84.2%
associate--l+84.2%
*-commutative84.2%
fma-define86.5%
*-commutative86.5%
fma-neg86.5%
fma-define86.5%
*-commutative86.5%
*-commutative86.5%
Applied egg-rr86.5%
Taylor expanded in i around 0 79.9%
pow179.9%
associate-*r*79.9%
Applied egg-rr79.9%
unpow179.9%
associate-*r*79.9%
*-commutative79.9%
associate-*r*82.1%
associate-*l*82.1%
Simplified82.1%
Taylor expanded in a around inf 57.6%
associate-*r*57.6%
*-commutative57.6%
associate-*l*57.6%
Simplified57.6%
if -5.09999999999999984e119 < a < -1.8e-46 or -2.30000000000000011e-55 < a < 1.95e40Initial program 87.9%
Simplified89.6%
Taylor expanded in b around inf 54.6%
if -1.8e-46 < a < -2.30000000000000011e-55Initial program 99.7%
Simplified100.0%
associate--l+100.0%
*-commutative100.0%
fma-define100.0%
*-commutative100.0%
fma-neg100.0%
fma-define100.0%
*-commutative100.0%
*-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in i around 0 80.0%
Taylor expanded in x around inf 80.7%
*-commutative80.7%
associate-*r*80.7%
associate-*r*99.7%
associate-*l*99.7%
Simplified99.7%
Final simplification56.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* j (* k -27.0)))) (t_2 (- (* b c) (* 4.0 (* t a)))))
(if (<= a -1.42e+32)
t_2
(if (<= a -1.8e-46)
t_1
(if (<= a -3.7e-55)
(* t (* (* x y) (* 18.0 z)))
(if (<= a 3.6e+25) t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double t_2 = (b * c) - (4.0 * (t * a));
double tmp;
if (a <= -1.42e+32) {
tmp = t_2;
} else if (a <= -1.8e-46) {
tmp = t_1;
} else if (a <= -3.7e-55) {
tmp = t * ((x * y) * (18.0 * z));
} else if (a <= 3.6e+25) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) + (j * (k * (-27.0d0)))
t_2 = (b * c) - (4.0d0 * (t * a))
if (a <= (-1.42d+32)) then
tmp = t_2
else if (a <= (-1.8d-46)) then
tmp = t_1
else if (a <= (-3.7d-55)) then
tmp = t * ((x * y) * (18.0d0 * z))
else if (a <= 3.6d+25) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double t_2 = (b * c) - (4.0 * (t * a));
double tmp;
if (a <= -1.42e+32) {
tmp = t_2;
} else if (a <= -1.8e-46) {
tmp = t_1;
} else if (a <= -3.7e-55) {
tmp = t * ((x * y) * (18.0 * z));
} else if (a <= 3.6e+25) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (j * (k * -27.0)) t_2 = (b * c) - (4.0 * (t * a)) tmp = 0 if a <= -1.42e+32: tmp = t_2 elif a <= -1.8e-46: tmp = t_1 elif a <= -3.7e-55: tmp = t * ((x * y) * (18.0 * z)) elif a <= 3.6e+25: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))) t_2 = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) tmp = 0.0 if (a <= -1.42e+32) tmp = t_2; elseif (a <= -1.8e-46) tmp = t_1; elseif (a <= -3.7e-55) tmp = Float64(t * Float64(Float64(x * y) * Float64(18.0 * z))); elseif (a <= 3.6e+25) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (j * (k * -27.0));
t_2 = (b * c) - (4.0 * (t * a));
tmp = 0.0;
if (a <= -1.42e+32)
tmp = t_2;
elseif (a <= -1.8e-46)
tmp = t_1;
elseif (a <= -3.7e-55)
tmp = t * ((x * y) * (18.0 * z));
elseif (a <= 3.6e+25)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.42e+32], t$95$2, If[LessEqual[a, -1.8e-46], t$95$1, If[LessEqual[a, -3.7e-55], N[(t * N[(N[(x * y), $MachinePrecision] * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.6e+25], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;a \leq -1.42 \cdot 10^{+32}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -3.7 \cdot 10^{-55}:\\
\;\;\;\;t \cdot \left(\left(x \cdot y\right) \cdot \left(18 \cdot z\right)\right)\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -1.41999999999999992e32 or 3.60000000000000015e25 < a Initial program 81.5%
Taylor expanded in x around 0 66.4%
Taylor expanded in j around 0 67.5%
if -1.41999999999999992e32 < a < -1.8e-46 or -3.69999999999999985e-55 < a < 3.60000000000000015e25Initial program 87.6%
Simplified88.9%
Taylor expanded in b around inf 56.5%
if -1.8e-46 < a < -3.69999999999999985e-55Initial program 99.7%
Simplified100.0%
associate--l+100.0%
*-commutative100.0%
fma-define100.0%
*-commutative100.0%
fma-neg100.0%
fma-define100.0%
*-commutative100.0%
*-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in i around 0 80.0%
Taylor expanded in x around inf 80.7%
*-commutative80.7%
associate-*r*80.7%
associate-*r*99.7%
associate-*l*99.7%
Simplified99.7%
Final simplification62.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= a -1.1e+31)
(- (* b c) (* 4.0 (* t a)))
(if (<= a -9.5e-300)
(+ (* b c) t_1)
(if (<= a 2.4e+40)
(+ t_1 (* x (* i -4.0)))
(* t (- (* 18.0 (* x (* y z))) (* a 4.0))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (a <= -1.1e+31) {
tmp = (b * c) - (4.0 * (t * a));
} else if (a <= -9.5e-300) {
tmp = (b * c) + t_1;
} else if (a <= 2.4e+40) {
tmp = t_1 + (x * (i * -4.0));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if (a <= (-1.1d+31)) then
tmp = (b * c) - (4.0d0 * (t * a))
else if (a <= (-9.5d-300)) then
tmp = (b * c) + t_1
else if (a <= 2.4d+40) then
tmp = t_1 + (x * (i * (-4.0d0)))
else
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (a <= -1.1e+31) {
tmp = (b * c) - (4.0 * (t * a));
} else if (a <= -9.5e-300) {
tmp = (b * c) + t_1;
} else if (a <= 2.4e+40) {
tmp = t_1 + (x * (i * -4.0));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if a <= -1.1e+31: tmp = (b * c) - (4.0 * (t * a)) elif a <= -9.5e-300: tmp = (b * c) + t_1 elif a <= 2.4e+40: tmp = t_1 + (x * (i * -4.0)) else: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (a <= -1.1e+31) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); elseif (a <= -9.5e-300) tmp = Float64(Float64(b * c) + t_1); elseif (a <= 2.4e+40) tmp = Float64(t_1 + Float64(x * Float64(i * -4.0))); else tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
tmp = 0.0;
if (a <= -1.1e+31)
tmp = (b * c) - (4.0 * (t * a));
elseif (a <= -9.5e-300)
tmp = (b * c) + t_1;
elseif (a <= 2.4e+40)
tmp = t_1 + (x * (i * -4.0));
else
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.1e+31], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -9.5e-300], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[a, 2.4e+40], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;a \leq -1.1 \cdot 10^{+31}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;a \leq -9.5 \cdot 10^{-300}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;a \leq 2.4 \cdot 10^{+40}:\\
\;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if a < -1.10000000000000005e31Initial program 82.7%
Taylor expanded in x around 0 72.7%
Taylor expanded in j around 0 74.6%
if -1.10000000000000005e31 < a < -9.5000000000000007e-300Initial program 88.8%
Simplified87.6%
Taylor expanded in b around inf 60.2%
if -9.5000000000000007e-300 < a < 2.4e40Initial program 85.2%
Simplified90.3%
Taylor expanded in i around inf 57.2%
associate-*r*57.2%
*-commutative57.2%
Simplified57.2%
if 2.4e40 < a Initial program 82.6%
Simplified84.9%
Taylor expanded in t around inf 78.2%
Final simplification65.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -5.2e-66) (not (<= t 5.1e+39))) (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) (- (- (* b c) (* 4.0 (* x i))) (* (* j 27.0) k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -5.2e-66) || !(t <= 5.1e+39)) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else {
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-5.2d-66)) .or. (.not. (t <= 5.1d+39))) then
tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
else
tmp = ((b * c) - (4.0d0 * (x * i))) - ((j * 27.0d0) * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -5.2e-66) || !(t <= 5.1e+39)) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else {
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -5.2e-66) or not (t <= 5.1e+39): tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) else: tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -5.2e-66) || !(t <= 5.1e+39)) tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(Float64(j * 27.0) * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -5.2e-66) || ~((t <= 5.1e+39)))
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
else
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -5.2e-66], N[Not[LessEqual[t, 5.1e+39]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{-66} \lor \neg \left(t \leq 5.1 \cdot 10^{+39}\right):\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if t < -5.1999999999999998e-66 or 5.0999999999999998e39 < t Initial program 83.9%
Simplified87.9%
associate--l+87.9%
*-commutative87.9%
fma-define90.0%
*-commutative90.0%
fma-neg90.0%
fma-define90.6%
*-commutative90.6%
*-commutative90.6%
Applied egg-rr90.6%
Taylor expanded in i around 0 84.9%
Taylor expanded in j around 0 76.2%
if -5.1999999999999998e-66 < t < 5.0999999999999998e39Initial program 87.2%
Taylor expanded in t around 0 80.5%
Final simplification78.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* a (* t -4.0))))
(if (<= a -3.1e+118)
t_1
(if (<= a -4.5e-167)
(* b c)
(if (<= a 1.18e-225)
(* j (* k -27.0))
(if (<= a 2.2e+40) (* x (* i -4.0)) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = a * (t * -4.0);
double tmp;
if (a <= -3.1e+118) {
tmp = t_1;
} else if (a <= -4.5e-167) {
tmp = b * c;
} else if (a <= 1.18e-225) {
tmp = j * (k * -27.0);
} else if (a <= 2.2e+40) {
tmp = x * (i * -4.0);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = a * (t * (-4.0d0))
if (a <= (-3.1d+118)) then
tmp = t_1
else if (a <= (-4.5d-167)) then
tmp = b * c
else if (a <= 1.18d-225) then
tmp = j * (k * (-27.0d0))
else if (a <= 2.2d+40) then
tmp = x * (i * (-4.0d0))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = a * (t * -4.0);
double tmp;
if (a <= -3.1e+118) {
tmp = t_1;
} else if (a <= -4.5e-167) {
tmp = b * c;
} else if (a <= 1.18e-225) {
tmp = j * (k * -27.0);
} else if (a <= 2.2e+40) {
tmp = x * (i * -4.0);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = a * (t * -4.0) tmp = 0 if a <= -3.1e+118: tmp = t_1 elif a <= -4.5e-167: tmp = b * c elif a <= 1.18e-225: tmp = j * (k * -27.0) elif a <= 2.2e+40: tmp = x * (i * -4.0) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(a * Float64(t * -4.0)) tmp = 0.0 if (a <= -3.1e+118) tmp = t_1; elseif (a <= -4.5e-167) tmp = Float64(b * c); elseif (a <= 1.18e-225) tmp = Float64(j * Float64(k * -27.0)); elseif (a <= 2.2e+40) tmp = Float64(x * Float64(i * -4.0)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = a * (t * -4.0);
tmp = 0.0;
if (a <= -3.1e+118)
tmp = t_1;
elseif (a <= -4.5e-167)
tmp = b * c;
elseif (a <= 1.18e-225)
tmp = j * (k * -27.0);
elseif (a <= 2.2e+40)
tmp = x * (i * -4.0);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.1e+118], t$95$1, If[LessEqual[a, -4.5e-167], N[(b * c), $MachinePrecision], If[LessEqual[a, 1.18e-225], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.2e+40], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(t \cdot -4\right)\\
\mathbf{if}\;a \leq -3.1 \cdot 10^{+118}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -4.5 \cdot 10^{-167}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;a \leq 1.18 \cdot 10^{-225}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{+40}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.09999999999999986e118 or 2.1999999999999999e40 < a Initial program 80.4%
Simplified84.0%
associate--l+84.0%
*-commutative84.0%
fma-define86.3%
*-commutative86.3%
fma-neg86.3%
fma-define86.3%
*-commutative86.3%
*-commutative86.3%
Applied egg-rr86.3%
Taylor expanded in i around 0 80.8%
pow180.8%
associate-*r*80.8%
Applied egg-rr80.8%
unpow180.8%
associate-*r*80.8%
*-commutative80.8%
associate-*r*83.0%
associate-*l*82.9%
Simplified82.9%
Taylor expanded in a around inf 58.2%
associate-*r*58.2%
*-commutative58.2%
associate-*l*58.2%
Simplified58.2%
if -3.09999999999999986e118 < a < -4.5000000000000001e-167Initial program 89.4%
Simplified89.5%
associate--l+89.5%
*-commutative89.5%
fma-define91.0%
*-commutative91.0%
fma-neg91.0%
fma-define92.5%
*-commutative92.5%
*-commutative92.5%
Applied egg-rr92.5%
Taylor expanded in b around inf 36.2%
if -4.5000000000000001e-167 < a < 1.18e-225Initial program 86.5%
Simplified86.3%
associate--l+86.3%
*-commutative86.3%
fma-define86.4%
*-commutative86.4%
fma-neg86.4%
fma-define86.4%
*-commutative86.4%
*-commutative86.4%
Applied egg-rr86.4%
Taylor expanded in j around inf 42.7%
*-commutative42.7%
associate-*r*42.7%
Simplified42.7%
if 1.18e-225 < a < 2.1999999999999999e40Initial program 87.0%
Simplified88.2%
associate--l+88.2%
*-commutative88.2%
fma-define88.2%
*-commutative88.2%
fma-neg88.2%
fma-define88.2%
*-commutative88.2%
*-commutative88.2%
Applied egg-rr88.2%
Taylor expanded in i around inf 37.3%
associate-*r*37.3%
*-commutative37.3%
Simplified37.3%
Final simplification45.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -4.7e+43) (not (<= (* b c) 1.15e+190))) (* b c) (* (* j k) -27.0)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -4.7e+43) || !((b * c) <= 1.15e+190)) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-4.7d+43)) .or. (.not. ((b * c) <= 1.15d+190))) then
tmp = b * c
else
tmp = (j * k) * (-27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -4.7e+43) || !((b * c) <= 1.15e+190)) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -4.7e+43) or not ((b * c) <= 1.15e+190): tmp = b * c else: tmp = (j * k) * -27.0 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -4.7e+43) || !(Float64(b * c) <= 1.15e+190)) tmp = Float64(b * c); else tmp = Float64(Float64(j * k) * -27.0); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -4.7e+43) || ~(((b * c) <= 1.15e+190)))
tmp = b * c;
else
tmp = (j * k) * -27.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -4.7e+43], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1.15e+190]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -4.7 \cdot 10^{+43} \lor \neg \left(b \cdot c \leq 1.15 \cdot 10^{+190}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\end{array}
\end{array}
if (*.f64 b c) < -4.69999999999999998e43 or 1.15e190 < (*.f64 b c) Initial program 83.9%
Simplified85.1%
associate--l+85.1%
*-commutative85.1%
fma-define86.2%
*-commutative86.2%
fma-neg86.2%
fma-define86.2%
*-commutative86.2%
*-commutative86.2%
Applied egg-rr86.2%
Taylor expanded in b around inf 60.9%
if -4.69999999999999998e43 < (*.f64 b c) < 1.15e190Initial program 86.1%
Simplified88.4%
Taylor expanded in j around inf 25.1%
Final simplification38.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -1.36e+14) (not (<= (* b c) 3e+112))) (* b c) (* a (* t -4.0))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.36e+14) || !((b * c) <= 3e+112)) {
tmp = b * c;
} else {
tmp = a * (t * -4.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-1.36d+14)) .or. (.not. ((b * c) <= 3d+112))) then
tmp = b * c
else
tmp = a * (t * (-4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.36e+14) || !((b * c) <= 3e+112)) {
tmp = b * c;
} else {
tmp = a * (t * -4.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -1.36e+14) or not ((b * c) <= 3e+112): tmp = b * c else: tmp = a * (t * -4.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -1.36e+14) || !(Float64(b * c) <= 3e+112)) tmp = Float64(b * c); else tmp = Float64(a * Float64(t * -4.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -1.36e+14) || ~(((b * c) <= 3e+112)))
tmp = b * c;
else
tmp = a * (t * -4.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -1.36e+14], N[Not[LessEqual[N[(b * c), $MachinePrecision], 3e+112]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.36 \cdot 10^{+14} \lor \neg \left(b \cdot c \leq 3 \cdot 10^{+112}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.36e14 or 2.99999999999999979e112 < (*.f64 b c) Initial program 84.9%
Simplified86.7%
associate--l+86.7%
*-commutative86.7%
fma-define87.6%
*-commutative87.6%
fma-neg87.6%
fma-define87.6%
*-commutative87.6%
*-commutative87.6%
Applied egg-rr87.6%
Taylor expanded in b around inf 54.5%
if -1.36e14 < (*.f64 b c) < 2.99999999999999979e112Initial program 85.5%
Simplified86.9%
associate--l+86.9%
*-commutative86.9%
fma-define88.3%
*-commutative88.3%
fma-neg88.3%
fma-define89.0%
*-commutative89.0%
*-commutative89.0%
Applied egg-rr89.0%
Taylor expanded in i around 0 76.2%
pow176.2%
associate-*r*76.2%
Applied egg-rr76.2%
unpow176.2%
associate-*r*76.2%
*-commutative76.2%
associate-*r*77.6%
associate-*l*77.6%
Simplified77.6%
Taylor expanded in a around inf 33.3%
associate-*r*33.3%
*-commutative33.3%
associate-*l*34.0%
Simplified34.0%
Final simplification43.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 85.3%
Simplified86.8%
associate--l+86.8%
*-commutative86.8%
fma-define88.0%
*-commutative88.0%
fma-neg88.0%
fma-define88.4%
*-commutative88.4%
*-commutative88.4%
Applied egg-rr88.4%
Taylor expanded in b around inf 25.9%
Final simplification25.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
(t_2
(-
(- (* (* 18.0 t) (* (* x y) z)) t_1)
(- (* (* k j) 27.0) (* c b)))))
(if (< t -1.6210815397541398e-69)
t_2
(if (< t 165.68027943805222)
(+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((a * t) + (i * x)) * 4.0d0
t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
if (t < (-1.6210815397541398d-69)) then
tmp = t_2
else if (t < 165.68027943805222d0) then
tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
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 j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((a * t) + (i * x)) * 4.0 t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)) tmp = 0 if t < -1.6210815397541398e-69: tmp = t_2 elif t < 165.68027943805222: tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0) t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b))) tmp = 0.0 if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((a * t) + (i * x)) * 4.0; t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)); tmp = 0.0; if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t\_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t\_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024043
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:alt
(if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))