
(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 20 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
(if (<= z 46000000.0)
(+
(fma t (fma x (* 18.0 (* z y)) (* a -4.0)) (fma b c (* x (* -4.0 i))))
(* j (* k -27.0)))
(-
(+ (* z (+ (* -4.0 (/ (* t a) z)) (* 18.0 (* t (* x y))))) (* b c))
(+ (* x (* i 4.0)) (* 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 (z <= 46000000.0) {
tmp = fma(t, fma(x, (18.0 * (z * y)), (a * -4.0)), fma(b, c, (x * (-4.0 * i)))) + (j * (k * -27.0));
} else {
tmp = ((z * ((-4.0 * ((t * a) / z)) + (18.0 * (t * (x * y))))) + (b * c)) - ((x * (i * 4.0)) + (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 (z <= 46000000.0) tmp = Float64(fma(t, fma(x, Float64(18.0 * Float64(z * y)), Float64(a * -4.0)), fma(b, c, Float64(x * Float64(-4.0 * i)))) + Float64(j * Float64(k * -27.0))); else tmp = Float64(Float64(Float64(z * Float64(Float64(-4.0 * Float64(Float64(t * a) / z)) + Float64(18.0 * Float64(t * Float64(x * y))))) + Float64(b * c)) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); end return 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, 46000000.0], N[(N[(t * N[(x * N[(18.0 * N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $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 46000000:\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(-4 \cdot i\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot \left(-4 \cdot \frac{t \cdot a}{z} + 18 \cdot \left(t \cdot \left(x \cdot y\right)\right)\right) + b \cdot c\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\end{array}
\end{array}
if z < 4.6e7Initial program 84.2%
Simplified89.6%
if 4.6e7 < z Initial program 81.2%
Simplified81.6%
Taylor expanded in z around inf 89.6%
Final simplification89.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 (* t (* a 4.0))))
(if (<=
(-
(- (+ (* b c) (- (* t (* z (* y (* x 18.0)))) t_1)) (* i (* x 4.0)))
(* k (* j 27.0)))
INFINITY)
(-
(+ (* (* x (* 18.0 y)) (* z t)) (- (* b c) t_1))
(+ (* x (* i 4.0)) (* j (* k 27.0))))
(* x (+ (* -4.0 i) (* 18.0 (* z (* t y))))))))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 = t * (a * 4.0);
double tmp;
if (((((b * c) + ((t * (z * (y * (x * 18.0)))) - t_1)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= ((double) INFINITY)) {
tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - t_1)) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = x * ((-4.0 * i) + (18.0 * (z * (t * y))));
}
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 = t * (a * 4.0);
double tmp;
if (((((b * c) + ((t * (z * (y * (x * 18.0)))) - t_1)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= Double.POSITIVE_INFINITY) {
tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - t_1)) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = x * ((-4.0 * i) + (18.0 * (z * (t * y))));
}
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 = t * (a * 4.0) tmp = 0 if ((((b * c) + ((t * (z * (y * (x * 18.0)))) - t_1)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= math.inf: tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - t_1)) - ((x * (i * 4.0)) + (j * (k * 27.0))) else: tmp = x * ((-4.0 * i) + (18.0 * (z * (t * y)))) 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(t * Float64(a * 4.0)) tmp = 0.0 if (Float64(Float64(Float64(Float64(b * c) + Float64(Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))) - t_1)) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))) <= Inf) tmp = Float64(Float64(Float64(Float64(x * Float64(18.0 * y)) * Float64(z * t)) + Float64(Float64(b * c) - t_1)) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); else tmp = Float64(x * Float64(Float64(-4.0 * i) + Float64(18.0 * Float64(z * Float64(t * y))))); 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 = t * (a * 4.0);
tmp = 0.0;
if (((((b * c) + ((t * (z * (y * (x * 18.0)))) - t_1)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= Inf)
tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - t_1)) - ((x * (i * 4.0)) + (j * (k * 27.0)));
else
tmp = x * ((-4.0 * i) + (18.0 * (z * (t * y))));
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[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(-4.0 * i), $MachinePrecision] + N[(18.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $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 := t \cdot \left(a \cdot 4\right)\\
\mathbf{if}\;\left(\left(b \cdot c + \left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t\_1\right)\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right) \leq \infty:\\
\;\;\;\;\left(\left(x \cdot \left(18 \cdot y\right)\right) \cdot \left(z \cdot t\right) + \left(b \cdot c - t\_1\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-4 \cdot i + 18 \cdot \left(z \cdot \left(t \cdot y\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 91.8%
Simplified92.7%
associate-*r*91.8%
distribute-rgt-out--91.8%
associate-+l-91.8%
associate-*l*91.6%
fma-neg91.6%
associate-*l*92.1%
*-commutative92.1%
Applied egg-rr92.1%
fma-undefine92.1%
unsub-neg92.1%
*-commutative92.1%
Simplified92.1%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Simplified26.1%
associate-*r*13.0%
distribute-rgt-out--0.0%
associate-+l-0.0%
associate-*l*4.3%
fma-neg8.7%
associate-*l*8.7%
*-commutative8.7%
Applied egg-rr8.7%
fma-undefine4.3%
unsub-neg4.3%
*-commutative4.3%
Simplified4.3%
Taylor expanded in x around inf 65.3%
cancel-sign-sub-inv65.3%
metadata-eval65.3%
associate-*r*69.6%
Simplified69.6%
Final simplification90.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 (+ (* x (* i 4.0)) (* j (* k 27.0)))))
(if (<= z 5.9e-123)
(- (* t (- (+ (* 18.0 (* x (* z y))) (/ (* b c) t)) (* a 4.0))) t_1)
(-
(+ (* z (+ (* -4.0 (/ (* t a) z)) (* 18.0 (* t (* x y))))) (* b c))
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 = (x * (i * 4.0)) + (j * (k * 27.0));
double tmp;
if (z <= 5.9e-123) {
tmp = (t * (((18.0 * (x * (z * y))) + ((b * c) / t)) - (a * 4.0))) - t_1;
} else {
tmp = ((z * ((-4.0 * ((t * a) / z)) + (18.0 * (t * (x * y))))) + (b * c)) - 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 = (x * (i * 4.0d0)) + (j * (k * 27.0d0))
if (z <= 5.9d-123) then
tmp = (t * (((18.0d0 * (x * (z * y))) + ((b * c) / t)) - (a * 4.0d0))) - t_1
else
tmp = ((z * (((-4.0d0) * ((t * a) / z)) + (18.0d0 * (t * (x * y))))) + (b * c)) - 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 = (x * (i * 4.0)) + (j * (k * 27.0));
double tmp;
if (z <= 5.9e-123) {
tmp = (t * (((18.0 * (x * (z * y))) + ((b * c) / t)) - (a * 4.0))) - t_1;
} else {
tmp = ((z * ((-4.0 * ((t * a) / z)) + (18.0 * (t * (x * y))))) + (b * c)) - 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 = (x * (i * 4.0)) + (j * (k * 27.0)) tmp = 0 if z <= 5.9e-123: tmp = (t * (((18.0 * (x * (z * y))) + ((b * c) / t)) - (a * 4.0))) - t_1 else: tmp = ((z * ((-4.0 * ((t * a) / z)) + (18.0 * (t * (x * y))))) + (b * c)) - 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(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0))) tmp = 0.0 if (z <= 5.9e-123) tmp = Float64(Float64(t * Float64(Float64(Float64(18.0 * Float64(x * Float64(z * y))) + Float64(Float64(b * c) / t)) - Float64(a * 4.0))) - t_1); else tmp = Float64(Float64(Float64(z * Float64(Float64(-4.0 * Float64(Float64(t * a) / z)) + Float64(18.0 * Float64(t * Float64(x * y))))) + Float64(b * c)) - 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 = (x * (i * 4.0)) + (j * (k * 27.0));
tmp = 0.0;
if (z <= 5.9e-123)
tmp = (t * (((18.0 * (x * (z * y))) + ((b * c) / t)) - (a * 4.0))) - t_1;
else
tmp = ((z * ((-4.0 * ((t * a) / z)) + (18.0 * (t * (x * y))))) + (b * c)) - 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[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 5.9e-123], N[(N[(t * N[(N[(N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(z * N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $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 := x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\\
\mathbf{if}\;z \leq 5.9 \cdot 10^{-123}:\\
\;\;\;\;t \cdot \left(\left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right) + \frac{b \cdot c}{t}\right) - a \cdot 4\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot \left(-4 \cdot \frac{t \cdot a}{z} + 18 \cdot \left(t \cdot \left(x \cdot y\right)\right)\right) + b \cdot c\right) - t\_1\\
\end{array}
\end{array}
if z < 5.89999999999999988e-123Initial program 84.4%
Simplified87.8%
Taylor expanded in t around inf 87.3%
if 5.89999999999999988e-123 < z Initial program 81.8%
Simplified84.5%
Taylor expanded in z around inf 87.4%
Final simplification87.3%
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 6e+197)
(-
(+ (* b c) (* t (- (* (* z y) (* x 18.0)) (* a 4.0))))
(+ (* x (* i 4.0)) (* j (* k 27.0))))
(* x (- (* 18.0 (* t (* z y))) (* i 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 (x <= 6e+197) {
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = x * ((18.0 * (t * (z * y))) - (i * 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 (x <= 6d+197) then
tmp = ((b * c) + (t * (((z * y) * (x * 18.0d0)) - (a * 4.0d0)))) - ((x * (i * 4.0d0)) + (j * (k * 27.0d0)))
else
tmp = x * ((18.0d0 * (t * (z * y))) - (i * 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 (x <= 6e+197) {
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = x * ((18.0 * (t * (z * y))) - (i * 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 x <= 6e+197: tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0))) else: tmp = x * ((18.0 * (t * (z * y))) - (i * 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 (x <= 6e+197) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(z * y) * Float64(x * 18.0)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(z * y))) - Float64(i * 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 (x <= 6e+197)
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
else
tmp = x * ((18.0 * (t * (z * y))) - (i * 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[LessEqual[x, 6e+197], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(z * y), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 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}
\mathbf{if}\;x \leq 6 \cdot 10^{+197}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(z \cdot y\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(z \cdot y\right)\right) - i \cdot 4\right)\\
\end{array}
\end{array}
if x < 6.0000000000000004e197Initial program 88.5%
Simplified90.8%
if 6.0000000000000004e197 < x Initial program 37.8%
Simplified49.3%
Taylor expanded in x around inf 77.3%
Final simplification89.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 (* k (* j -27.0))))
(if (<= (* b c) -2e+192)
(* b c)
(if (<= (* b c) -5e+63)
t_1
(if (<= (* b c) 2e-8)
(* x (* 18.0 (* z (* t y))))
(if (<= (* b c) 1e+148) t_1 (* 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 t_1 = k * (j * -27.0);
double tmp;
if ((b * c) <= -2e+192) {
tmp = b * c;
} else if ((b * c) <= -5e+63) {
tmp = t_1;
} else if ((b * c) <= 2e-8) {
tmp = x * (18.0 * (z * (t * y)));
} else if ((b * c) <= 1e+148) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = k * (j * (-27.0d0))
if ((b * c) <= (-2d+192)) then
tmp = b * c
else if ((b * c) <= (-5d+63)) then
tmp = t_1
else if ((b * c) <= 2d-8) then
tmp = x * (18.0d0 * (z * (t * y)))
else if ((b * c) <= 1d+148) then
tmp = t_1
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 t_1 = k * (j * -27.0);
double tmp;
if ((b * c) <= -2e+192) {
tmp = b * c;
} else if ((b * c) <= -5e+63) {
tmp = t_1;
} else if ((b * c) <= 2e-8) {
tmp = x * (18.0 * (z * (t * y)));
} else if ((b * c) <= 1e+148) {
tmp = t_1;
} 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): t_1 = k * (j * -27.0) tmp = 0 if (b * c) <= -2e+192: tmp = b * c elif (b * c) <= -5e+63: tmp = t_1 elif (b * c) <= 2e-8: tmp = x * (18.0 * (z * (t * y))) elif (b * c) <= 1e+148: tmp = t_1 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) t_1 = Float64(k * Float64(j * -27.0)) tmp = 0.0 if (Float64(b * c) <= -2e+192) tmp = Float64(b * c); elseif (Float64(b * c) <= -5e+63) tmp = t_1; elseif (Float64(b * c) <= 2e-8) tmp = Float64(x * Float64(18.0 * Float64(z * Float64(t * y)))); elseif (Float64(b * c) <= 1e+148) tmp = t_1; 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)
t_1 = k * (j * -27.0);
tmp = 0.0;
if ((b * c) <= -2e+192)
tmp = b * c;
elseif ((b * c) <= -5e+63)
tmp = t_1;
elseif ((b * c) <= 2e-8)
tmp = x * (18.0 * (z * (t * y)));
elseif ((b * c) <= 1e+148)
tmp = t_1;
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_] := Block[{t$95$1 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2e+192], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5e+63], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 2e-8], N[(x * N[(18.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1e+148], t$95$1, 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}
t_1 := k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+192}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{+63}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-8}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(t \cdot y\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 10^{+148}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -2.00000000000000008e192 or 1e148 < (*.f64 b c) Initial program 82.9%
Simplified83.1%
associate-*r*82.9%
distribute-rgt-out--82.9%
associate-+l-82.9%
associate-*l*81.7%
fma-neg81.7%
associate-*l*81.7%
*-commutative81.7%
Applied egg-rr81.7%
fma-undefine81.7%
unsub-neg81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in b around inf 69.1%
if -2.00000000000000008e192 < (*.f64 b c) < -5.00000000000000011e63 or 2e-8 < (*.f64 b c) < 1e148Initial program 89.6%
Simplified91.8%
Taylor expanded in j around inf 38.4%
associate-*r*38.5%
*-commutative38.5%
metadata-eval38.5%
distribute-rgt-neg-in38.5%
*-commutative38.5%
distribute-rgt-neg-in38.5%
metadata-eval38.5%
*-commutative38.5%
Simplified38.5%
if -5.00000000000000011e63 < (*.f64 b c) < 2e-8Initial program 81.7%
Simplified86.7%
Taylor expanded in x around inf 50.4%
Taylor expanded in t around inf 29.9%
associate-*r*31.4%
*-commutative31.4%
Simplified31.4%
Final simplification43.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 (* k (* j -27.0))))
(if (<= (* b c) -2e+192)
(* b c)
(if (<= (* b c) 4e-279)
t_1
(if (<= (* b c) 2e-8)
(* x (* 18.0 (* t (* z y))))
(if (<= (* b c) 1e+148) t_1 (* 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 t_1 = k * (j * -27.0);
double tmp;
if ((b * c) <= -2e+192) {
tmp = b * c;
} else if ((b * c) <= 4e-279) {
tmp = t_1;
} else if ((b * c) <= 2e-8) {
tmp = x * (18.0 * (t * (z * y)));
} else if ((b * c) <= 1e+148) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = k * (j * (-27.0d0))
if ((b * c) <= (-2d+192)) then
tmp = b * c
else if ((b * c) <= 4d-279) then
tmp = t_1
else if ((b * c) <= 2d-8) then
tmp = x * (18.0d0 * (t * (z * y)))
else if ((b * c) <= 1d+148) then
tmp = t_1
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 t_1 = k * (j * -27.0);
double tmp;
if ((b * c) <= -2e+192) {
tmp = b * c;
} else if ((b * c) <= 4e-279) {
tmp = t_1;
} else if ((b * c) <= 2e-8) {
tmp = x * (18.0 * (t * (z * y)));
} else if ((b * c) <= 1e+148) {
tmp = t_1;
} 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): t_1 = k * (j * -27.0) tmp = 0 if (b * c) <= -2e+192: tmp = b * c elif (b * c) <= 4e-279: tmp = t_1 elif (b * c) <= 2e-8: tmp = x * (18.0 * (t * (z * y))) elif (b * c) <= 1e+148: tmp = t_1 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) t_1 = Float64(k * Float64(j * -27.0)) tmp = 0.0 if (Float64(b * c) <= -2e+192) tmp = Float64(b * c); elseif (Float64(b * c) <= 4e-279) tmp = t_1; elseif (Float64(b * c) <= 2e-8) tmp = Float64(x * Float64(18.0 * Float64(t * Float64(z * y)))); elseif (Float64(b * c) <= 1e+148) tmp = t_1; 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)
t_1 = k * (j * -27.0);
tmp = 0.0;
if ((b * c) <= -2e+192)
tmp = b * c;
elseif ((b * c) <= 4e-279)
tmp = t_1;
elseif ((b * c) <= 2e-8)
tmp = x * (18.0 * (t * (z * y)));
elseif ((b * c) <= 1e+148)
tmp = t_1;
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_] := Block[{t$95$1 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2e+192], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4e-279], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 2e-8], N[(x * N[(18.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1e+148], t$95$1, 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}
t_1 := k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+192}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 4 \cdot 10^{-279}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-8}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(z \cdot y\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 10^{+148}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -2.00000000000000008e192 or 1e148 < (*.f64 b c) Initial program 82.9%
Simplified83.1%
associate-*r*82.9%
distribute-rgt-out--82.9%
associate-+l-82.9%
associate-*l*81.7%
fma-neg81.7%
associate-*l*81.7%
*-commutative81.7%
Applied egg-rr81.7%
fma-undefine81.7%
unsub-neg81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in b around inf 69.1%
if -2.00000000000000008e192 < (*.f64 b c) < 4.00000000000000022e-279 or 2e-8 < (*.f64 b c) < 1e148Initial program 82.7%
Simplified87.6%
Taylor expanded in j around inf 30.0%
associate-*r*30.0%
*-commutative30.0%
metadata-eval30.0%
distribute-rgt-neg-in30.0%
*-commutative30.0%
distribute-rgt-neg-in30.0%
metadata-eval30.0%
*-commutative30.0%
Simplified30.0%
if 4.00000000000000022e-279 < (*.f64 b c) < 2e-8Initial program 87.1%
Simplified93.6%
Taylor expanded in x around inf 59.2%
Taylor expanded in t around inf 39.0%
Final simplification42.3%
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 (* k (* j -27.0))))
(if (<= (* b c) -2e+192)
(* b c)
(if (<= (* b c) 4e-279)
t_1
(if (<= (* b c) 4e-104)
(* 18.0 (* t (* x (* z y))))
(if (<= (* b c) 1e+148) t_1 (* 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 t_1 = k * (j * -27.0);
double tmp;
if ((b * c) <= -2e+192) {
tmp = b * c;
} else if ((b * c) <= 4e-279) {
tmp = t_1;
} else if ((b * c) <= 4e-104) {
tmp = 18.0 * (t * (x * (z * y)));
} else if ((b * c) <= 1e+148) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = k * (j * (-27.0d0))
if ((b * c) <= (-2d+192)) then
tmp = b * c
else if ((b * c) <= 4d-279) then
tmp = t_1
else if ((b * c) <= 4d-104) then
tmp = 18.0d0 * (t * (x * (z * y)))
else if ((b * c) <= 1d+148) then
tmp = t_1
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 t_1 = k * (j * -27.0);
double tmp;
if ((b * c) <= -2e+192) {
tmp = b * c;
} else if ((b * c) <= 4e-279) {
tmp = t_1;
} else if ((b * c) <= 4e-104) {
tmp = 18.0 * (t * (x * (z * y)));
} else if ((b * c) <= 1e+148) {
tmp = t_1;
} 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): t_1 = k * (j * -27.0) tmp = 0 if (b * c) <= -2e+192: tmp = b * c elif (b * c) <= 4e-279: tmp = t_1 elif (b * c) <= 4e-104: tmp = 18.0 * (t * (x * (z * y))) elif (b * c) <= 1e+148: tmp = t_1 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) t_1 = Float64(k * Float64(j * -27.0)) tmp = 0.0 if (Float64(b * c) <= -2e+192) tmp = Float64(b * c); elseif (Float64(b * c) <= 4e-279) tmp = t_1; elseif (Float64(b * c) <= 4e-104) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(z * y)))); elseif (Float64(b * c) <= 1e+148) tmp = t_1; 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)
t_1 = k * (j * -27.0);
tmp = 0.0;
if ((b * c) <= -2e+192)
tmp = b * c;
elseif ((b * c) <= 4e-279)
tmp = t_1;
elseif ((b * c) <= 4e-104)
tmp = 18.0 * (t * (x * (z * y)));
elseif ((b * c) <= 1e+148)
tmp = t_1;
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_] := Block[{t$95$1 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2e+192], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4e-279], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 4e-104], N[(18.0 * N[(t * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1e+148], t$95$1, 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}
t_1 := k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+192}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 4 \cdot 10^{-279}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 4 \cdot 10^{-104}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 10^{+148}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -2.00000000000000008e192 or 1e148 < (*.f64 b c) Initial program 82.9%
Simplified83.1%
associate-*r*82.9%
distribute-rgt-out--82.9%
associate-+l-82.9%
associate-*l*81.7%
fma-neg81.7%
associate-*l*81.7%
*-commutative81.7%
Applied egg-rr81.7%
fma-undefine81.7%
unsub-neg81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in b around inf 69.1%
if -2.00000000000000008e192 < (*.f64 b c) < 4.00000000000000022e-279 or 3.99999999999999971e-104 < (*.f64 b c) < 1e148Initial program 81.6%
Simplified87.8%
Taylor expanded in j around inf 29.8%
associate-*r*29.9%
*-commutative29.9%
metadata-eval29.9%
distribute-rgt-neg-in29.9%
*-commutative29.9%
distribute-rgt-neg-in29.9%
metadata-eval29.9%
*-commutative29.9%
Simplified29.9%
if 4.00000000000000022e-279 < (*.f64 b c) < 3.99999999999999971e-104Initial program 96.3%
Simplified96.4%
associate-*r*96.3%
distribute-rgt-out--96.3%
associate-+l-96.3%
associate-*l*92.7%
fma-neg92.7%
associate-*l*92.9%
*-commutative92.9%
Applied egg-rr92.9%
fma-undefine92.9%
unsub-neg92.9%
*-commutative92.9%
Simplified92.9%
Taylor expanded in t around 0 65.4%
neg-mul-165.4%
distribute-rgt-neg-in65.4%
Simplified65.4%
Taylor expanded in y around inf 40.1%
Final simplification41.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
(if (<= x -1.26e+92)
(* x (* z (+ (* -4.0 (/ i z)) (* 18.0 (* t y)))))
(if (<= x 1.7e+114)
(-
(+ (* b c) (* t (- (* 18.0 (* x (* z y))) (* a 4.0))))
(* 27.0 (* j k)))
(* x (- (* 18.0 (* t (* z y))) (* i 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 (x <= -1.26e+92) {
tmp = x * (z * ((-4.0 * (i / z)) + (18.0 * (t * y))));
} else if (x <= 1.7e+114) {
tmp = ((b * c) + (t * ((18.0 * (x * (z * y))) - (a * 4.0)))) - (27.0 * (j * k));
} else {
tmp = x * ((18.0 * (t * (z * y))) - (i * 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 (x <= (-1.26d+92)) then
tmp = x * (z * (((-4.0d0) * (i / z)) + (18.0d0 * (t * y))))
else if (x <= 1.7d+114) then
tmp = ((b * c) + (t * ((18.0d0 * (x * (z * y))) - (a * 4.0d0)))) - (27.0d0 * (j * k))
else
tmp = x * ((18.0d0 * (t * (z * y))) - (i * 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 (x <= -1.26e+92) {
tmp = x * (z * ((-4.0 * (i / z)) + (18.0 * (t * y))));
} else if (x <= 1.7e+114) {
tmp = ((b * c) + (t * ((18.0 * (x * (z * y))) - (a * 4.0)))) - (27.0 * (j * k));
} else {
tmp = x * ((18.0 * (t * (z * y))) - (i * 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 x <= -1.26e+92: tmp = x * (z * ((-4.0 * (i / z)) + (18.0 * (t * y)))) elif x <= 1.7e+114: tmp = ((b * c) + (t * ((18.0 * (x * (z * y))) - (a * 4.0)))) - (27.0 * (j * k)) else: tmp = x * ((18.0 * (t * (z * y))) - (i * 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 (x <= -1.26e+92) tmp = Float64(x * Float64(z * Float64(Float64(-4.0 * Float64(i / z)) + Float64(18.0 * Float64(t * y))))); elseif (x <= 1.7e+114) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(z * y))) - Float64(a * 4.0)))) - Float64(27.0 * Float64(j * k))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(z * y))) - Float64(i * 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 (x <= -1.26e+92)
tmp = x * (z * ((-4.0 * (i / z)) + (18.0 * (t * y))));
elseif (x <= 1.7e+114)
tmp = ((b * c) + (t * ((18.0 * (x * (z * y))) - (a * 4.0)))) - (27.0 * (j * k));
else
tmp = x * ((18.0 * (t * (z * y))) - (i * 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[LessEqual[x, -1.26e+92], N[(x * N[(z * N[(N[(-4.0 * N[(i / z), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.7e+114], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 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}
\mathbf{if}\;x \leq -1.26 \cdot 10^{+92}:\\
\;\;\;\;x \cdot \left(z \cdot \left(-4 \cdot \frac{i}{z} + 18 \cdot \left(t \cdot y\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{+114}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right) - a \cdot 4\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(z \cdot y\right)\right) - i \cdot 4\right)\\
\end{array}
\end{array}
if x < -1.26e92Initial program 72.4%
Simplified82.6%
Taylor expanded in x around inf 82.7%
Taylor expanded in z around inf 85.4%
if -1.26e92 < x < 1.7e114Initial program 94.7%
Simplified94.3%
Taylor expanded in i around 0 88.4%
if 1.7e114 < x Initial program 51.5%
Simplified62.0%
Taylor expanded in x around inf 72.8%
Final simplification85.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 (<= x -2.25e+48)
(* x (+ (* -4.0 i) (* 18.0 (* z (* t y)))))
(if (<= x 9.8e-253)
(- (* b c) (* 27.0 (* j k)))
(if (<= x 7e-42)
(+ (* j (* k -27.0)) (* -4.0 (* t a)))
(* x (- (* 18.0 (* t (* z y))) (* i 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 (x <= -2.25e+48) {
tmp = x * ((-4.0 * i) + (18.0 * (z * (t * y))));
} else if (x <= 9.8e-253) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 7e-42) {
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
} else {
tmp = x * ((18.0 * (t * (z * y))) - (i * 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 (x <= (-2.25d+48)) then
tmp = x * (((-4.0d0) * i) + (18.0d0 * (z * (t * y))))
else if (x <= 9.8d-253) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (x <= 7d-42) then
tmp = (j * (k * (-27.0d0))) + ((-4.0d0) * (t * a))
else
tmp = x * ((18.0d0 * (t * (z * y))) - (i * 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 (x <= -2.25e+48) {
tmp = x * ((-4.0 * i) + (18.0 * (z * (t * y))));
} else if (x <= 9.8e-253) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 7e-42) {
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
} else {
tmp = x * ((18.0 * (t * (z * y))) - (i * 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 x <= -2.25e+48: tmp = x * ((-4.0 * i) + (18.0 * (z * (t * y)))) elif x <= 9.8e-253: tmp = (b * c) - (27.0 * (j * k)) elif x <= 7e-42: tmp = (j * (k * -27.0)) + (-4.0 * (t * a)) else: tmp = x * ((18.0 * (t * (z * y))) - (i * 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 (x <= -2.25e+48) tmp = Float64(x * Float64(Float64(-4.0 * i) + Float64(18.0 * Float64(z * Float64(t * y))))); elseif (x <= 9.8e-253) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (x <= 7e-42) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(t * a))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(z * y))) - Float64(i * 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 (x <= -2.25e+48)
tmp = x * ((-4.0 * i) + (18.0 * (z * (t * y))));
elseif (x <= 9.8e-253)
tmp = (b * c) - (27.0 * (j * k));
elseif (x <= 7e-42)
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
else
tmp = x * ((18.0 * (t * (z * y))) - (i * 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[LessEqual[x, -2.25e+48], N[(x * N[(N[(-4.0 * i), $MachinePrecision] + N[(18.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.8e-253], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7e-42], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 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}
\mathbf{if}\;x \leq -2.25 \cdot 10^{+48}:\\
\;\;\;\;x \cdot \left(-4 \cdot i + 18 \cdot \left(z \cdot \left(t \cdot y\right)\right)\right)\\
\mathbf{elif}\;x \leq 9.8 \cdot 10^{-253}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-42}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(z \cdot y\right)\right) - i \cdot 4\right)\\
\end{array}
\end{array}
if x < -2.24999999999999998e48Initial program 75.0%
Simplified84.7%
associate-*r*77.0%
distribute-rgt-out--75.0%
associate-+l-75.0%
associate-*l*76.6%
fma-neg76.6%
associate-*l*78.5%
*-commutative78.5%
Applied egg-rr78.5%
fma-undefine78.5%
unsub-neg78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in x around inf 77.4%
cancel-sign-sub-inv77.4%
metadata-eval77.4%
associate-*r*79.3%
Simplified79.3%
if -2.24999999999999998e48 < x < 9.7999999999999999e-253Initial program 93.1%
Simplified91.1%
Taylor expanded in t around 0 68.4%
Taylor expanded in i around 0 63.9%
if 9.7999999999999999e-253 < x < 7.0000000000000004e-42Initial program 99.8%
Simplified99.9%
Taylor expanded in a around inf 67.0%
*-commutative67.0%
Simplified67.0%
if 7.0000000000000004e-42 < x Initial program 65.7%
Simplified72.9%
Taylor expanded in x around inf 64.5%
Final simplification67.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 (* x (+ (* -4.0 i) (* 18.0 (* z (* t y)))))))
(if (<= x -8.2e+48)
t_1
(if (<= x 9e-253)
(- (* b c) (* 27.0 (* j k)))
(if (<= x 7e-42) (+ (* j (* k -27.0)) (* -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 = x * ((-4.0 * i) + (18.0 * (z * (t * y))));
double tmp;
if (x <= -8.2e+48) {
tmp = t_1;
} else if (x <= 9e-253) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 7e-42) {
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
} 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 = x * (((-4.0d0) * i) + (18.0d0 * (z * (t * y))))
if (x <= (-8.2d+48)) then
tmp = t_1
else if (x <= 9d-253) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (x <= 7d-42) then
tmp = (j * (k * (-27.0d0))) + ((-4.0d0) * (t * a))
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 = x * ((-4.0 * i) + (18.0 * (z * (t * y))));
double tmp;
if (x <= -8.2e+48) {
tmp = t_1;
} else if (x <= 9e-253) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 7e-42) {
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
} 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 = x * ((-4.0 * i) + (18.0 * (z * (t * y)))) tmp = 0 if x <= -8.2e+48: tmp = t_1 elif x <= 9e-253: tmp = (b * c) - (27.0 * (j * k)) elif x <= 7e-42: tmp = (j * (k * -27.0)) + (-4.0 * (t * a)) 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(x * Float64(Float64(-4.0 * i) + Float64(18.0 * Float64(z * Float64(t * y))))) tmp = 0.0 if (x <= -8.2e+48) tmp = t_1; elseif (x <= 9e-253) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (x <= 7e-42) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(t * a))); 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 = x * ((-4.0 * i) + (18.0 * (z * (t * y))));
tmp = 0.0;
if (x <= -8.2e+48)
tmp = t_1;
elseif (x <= 9e-253)
tmp = (b * c) - (27.0 * (j * k));
elseif (x <= 7e-42)
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
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[(x * N[(N[(-4.0 * i), $MachinePrecision] + N[(18.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.2e+48], t$95$1, If[LessEqual[x, 9e-253], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7e-42], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $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 := x \cdot \left(-4 \cdot i + 18 \cdot \left(z \cdot \left(t \cdot y\right)\right)\right)\\
\mathbf{if}\;x \leq -8.2 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 9 \cdot 10^{-253}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-42}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -8.2000000000000005e48 or 7.0000000000000004e-42 < x Initial program 69.7%
Simplified78.0%
associate-*r*71.4%
distribute-rgt-out--69.7%
associate-+l-69.7%
associate-*l*71.9%
fma-neg72.8%
associate-*l*73.6%
*-commutative73.6%
Applied egg-rr73.6%
fma-undefine72.7%
unsub-neg72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in x around inf 70.0%
cancel-sign-sub-inv70.0%
metadata-eval70.0%
associate-*r*71.7%
Simplified71.7%
if -8.2000000000000005e48 < x < 9.00000000000000057e-253Initial program 93.1%
Simplified91.1%
Taylor expanded in t around 0 68.4%
Taylor expanded in i around 0 63.9%
if 9.00000000000000057e-253 < x < 7.0000000000000004e-42Initial program 99.8%
Simplified99.9%
Taylor expanded in a around inf 67.0%
*-commutative67.0%
Simplified67.0%
Final simplification68.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 (* t (- (* 18.0 (* x (* z y))) (* a 4.0)))))
(if (<= t -1.05e+90)
t_1
(if (<= t -8e-82)
(+ (* j (* k -27.0)) (* -4.0 (* t a)))
(if (<= t 9.2e-58) (- (* b c) (* 4.0 (* x i))) 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 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
double tmp;
if (t <= -1.05e+90) {
tmp = t_1;
} else if (t <= -8e-82) {
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
} else if (t <= 9.2e-58) {
tmp = (b * c) - (4.0 * (x * i));
} 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 = t * ((18.0d0 * (x * (z * y))) - (a * 4.0d0))
if (t <= (-1.05d+90)) then
tmp = t_1
else if (t <= (-8d-82)) then
tmp = (j * (k * (-27.0d0))) + ((-4.0d0) * (t * a))
else if (t <= 9.2d-58) then
tmp = (b * c) - (4.0d0 * (x * i))
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 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
double tmp;
if (t <= -1.05e+90) {
tmp = t_1;
} else if (t <= -8e-82) {
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
} else if (t <= 9.2e-58) {
tmp = (b * c) - (4.0 * (x * i));
} 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 = t * ((18.0 * (x * (z * y))) - (a * 4.0)) tmp = 0 if t <= -1.05e+90: tmp = t_1 elif t <= -8e-82: tmp = (j * (k * -27.0)) + (-4.0 * (t * a)) elif t <= 9.2e-58: tmp = (b * c) - (4.0 * (x * i)) 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(t * Float64(Float64(18.0 * Float64(x * Float64(z * y))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -1.05e+90) tmp = t_1; elseif (t <= -8e-82) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(t * a))); elseif (t <= 9.2e-58) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); 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 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
tmp = 0.0;
if (t <= -1.05e+90)
tmp = t_1;
elseif (t <= -8e-82)
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
elseif (t <= 9.2e-58)
tmp = (b * c) - (4.0 * (x * i));
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[(t * N[(N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.05e+90], t$95$1, If[LessEqual[t, -8e-82], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.2e-58], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $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 := t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1.05 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -8 \cdot 10^{-82}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t \leq 9.2 \cdot 10^{-58}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.0499999999999999e90 or 9.1999999999999995e-58 < t Initial program 87.1%
Simplified91.5%
associate-*r*89.8%
distribute-rgt-out--87.2%
associate-+l-87.2%
associate-*l*82.2%
fma-neg83.1%
associate-*l*83.9%
*-commutative83.9%
Applied egg-rr83.9%
fma-undefine83.0%
unsub-neg83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in t around inf 66.2%
if -1.0499999999999999e90 < t < -8e-82Initial program 93.0%
Simplified93.0%
Taylor expanded in a around inf 56.2%
*-commutative56.2%
Simplified56.2%
if -8e-82 < t < 9.1999999999999995e-58Initial program 75.0%
Simplified78.3%
Taylor expanded in t around 0 81.6%
Taylor expanded in j around 0 59.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 (if (or (<= t -8.4e+95) (not (<= t 3.6e+170))) (* t (- (* 18.0 (* x (* z y))) (* a 4.0))) (- (* b c) (+ (* 4.0 (* x i)) (* 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 ((t <= -8.4e+95) || !(t <= 3.6e+170)) {
tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0));
} else {
tmp = (b * c) - ((4.0 * (x * i)) + (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 ((t <= (-8.4d+95)) .or. (.not. (t <= 3.6d+170))) then
tmp = t * ((18.0d0 * (x * (z * y))) - (a * 4.0d0))
else
tmp = (b * c) - ((4.0d0 * (x * i)) + (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 ((t <= -8.4e+95) || !(t <= 3.6e+170)) {
tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0));
} else {
tmp = (b * c) - ((4.0 * (x * i)) + (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 (t <= -8.4e+95) or not (t <= 3.6e+170): tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0)) else: tmp = (b * c) - ((4.0 * (x * i)) + (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 ((t <= -8.4e+95) || !(t <= 3.6e+170)) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(z * y))) - Float64(a * 4.0))); else tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + 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 ((t <= -8.4e+95) || ~((t <= 3.6e+170)))
tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0));
else
tmp = (b * c) - ((4.0 * (x * i)) + (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[Or[LessEqual[t, -8.4e+95], N[Not[LessEqual[t, 3.6e+170]], $MachinePrecision]], N[(t * N[(N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $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}\;t \leq -8.4 \cdot 10^{+95} \lor \neg \left(t \leq 3.6 \cdot 10^{+170}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\end{array}
\end{array}
if t < -8.4e95 or 3.6e170 < t Initial program 82.5%
Simplified87.3%
associate-*r*87.3%
distribute-rgt-out--82.5%
associate-+l-82.5%
associate-*l*76.3%
fma-neg77.9%
associate-*l*77.9%
*-commutative77.9%
Applied egg-rr77.9%
fma-undefine76.3%
unsub-neg76.3%
*-commutative76.3%
Simplified76.3%
Taylor expanded in t around inf 81.1%
if -8.4e95 < t < 3.6e170Initial program 83.9%
Simplified86.5%
Taylor expanded in t around 0 70.1%
Final simplification72.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
(if (<= x -5.1e+82)
(* x (* z (+ (* -4.0 (/ i z)) (* 18.0 (* t y)))))
(if (<= x 8.4e-22)
(- (- (* b c) (* (* t a) 4.0)) (* k (* j 27.0)))
(* x (- (* 18.0 (* t (* z y))) (* i 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 (x <= -5.1e+82) {
tmp = x * (z * ((-4.0 * (i / z)) + (18.0 * (t * y))));
} else if (x <= 8.4e-22) {
tmp = ((b * c) - ((t * a) * 4.0)) - (k * (j * 27.0));
} else {
tmp = x * ((18.0 * (t * (z * y))) - (i * 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 (x <= (-5.1d+82)) then
tmp = x * (z * (((-4.0d0) * (i / z)) + (18.0d0 * (t * y))))
else if (x <= 8.4d-22) then
tmp = ((b * c) - ((t * a) * 4.0d0)) - (k * (j * 27.0d0))
else
tmp = x * ((18.0d0 * (t * (z * y))) - (i * 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 (x <= -5.1e+82) {
tmp = x * (z * ((-4.0 * (i / z)) + (18.0 * (t * y))));
} else if (x <= 8.4e-22) {
tmp = ((b * c) - ((t * a) * 4.0)) - (k * (j * 27.0));
} else {
tmp = x * ((18.0 * (t * (z * y))) - (i * 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 x <= -5.1e+82: tmp = x * (z * ((-4.0 * (i / z)) + (18.0 * (t * y)))) elif x <= 8.4e-22: tmp = ((b * c) - ((t * a) * 4.0)) - (k * (j * 27.0)) else: tmp = x * ((18.0 * (t * (z * y))) - (i * 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 (x <= -5.1e+82) tmp = Float64(x * Float64(z * Float64(Float64(-4.0 * Float64(i / z)) + Float64(18.0 * Float64(t * y))))); elseif (x <= 8.4e-22) tmp = Float64(Float64(Float64(b * c) - Float64(Float64(t * a) * 4.0)) - Float64(k * Float64(j * 27.0))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(z * y))) - Float64(i * 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 (x <= -5.1e+82)
tmp = x * (z * ((-4.0 * (i / z)) + (18.0 * (t * y))));
elseif (x <= 8.4e-22)
tmp = ((b * c) - ((t * a) * 4.0)) - (k * (j * 27.0));
else
tmp = x * ((18.0 * (t * (z * y))) - (i * 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[LessEqual[x, -5.1e+82], N[(x * N[(z * N[(N[(-4.0 * N[(i / z), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.4e-22], N[(N[(N[(b * c), $MachinePrecision] - N[(N[(t * a), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 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}
\mathbf{if}\;x \leq -5.1 \cdot 10^{+82}:\\
\;\;\;\;x \cdot \left(z \cdot \left(-4 \cdot \frac{i}{z} + 18 \cdot \left(t \cdot y\right)\right)\right)\\
\mathbf{elif}\;x \leq 8.4 \cdot 10^{-22}:\\
\;\;\;\;\left(b \cdot c - \left(t \cdot a\right) \cdot 4\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(z \cdot y\right)\right) - i \cdot 4\right)\\
\end{array}
\end{array}
if x < -5.1000000000000003e82Initial program 73.3%
Simplified84.6%
Taylor expanded in x around inf 82.4%
Taylor expanded in z around inf 84.7%
if -5.1000000000000003e82 < x < 8.40000000000000031e-22Initial program 95.2%
Taylor expanded in x around 0 83.9%
if 8.40000000000000031e-22 < x Initial program 63.1%
Simplified70.8%
Taylor expanded in x around inf 67.8%
Final simplification80.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 (* j (* k -27.0))))
(if (<= (* b c) -2e+164)
(* c (+ b (* -27.0 (/ (* j k) c))))
(if (<= (* b c) 1e+148) (+ t_1 (* -4.0 (* t a))) (+ t_1 (* 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 t_1 = j * (k * -27.0);
double tmp;
if ((b * c) <= -2e+164) {
tmp = c * (b + (-27.0 * ((j * k) / c)));
} else if ((b * c) <= 1e+148) {
tmp = t_1 + (-4.0 * (t * a));
} else {
tmp = t_1 + (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) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if ((b * c) <= (-2d+164)) then
tmp = c * (b + ((-27.0d0) * ((j * k) / c)))
else if ((b * c) <= 1d+148) then
tmp = t_1 + ((-4.0d0) * (t * a))
else
tmp = t_1 + (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 t_1 = j * (k * -27.0);
double tmp;
if ((b * c) <= -2e+164) {
tmp = c * (b + (-27.0 * ((j * k) / c)));
} else if ((b * c) <= 1e+148) {
tmp = t_1 + (-4.0 * (t * a));
} else {
tmp = t_1 + (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): t_1 = j * (k * -27.0) tmp = 0 if (b * c) <= -2e+164: tmp = c * (b + (-27.0 * ((j * k) / c))) elif (b * c) <= 1e+148: tmp = t_1 + (-4.0 * (t * a)) else: tmp = t_1 + (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) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (Float64(b * c) <= -2e+164) tmp = Float64(c * Float64(b + Float64(-27.0 * Float64(Float64(j * k) / c)))); elseif (Float64(b * c) <= 1e+148) tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a))); else tmp = Float64(t_1 + 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)
t_1 = j * (k * -27.0);
tmp = 0.0;
if ((b * c) <= -2e+164)
tmp = c * (b + (-27.0 * ((j * k) / c)));
elseif ((b * c) <= 1e+148)
tmp = t_1 + (-4.0 * (t * a));
else
tmp = t_1 + (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_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2e+164], N[(c * N[(b + N[(-27.0 * N[(N[(j * k), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1e+148], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(b * c), $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}\;b \cdot c \leq -2 \cdot 10^{+164}:\\
\;\;\;\;c \cdot \left(b + -27 \cdot \frac{j \cdot k}{c}\right)\\
\mathbf{elif}\;b \cdot c \leq 10^{+148}:\\
\;\;\;\;t\_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -2e164Initial program 81.9%
Simplified79.7%
Taylor expanded in t around 0 78.9%
Taylor expanded in i around 0 73.8%
Taylor expanded in c around inf 76.4%
if -2e164 < (*.f64 b c) < 1e148Initial program 83.8%
Simplified89.3%
Taylor expanded in a around inf 53.0%
*-commutative53.0%
Simplified53.0%
if 1e148 < (*.f64 b c) Initial program 83.9%
Simplified89.3%
Taylor expanded in b around inf 79.0%
Final simplification60.3%
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 (* k (* (* -4.0 i) (/ x k)))))
(if (<= x -1.15e+92)
t_1
(if (<= x 1.25e+100)
(+ (* j (* k -27.0)) (* b c))
(if (<= x 1.4e+180) t_1 (* x (* 18.0 (* t (* z y)))))))))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 = k * ((-4.0 * i) * (x / k));
double tmp;
if (x <= -1.15e+92) {
tmp = t_1;
} else if (x <= 1.25e+100) {
tmp = (j * (k * -27.0)) + (b * c);
} else if (x <= 1.4e+180) {
tmp = t_1;
} else {
tmp = x * (18.0 * (t * (z * y)));
}
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 = k * (((-4.0d0) * i) * (x / k))
if (x <= (-1.15d+92)) then
tmp = t_1
else if (x <= 1.25d+100) then
tmp = (j * (k * (-27.0d0))) + (b * c)
else if (x <= 1.4d+180) then
tmp = t_1
else
tmp = x * (18.0d0 * (t * (z * y)))
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 = k * ((-4.0 * i) * (x / k));
double tmp;
if (x <= -1.15e+92) {
tmp = t_1;
} else if (x <= 1.25e+100) {
tmp = (j * (k * -27.0)) + (b * c);
} else if (x <= 1.4e+180) {
tmp = t_1;
} else {
tmp = x * (18.0 * (t * (z * y)));
}
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 = k * ((-4.0 * i) * (x / k)) tmp = 0 if x <= -1.15e+92: tmp = t_1 elif x <= 1.25e+100: tmp = (j * (k * -27.0)) + (b * c) elif x <= 1.4e+180: tmp = t_1 else: tmp = x * (18.0 * (t * (z * y))) 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(k * Float64(Float64(-4.0 * i) * Float64(x / k))) tmp = 0.0 if (x <= -1.15e+92) tmp = t_1; elseif (x <= 1.25e+100) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); elseif (x <= 1.4e+180) tmp = t_1; else tmp = Float64(x * Float64(18.0 * Float64(t * Float64(z * y)))); 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 = k * ((-4.0 * i) * (x / k));
tmp = 0.0;
if (x <= -1.15e+92)
tmp = t_1;
elseif (x <= 1.25e+100)
tmp = (j * (k * -27.0)) + (b * c);
elseif (x <= 1.4e+180)
tmp = t_1;
else
tmp = x * (18.0 * (t * (z * y)));
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[(k * N[(N[(-4.0 * i), $MachinePrecision] * N[(x / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.15e+92], t$95$1, If[LessEqual[x, 1.25e+100], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.4e+180], t$95$1, N[(x * N[(18.0 * N[(t * N[(z * y), $MachinePrecision]), $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 := k \cdot \left(\left(-4 \cdot i\right) \cdot \frac{x}{k}\right)\\
\mathbf{if}\;x \leq -1.15 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{+100}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{+180}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(z \cdot y\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.14999999999999999e92 or 1.25e100 < x < 1.40000000000000006e180Initial program 70.7%
Simplified81.8%
Taylor expanded in t around 0 59.7%
Taylor expanded in k around inf 54.2%
Taylor expanded in i around inf 50.4%
associate-*r/52.2%
metadata-eval52.2%
distribute-lft-neg-in52.2%
associate-*r*52.2%
distribute-lft-neg-in52.2%
distribute-lft-neg-in52.2%
metadata-eval52.2%
*-commutative52.2%
Simplified52.2%
if -1.14999999999999999e92 < x < 1.25e100Initial program 94.6%
Simplified94.8%
Taylor expanded in b around inf 54.5%
if 1.40000000000000006e180 < x Initial program 48.5%
Simplified57.0%
Taylor expanded in x around inf 71.8%
Taylor expanded in t around inf 48.1%
Final simplification53.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 (or (<= j -2e+72) (not (<= j 8.2e-56))) (+ (* j (* k -27.0)) (* b c)) (- (* b c) (* 4.0 (* x 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 ((j <= -2e+72) || !(j <= 8.2e-56)) {
tmp = (j * (k * -27.0)) + (b * c);
} else {
tmp = (b * c) - (4.0 * (x * 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 ((j <= (-2d+72)) .or. (.not. (j <= 8.2d-56))) then
tmp = (j * (k * (-27.0d0))) + (b * c)
else
tmp = (b * c) - (4.0d0 * (x * 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 ((j <= -2e+72) || !(j <= 8.2e-56)) {
tmp = (j * (k * -27.0)) + (b * c);
} else {
tmp = (b * c) - (4.0 * (x * 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 (j <= -2e+72) or not (j <= 8.2e-56): tmp = (j * (k * -27.0)) + (b * c) else: tmp = (b * c) - (4.0 * (x * 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 ((j <= -2e+72) || !(j <= 8.2e-56)) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * 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 ((j <= -2e+72) || ~((j <= 8.2e-56)))
tmp = (j * (k * -27.0)) + (b * c);
else
tmp = (b * c) - (4.0 * (x * 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[Or[LessEqual[j, -2e+72], N[Not[LessEqual[j, 8.2e-56]], $MachinePrecision]], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * 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}\;j \leq -2 \cdot 10^{+72} \lor \neg \left(j \leq 8.2 \cdot 10^{-56}\right):\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if j < -1.99999999999999989e72 or 8.2000000000000003e-56 < j Initial program 82.2%
Simplified86.5%
Taylor expanded in b around inf 50.6%
if -1.99999999999999989e72 < j < 8.2000000000000003e-56Initial program 84.6%
Simplified88.3%
Taylor expanded in t around 0 59.5%
Taylor expanded in j around 0 51.5%
Final simplification51.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) -2e+192) (not (<= (* b c) 1e+148))) (* b c) (* k (* j -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) <= -2e+192) || !((b * c) <= 1e+148)) {
tmp = b * c;
} else {
tmp = k * (j * -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) <= (-2d+192)) .or. (.not. ((b * c) <= 1d+148))) then
tmp = b * c
else
tmp = k * (j * (-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) <= -2e+192) || !((b * c) <= 1e+148)) {
tmp = b * c;
} else {
tmp = k * (j * -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) <= -2e+192) or not ((b * c) <= 1e+148): tmp = b * c else: tmp = k * (j * -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) <= -2e+192) || !(Float64(b * c) <= 1e+148)) tmp = Float64(b * c); else tmp = Float64(k * Float64(j * -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) <= -2e+192) || ~(((b * c) <= 1e+148)))
tmp = b * c;
else
tmp = k * (j * -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], -2e+192], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1e+148]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(k * N[(j * -27.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 -2 \cdot 10^{+192} \lor \neg \left(b \cdot c \leq 10^{+148}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -2.00000000000000008e192 or 1e148 < (*.f64 b c) Initial program 82.9%
Simplified83.1%
associate-*r*82.9%
distribute-rgt-out--82.9%
associate-+l-82.9%
associate-*l*81.7%
fma-neg81.7%
associate-*l*81.7%
*-commutative81.7%
Applied egg-rr81.7%
fma-undefine81.7%
unsub-neg81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in b around inf 69.1%
if -2.00000000000000008e192 < (*.f64 b c) < 1e148Initial program 83.8%
Simplified89.1%
Taylor expanded in j around inf 26.8%
associate-*r*26.8%
*-commutative26.8%
metadata-eval26.8%
distribute-rgt-neg-in26.8%
*-commutative26.8%
distribute-rgt-neg-in26.8%
metadata-eval26.8%
*-commutative26.8%
Simplified26.8%
Final simplification38.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 (or (<= (* b c) -1.9e+191) (not (<= (* b c) 3.4e+149))) (* 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) <= -1.9e+191) || !((b * c) <= 3.4e+149)) {
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) <= (-1.9d+191)) .or. (.not. ((b * c) <= 3.4d+149))) 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) <= -1.9e+191) || !((b * c) <= 3.4e+149)) {
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) <= -1.9e+191) or not ((b * c) <= 3.4e+149): 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) <= -1.9e+191) || !(Float64(b * c) <= 3.4e+149)) tmp = Float64(b * c); else tmp = Float64(j * Float64(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) <= -1.9e+191) || ~(((b * c) <= 3.4e+149)))
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], -1.9e+191], N[Not[LessEqual[N[(b * c), $MachinePrecision], 3.4e+149]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(j * N[(k * -27.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.9 \cdot 10^{+191} \lor \neg \left(b \cdot c \leq 3.4 \cdot 10^{+149}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.8999999999999999e191 or 3.3999999999999998e149 < (*.f64 b c) Initial program 82.9%
Simplified83.1%
associate-*r*82.9%
distribute-rgt-out--82.9%
associate-+l-82.9%
associate-*l*81.7%
fma-neg81.7%
associate-*l*81.7%
*-commutative81.7%
Applied egg-rr81.7%
fma-undefine81.7%
unsub-neg81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in b around inf 69.1%
if -1.8999999999999999e191 < (*.f64 b c) < 3.3999999999999998e149Initial program 83.8%
Simplified89.1%
Taylor expanded in j around inf 26.8%
*-commutative26.8%
associate-*r*26.9%
pow126.9%
Applied egg-rr26.9%
unpow126.9%
Simplified26.9%
Final simplification38.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 (or (<= (* b c) -1.92e+191) (not (<= (* b c) 7e+148))) (* b c) (* -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 (((b * c) <= -1.92e+191) || !((b * c) <= 7e+148)) {
tmp = b * c;
} else {
tmp = -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 (((b * c) <= (-1.92d+191)) .or. (.not. ((b * c) <= 7d+148))) then
tmp = b * c
else
tmp = (-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 (((b * c) <= -1.92e+191) || !((b * c) <= 7e+148)) {
tmp = b * c;
} else {
tmp = -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 ((b * c) <= -1.92e+191) or not ((b * c) <= 7e+148): tmp = b * c else: tmp = -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 ((Float64(b * c) <= -1.92e+191) || !(Float64(b * c) <= 7e+148)) tmp = Float64(b * c); else tmp = 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 (((b * c) <= -1.92e+191) || ~(((b * c) <= 7e+148)))
tmp = b * c;
else
tmp = -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[Or[LessEqual[N[(b * c), $MachinePrecision], -1.92e+191], N[Not[LessEqual[N[(b * c), $MachinePrecision], 7e+148]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * 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}\;b \cdot c \leq -1.92 \cdot 10^{+191} \lor \neg \left(b \cdot c \leq 7 \cdot 10^{+148}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.9199999999999999e191 or 6.9999999999999998e148 < (*.f64 b c) Initial program 82.9%
Simplified83.1%
associate-*r*82.9%
distribute-rgt-out--82.9%
associate-+l-82.9%
associate-*l*81.7%
fma-neg81.7%
associate-*l*81.7%
*-commutative81.7%
Applied egg-rr81.7%
fma-undefine81.7%
unsub-neg81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in b around inf 69.1%
if -1.9199999999999999e191 < (*.f64 b c) < 6.9999999999999998e148Initial program 83.8%
Simplified89.1%
Taylor expanded in j around inf 26.8%
Final simplification38.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 (* 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 83.5%
Simplified86.7%
associate-*r*84.8%
distribute-rgt-out--83.6%
associate-+l-83.6%
associate-*l*83.8%
fma-neg84.2%
associate-*l*84.6%
*-commutative84.6%
Applied egg-rr84.6%
fma-undefine84.2%
unsub-neg84.2%
*-commutative84.2%
Simplified84.2%
Taylor expanded in b around inf 23.6%
(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 2024146
(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
(! :herbie-platform default (if (< t -8105407698770699/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))) (if (< t 8284013971902611/50000000000000) (+ (- (* (* 18 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4)) (- (* c b) (* 27 (* k j)))) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))