
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= t -3e-79)
(+
(fma t (fma x (* 18.0 (* y z)) (* a -4.0)) (fma b c (* x (* -4.0 i))))
t_1)
(if (<= t 2e+121)
(+
t_1
(fma
-4.0
(* t a)
(- (* b c) (* x (fma (* y (* t z)) -18.0 (* i 4.0))))))
(-
(fma c b (* t (fma (* x 18.0) (* y z) (* a -4.0))))
(* 27.0 (* j k)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (t <= -3e-79) {
tmp = fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), fma(b, c, (x * (-4.0 * i)))) + t_1;
} else if (t <= 2e+121) {
tmp = t_1 + fma(-4.0, (t * a), ((b * c) - (x * fma((y * (t * z)), -18.0, (i * 4.0)))));
} else {
tmp = fma(c, b, (t * fma((x * 18.0), (y * z), (a * -4.0)))) - (27.0 * (j * k));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (t <= -3e-79) tmp = Float64(fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0)), fma(b, c, Float64(x * Float64(-4.0 * i)))) + t_1); elseif (t <= 2e+121) tmp = Float64(t_1 + fma(-4.0, Float64(t * a), Float64(Float64(b * c) - Float64(x * fma(Float64(y * Float64(t * z)), -18.0, Float64(i * 4.0)))))); else tmp = Float64(fma(c, b, Float64(t * fma(Float64(x * 18.0), Float64(y * z), Float64(a * -4.0)))) - Float64(27.0 * Float64(j * k))); 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_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3e-79], N[(N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 2e+121], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(x * N[(N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision] * -18.0 + N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * b + N[(t * N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;t \leq -3 \cdot 10^{-79}:\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(-4 \cdot i\right)\right)\right) + t_1\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+121}:\\
\;\;\;\;t_1 + \mathsf{fma}\left(-4, t \cdot a, b \cdot c - x \cdot \mathsf{fma}\left(y \cdot \left(t \cdot z\right), -18, i \cdot 4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(c, b, t \cdot \mathsf{fma}\left(x \cdot 18, y \cdot z, a \cdot -4\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if t < -3e-79Initial program 84.5%
Simplified94.8%
if -3e-79 < t < 2.00000000000000007e121Initial program 88.2%
Simplified85.5%
Taylor expanded in x around -inf 90.3%
fma-def90.3%
+-commutative90.3%
mul-1-neg90.3%
metadata-eval90.3%
cancel-sign-sub-inv90.3%
unsub-neg90.3%
*-commutative90.3%
fma-neg90.3%
*-commutative90.3%
associate-*l*97.2%
distribute-lft-neg-in97.2%
metadata-eval97.2%
*-commutative97.2%
Simplified97.2%
if 2.00000000000000007e121 < t Initial program 73.4%
Simplified78.7%
Taylor expanded in i around 0 79.0%
*-commutative79.0%
fma-def86.9%
cancel-sign-sub-inv86.9%
associate-*r*86.9%
metadata-eval86.9%
fma-def86.9%
Applied egg-rr86.9%
Final simplification94.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(+ (* b c) (- (* t (* z (* y (* x 18.0)))) (* t (* a 4.0))))
(* i (* x 4.0)))
(* k (* j 27.0)))))
(if (<= t_1 2e+307)
t_1
(if (<= t_1 INFINITY)
(-
(+ (* b c) (* x (- (* 18.0 (* t (* y z))) (* i 4.0))))
(+ (* 27.0 (* j k)) (* (* t a) 4.0)))
(fma c b (* t (fma (* x 18.0) (* y z) (* a -4.0))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (j * 27.0));
double tmp;
if (t_1 <= 2e+307) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = ((b * c) + (x * ((18.0 * (t * (y * z))) - (i * 4.0)))) - ((27.0 * (j * k)) + ((t * a) * 4.0));
} else {
tmp = fma(c, b, (t * fma((x * 18.0), (y * z), (a * -4.0))));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(b * c) + Float64(Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))) - Float64(t * Float64(a * 4.0)))) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))) tmp = 0.0 if (t_1 <= 2e+307) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0)))) - Float64(Float64(27.0 * Float64(j * k)) + Float64(Float64(t * a) * 4.0))); else tmp = fma(c, b, Float64(t * fma(Float64(x * 18.0), Float64(y * z), Float64(a * -4.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_] := Block[{t$95$1 = N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+307], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * b + N[(t * N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision] + N[(a * -4.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}
t_1 := \left(\left(b \cdot c + \left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right)\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t_1 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;\left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\right) - \left(27 \cdot \left(j \cdot k\right) + \left(t \cdot a\right) \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(c, b, t \cdot \mathsf{fma}\left(x \cdot 18, y \cdot z, a \cdot -4\right)\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < 1.99999999999999997e307Initial program 96.7%
if 1.99999999999999997e307 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 90.7%
Taylor expanded in x around 0 98.3%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) Initial program 0.0%
Simplified28.6%
Taylor expanded in i around 0 32.1%
Taylor expanded in j around 0 43.0%
*-commutative32.1%
fma-def46.4%
cancel-sign-sub-inv46.4%
associate-*r*46.4%
metadata-eval46.4%
fma-def46.4%
Applied egg-rr60.8%
Final simplification93.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(+ (* b c) (- (* t (* z (* y (* x 18.0)))) (* t (* a 4.0))))
(* i (* x 4.0)))
(* k (* j 27.0)))))
(if (<= t_1 2e+307)
t_1
(if (<= t_1 INFINITY)
(-
(+ (* b c) (* x (- (* 18.0 (* t (* y z))) (* i 4.0))))
(+ (* 27.0 (* j k)) (* (* t a) 4.0)))
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (j * 27.0));
double tmp;
if (t_1 <= 2e+307) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = ((b * c) + (x * ((18.0 * (t * (y * z))) - (i * 4.0)))) - ((27.0 * (j * k)) + ((t * a) * 4.0));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
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 = (((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (j * 27.0));
double tmp;
if (t_1 <= 2e+307) {
tmp = t_1;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = ((b * c) + (x * ((18.0 * (t * (y * z))) - (i * 4.0)))) - ((27.0 * (j * k)) + ((t * a) * 4.0));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (j * 27.0)) tmp = 0 if t_1 <= 2e+307: tmp = t_1 elif t_1 <= math.inf: tmp = ((b * c) + (x * ((18.0 * (t * (y * z))) - (i * 4.0)))) - ((27.0 * (j * k)) + ((t * a) * 4.0)) else: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(b * c) + Float64(Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))) - Float64(t * Float64(a * 4.0)))) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))) tmp = 0.0 if (t_1 <= 2e+307) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0)))) - Float64(Float64(27.0 * Float64(j * k)) + Float64(Float64(t * a) * 4.0))); else tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (j * 27.0));
tmp = 0.0;
if (t_1 <= 2e+307)
tmp = t_1;
elseif (t_1 <= Inf)
tmp = ((b * c) + (x * ((18.0 * (t * (y * z))) - (i * 4.0)))) - ((27.0 * (j * k)) + ((t * a) * 4.0));
else
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+307], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(b \cdot c + \left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right)\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t_1 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;\left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\right) - \left(27 \cdot \left(j \cdot k\right) + \left(t \cdot a\right) \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < 1.99999999999999997e307Initial program 96.7%
if 1.99999999999999997e307 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 90.7%
Taylor expanded in x around 0 98.3%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) Initial program 0.0%
Simplified28.6%
Taylor expanded in i around 0 32.1%
Taylor expanded in j around 0 43.0%
Taylor expanded in b around 0 57.3%
Final simplification92.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 (* 27.0 (* j k))))
(if (or (<= x -6.5e-131) (not (<= x 1e-21)))
(-
(+ (* b c) (* x (- (* 18.0 (* t (* y z))) (* i 4.0))))
(+ t_1 (* (* t a) 4.0)))
(- (+ (* b c) (* -4.0 (* t a))) (+ t_1 (* 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 t_1 = 27.0 * (j * k);
double tmp;
if ((x <= -6.5e-131) || !(x <= 1e-21)) {
tmp = ((b * c) + (x * ((18.0 * (t * (y * z))) - (i * 4.0)))) - (t_1 + ((t * a) * 4.0));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - (t_1 + (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) :: t_1
real(8) :: tmp
t_1 = 27.0d0 * (j * k)
if ((x <= (-6.5d-131)) .or. (.not. (x <= 1d-21))) then
tmp = ((b * c) + (x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0)))) - (t_1 + ((t * a) * 4.0d0))
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (t_1 + (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 t_1 = 27.0 * (j * k);
double tmp;
if ((x <= -6.5e-131) || !(x <= 1e-21)) {
tmp = ((b * c) + (x * ((18.0 * (t * (y * z))) - (i * 4.0)))) - (t_1 + ((t * a) * 4.0));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - (t_1 + (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): t_1 = 27.0 * (j * k) tmp = 0 if (x <= -6.5e-131) or not (x <= 1e-21): tmp = ((b * c) + (x * ((18.0 * (t * (y * z))) - (i * 4.0)))) - (t_1 + ((t * a) * 4.0)) else: tmp = ((b * c) + (-4.0 * (t * a))) - (t_1 + (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) t_1 = Float64(27.0 * Float64(j * k)) tmp = 0.0 if ((x <= -6.5e-131) || !(x <= 1e-21)) tmp = Float64(Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0)))) - Float64(t_1 + Float64(Float64(t * a) * 4.0))); else tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(t_1 + 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)
t_1 = 27.0 * (j * k);
tmp = 0.0;
if ((x <= -6.5e-131) || ~((x <= 1e-21)))
tmp = ((b * c) + (x * ((18.0 * (t * (y * z))) - (i * 4.0)))) - (t_1 + ((t * a) * 4.0));
else
tmp = ((b * c) + (-4.0 * (t * a))) - (t_1 + (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_] := Block[{t$95$1 = N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x, -6.5e-131], N[Not[LessEqual[x, 1e-21]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 + N[(N[(t * a), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 + N[(4.0 * N[(x * i), $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 := 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;x \leq -6.5 \cdot 10^{-131} \lor \neg \left(x \leq 10^{-21}\right):\\
\;\;\;\;\left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\right) - \left(t_1 + \left(t \cdot a\right) \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(t_1 + 4 \cdot \left(x \cdot i\right)\right)\\
\end{array}
\end{array}
if x < -6.5000000000000002e-131 or 9.99999999999999908e-22 < x Initial program 77.6%
Taylor expanded in x around 0 88.3%
if -6.5000000000000002e-131 < x < 9.99999999999999908e-22Initial program 96.1%
Simplified88.5%
Taylor expanded in y around 0 94.2%
Final simplification90.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 (+ (* x (* i 4.0)) (* j (* k 27.0)))))
(if (<= z 1.48e+211)
(- (+ (* b c) (* t (- (* (* y z) (* x 18.0)) (* a 4.0)))) t_1)
(- (+ (* b c) (+ (* (* t z) (* y (* x 18.0))) (* t (* a -4.0)))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * (i * 4.0)) + (j * (k * 27.0));
double tmp;
if (z <= 1.48e+211) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - t_1;
} else {
tmp = ((b * c) + (((t * z) * (y * (x * 18.0))) + (t * (a * -4.0)))) - 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 <= 1.48d+211) then
tmp = ((b * c) + (t * (((y * z) * (x * 18.0d0)) - (a * 4.0d0)))) - t_1
else
tmp = ((b * c) + (((t * z) * (y * (x * 18.0d0))) + (t * (a * (-4.0d0))))) - 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 <= 1.48e+211) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - t_1;
} else {
tmp = ((b * c) + (((t * z) * (y * (x * 18.0))) + (t * (a * -4.0)))) - 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 <= 1.48e+211: tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - t_1 else: tmp = ((b * c) + (((t * z) * (y * (x * 18.0))) + (t * (a * -4.0)))) - 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 <= 1.48e+211) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(y * z) * Float64(x * 18.0)) - Float64(a * 4.0)))) - t_1); else tmp = Float64(Float64(Float64(b * c) + Float64(Float64(Float64(t * z) * Float64(y * Float64(x * 18.0))) + Float64(t * Float64(a * -4.0)))) - 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 <= 1.48e+211)
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - t_1;
else
tmp = ((b * c) + (((t * z) * (y * (x * 18.0))) + (t * (a * -4.0)))) - 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, 1.48e+211], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(N[(t * z), $MachinePrecision] * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\\
\mathbf{if}\;z \leq 1.48 \cdot 10^{+211}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + \left(\left(t \cdot z\right) \cdot \left(y \cdot \left(x \cdot 18\right)\right) + t \cdot \left(a \cdot -4\right)\right)\right) - t_1\\
\end{array}
\end{array}
if z < 1.47999999999999999e211Initial program 86.2%
Simplified88.7%
if 1.47999999999999999e211 < z Initial program 70.2%
Simplified56.1%
associate-*r*75.2%
distribute-rgt-out--70.2%
cancel-sign-sub-inv70.2%
associate-*l*71.0%
fma-def71.0%
associate-*l*71.0%
Applied egg-rr71.0%
fma-udef71.0%
associate-*r*71.0%
*-commutative71.0%
distribute-rgt-neg-in71.0%
metadata-eval71.0%
Applied egg-rr71.0%
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 (<= (* b c) -8e+32)
(* b c)
(if (<= (* b c) -7.5e-110)
(* -27.0 (* j k))
(if (<= (* b c) 4e-269)
(* i (* x -4.0))
(if (<= (* b c) 2.25e-116)
(* k (* j -27.0))
(if (<= (* b c) 9e+99) (* 18.0 (* t (* x (* y z)))) (* b c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -8e+32) {
tmp = b * c;
} else if ((b * c) <= -7.5e-110) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 4e-269) {
tmp = i * (x * -4.0);
} else if ((b * c) <= 2.25e-116) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 9e+99) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-8d+32)) then
tmp = b * c
else if ((b * c) <= (-7.5d-110)) then
tmp = (-27.0d0) * (j * k)
else if ((b * c) <= 4d-269) then
tmp = i * (x * (-4.0d0))
else if ((b * c) <= 2.25d-116) then
tmp = k * (j * (-27.0d0))
else if ((b * c) <= 9d+99) then
tmp = 18.0d0 * (t * (x * (y * z)))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -8e+32) {
tmp = b * c;
} else if ((b * c) <= -7.5e-110) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 4e-269) {
tmp = i * (x * -4.0);
} else if ((b * c) <= 2.25e-116) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 9e+99) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -8e+32: tmp = b * c elif (b * c) <= -7.5e-110: tmp = -27.0 * (j * k) elif (b * c) <= 4e-269: tmp = i * (x * -4.0) elif (b * c) <= 2.25e-116: tmp = k * (j * -27.0) elif (b * c) <= 9e+99: tmp = 18.0 * (t * (x * (y * z))) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -8e+32) tmp = Float64(b * c); elseif (Float64(b * c) <= -7.5e-110) tmp = Float64(-27.0 * Float64(j * k)); elseif (Float64(b * c) <= 4e-269) tmp = Float64(i * Float64(x * -4.0)); elseif (Float64(b * c) <= 2.25e-116) tmp = Float64(k * Float64(j * -27.0)); elseif (Float64(b * c) <= 9e+99) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -8e+32)
tmp = b * c;
elseif ((b * c) <= -7.5e-110)
tmp = -27.0 * (j * k);
elseif ((b * c) <= 4e-269)
tmp = i * (x * -4.0);
elseif ((b * c) <= 2.25e-116)
tmp = k * (j * -27.0);
elseif ((b * c) <= 9e+99)
tmp = 18.0 * (t * (x * (y * z)));
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -8e+32], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -7.5e-110], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4e-269], N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.25e-116], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 9e+99], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -8 \cdot 10^{+32}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -7.5 \cdot 10^{-110}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq 4 \cdot 10^{-269}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 2.25 \cdot 10^{-116}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 9 \cdot 10^{+99}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -8.00000000000000043e32 or 8.9999999999999999e99 < (*.f64 b c) Initial program 81.8%
Simplified82.9%
associate-*r*82.8%
distribute-rgt-out--81.8%
cancel-sign-sub-inv81.8%
associate-*l*80.5%
fma-def81.6%
associate-*l*81.6%
Applied egg-rr81.6%
Taylor expanded in b around inf 51.0%
if -8.00000000000000043e32 < (*.f64 b c) < -7.50000000000000053e-110Initial program 81.3%
Simplified87.5%
Taylor expanded in j around inf 36.4%
if -7.50000000000000053e-110 < (*.f64 b c) < 3.9999999999999998e-269Initial program 86.6%
Simplified85.1%
associate-*r*88.2%
distribute-rgt-out--86.5%
cancel-sign-sub-inv86.5%
associate-*l*86.6%
fma-def88.3%
associate-*l*88.3%
Applied egg-rr88.3%
Taylor expanded in i around inf 43.2%
associate-*r*43.2%
*-commutative43.2%
associate-*l*43.2%
Simplified43.2%
if 3.9999999999999998e-269 < (*.f64 b c) < 2.25000000000000006e-116Initial program 88.6%
Simplified92.4%
Taylor expanded in j around inf 43.8%
*-commutative43.8%
associate-*r*43.8%
*-commutative43.8%
Simplified43.8%
Taylor expanded in j around 0 43.8%
associate-*r*43.9%
Simplified43.9%
if 2.25000000000000006e-116 < (*.f64 b c) < 8.9999999999999999e99Initial program 90.3%
Taylor expanded in t around -inf 56.1%
associate-*r*56.1%
neg-mul-156.1%
cancel-sign-sub-inv56.1%
*-commutative56.1%
metadata-eval56.1%
*-commutative56.1%
Simplified56.1%
Taylor expanded in x around inf 39.4%
Final simplification44.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 (or (<= x -1.75e+112) (not (<= x 1.15e-14)))
(-
(+ (* b c) (* -27.0 (* j k)))
(* x (+ (* i 4.0) (* -18.0 (* t (* y z))))))
(- (+ (* b c) (* -4.0 (* t a))) (+ (* 27.0 (* j k)) (* 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 ((x <= -1.75e+112) || !(x <= 1.15e-14)) {
tmp = ((b * c) + (-27.0 * (j * k))) - (x * ((i * 4.0) + (-18.0 * (t * (y * z)))));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (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 ((x <= (-1.75d+112)) .or. (.not. (x <= 1.15d-14))) then
tmp = ((b * c) + ((-27.0d0) * (j * k))) - (x * ((i * 4.0d0) + ((-18.0d0) * (t * (y * z)))))
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((27.0d0 * (j * k)) + (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 ((x <= -1.75e+112) || !(x <= 1.15e-14)) {
tmp = ((b * c) + (-27.0 * (j * k))) - (x * ((i * 4.0) + (-18.0 * (t * (y * z)))));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (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 (x <= -1.75e+112) or not (x <= 1.15e-14): tmp = ((b * c) + (-27.0 * (j * k))) - (x * ((i * 4.0) + (-18.0 * (t * (y * z))))) else: tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (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 ((x <= -1.75e+112) || !(x <= 1.15e-14)) tmp = Float64(Float64(Float64(b * c) + Float64(-27.0 * Float64(j * k))) - Float64(x * Float64(Float64(i * 4.0) + Float64(-18.0 * Float64(t * Float64(y * z)))))); else tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(27.0 * Float64(j * k)) + 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 ((x <= -1.75e+112) || ~((x <= 1.15e-14)))
tmp = ((b * c) + (-27.0 * (j * k))) - (x * ((i * 4.0) + (-18.0 * (t * (y * z)))));
else
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (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[x, -1.75e+112], N[Not[LessEqual[x, 1.15e-14]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * N[(N[(i * 4.0), $MachinePrecision] + N[(-18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $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}\;x \leq -1.75 \cdot 10^{+112} \lor \neg \left(x \leq 1.15 \cdot 10^{-14}\right):\\
\;\;\;\;\left(b \cdot c + -27 \cdot \left(j \cdot k\right)\right) - x \cdot \left(i \cdot 4 + -18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\end{array}
\end{array}
if x < -1.74999999999999998e112 or 1.14999999999999999e-14 < x Initial program 74.1%
Simplified87.4%
Taylor expanded in x around -inf 89.1%
fma-def89.1%
+-commutative89.1%
mul-1-neg89.1%
metadata-eval89.1%
cancel-sign-sub-inv89.1%
unsub-neg89.1%
*-commutative89.1%
fma-neg89.1%
*-commutative89.1%
associate-*l*90.0%
distribute-lft-neg-in90.0%
metadata-eval90.0%
*-commutative90.0%
Simplified90.0%
Taylor expanded in a around 0 88.0%
if -1.74999999999999998e112 < x < 1.14999999999999999e-14Initial program 93.2%
Simplified87.2%
Taylor expanded in y around 0 87.8%
Final simplification87.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(t_2 (* j (* k -27.0)))
(t_3 (+ t_2 (* b c))))
(if (<= t -2.7e+27)
t_1
(if (<= t 5.8e-166)
t_3
(if (<= t 1.55e-104)
t_1
(if (<= t 2.4e-61)
t_3
(if (or (<= t 1e-21) (not (<= t 7.6e+120)))
t_1
(+ t_2 (* -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 t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (b * c);
double tmp;
if (t <= -2.7e+27) {
tmp = t_1;
} else if (t <= 5.8e-166) {
tmp = t_3;
} else if (t <= 1.55e-104) {
tmp = t_1;
} else if (t <= 2.4e-61) {
tmp = t_3;
} else if ((t <= 1e-21) || !(t <= 7.6e+120)) {
tmp = t_1;
} else {
tmp = t_2 + (-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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
t_2 = j * (k * (-27.0d0))
t_3 = t_2 + (b * c)
if (t <= (-2.7d+27)) then
tmp = t_1
else if (t <= 5.8d-166) then
tmp = t_3
else if (t <= 1.55d-104) then
tmp = t_1
else if (t <= 2.4d-61) then
tmp = t_3
else if ((t <= 1d-21) .or. (.not. (t <= 7.6d+120))) then
tmp = t_1
else
tmp = t_2 + ((-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 t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (b * c);
double tmp;
if (t <= -2.7e+27) {
tmp = t_1;
} else if (t <= 5.8e-166) {
tmp = t_3;
} else if (t <= 1.55e-104) {
tmp = t_1;
} else if (t <= 2.4e-61) {
tmp = t_3;
} else if ((t <= 1e-21) || !(t <= 7.6e+120)) {
tmp = t_1;
} else {
tmp = t_2 + (-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): t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) t_2 = j * (k * -27.0) t_3 = t_2 + (b * c) tmp = 0 if t <= -2.7e+27: tmp = t_1 elif t <= 5.8e-166: tmp = t_3 elif t <= 1.55e-104: tmp = t_1 elif t <= 2.4e-61: tmp = t_3 elif (t <= 1e-21) or not (t <= 7.6e+120): tmp = t_1 else: tmp = t_2 + (-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) t_1 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) t_2 = Float64(j * Float64(k * -27.0)) t_3 = Float64(t_2 + Float64(b * c)) tmp = 0.0 if (t <= -2.7e+27) tmp = t_1; elseif (t <= 5.8e-166) tmp = t_3; elseif (t <= 1.55e-104) tmp = t_1; elseif (t <= 2.4e-61) tmp = t_3; elseif ((t <= 1e-21) || !(t <= 7.6e+120)) tmp = t_1; else tmp = Float64(t_2 + 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)
t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
t_2 = j * (k * -27.0);
t_3 = t_2 + (b * c);
tmp = 0.0;
if (t <= -2.7e+27)
tmp = t_1;
elseif (t <= 5.8e-166)
tmp = t_3;
elseif (t <= 1.55e-104)
tmp = t_1;
elseif (t <= 2.4e-61)
tmp = t_3;
elseif ((t <= 1e-21) || ~((t <= 7.6e+120)))
tmp = t_1;
else
tmp = t_2 + (-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_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.7e+27], t$95$1, If[LessEqual[t, 5.8e-166], t$95$3, If[LessEqual[t, 1.55e-104], t$95$1, If[LessEqual[t, 2.4e-61], t$95$3, If[Or[LessEqual[t, 1e-21], N[Not[LessEqual[t, 7.6e+120]], $MachinePrecision]], t$95$1, N[(t$95$2 + 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}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
t_3 := t_2 + b \cdot c\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+27}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{-166}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-104}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{-61}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 10^{-21} \lor \neg \left(t \leq 7.6 \cdot 10^{+120}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2 + -4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if t < -2.6999999999999997e27 or 5.8e-166 < t < 1.54999999999999988e-104 or 2.4000000000000001e-61 < t < 9.99999999999999908e-22 or 7.5999999999999995e120 < t Initial program 79.5%
Simplified85.6%
Taylor expanded in i around 0 82.3%
Taylor expanded in j around 0 80.5%
Taylor expanded in b around 0 79.6%
if -2.6999999999999997e27 < t < 5.8e-166 or 1.54999999999999988e-104 < t < 2.4000000000000001e-61Initial program 89.9%
Simplified85.7%
Taylor expanded in b around inf 64.0%
if 9.99999999999999908e-22 < t < 7.5999999999999995e120Initial program 86.0%
Simplified89.7%
Taylor expanded in i around inf 55.1%
*-commutative55.1%
Simplified55.1%
Final simplification69.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -7.5e+35)
(+ (* b c) t_1)
(if (<= t 1.6e+121)
(- (+ (* b c) (* -4.0 (* t a))) (+ (* 27.0 (* j k)) (* 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 * (y * z))) - (a * 4.0));
double tmp;
if (t <= -7.5e+35) {
tmp = (b * c) + t_1;
} else if (t <= 1.6e+121) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (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 * (y * z))) - (a * 4.0d0))
if (t <= (-7.5d+35)) then
tmp = (b * c) + t_1
else if (t <= 1.6d+121) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((27.0d0 * (j * k)) + (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 * (y * z))) - (a * 4.0));
double tmp;
if (t <= -7.5e+35) {
tmp = (b * c) + t_1;
} else if (t <= 1.6e+121) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (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 * (y * z))) - (a * 4.0)) tmp = 0 if t <= -7.5e+35: tmp = (b * c) + t_1 elif t <= 1.6e+121: tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (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(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -7.5e+35) tmp = Float64(Float64(b * c) + t_1); elseif (t <= 1.6e+121) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(27.0 * Float64(j * k)) + 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 * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -7.5e+35)
tmp = (b * c) + t_1;
elseif (t <= 1.6e+121)
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (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[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.5e+35], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 1.6e+121], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -7.5 \cdot 10^{+35}:\\
\;\;\;\;b \cdot c + t_1\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+121}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -7.4999999999999999e35Initial program 82.9%
Simplified89.6%
Taylor expanded in i around 0 87.9%
Taylor expanded in j around 0 86.2%
if -7.4999999999999999e35 < t < 1.6e121Initial program 88.4%
Simplified86.6%
Taylor expanded in y around 0 89.6%
if 1.6e121 < t Initial program 73.4%
Simplified78.7%
Taylor expanded in i around 0 79.0%
Taylor expanded in j around 0 76.6%
Taylor expanded in b around 0 81.5%
Final simplification87.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 (- (* 18.0 (* x (* y z))) (* a 4.0))))
(t_2 (* 27.0 (* j k))))
(if (<= t -3.5e-9)
(- (+ (* b c) t_1) t_2)
(if (<= t 2e+121)
(- (+ (* b c) (* -4.0 (* t a))) (+ t_2 (* 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 * (y * z))) - (a * 4.0));
double t_2 = 27.0 * (j * k);
double tmp;
if (t <= -3.5e-9) {
tmp = ((b * c) + t_1) - t_2;
} else if (t <= 2e+121) {
tmp = ((b * c) + (-4.0 * (t * a))) - (t_2 + (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) :: t_2
real(8) :: tmp
t_1 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
t_2 = 27.0d0 * (j * k)
if (t <= (-3.5d-9)) then
tmp = ((b * c) + t_1) - t_2
else if (t <= 2d+121) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (t_2 + (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 * (y * z))) - (a * 4.0));
double t_2 = 27.0 * (j * k);
double tmp;
if (t <= -3.5e-9) {
tmp = ((b * c) + t_1) - t_2;
} else if (t <= 2e+121) {
tmp = ((b * c) + (-4.0 * (t * a))) - (t_2 + (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 * (y * z))) - (a * 4.0)) t_2 = 27.0 * (j * k) tmp = 0 if t <= -3.5e-9: tmp = ((b * c) + t_1) - t_2 elif t <= 2e+121: tmp = ((b * c) + (-4.0 * (t * a))) - (t_2 + (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(y * z))) - Float64(a * 4.0))) t_2 = Float64(27.0 * Float64(j * k)) tmp = 0.0 if (t <= -3.5e-9) tmp = Float64(Float64(Float64(b * c) + t_1) - t_2); elseif (t <= 2e+121) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(t_2 + 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 * (y * z))) - (a * 4.0));
t_2 = 27.0 * (j * k);
tmp = 0.0;
if (t <= -3.5e-9)
tmp = ((b * c) + t_1) - t_2;
elseif (t <= 2e+121)
tmp = ((b * c) + (-4.0 * (t * a))) - (t_2 + (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[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.5e-9], N[(N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[t, 2e+121], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
t_2 := 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;t \leq -3.5 \cdot 10^{-9}:\\
\;\;\;\;\left(b \cdot c + t_1\right) - t_2\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+121}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(t_2 + 4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -3.4999999999999999e-9Initial program 81.9%
Simplified89.4%
Taylor expanded in i around 0 87.9%
if -3.4999999999999999e-9 < t < 2.00000000000000007e121Initial program 89.1%
Simplified86.6%
Taylor expanded in y around 0 89.7%
if 2.00000000000000007e121 < t Initial program 73.4%
Simplified78.7%
Taylor expanded in i around 0 79.0%
Taylor expanded in j around 0 76.6%
Taylor expanded in b around 0 81.5%
Final simplification88.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -27.0 (* j k))))
(if (<= (* b c) -3.05e+32)
(* b c)
(if (<= (* b c) -5.5e-109)
t_1
(if (<= (* b c) 2.2e-285)
(* i (* x -4.0))
(if (<= (* b c) 1.95e+80) 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 = -27.0 * (j * k);
double tmp;
if ((b * c) <= -3.05e+32) {
tmp = b * c;
} else if ((b * c) <= -5.5e-109) {
tmp = t_1;
} else if ((b * c) <= 2.2e-285) {
tmp = i * (x * -4.0);
} else if ((b * c) <= 1.95e+80) {
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 = (-27.0d0) * (j * k)
if ((b * c) <= (-3.05d+32)) then
tmp = b * c
else if ((b * c) <= (-5.5d-109)) then
tmp = t_1
else if ((b * c) <= 2.2d-285) then
tmp = i * (x * (-4.0d0))
else if ((b * c) <= 1.95d+80) 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 = -27.0 * (j * k);
double tmp;
if ((b * c) <= -3.05e+32) {
tmp = b * c;
} else if ((b * c) <= -5.5e-109) {
tmp = t_1;
} else if ((b * c) <= 2.2e-285) {
tmp = i * (x * -4.0);
} else if ((b * c) <= 1.95e+80) {
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 = -27.0 * (j * k) tmp = 0 if (b * c) <= -3.05e+32: tmp = b * c elif (b * c) <= -5.5e-109: tmp = t_1 elif (b * c) <= 2.2e-285: tmp = i * (x * -4.0) elif (b * c) <= 1.95e+80: 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(-27.0 * Float64(j * k)) tmp = 0.0 if (Float64(b * c) <= -3.05e+32) tmp = Float64(b * c); elseif (Float64(b * c) <= -5.5e-109) tmp = t_1; elseif (Float64(b * c) <= 2.2e-285) tmp = Float64(i * Float64(x * -4.0)); elseif (Float64(b * c) <= 1.95e+80) 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 = -27.0 * (j * k);
tmp = 0.0;
if ((b * c) <= -3.05e+32)
tmp = b * c;
elseif ((b * c) <= -5.5e-109)
tmp = t_1;
elseif ((b * c) <= 2.2e-285)
tmp = i * (x * -4.0);
elseif ((b * c) <= 1.95e+80)
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[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -3.05e+32], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5.5e-109], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 2.2e-285], N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.95e+80], 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 := -27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;b \cdot c \leq -3.05 \cdot 10^{+32}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -5.5 \cdot 10^{-109}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq 2.2 \cdot 10^{-285}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 1.95 \cdot 10^{+80}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -3.05000000000000014e32 or 1.94999999999999999e80 < (*.f64 b c) Initial program 82.5%
Simplified83.5%
associate-*r*83.5%
distribute-rgt-out--82.5%
cancel-sign-sub-inv82.5%
associate-*l*81.3%
fma-def82.3%
associate-*l*82.3%
Applied egg-rr82.3%
Taylor expanded in b around inf 50.1%
if -3.05000000000000014e32 < (*.f64 b c) < -5.5000000000000003e-109 or 2.1999999999999999e-285 < (*.f64 b c) < 1.94999999999999999e80Initial program 86.4%
Simplified89.5%
Taylor expanded in j around inf 33.5%
if -5.5000000000000003e-109 < (*.f64 b c) < 2.1999999999999999e-285Initial program 86.6%
Simplified85.1%
associate-*r*88.2%
distribute-rgt-out--86.5%
cancel-sign-sub-inv86.5%
associate-*l*86.6%
fma-def88.3%
associate-*l*88.3%
Applied egg-rr88.3%
Taylor expanded in i around inf 43.2%
associate-*r*43.2%
*-commutative43.2%
associate-*l*43.2%
Simplified43.2%
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
(if (<= (* b c) -1.95e+33)
(* b c)
(if (<= (* b c) -1.75e-109)
(* -27.0 (* j k))
(if (<= (* b c) 1.2e-266)
(* i (* x -4.0))
(if (<= (* b c) 6.6e+80) (* k (* j -27.0)) (* b c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1.95e+33) {
tmp = b * c;
} else if ((b * c) <= -1.75e-109) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 1.2e-266) {
tmp = i * (x * -4.0);
} else if ((b * c) <= 6.6e+80) {
tmp = k * (j * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-1.95d+33)) then
tmp = b * c
else if ((b * c) <= (-1.75d-109)) then
tmp = (-27.0d0) * (j * k)
else if ((b * c) <= 1.2d-266) then
tmp = i * (x * (-4.0d0))
else if ((b * c) <= 6.6d+80) then
tmp = k * (j * (-27.0d0))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1.95e+33) {
tmp = b * c;
} else if ((b * c) <= -1.75e-109) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 1.2e-266) {
tmp = i * (x * -4.0);
} else if ((b * c) <= 6.6e+80) {
tmp = k * (j * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -1.95e+33: tmp = b * c elif (b * c) <= -1.75e-109: tmp = -27.0 * (j * k) elif (b * c) <= 1.2e-266: tmp = i * (x * -4.0) elif (b * c) <= 6.6e+80: tmp = k * (j * -27.0) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -1.95e+33) tmp = Float64(b * c); elseif (Float64(b * c) <= -1.75e-109) tmp = Float64(-27.0 * Float64(j * k)); elseif (Float64(b * c) <= 1.2e-266) tmp = Float64(i * Float64(x * -4.0)); elseif (Float64(b * c) <= 6.6e+80) tmp = Float64(k * Float64(j * -27.0)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -1.95e+33)
tmp = b * c;
elseif ((b * c) <= -1.75e-109)
tmp = -27.0 * (j * k);
elseif ((b * c) <= 1.2e-266)
tmp = i * (x * -4.0);
elseif ((b * c) <= 6.6e+80)
tmp = k * (j * -27.0);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -1.95e+33], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.75e-109], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.2e-266], N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 6.6e+80], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+33}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1.75 \cdot 10^{-109}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq 1.2 \cdot 10^{-266}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 6.6 \cdot 10^{+80}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.9500000000000001e33 or 6.59999999999999982e80 < (*.f64 b c) Initial program 82.5%
Simplified83.5%
associate-*r*83.5%
distribute-rgt-out--82.5%
cancel-sign-sub-inv82.5%
associate-*l*81.3%
fma-def82.3%
associate-*l*82.3%
Applied egg-rr82.3%
Taylor expanded in b around inf 50.1%
if -1.9500000000000001e33 < (*.f64 b c) < -1.75e-109Initial program 81.3%
Simplified87.5%
Taylor expanded in j around inf 36.4%
if -1.75e-109 < (*.f64 b c) < 1.2e-266Initial program 86.6%
Simplified85.1%
associate-*r*88.2%
distribute-rgt-out--86.5%
cancel-sign-sub-inv86.5%
associate-*l*86.6%
fma-def88.3%
associate-*l*88.3%
Applied egg-rr88.3%
Taylor expanded in i around inf 43.2%
associate-*r*43.2%
*-commutative43.2%
associate-*l*43.2%
Simplified43.2%
if 1.2e-266 < (*.f64 b c) < 6.59999999999999982e80Initial program 89.0%
Simplified90.5%
Taylor expanded in j around inf 32.0%
*-commutative32.0%
associate-*r*31.9%
*-commutative31.9%
Simplified31.9%
Taylor expanded in j around 0 32.0%
associate-*r*32.0%
Simplified32.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 (* j (* k -27.0))) (t_2 (+ t_1 (* b c))))
(if (<= (* b c) -2.9e+55)
t_2
(if (<= (* b c) 7.2e-30)
(+ t_1 (* -4.0 (* x i)))
(if (<= (* b c) 2.7e+46) (* 18.0 (* t (* x (* y z)))) t_2)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (b * c);
double tmp;
if ((b * c) <= -2.9e+55) {
tmp = t_2;
} else if ((b * c) <= 7.2e-30) {
tmp = t_1 + (-4.0 * (x * i));
} else if ((b * c) <= 2.7e+46) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = t_1 + (b * c)
if ((b * c) <= (-2.9d+55)) then
tmp = t_2
else if ((b * c) <= 7.2d-30) then
tmp = t_1 + ((-4.0d0) * (x * i))
else if ((b * c) <= 2.7d+46) then
tmp = 18.0d0 * (t * (x * (y * z)))
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (b * c);
double tmp;
if ((b * c) <= -2.9e+55) {
tmp = t_2;
} else if ((b * c) <= 7.2e-30) {
tmp = t_1 + (-4.0 * (x * i));
} else if ((b * c) <= 2.7e+46) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = t_1 + (b * c) tmp = 0 if (b * c) <= -2.9e+55: tmp = t_2 elif (b * c) <= 7.2e-30: tmp = t_1 + (-4.0 * (x * i)) elif (b * c) <= 2.7e+46: tmp = 18.0 * (t * (x * (y * z))) else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(t_1 + Float64(b * c)) tmp = 0.0 if (Float64(b * c) <= -2.9e+55) tmp = t_2; elseif (Float64(b * c) <= 7.2e-30) tmp = Float64(t_1 + Float64(-4.0 * Float64(x * i))); elseif (Float64(b * c) <= 2.7e+46) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = t_1 + (b * c);
tmp = 0.0;
if ((b * c) <= -2.9e+55)
tmp = t_2;
elseif ((b * c) <= 7.2e-30)
tmp = t_1 + (-4.0 * (x * i));
elseif ((b * c) <= 2.7e+46)
tmp = 18.0 * (t * (x * (y * z)));
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2.9e+55], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 7.2e-30], N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.7e+46], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t_1 + b \cdot c\\
\mathbf{if}\;b \cdot c \leq -2.9 \cdot 10^{+55}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq 7.2 \cdot 10^{-30}:\\
\;\;\;\;t_1 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq 2.7 \cdot 10^{+46}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 b c) < -2.8999999999999999e55 or 2.7000000000000002e46 < (*.f64 b c) Initial program 85.2%
Simplified84.4%
Taylor expanded in b around inf 58.0%
if -2.8999999999999999e55 < (*.f64 b c) < 7.2000000000000006e-30Initial program 84.9%
Simplified89.9%
Taylor expanded in i around inf 54.3%
*-commutative54.3%
Simplified54.3%
if 7.2000000000000006e-30 < (*.f64 b c) < 2.7000000000000002e46Initial program 83.7%
Taylor expanded in t around -inf 64.8%
associate-*r*64.8%
neg-mul-164.8%
cancel-sign-sub-inv64.8%
*-commutative64.8%
metadata-eval64.8%
*-commutative64.8%
Simplified64.8%
Taylor expanded in x around inf 54.0%
Final simplification55.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 (* 27.0 (* j k))))
(if (<= t -2.65e+32)
(* t (- (* a (- 4.0)) (* x (* y (* z -18.0)))))
(if (<= t -3.3e-62)
(- (+ (* b c) (* -4.0 (* t a))) t_1)
(if (<= t 7.6e+120)
(- (* b c) (+ t_1 (* 4.0 (* x i))))
(* t (- (* 18.0 (* x (* y z))) (* a 4.0))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double tmp;
if (t <= -2.65e+32) {
tmp = t * ((a * -4.0) - (x * (y * (z * -18.0))));
} else if (t <= -3.3e-62) {
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
} else if (t <= 7.6e+120) {
tmp = (b * c) - (t_1 + (4.0 * (x * i)));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 27.0d0 * (j * k)
if (t <= (-2.65d+32)) then
tmp = t * ((a * -4.0d0) - (x * (y * (z * (-18.0d0)))))
else if (t <= (-3.3d-62)) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - t_1
else if (t <= 7.6d+120) then
tmp = (b * c) - (t_1 + (4.0d0 * (x * i)))
else
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double tmp;
if (t <= -2.65e+32) {
tmp = t * ((a * -4.0) - (x * (y * (z * -18.0))));
} else if (t <= -3.3e-62) {
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
} else if (t <= 7.6e+120) {
tmp = (b * c) - (t_1 + (4.0 * (x * i)));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 27.0 * (j * k) tmp = 0 if t <= -2.65e+32: tmp = t * ((a * -4.0) - (x * (y * (z * -18.0)))) elif t <= -3.3e-62: tmp = ((b * c) + (-4.0 * (t * a))) - t_1 elif t <= 7.6e+120: tmp = (b * c) - (t_1 + (4.0 * (x * i))) else: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(27.0 * Float64(j * k)) tmp = 0.0 if (t <= -2.65e+32) tmp = Float64(t * Float64(Float64(a * Float64(-4.0)) - Float64(x * Float64(y * Float64(z * -18.0))))); elseif (t <= -3.3e-62) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - t_1); elseif (t <= 7.6e+120) tmp = Float64(Float64(b * c) - Float64(t_1 + Float64(4.0 * Float64(x * i)))); else tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 27.0 * (j * k);
tmp = 0.0;
if (t <= -2.65e+32)
tmp = t * ((a * -4.0) - (x * (y * (z * -18.0))));
elseif (t <= -3.3e-62)
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
elseif (t <= 7.6e+120)
tmp = (b * c) - (t_1 + (4.0 * (x * i)));
else
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.65e+32], N[(t * N[(N[(a * (-4.0)), $MachinePrecision] - N[(x * N[(y * N[(z * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.3e-62], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, 7.6e+120], N[(N[(b * c), $MachinePrecision] - N[(t$95$1 + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;t \leq -2.65 \cdot 10^{+32}:\\
\;\;\;\;t \cdot \left(a \cdot \left(-4\right) - x \cdot \left(y \cdot \left(z \cdot -18\right)\right)\right)\\
\mathbf{elif}\;t \leq -3.3 \cdot 10^{-62}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t_1\\
\mathbf{elif}\;t \leq 7.6 \cdot 10^{+120}:\\
\;\;\;\;b \cdot c - \left(t_1 + 4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -2.65e32Initial program 83.2%
Taylor expanded in t around -inf 81.4%
associate-*r*81.4%
neg-mul-181.4%
cancel-sign-sub-inv81.4%
*-commutative81.4%
metadata-eval81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in x around 0 81.4%
*-commutative81.4%
associate-*r*81.4%
associate-*l*81.4%
Simplified81.4%
if -2.65e32 < t < -3.30000000000000004e-62Initial program 87.5%
Simplified93.7%
Taylor expanded in x around 0 93.9%
if -3.30000000000000004e-62 < t < 7.5999999999999995e120Initial program 88.4%
Simplified85.7%
Taylor expanded in t around 0 81.5%
if 7.5999999999999995e120 < t Initial program 73.4%
Simplified78.7%
Taylor expanded in i around 0 79.0%
Taylor expanded in j around 0 76.6%
Taylor expanded in b around 0 81.5%
Final simplification82.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 (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(t_2 (* 27.0 (* j k))))
(if (<= t -6.4e+28)
(+ (* b c) t_1)
(if (<= t -5e-64)
(- (+ (* b c) (* -4.0 (* t a))) t_2)
(if (<= t 7.6e+120) (- (* b c) (+ t_2 (* 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 * (y * z))) - (a * 4.0));
double t_2 = 27.0 * (j * k);
double tmp;
if (t <= -6.4e+28) {
tmp = (b * c) + t_1;
} else if (t <= -5e-64) {
tmp = ((b * c) + (-4.0 * (t * a))) - t_2;
} else if (t <= 7.6e+120) {
tmp = (b * c) - (t_2 + (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) :: t_2
real(8) :: tmp
t_1 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
t_2 = 27.0d0 * (j * k)
if (t <= (-6.4d+28)) then
tmp = (b * c) + t_1
else if (t <= (-5d-64)) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - t_2
else if (t <= 7.6d+120) then
tmp = (b * c) - (t_2 + (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 * (y * z))) - (a * 4.0));
double t_2 = 27.0 * (j * k);
double tmp;
if (t <= -6.4e+28) {
tmp = (b * c) + t_1;
} else if (t <= -5e-64) {
tmp = ((b * c) + (-4.0 * (t * a))) - t_2;
} else if (t <= 7.6e+120) {
tmp = (b * c) - (t_2 + (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 * (y * z))) - (a * 4.0)) t_2 = 27.0 * (j * k) tmp = 0 if t <= -6.4e+28: tmp = (b * c) + t_1 elif t <= -5e-64: tmp = ((b * c) + (-4.0 * (t * a))) - t_2 elif t <= 7.6e+120: tmp = (b * c) - (t_2 + (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(y * z))) - Float64(a * 4.0))) t_2 = Float64(27.0 * Float64(j * k)) tmp = 0.0 if (t <= -6.4e+28) tmp = Float64(Float64(b * c) + t_1); elseif (t <= -5e-64) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - t_2); elseif (t <= 7.6e+120) tmp = Float64(Float64(b * c) - Float64(t_2 + 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 * (y * z))) - (a * 4.0));
t_2 = 27.0 * (j * k);
tmp = 0.0;
if (t <= -6.4e+28)
tmp = (b * c) + t_1;
elseif (t <= -5e-64)
tmp = ((b * c) + (-4.0 * (t * a))) - t_2;
elseif (t <= 7.6e+120)
tmp = (b * c) - (t_2 + (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[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.4e+28], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, -5e-64], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[t, 7.6e+120], N[(N[(b * c), $MachinePrecision] - N[(t$95$2 + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
t_2 := 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;t \leq -6.4 \cdot 10^{+28}:\\
\;\;\;\;b \cdot c + t_1\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-64}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t_2\\
\mathbf{elif}\;t \leq 7.6 \cdot 10^{+120}:\\
\;\;\;\;b \cdot c - \left(t_2 + 4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -6.4000000000000001e28Initial program 83.2%
Simplified89.8%
Taylor expanded in i around 0 88.1%
Taylor expanded in j around 0 86.4%
if -6.4000000000000001e28 < t < -5.00000000000000033e-64Initial program 87.5%
Simplified93.7%
Taylor expanded in x around 0 93.9%
if -5.00000000000000033e-64 < t < 7.5999999999999995e120Initial program 88.4%
Simplified85.7%
Taylor expanded in t around 0 81.5%
if 7.5999999999999995e120 < t Initial program 73.4%
Simplified78.7%
Taylor expanded in i around 0 79.0%
Taylor expanded in j around 0 76.6%
Taylor expanded in b around 0 81.5%
Final simplification83.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ t_1 (* t (* a -4.0)))))
(if (<= t -2.3e+127)
t_2
(if (<= t -7.5e+32)
(* (* x (* y z)) (* t 18.0))
(if (<= t 9.5e-302)
(+ t_1 (* b c))
(if (<= t 7.6e+120) (+ t_1 (* -4.0 (* x i))) t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (t * (a * -4.0));
double tmp;
if (t <= -2.3e+127) {
tmp = t_2;
} else if (t <= -7.5e+32) {
tmp = (x * (y * z)) * (t * 18.0);
} else if (t <= 9.5e-302) {
tmp = t_1 + (b * c);
} else if (t <= 7.6e+120) {
tmp = t_1 + (-4.0 * (x * i));
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = t_1 + (t * (a * (-4.0d0)))
if (t <= (-2.3d+127)) then
tmp = t_2
else if (t <= (-7.5d+32)) then
tmp = (x * (y * z)) * (t * 18.0d0)
else if (t <= 9.5d-302) then
tmp = t_1 + (b * c)
else if (t <= 7.6d+120) then
tmp = t_1 + ((-4.0d0) * (x * i))
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (t * (a * -4.0));
double tmp;
if (t <= -2.3e+127) {
tmp = t_2;
} else if (t <= -7.5e+32) {
tmp = (x * (y * z)) * (t * 18.0);
} else if (t <= 9.5e-302) {
tmp = t_1 + (b * c);
} else if (t <= 7.6e+120) {
tmp = t_1 + (-4.0 * (x * i));
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = t_1 + (t * (a * -4.0)) tmp = 0 if t <= -2.3e+127: tmp = t_2 elif t <= -7.5e+32: tmp = (x * (y * z)) * (t * 18.0) elif t <= 9.5e-302: tmp = t_1 + (b * c) elif t <= 7.6e+120: tmp = t_1 + (-4.0 * (x * i)) else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(t_1 + Float64(t * Float64(a * -4.0))) tmp = 0.0 if (t <= -2.3e+127) tmp = t_2; elseif (t <= -7.5e+32) tmp = Float64(Float64(x * Float64(y * z)) * Float64(t * 18.0)); elseif (t <= 9.5e-302) tmp = Float64(t_1 + Float64(b * c)); elseif (t <= 7.6e+120) tmp = Float64(t_1 + Float64(-4.0 * Float64(x * i))); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = t_1 + (t * (a * -4.0));
tmp = 0.0;
if (t <= -2.3e+127)
tmp = t_2;
elseif (t <= -7.5e+32)
tmp = (x * (y * z)) * (t * 18.0);
elseif (t <= 9.5e-302)
tmp = t_1 + (b * c);
elseif (t <= 7.6e+120)
tmp = t_1 + (-4.0 * (x * i));
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.3e+127], t$95$2, If[LessEqual[t, -7.5e+32], N[(N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] * N[(t * 18.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e-302], N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.6e+120], N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t_1 + t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;t \leq -2.3 \cdot 10^{+127}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -7.5 \cdot 10^{+32}:\\
\;\;\;\;\left(x \cdot \left(y \cdot z\right)\right) \cdot \left(t \cdot 18\right)\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-302}:\\
\;\;\;\;t_1 + b \cdot c\\
\mathbf{elif}\;t \leq 7.6 \cdot 10^{+120}:\\
\;\;\;\;t_1 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -2.3000000000000002e127 or 7.5999999999999995e120 < t Initial program 79.6%
Simplified88.5%
Taylor expanded in a around inf 59.0%
*-commutative59.0%
*-commutative59.0%
associate-*r*59.0%
*-commutative59.0%
Simplified59.0%
if -2.3000000000000002e127 < t < -7.49999999999999959e32Initial program 78.2%
Taylor expanded in t around -inf 75.5%
associate-*r*75.5%
neg-mul-175.5%
cancel-sign-sub-inv75.5%
*-commutative75.5%
metadata-eval75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in x around inf 64.7%
associate-*r*64.8%
Simplified64.8%
if -7.49999999999999959e32 < t < 9.49999999999999991e-302Initial program 87.3%
Simplified83.5%
Taylor expanded in b around inf 65.8%
if 9.49999999999999991e-302 < t < 7.5999999999999995e120Initial program 89.3%
Simplified89.4%
Taylor expanded in i around inf 54.5%
*-commutative54.5%
Simplified54.5%
Final simplification60.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 (- (* 18.0 (* t (* y z))) (* i 4.0)))))
(if (<= x -1150.0)
t_1
(if (<= x 6.5e-51)
(+ (* j (* k -27.0)) (* t (* a -4.0)))
(if (<= x 7.8e+113) (+ (* b c) (* 18.0 (* t (* x (* y z))))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
double tmp;
if (x <= -1150.0) {
tmp = t_1;
} else if (x <= 6.5e-51) {
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
} else if (x <= 7.8e+113) {
tmp = (b * c) + (18.0 * (t * (x * (y * z))));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
if (x <= (-1150.0d0)) then
tmp = t_1
else if (x <= 6.5d-51) then
tmp = (j * (k * (-27.0d0))) + (t * (a * (-4.0d0)))
else if (x <= 7.8d+113) then
tmp = (b * c) + (18.0d0 * (t * (x * (y * z))))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
double tmp;
if (x <= -1150.0) {
tmp = t_1;
} else if (x <= 6.5e-51) {
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
} else if (x <= 7.8e+113) {
tmp = (b * c) + (18.0 * (t * (x * (y * z))));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0)) tmp = 0 if x <= -1150.0: tmp = t_1 elif x <= 6.5e-51: tmp = (j * (k * -27.0)) + (t * (a * -4.0)) elif x <= 7.8e+113: tmp = (b * c) + (18.0 * (t * (x * (y * z)))) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))) tmp = 0.0 if (x <= -1150.0) tmp = t_1; elseif (x <= 6.5e-51) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(a * -4.0))); elseif (x <= 7.8e+113) tmp = Float64(Float64(b * c) + Float64(18.0 * Float64(t * Float64(x * Float64(y * z))))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
tmp = 0.0;
if (x <= -1150.0)
tmp = t_1;
elseif (x <= 6.5e-51)
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
elseif (x <= 7.8e+113)
tmp = (b * c) + (18.0 * (t * (x * (y * z))));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1150.0], t$95$1, If[LessEqual[x, 6.5e-51], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.8e+113], N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\mathbf{if}\;x \leq -1150:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-51}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{+113}:\\
\;\;\;\;b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -1150 or 7.80000000000000039e113 < x Initial program 72.3%
Simplified80.1%
Taylor expanded in x around inf 69.2%
if -1150 < x < 6.5000000000000003e-51Initial program 96.1%
Simplified89.3%
Taylor expanded in a around inf 64.2%
*-commutative64.2%
*-commutative64.2%
associate-*r*64.2%
*-commutative64.2%
Simplified64.2%
if 6.5000000000000003e-51 < x < 7.80000000000000039e113Initial program 79.3%
Simplified93.1%
Taylor expanded in i around 0 83.2%
Taylor expanded in j around 0 76.6%
Taylor expanded in a around 0 69.7%
Final simplification66.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -3.2e+34)
(* t (- (* a (- 4.0)) (* x (* y (* z -18.0)))))
(if (<= t 8.5e+120)
(- (* b c) (+ (* 27.0 (* j k)) (* 4.0 (* x i))))
(* t (- (* 18.0 (* x (* y z))) (* a 4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -3.2e+34) {
tmp = t * ((a * -4.0) - (x * (y * (z * -18.0))));
} else if (t <= 8.5e+120) {
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (t <= (-3.2d+34)) then
tmp = t * ((a * -4.0d0) - (x * (y * (z * (-18.0d0)))))
else if (t <= 8.5d+120) then
tmp = (b * c) - ((27.0d0 * (j * k)) + (4.0d0 * (x * i)))
else
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -3.2e+34) {
tmp = t * ((a * -4.0) - (x * (y * (z * -18.0))));
} else if (t <= 8.5e+120) {
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -3.2e+34: tmp = t * ((a * -4.0) - (x * (y * (z * -18.0)))) elif t <= 8.5e+120: tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i))) else: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -3.2e+34) tmp = Float64(t * Float64(Float64(a * Float64(-4.0)) - Float64(x * Float64(y * Float64(z * -18.0))))); elseif (t <= 8.5e+120) tmp = Float64(Float64(b * c) - Float64(Float64(27.0 * Float64(j * k)) + Float64(4.0 * Float64(x * i)))); else tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= -3.2e+34)
tmp = t * ((a * -4.0) - (x * (y * (z * -18.0))));
elseif (t <= 8.5e+120)
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
else
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -3.2e+34], N[(t * N[(N[(a * (-4.0)), $MachinePrecision] - N[(x * N[(y * N[(z * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.5e+120], N[(N[(b * c), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{+34}:\\
\;\;\;\;t \cdot \left(a \cdot \left(-4\right) - x \cdot \left(y \cdot \left(z \cdot -18\right)\right)\right)\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{+120}:\\
\;\;\;\;b \cdot c - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -3.1999999999999998e34Initial program 82.9%
Taylor expanded in t around -inf 81.1%
associate-*r*81.1%
neg-mul-181.1%
cancel-sign-sub-inv81.1%
*-commutative81.1%
metadata-eval81.1%
*-commutative81.1%
Simplified81.1%
Taylor expanded in x around 0 81.1%
*-commutative81.1%
associate-*r*81.1%
associate-*l*81.1%
Simplified81.1%
if -3.1999999999999998e34 < t < 8.50000000000000026e120Initial program 88.4%
Simplified86.6%
Taylor expanded in t around 0 79.2%
if 8.50000000000000026e120 < t Initial program 73.4%
Simplified78.7%
Taylor expanded in i around 0 79.0%
Taylor expanded in j around 0 76.6%
Taylor expanded in b around 0 81.5%
Final simplification80.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 (<= x -118.0) (not (<= x 3.5e-48))) (* x (- (* 18.0 (* t (* y z))) (* i 4.0))) (+ (* j (* k -27.0)) (* t (* a -4.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -118.0) || !(x <= 3.5e-48)) {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
} else {
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-118.0d0)) .or. (.not. (x <= 3.5d-48))) then
tmp = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
else
tmp = (j * (k * (-27.0d0))) + (t * (a * (-4.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -118.0) || !(x <= 3.5e-48)) {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
} else {
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -118.0) or not (x <= 3.5e-48): tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0)) else: tmp = (j * (k * -27.0)) + (t * (a * -4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -118.0) || !(x <= 3.5e-48)) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))); else tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(a * -4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -118.0) || ~((x <= 3.5e-48)))
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
else
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -118.0], N[Not[LessEqual[x, 3.5e-48]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -118 \lor \neg \left(x \leq 3.5 \cdot 10^{-48}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4\right)\\
\end{array}
\end{array}
if x < -118 or 3.49999999999999991e-48 < x Initial program 73.9%
Simplified83.0%
Taylor expanded in x around inf 64.8%
if -118 < x < 3.49999999999999991e-48Initial program 96.1%
Simplified89.3%
Taylor expanded in a around inf 64.2%
*-commutative64.2%
*-commutative64.2%
associate-*r*64.2%
*-commutative64.2%
Simplified64.2%
Final simplification64.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -4.5e+32) (not (<= (* b c) 2.1e+81))) (* 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) <= -4.5e+32) || !((b * c) <= 2.1e+81)) {
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) <= (-4.5d+32)) .or. (.not. ((b * c) <= 2.1d+81))) 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) <= -4.5e+32) || !((b * c) <= 2.1e+81)) {
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) <= -4.5e+32) or not ((b * c) <= 2.1e+81): 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) <= -4.5e+32) || !(Float64(b * c) <= 2.1e+81)) 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) <= -4.5e+32) || ~(((b * c) <= 2.1e+81)))
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], -4.5e+32], N[Not[LessEqual[N[(b * c), $MachinePrecision], 2.1e+81]], $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 -4.5 \cdot 10^{+32} \lor \neg \left(b \cdot c \leq 2.1 \cdot 10^{+81}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -4.5000000000000003e32 or 2.0999999999999999e81 < (*.f64 b c) Initial program 82.5%
Simplified83.5%
associate-*r*83.5%
distribute-rgt-out--82.5%
cancel-sign-sub-inv82.5%
associate-*l*81.3%
fma-def82.3%
associate-*l*82.3%
Applied egg-rr82.3%
Taylor expanded in b around inf 50.1%
if -4.5000000000000003e32 < (*.f64 b c) < 2.0999999999999999e81Initial program 86.5%
Simplified89.1%
Taylor expanded in j around inf 30.6%
Final simplification38.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 -2.4e+47) (* 18.0 (* t (* x (* y z)))) (if (<= x 1.8e+145) (+ (* j (* k -27.0)) (* b c)) (* i (* x -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.4e+47) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= 1.8e+145) {
tmp = (j * (k * -27.0)) + (b * c);
} else {
tmp = i * (x * -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.4d+47)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (x <= 1.8d+145) then
tmp = (j * (k * (-27.0d0))) + (b * c)
else
tmp = i * (x * (-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.4e+47) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= 1.8e+145) {
tmp = (j * (k * -27.0)) + (b * c);
} else {
tmp = i * (x * -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.4e+47: tmp = 18.0 * (t * (x * (y * z))) elif x <= 1.8e+145: tmp = (j * (k * -27.0)) + (b * c) else: tmp = i * (x * -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.4e+47) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (x <= 1.8e+145) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); else tmp = Float64(i * Float64(x * -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.4e+47)
tmp = 18.0 * (t * (x * (y * z)));
elseif (x <= 1.8e+145)
tmp = (j * (k * -27.0)) + (b * c);
else
tmp = i * (x * -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.4e+47], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.8e+145], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{+47}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{+145}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right)\\
\end{array}
\end{array}
if x < -2.40000000000000019e47Initial program 67.7%
Taylor expanded in t around -inf 58.3%
associate-*r*58.3%
neg-mul-158.3%
cancel-sign-sub-inv58.3%
*-commutative58.3%
metadata-eval58.3%
*-commutative58.3%
Simplified58.3%
Taylor expanded in x around inf 44.0%
if -2.40000000000000019e47 < x < 1.79999999999999987e145Initial program 92.9%
Simplified90.7%
Taylor expanded in b around inf 51.5%
if 1.79999999999999987e145 < x Initial program 73.1%
Simplified79.1%
associate-*r*73.1%
distribute-rgt-out--73.1%
cancel-sign-sub-inv73.1%
associate-*l*76.1%
fma-def76.1%
associate-*l*76.1%
Applied egg-rr76.1%
Taylor expanded in i around inf 58.1%
associate-*r*58.1%
*-commutative58.1%
associate-*l*58.1%
Simplified58.1%
Final simplification50.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 (* 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 84.9%
Simplified86.1%
associate-*r*86.4%
distribute-rgt-out--84.9%
cancel-sign-sub-inv84.9%
associate-*l*84.1%
fma-def84.8%
associate-*l*84.9%
Applied egg-rr84.9%
Taylor expanded in b around inf 22.9%
Final simplification22.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
(t_2
(-
(- (* (* 18.0 t) (* (* x y) z)) t_1)
(- (* (* k j) 27.0) (* c b)))))
(if (< t -1.6210815397541398e-69)
t_2
(if (< t 165.68027943805222)
(+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((a * t) + (i * x)) * 4.0d0
t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
if (t < (-1.6210815397541398d-69)) then
tmp = t_2
else if (t < 165.68027943805222d0) then
tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((a * t) + (i * x)) * 4.0 t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)) tmp = 0 if t < -1.6210815397541398e-69: tmp = t_2 elif t < 165.68027943805222: tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0) t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b))) tmp = 0.0 if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((a * t) + (i * x)) * 4.0; t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)); tmp = 0.0; if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
herbie shell --seed 2024013
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:herbie-target
(if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))