
(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 18 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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* x 4.0) i))
(t_2 (* (* j 27.0) k))
(t_3 (* t (* a 4.0)))
(t_4 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) t_3) (* b c)) t_1) t_2)))
(if (<= t_4 (- INFINITY))
(- (- (+ (* b c) (- (* y (* 18.0 (* z (* x t)))) t_3)) t_1) t_2)
(if (<= t_4 INFINITY)
t_4
(- (* t (* x (+ (* z (* 18.0 y)) (* -4.0 (/ i t))))) t_2)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 = (x * 4.0) * i;
double t_2 = (j * 27.0) * k;
double t_3 = t * (a * 4.0);
double t_4 = (((((((x * 18.0) * y) * z) * t) - t_3) + (b * c)) - t_1) - t_2;
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = (((b * c) + ((y * (18.0 * (z * (x * t)))) - t_3)) - t_1) - t_2;
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_4;
} else {
tmp = (t * (x * ((z * (18.0 * y)) + (-4.0 * (i / t))))) - t_2;
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * 4.0) * i;
double t_2 = (j * 27.0) * k;
double t_3 = t * (a * 4.0);
double t_4 = (((((((x * 18.0) * y) * z) * t) - t_3) + (b * c)) - t_1) - t_2;
double tmp;
if (t_4 <= -Double.POSITIVE_INFINITY) {
tmp = (((b * c) + ((y * (18.0 * (z * (x * t)))) - t_3)) - t_1) - t_2;
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = t_4;
} else {
tmp = (t * (x * ((z * (18.0 * y)) + (-4.0 * (i / t))))) - 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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (x * 4.0) * i t_2 = (j * 27.0) * k t_3 = t * (a * 4.0) t_4 = (((((((x * 18.0) * y) * z) * t) - t_3) + (b * c)) - t_1) - t_2 tmp = 0 if t_4 <= -math.inf: tmp = (((b * c) + ((y * (18.0 * (z * (x * t)))) - t_3)) - t_1) - t_2 elif t_4 <= math.inf: tmp = t_4 else: tmp = (t * (x * ((z * (18.0 * y)) + (-4.0 * (i / t))))) - 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]) 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 * 4.0) * i) t_2 = Float64(Float64(j * 27.0) * k) t_3 = Float64(t * Float64(a * 4.0)) t_4 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - t_3) + Float64(b * c)) - t_1) - t_2) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = Float64(Float64(Float64(Float64(b * c) + Float64(Float64(y * Float64(18.0 * Float64(z * Float64(x * t)))) - t_3)) - t_1) - t_2); elseif (t_4 <= Inf) tmp = t_4; else tmp = Float64(Float64(t * Float64(x * Float64(Float64(z * Float64(18.0 * y)) + Float64(-4.0 * Float64(i / t))))) - 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (x * 4.0) * i;
t_2 = (j * 27.0) * k;
t_3 = t * (a * 4.0);
t_4 = (((((((x * 18.0) * y) * z) * t) - t_3) + (b * c)) - t_1) - t_2;
tmp = 0.0;
if (t_4 <= -Inf)
tmp = (((b * c) + ((y * (18.0 * (z * (x * t)))) - t_3)) - t_1) - t_2;
elseif (t_4 <= Inf)
tmp = t_4;
else
tmp = (t * (x * ((z * (18.0 * y)) + (-4.0 * (i / t))))) - 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.
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 * 4.0), $MachinePrecision] * i), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - t$95$3), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(y * N[(18.0 * N[(z * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[t$95$4, Infinity], t$95$4, N[(N[(t * N[(x * N[(N[(z * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(i / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $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])\\\\
[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(x \cdot 4\right) \cdot i\\
t_2 := \left(j \cdot 27\right) \cdot k\\
t_3 := t \cdot \left(a \cdot 4\right)\\
t_4 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t\_3\right) + b \cdot c\right) - t\_1\right) - t\_2\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;\left(\left(b \cdot c + \left(y \cdot \left(18 \cdot \left(z \cdot \left(x \cdot t\right)\right)\right) - t\_3\right)\right) - t\_1\right) - t\_2\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(x \cdot \left(z \cdot \left(18 \cdot y\right) + -4 \cdot \frac{i}{t}\right)\right) - t\_2\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < -inf.0Initial program 90.2%
pow190.2%
associate-*l*90.0%
*-commutative90.0%
Applied egg-rr90.0%
unpow190.0%
associate-*l*96.9%
*-commutative96.9%
Simplified96.9%
Taylor expanded in x around 0 91.4%
associate-*r*97.0%
Simplified97.0%
if -inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 96.7%
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%
Taylor expanded in t around inf 29.4%
Taylor expanded in x around inf 68.1%
cancel-sign-sub-inv68.1%
metadata-eval68.1%
associate-*r*68.1%
Simplified68.1%
Final simplification93.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (+ (* 4.0 (* t a)) (* 27.0 (* j k)))))
(if (<= t -3.4e+114)
(* t (- (* 18.0 (* z (* x y))) (* a 4.0)))
(if (<= t -85000.0)
(- (* b c) t_1)
(if (<= t -4.4e-42)
(* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))
(if (<= t 0.22)
(- (- (* b c) (* 4.0 (* x i))) (* (* j 27.0) k))
(if (or (<= t 8.2e+75) (not (<= t 2.25e+197)))
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(* c (- b (/ t_1 c))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 = (4.0 * (t * a)) + (27.0 * (j * k));
double tmp;
if (t <= -3.4e+114) {
tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0));
} else if (t <= -85000.0) {
tmp = (b * c) - t_1;
} else if (t <= -4.4e-42) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else if (t <= 0.22) {
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
} else if ((t <= 8.2e+75) || !(t <= 2.25e+197)) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else {
tmp = c * (b - (t_1 / 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.
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 = (4.0d0 * (t * a)) + (27.0d0 * (j * k))
if (t <= (-3.4d+114)) then
tmp = t * ((18.0d0 * (z * (x * y))) - (a * 4.0d0))
else if (t <= (-85000.0d0)) then
tmp = (b * c) - t_1
else if (t <= (-4.4d-42)) then
tmp = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
else if (t <= 0.22d0) then
tmp = ((b * c) - (4.0d0 * (x * i))) - ((j * 27.0d0) * k)
else if ((t <= 8.2d+75) .or. (.not. (t <= 2.25d+197))) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else
tmp = c * (b - (t_1 / 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;
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 = (4.0 * (t * a)) + (27.0 * (j * k));
double tmp;
if (t <= -3.4e+114) {
tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0));
} else if (t <= -85000.0) {
tmp = (b * c) - t_1;
} else if (t <= -4.4e-42) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else if (t <= 0.22) {
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
} else if ((t <= 8.2e+75) || !(t <= 2.25e+197)) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else {
tmp = c * (b - (t_1 / c));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 = (4.0 * (t * a)) + (27.0 * (j * k)) tmp = 0 if t <= -3.4e+114: tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0)) elif t <= -85000.0: tmp = (b * c) - t_1 elif t <= -4.4e-42: tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)) elif t <= 0.22: tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k) elif (t <= 8.2e+75) or not (t <= 2.25e+197): tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) else: tmp = c * (b - (t_1 / c)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(4.0 * Float64(t * a)) + Float64(27.0 * Float64(j * k))) tmp = 0.0 if (t <= -3.4e+114) tmp = Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) - Float64(a * 4.0))); elseif (t <= -85000.0) tmp = Float64(Float64(b * c) - t_1); elseif (t <= -4.4e-42) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))); elseif (t <= 0.22) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(Float64(j * 27.0) * k)); elseif ((t <= 8.2e+75) || !(t <= 2.25e+197)) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); else tmp = Float64(c * Float64(b - Float64(t_1 / 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])){:}
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 = (4.0 * (t * a)) + (27.0 * (j * k));
tmp = 0.0;
if (t <= -3.4e+114)
tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0));
elseif (t <= -85000.0)
tmp = (b * c) - t_1;
elseif (t <= -4.4e-42)
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
elseif (t <= 0.22)
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
elseif ((t <= 8.2e+75) || ~((t <= 2.25e+197)))
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
else
tmp = c * (b - (t_1 / 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.
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[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.4e+114], N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -85000.0], N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, -4.4e-42], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.22], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 8.2e+75], N[Not[LessEqual[t, 2.25e+197]], $MachinePrecision]], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(b - N[(t$95$1 / c), $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])\\\\
[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 := 4 \cdot \left(t \cdot a\right) + 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;t \leq -3.4 \cdot 10^{+114}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq -85000:\\
\;\;\;\;b \cdot c - t\_1\\
\mathbf{elif}\;t \leq -4.4 \cdot 10^{-42}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{elif}\;t \leq 0.22:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{+75} \lor \neg \left(t \leq 2.25 \cdot 10^{+197}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(b - \frac{t\_1}{c}\right)\\
\end{array}
\end{array}
if t < -3.4000000000000001e114Initial program 77.6%
Simplified80.8%
Taylor expanded in t around inf 70.8%
pow170.8%
*-commutative70.8%
Applied egg-rr70.8%
unpow170.8%
*-commutative70.8%
associate-*r*73.2%
Simplified73.2%
if -3.4000000000000001e114 < t < -85000Initial program 83.9%
Taylor expanded in x around 0 70.9%
Taylor expanded in b around 0 75.1%
if -85000 < t < -4.4000000000000001e-42Initial program 80.5%
Simplified90.0%
Taylor expanded in x around inf 90.4%
cancel-sign-sub-inv90.4%
associate-*r*90.4%
metadata-eval90.4%
Applied egg-rr90.4%
if -4.4000000000000001e-42 < t < 0.220000000000000001Initial program 84.6%
Taylor expanded in t around 0 82.9%
if 0.220000000000000001 < t < 8.1999999999999997e75 or 2.2500000000000001e197 < t Initial program 70.7%
Simplified85.3%
Taylor expanded in t around inf 90.5%
if 8.1999999999999997e75 < t < 2.2500000000000001e197Initial program 95.7%
Taylor expanded in x around 0 68.2%
Taylor expanded in c around inf 68.3%
Final simplification80.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (+ (* 4.0 (* t a)) (* 27.0 (* j k))))))
(if (<= t -1.45e+113)
(* t (- (* 18.0 (* z (* x y))) (* a 4.0)))
(if (<= t -72000.0)
t_1
(if (<= t -6.2e-42)
(* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))
(if (<= t 0.21)
(- (- (* b c) (* 4.0 (* x i))) (* (* j 27.0) k))
(if (or (<= t 4.5e+79) (not (<= t 2.4e+197)))
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - ((4.0 * (t * a)) + (27.0 * (j * k)));
double tmp;
if (t <= -1.45e+113) {
tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0));
} else if (t <= -72000.0) {
tmp = t_1;
} else if (t <= -6.2e-42) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else if (t <= 0.21) {
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
} else if ((t <= 4.5e+79) || !(t <= 2.4e+197)) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) - ((4.0d0 * (t * a)) + (27.0d0 * (j * k)))
if (t <= (-1.45d+113)) then
tmp = t * ((18.0d0 * (z * (x * y))) - (a * 4.0d0))
else if (t <= (-72000.0d0)) then
tmp = t_1
else if (t <= (-6.2d-42)) then
tmp = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
else if (t <= 0.21d0) then
tmp = ((b * c) - (4.0d0 * (x * i))) - ((j * 27.0d0) * k)
else if ((t <= 4.5d+79) .or. (.not. (t <= 2.4d+197))) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - ((4.0 * (t * a)) + (27.0 * (j * k)));
double tmp;
if (t <= -1.45e+113) {
tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0));
} else if (t <= -72000.0) {
tmp = t_1;
} else if (t <= -6.2e-42) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else if (t <= 0.21) {
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
} else if ((t <= 4.5e+79) || !(t <= 2.4e+197)) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - ((4.0 * (t * a)) + (27.0 * (j * k))) tmp = 0 if t <= -1.45e+113: tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0)) elif t <= -72000.0: tmp = t_1 elif t <= -6.2e-42: tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)) elif t <= 0.21: tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k) elif (t <= 4.5e+79) or not (t <= 2.4e+197): tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + Float64(27.0 * Float64(j * k)))) tmp = 0.0 if (t <= -1.45e+113) tmp = Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) - Float64(a * 4.0))); elseif (t <= -72000.0) tmp = t_1; elseif (t <= -6.2e-42) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))); elseif (t <= 0.21) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(Float64(j * 27.0) * k)); elseif ((t <= 4.5e+79) || !(t <= 2.4e+197)) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - ((4.0 * (t * a)) + (27.0 * (j * k)));
tmp = 0.0;
if (t <= -1.45e+113)
tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0));
elseif (t <= -72000.0)
tmp = t_1;
elseif (t <= -6.2e-42)
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
elseif (t <= 0.21)
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
elseif ((t <= 4.5e+79) || ~((t <= 2.4e+197)))
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.45e+113], N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -72000.0], t$95$1, If[LessEqual[t, -6.2e-42], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.21], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 4.5e+79], N[Not[LessEqual[t, 2.4e+197]], $MachinePrecision]], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{if}\;t \leq -1.45 \cdot 10^{+113}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq -72000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -6.2 \cdot 10^{-42}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{elif}\;t \leq 0.21:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+79} \lor \neg \left(t \leq 2.4 \cdot 10^{+197}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.44999999999999992e113Initial program 77.6%
Simplified80.8%
Taylor expanded in t around inf 70.8%
pow170.8%
*-commutative70.8%
Applied egg-rr70.8%
unpow170.8%
*-commutative70.8%
associate-*r*73.2%
Simplified73.2%
if -1.44999999999999992e113 < t < -72000 or 4.49999999999999994e79 < t < 2.3999999999999999e197Initial program 89.8%
Taylor expanded in x around 0 69.5%
Taylor expanded in b around 0 71.7%
if -72000 < t < -6.2000000000000005e-42Initial program 80.5%
Simplified90.0%
Taylor expanded in x around inf 90.4%
cancel-sign-sub-inv90.4%
associate-*r*90.4%
metadata-eval90.4%
Applied egg-rr90.4%
if -6.2000000000000005e-42 < t < 0.209999999999999992Initial program 84.6%
Taylor expanded in t around 0 82.9%
if 0.209999999999999992 < t < 4.49999999999999994e79 or 2.3999999999999999e197 < t Initial program 70.7%
Simplified85.3%
Taylor expanded in t around inf 90.5%
Final simplification80.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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) (* 27.0 (* j k))))
(t_2 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -1.12e-29)
t_2
(if (<= t -4.2e-305)
t_1
(if (<= t 1.7e-218)
(- (* -4.0 (* x i)) (* (* j 27.0) k))
(if (<= t 3.3e-41)
t_1
(if (<= t 1.5e+84)
(* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))
(if (<= t 2.2e+194)
(+ (* (* j k) -27.0) (* -4.0 (* t a)))
t_2))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -1.12e-29) {
tmp = t_2;
} else if (t <= -4.2e-305) {
tmp = t_1;
} else if (t <= 1.7e-218) {
tmp = (-4.0 * (x * i)) - ((j * 27.0) * k);
} else if (t <= 3.3e-41) {
tmp = t_1;
} else if (t <= 1.5e+84) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else if (t <= 2.2e+194) {
tmp = ((j * k) * -27.0) + (-4.0 * (t * a));
} 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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) - (27.0d0 * (j * k))
t_2 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-1.12d-29)) then
tmp = t_2
else if (t <= (-4.2d-305)) then
tmp = t_1
else if (t <= 1.7d-218) then
tmp = ((-4.0d0) * (x * i)) - ((j * 27.0d0) * k)
else if (t <= 3.3d-41) then
tmp = t_1
else if (t <= 1.5d+84) then
tmp = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
else if (t <= 2.2d+194) then
tmp = ((j * k) * (-27.0d0)) + ((-4.0d0) * (t * a))
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;
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) - (27.0 * (j * k));
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -1.12e-29) {
tmp = t_2;
} else if (t <= -4.2e-305) {
tmp = t_1;
} else if (t <= 1.7e-218) {
tmp = (-4.0 * (x * i)) - ((j * 27.0) * k);
} else if (t <= 3.3e-41) {
tmp = t_1;
} else if (t <= 1.5e+84) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else if (t <= 2.2e+194) {
tmp = ((j * k) * -27.0) + (-4.0 * (t * a));
} 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]) [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) - (27.0 * (j * k)) t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -1.12e-29: tmp = t_2 elif t <= -4.2e-305: tmp = t_1 elif t <= 1.7e-218: tmp = (-4.0 * (x * i)) - ((j * 27.0) * k) elif t <= 3.3e-41: tmp = t_1 elif t <= 1.5e+84: tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)) elif t <= 2.2e+194: tmp = ((j * k) * -27.0) + (-4.0 * (t * a)) 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -1.12e-29) tmp = t_2; elseif (t <= -4.2e-305) tmp = t_1; elseif (t <= 1.7e-218) tmp = Float64(Float64(-4.0 * Float64(x * i)) - Float64(Float64(j * 27.0) * k)); elseif (t <= 3.3e-41) tmp = t_1; elseif (t <= 1.5e+84) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))); elseif (t <= 2.2e+194) tmp = Float64(Float64(Float64(j * k) * -27.0) + Float64(-4.0 * Float64(t * a))); 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])){:}
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) - (27.0 * (j * k));
t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -1.12e-29)
tmp = t_2;
elseif (t <= -4.2e-305)
tmp = t_1;
elseif (t <= 1.7e-218)
tmp = (-4.0 * (x * i)) - ((j * 27.0) * k);
elseif (t <= 3.3e-41)
tmp = t_1;
elseif (t <= 1.5e+84)
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
elseif (t <= 2.2e+194)
tmp = ((j * k) * -27.0) + (-4.0 * (t * a));
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.12e-29], t$95$2, If[LessEqual[t, -4.2e-305], t$95$1, If[LessEqual[t, 1.7e-218], N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e-41], t$95$1, If[LessEqual[t, 1.5e+84], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e+194], N[(N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision] + N[(-4.0 * N[(t * a), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1.12 \cdot 10^{-29}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -4.2 \cdot 10^{-305}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-218}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+84}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{+194}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.11999999999999995e-29 or 2.2000000000000001e194 < t Initial program 75.9%
Simplified84.4%
Taylor expanded in t around inf 71.6%
if -1.11999999999999995e-29 < t < -4.2e-305 or 1.69999999999999993e-218 < t < 3.30000000000000024e-41Initial program 85.5%
Taylor expanded in x around 0 68.6%
Taylor expanded in a around 0 65.8%
if -4.2e-305 < t < 1.69999999999999993e-218Initial program 76.5%
pow176.5%
associate-*l*86.0%
*-commutative86.0%
Applied egg-rr86.0%
unpow186.0%
associate-*l*94.9%
*-commutative94.9%
Simplified94.9%
Taylor expanded in i around inf 79.8%
if 3.30000000000000024e-41 < t < 1.49999999999999998e84Initial program 88.0%
Simplified92.0%
Taylor expanded in x around inf 76.8%
cancel-sign-sub-inv76.8%
associate-*r*73.1%
metadata-eval73.1%
Applied egg-rr73.1%
if 1.49999999999999998e84 < t < 2.2000000000000001e194Initial program 94.8%
Simplified99.9%
Taylor expanded in a around inf 66.5%
associate-*r*66.5%
*-commutative66.5%
Simplified66.5%
Taylor expanded in t around 0 66.5%
Final simplification69.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k))
(t_2 (- (* t (* x (+ (* z (* 18.0 y)) (* -4.0 (/ i t))))) t_1)))
(if (<= t -4.5e+94)
(* t (- (* 18.0 (* z (* x y))) (* a 4.0)))
(if (<= t -1.3e-67)
t_2
(if (<= t 9.5e-38)
(- (- (* b c) (* 4.0 (* x i))) t_1)
(if (<= t 1.95e+146)
t_2
(* 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);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = (t * (x * ((z * (18.0 * y)) + (-4.0 * (i / t))))) - t_1;
double tmp;
if (t <= -4.5e+94) {
tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0));
} else if (t <= -1.3e-67) {
tmp = t_2;
} else if (t <= 9.5e-38) {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
} else if (t <= 1.95e+146) {
tmp = t_2;
} 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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (j * 27.0d0) * k
t_2 = (t * (x * ((z * (18.0d0 * y)) + ((-4.0d0) * (i / t))))) - t_1
if (t <= (-4.5d+94)) then
tmp = t * ((18.0d0 * (z * (x * y))) - (a * 4.0d0))
else if (t <= (-1.3d-67)) then
tmp = t_2
else if (t <= 9.5d-38) then
tmp = ((b * c) - (4.0d0 * (x * i))) - t_1
else if (t <= 1.95d+146) then
tmp = t_2
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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = (t * (x * ((z * (18.0 * y)) + (-4.0 * (i / t))))) - t_1;
double tmp;
if (t <= -4.5e+94) {
tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0));
} else if (t <= -1.3e-67) {
tmp = t_2;
} else if (t <= 9.5e-38) {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
} else if (t <= 1.95e+146) {
tmp = t_2;
} 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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = (t * (x * ((z * (18.0 * y)) + (-4.0 * (i / t))))) - t_1 tmp = 0 if t <= -4.5e+94: tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0)) elif t <= -1.3e-67: tmp = t_2 elif t <= 9.5e-38: tmp = ((b * c) - (4.0 * (x * i))) - t_1 elif t <= 1.95e+146: tmp = t_2 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(Float64(t * Float64(x * Float64(Float64(z * Float64(18.0 * y)) + Float64(-4.0 * Float64(i / t))))) - t_1) tmp = 0.0 if (t <= -4.5e+94) tmp = Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) - Float64(a * 4.0))); elseif (t <= -1.3e-67) tmp = t_2; elseif (t <= 9.5e-38) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_1); elseif (t <= 1.95e+146) tmp = t_2; 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
t_2 = (t * (x * ((z * (18.0 * y)) + (-4.0 * (i / t))))) - t_1;
tmp = 0.0;
if (t <= -4.5e+94)
tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0));
elseif (t <= -1.3e-67)
tmp = t_2;
elseif (t <= 9.5e-38)
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
elseif (t <= 1.95e+146)
tmp = t_2;
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t * N[(x * N[(N[(z * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(i / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[t, -4.5e+94], N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.3e-67], t$95$2, If[LessEqual[t, 9.5e-38], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, 1.95e+146], t$95$2, 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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := t \cdot \left(x \cdot \left(z \cdot \left(18 \cdot y\right) + -4 \cdot \frac{i}{t}\right)\right) - t\_1\\
\mathbf{if}\;t \leq -4.5 \cdot 10^{+94}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq -1.3 \cdot 10^{-67}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-38}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t\_1\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+146}:\\
\;\;\;\;t\_2\\
\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 < -4.49999999999999972e94Initial program 79.8%
Simplified82.8%
Taylor expanded in t around inf 71.2%
pow171.2%
*-commutative71.2%
Applied egg-rr71.2%
unpow171.2%
*-commutative71.2%
associate-*r*73.5%
Simplified73.5%
if -4.49999999999999972e94 < t < -1.2999999999999999e-67 or 9.5000000000000009e-38 < t < 1.95e146Initial program 84.5%
Taylor expanded in t around inf 88.7%
Taylor expanded in x around inf 76.4%
cancel-sign-sub-inv76.4%
metadata-eval76.4%
associate-*r*76.5%
Simplified76.5%
if -1.2999999999999999e-67 < t < 9.5000000000000009e-38Initial program 84.1%
Taylor expanded in t around 0 84.0%
if 1.95e146 < t Initial program 74.2%
Simplified88.5%
Taylor expanded in t around inf 83.1%
Final simplification80.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (* a 4.0))))
(t_2 (- (* b c) (* 27.0 (* j k))))
(t_3 (* 18.0 (* t (* x (* y z))))))
(if (<= z -1.65e+118)
t_3
(if (<= z -1.3e-49)
t_2
(if (<= z -1.25e-91)
t_3
(if (<= z -2.8e-163)
t_1
(if (<= z 3.4e+115)
t_2
(if (<= z 5.6e+134) t_1 (* x (* 18.0 (* t (* y z))))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (t * (a * 4.0));
double t_2 = (b * c) - (27.0 * (j * k));
double t_3 = 18.0 * (t * (x * (y * z)));
double tmp;
if (z <= -1.65e+118) {
tmp = t_3;
} else if (z <= -1.3e-49) {
tmp = t_2;
} else if (z <= -1.25e-91) {
tmp = t_3;
} else if (z <= -2.8e-163) {
tmp = t_1;
} else if (z <= 3.4e+115) {
tmp = t_2;
} else if (z <= 5.6e+134) {
tmp = t_1;
} else {
tmp = x * (18.0 * (t * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = (b * c) - (t * (a * 4.0d0))
t_2 = (b * c) - (27.0d0 * (j * k))
t_3 = 18.0d0 * (t * (x * (y * z)))
if (z <= (-1.65d+118)) then
tmp = t_3
else if (z <= (-1.3d-49)) then
tmp = t_2
else if (z <= (-1.25d-91)) then
tmp = t_3
else if (z <= (-2.8d-163)) then
tmp = t_1
else if (z <= 3.4d+115) then
tmp = t_2
else if (z <= 5.6d+134) then
tmp = t_1
else
tmp = x * (18.0d0 * (t * (y * z)))
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;
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 * (a * 4.0));
double t_2 = (b * c) - (27.0 * (j * k));
double t_3 = 18.0 * (t * (x * (y * z)));
double tmp;
if (z <= -1.65e+118) {
tmp = t_3;
} else if (z <= -1.3e-49) {
tmp = t_2;
} else if (z <= -1.25e-91) {
tmp = t_3;
} else if (z <= -2.8e-163) {
tmp = t_1;
} else if (z <= 3.4e+115) {
tmp = t_2;
} else if (z <= 5.6e+134) {
tmp = t_1;
} else {
tmp = x * (18.0 * (t * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 * (a * 4.0)) t_2 = (b * c) - (27.0 * (j * k)) t_3 = 18.0 * (t * (x * (y * z))) tmp = 0 if z <= -1.65e+118: tmp = t_3 elif z <= -1.3e-49: tmp = t_2 elif z <= -1.25e-91: tmp = t_3 elif z <= -2.8e-163: tmp = t_1 elif z <= 3.4e+115: tmp = t_2 elif z <= 5.6e+134: tmp = t_1 else: tmp = x * (18.0 * (t * (y * z))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(t * Float64(a * 4.0))) t_2 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) t_3 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) tmp = 0.0 if (z <= -1.65e+118) tmp = t_3; elseif (z <= -1.3e-49) tmp = t_2; elseif (z <= -1.25e-91) tmp = t_3; elseif (z <= -2.8e-163) tmp = t_1; elseif (z <= 3.4e+115) tmp = t_2; elseif (z <= 5.6e+134) tmp = t_1; else tmp = Float64(x * Float64(18.0 * Float64(t * Float64(y * z)))); 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])){:}
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 * (a * 4.0));
t_2 = (b * c) - (27.0 * (j * k));
t_3 = 18.0 * (t * (x * (y * z)));
tmp = 0.0;
if (z <= -1.65e+118)
tmp = t_3;
elseif (z <= -1.3e-49)
tmp = t_2;
elseif (z <= -1.25e-91)
tmp = t_3;
elseif (z <= -2.8e-163)
tmp = t_1;
elseif (z <= 3.4e+115)
tmp = t_2;
elseif (z <= 5.6e+134)
tmp = t_1;
else
tmp = x * (18.0 * (t * (y * z)));
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.65e+118], t$95$3, If[LessEqual[z, -1.3e-49], t$95$2, If[LessEqual[z, -1.25e-91], t$95$3, If[LessEqual[z, -2.8e-163], t$95$1, If[LessEqual[z, 3.4e+115], t$95$2, If[LessEqual[z, 5.6e+134], t$95$1, N[(x * N[(18.0 * N[(t * N[(y * z), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - t \cdot \left(a \cdot 4\right)\\
t_2 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
t_3 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{+118}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-49}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{-91}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-163}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+115}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{+134}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if z < -1.65e118 or -1.29999999999999997e-49 < z < -1.24999999999999999e-91Initial program 83.3%
Simplified85.4%
Taylor expanded in x around inf 49.1%
Taylor expanded in t around inf 34.9%
associate-*r*30.8%
associate-*r*30.8%
associate-*r*30.8%
Simplified30.8%
Taylor expanded in x around 0 34.9%
*-commutative34.9%
Simplified34.9%
if -1.65e118 < z < -1.29999999999999997e-49 or -2.8e-163 < z < 3.4000000000000001e115Initial program 83.3%
Taylor expanded in x around 0 65.2%
Taylor expanded in a around 0 49.6%
if -1.24999999999999999e-91 < z < -2.8e-163 or 3.4000000000000001e115 < z < 5.5999999999999997e134Initial program 88.9%
Taylor expanded in x around 0 56.8%
Taylor expanded in b around 0 62.4%
Taylor expanded in a around inf 48.8%
associate-*r*48.8%
*-commutative48.8%
Simplified48.8%
if 5.5999999999999997e134 < z Initial program 74.1%
Simplified83.7%
Taylor expanded in x around inf 72.5%
Taylor expanded in t around inf 60.8%
Final simplification48.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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) (* -4.0 (* t a))))
(t_2 (- (* b c) (* t (* a 4.0)))))
(if (<= b -3.1e+122)
t_2
(if (<= b -9.5e-29)
t_1
(if (<= b -5.6e-51)
(* t (* z (* 18.0 (* x y))))
(if (<= b -1.2e-245)
t_1
(if (<= b 4e+37) (+ (* j (* k -27.0)) (* i (* x -4.0))) t_2)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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) + (-4.0 * (t * a));
double t_2 = (b * c) - (t * (a * 4.0));
double tmp;
if (b <= -3.1e+122) {
tmp = t_2;
} else if (b <= -9.5e-29) {
tmp = t_1;
} else if (b <= -5.6e-51) {
tmp = t * (z * (18.0 * (x * y)));
} else if (b <= -1.2e-245) {
tmp = t_1;
} else if (b <= 4e+37) {
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
} 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.
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)) + ((-4.0d0) * (t * a))
t_2 = (b * c) - (t * (a * 4.0d0))
if (b <= (-3.1d+122)) then
tmp = t_2
else if (b <= (-9.5d-29)) then
tmp = t_1
else if (b <= (-5.6d-51)) then
tmp = t * (z * (18.0d0 * (x * y)))
else if (b <= (-1.2d-245)) then
tmp = t_1
else if (b <= 4d+37) then
tmp = (j * (k * (-27.0d0))) + (i * (x * (-4.0d0)))
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;
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) + (-4.0 * (t * a));
double t_2 = (b * c) - (t * (a * 4.0));
double tmp;
if (b <= -3.1e+122) {
tmp = t_2;
} else if (b <= -9.5e-29) {
tmp = t_1;
} else if (b <= -5.6e-51) {
tmp = t * (z * (18.0 * (x * y)));
} else if (b <= -1.2e-245) {
tmp = t_1;
} else if (b <= 4e+37) {
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
} 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]) [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) + (-4.0 * (t * a)) t_2 = (b * c) - (t * (a * 4.0)) tmp = 0 if b <= -3.1e+122: tmp = t_2 elif b <= -9.5e-29: tmp = t_1 elif b <= -5.6e-51: tmp = t * (z * (18.0 * (x * y))) elif b <= -1.2e-245: tmp = t_1 elif b <= 4e+37: tmp = (j * (k * -27.0)) + (i * (x * -4.0)) 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]) 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(j * k) * -27.0) + Float64(-4.0 * Float64(t * a))) t_2 = Float64(Float64(b * c) - Float64(t * Float64(a * 4.0))) tmp = 0.0 if (b <= -3.1e+122) tmp = t_2; elseif (b <= -9.5e-29) tmp = t_1; elseif (b <= -5.6e-51) tmp = Float64(t * Float64(z * Float64(18.0 * Float64(x * y)))); elseif (b <= -1.2e-245) tmp = t_1; elseif (b <= 4e+37) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(i * Float64(x * -4.0))); 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])){:}
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) + (-4.0 * (t * a));
t_2 = (b * c) - (t * (a * 4.0));
tmp = 0.0;
if (b <= -3.1e+122)
tmp = t_2;
elseif (b <= -9.5e-29)
tmp = t_1;
elseif (b <= -5.6e-51)
tmp = t * (z * (18.0 * (x * y)));
elseif (b <= -1.2e-245)
tmp = t_1;
elseif (b <= 4e+37)
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
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.
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[(j * k), $MachinePrecision] * -27.0), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.1e+122], t$95$2, If[LessEqual[b, -9.5e-29], t$95$1, If[LessEqual[b, -5.6e-51], N[(t * N[(z * N[(18.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.2e-245], t$95$1, If[LessEqual[b, 4e+37], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(i * N[(x * -4.0), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot k\right) \cdot -27 + -4 \cdot \left(t \cdot a\right)\\
t_2 := b \cdot c - t \cdot \left(a \cdot 4\right)\\
\mathbf{if}\;b \leq -3.1 \cdot 10^{+122}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -9.5 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -5.6 \cdot 10^{-51}:\\
\;\;\;\;t \cdot \left(z \cdot \left(18 \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{elif}\;b \leq -1.2 \cdot 10^{-245}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4 \cdot 10^{+37}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + i \cdot \left(x \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -3.09999999999999999e122 or 3.99999999999999982e37 < b Initial program 78.1%
Taylor expanded in x around 0 59.1%
Taylor expanded in b around 0 59.2%
Taylor expanded in a around inf 45.0%
associate-*r*45.0%
*-commutative45.0%
Simplified45.0%
if -3.09999999999999999e122 < b < -9.50000000000000023e-29 or -5.6e-51 < b < -1.2e-245Initial program 85.9%
Simplified90.8%
Taylor expanded in a around inf 47.5%
associate-*r*47.5%
*-commutative47.5%
Simplified47.5%
Taylor expanded in t around 0 47.6%
if -9.50000000000000023e-29 < b < -5.6e-51Initial program 100.0%
Simplified100.0%
Taylor expanded in x around inf 75.0%
Taylor expanded in t around inf 50.9%
associate-*r*51.4%
associate-*r*51.4%
associate-*r*51.4%
Simplified51.4%
Taylor expanded in x around 0 50.9%
associate-*r*50.9%
*-commutative50.9%
associate-*r*50.9%
associate-*r*50.9%
associate-*r*51.4%
*-commutative51.4%
associate-*l*51.4%
*-commutative51.4%
Simplified51.4%
if -1.2e-245 < b < 3.99999999999999982e37Initial program 82.7%
Simplified87.5%
Taylor expanded in i around inf 57.9%
associate-*r*57.9%
*-commutative57.9%
associate-*r*57.9%
*-commutative57.9%
*-commutative57.9%
Simplified57.9%
Final simplification49.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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) (- INFINITY))
(* c (- b (/ (+ (* 4.0 (* t a)) (* 27.0 (* j k))) c)))
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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) <= -((double) INFINITY)) {
tmp = c * (b - (((4.0 * (t * a)) + (27.0 * (j * k))) / c));
} else {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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) <= -Double.POSITIVE_INFINITY) {
tmp = c * (b - (((4.0 * (t * a)) + (27.0 * (j * k))) / c));
} else {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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) <= -math.inf: tmp = c * (b - (((4.0 * (t * a)) + (27.0 * (j * k))) / c)) else: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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) <= Float64(-Inf)) tmp = Float64(c * Float64(b - Float64(Float64(Float64(4.0 * Float64(t * a)) + Float64(27.0 * Float64(j * k))) / c))); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); 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])){:}
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) <= -Inf)
tmp = c * (b - (((4.0 * (t * a)) + (27.0 * (j * k))) / c));
else
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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], (-Infinity)], N[(c * N[(b - N[(N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\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])\\\\
[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 -\infty:\\
\;\;\;\;c \cdot \left(b - \frac{4 \cdot \left(t \cdot a\right) + 27 \cdot \left(j \cdot k\right)}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -inf.0Initial program 62.5%
Taylor expanded in x around 0 66.7%
Taylor expanded in c around inf 87.5%
if -inf.0 < (*.f64 b c) Initial program 84.2%
Simplified88.5%
Final simplification88.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (* 18.0 (* t (* x (* y z))))))
(if (<= z -6.8e-88)
t_2
(if (<= z -7.6e-201)
(* -4.0 (* t a))
(if (<= z 9e-103)
t_1
(if (<= z 2.5e-22) (* x (* i -4.0)) (if (<= z 2.7e+102) t_1 t_2)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if (z <= -6.8e-88) {
tmp = t_2;
} else if (z <= -7.6e-201) {
tmp = -4.0 * (t * a);
} else if (z <= 9e-103) {
tmp = t_1;
} else if (z <= 2.5e-22) {
tmp = x * (i * -4.0);
} else if (z <= 2.7e+102) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = 18.0d0 * (t * (x * (y * z)))
if (z <= (-6.8d-88)) then
tmp = t_2
else if (z <= (-7.6d-201)) then
tmp = (-4.0d0) * (t * a)
else if (z <= 9d-103) then
tmp = t_1
else if (z <= 2.5d-22) then
tmp = x * (i * (-4.0d0))
else if (z <= 2.7d+102) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = 18.0 * (t * (x * (y * z)));
double tmp;
if (z <= -6.8e-88) {
tmp = t_2;
} else if (z <= -7.6e-201) {
tmp = -4.0 * (t * a);
} else if (z <= 9e-103) {
tmp = t_1;
} else if (z <= 2.5e-22) {
tmp = x * (i * -4.0);
} else if (z <= 2.7e+102) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 = 18.0 * (t * (x * (y * z))) tmp = 0 if z <= -6.8e-88: tmp = t_2 elif z <= -7.6e-201: tmp = -4.0 * (t * a) elif z <= 9e-103: tmp = t_1 elif z <= 2.5e-22: tmp = x * (i * -4.0) elif z <= 2.7e+102: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * k) * -27.0) t_2 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) tmp = 0.0 if (z <= -6.8e-88) tmp = t_2; elseif (z <= -7.6e-201) tmp = Float64(-4.0 * Float64(t * a)); elseif (z <= 9e-103) tmp = t_1; elseif (z <= 2.5e-22) tmp = Float64(x * Float64(i * -4.0)); elseif (z <= 2.7e+102) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 = 18.0 * (t * (x * (y * z)));
tmp = 0.0;
if (z <= -6.8e-88)
tmp = t_2;
elseif (z <= -7.6e-201)
tmp = -4.0 * (t * a);
elseif (z <= 9e-103)
tmp = t_1;
elseif (z <= 2.5e-22)
tmp = x * (i * -4.0);
elseif (z <= 2.7e+102)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.8e-88], t$95$2, If[LessEqual[z, -7.6e-201], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e-103], t$95$1, If[LessEqual[z, 2.5e-22], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e+102], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot k\right) \cdot -27\\
t_2 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;z \leq -6.8 \cdot 10^{-88}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -7.6 \cdot 10^{-201}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-103}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-22}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+102}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -6.79999999999999949e-88 or 2.7000000000000001e102 < z Initial program 79.5%
Simplified84.5%
Taylor expanded in x around inf 51.3%
Taylor expanded in t around inf 38.0%
associate-*r*35.3%
associate-*r*35.3%
associate-*r*35.3%
Simplified35.3%
Taylor expanded in x around 0 36.7%
*-commutative36.7%
Simplified36.7%
if -6.79999999999999949e-88 < z < -7.6000000000000001e-201Initial program 87.5%
Taylor expanded in x around 0 51.1%
Taylor expanded in b around 0 57.4%
Taylor expanded in a around inf 27.3%
*-commutative27.3%
Simplified27.3%
if -7.6000000000000001e-201 < z < 9e-103 or 2.49999999999999977e-22 < z < 2.7000000000000001e102Initial program 86.3%
Simplified90.8%
Taylor expanded in j around inf 41.8%
if 9e-103 < z < 2.49999999999999977e-22Initial program 77.3%
Simplified77.7%
Taylor expanded in x around inf 47.8%
Taylor expanded in t around 0 25.1%
*-commutative25.1%
Simplified25.1%
Final simplification37.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (<= z -3.5e-87)
(* 18.0 (* t (* x (* y z))))
(if (<= z -7e-201)
(* -4.0 (* t a))
(if (<= z 1.02e-106)
t_1
(if (<= z 2.2e-22)
(* x (* i -4.0))
(if (<= z 1.6e+102) t_1 (* x (* 18.0 (* t (* y z)))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 (z <= -3.5e-87) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (z <= -7e-201) {
tmp = -4.0 * (t * a);
} else if (z <= 1.02e-106) {
tmp = t_1;
} else if (z <= 2.2e-22) {
tmp = x * (i * -4.0);
} else if (z <= 1.6e+102) {
tmp = t_1;
} else {
tmp = x * (18.0 * (t * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * k) * (-27.0d0)
if (z <= (-3.5d-87)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (z <= (-7d-201)) then
tmp = (-4.0d0) * (t * a)
else if (z <= 1.02d-106) then
tmp = t_1
else if (z <= 2.2d-22) then
tmp = x * (i * (-4.0d0))
else if (z <= 1.6d+102) then
tmp = t_1
else
tmp = x * (18.0d0 * (t * (y * z)))
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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * k) * -27.0;
double tmp;
if (z <= -3.5e-87) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (z <= -7e-201) {
tmp = -4.0 * (t * a);
} else if (z <= 1.02e-106) {
tmp = t_1;
} else if (z <= 2.2e-22) {
tmp = x * (i * -4.0);
} else if (z <= 1.6e+102) {
tmp = t_1;
} else {
tmp = x * (18.0 * (t * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * k) * -27.0 tmp = 0 if z <= -3.5e-87: tmp = 18.0 * (t * (x * (y * z))) elif z <= -7e-201: tmp = -4.0 * (t * a) elif z <= 1.02e-106: tmp = t_1 elif z <= 2.2e-22: tmp = x * (i * -4.0) elif z <= 1.6e+102: tmp = t_1 else: tmp = x * (18.0 * (t * (y * z))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * k) * -27.0) tmp = 0.0 if (z <= -3.5e-87) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (z <= -7e-201) tmp = Float64(-4.0 * Float64(t * a)); elseif (z <= 1.02e-106) tmp = t_1; elseif (z <= 2.2e-22) tmp = Float64(x * Float64(i * -4.0)); elseif (z <= 1.6e+102) tmp = t_1; else tmp = Float64(x * Float64(18.0 * Float64(t * Float64(y * z)))); 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * k) * -27.0;
tmp = 0.0;
if (z <= -3.5e-87)
tmp = 18.0 * (t * (x * (y * z)));
elseif (z <= -7e-201)
tmp = -4.0 * (t * a);
elseif (z <= 1.02e-106)
tmp = t_1;
elseif (z <= 2.2e-22)
tmp = x * (i * -4.0);
elseif (z <= 1.6e+102)
tmp = t_1;
else
tmp = x * (18.0 * (t * (y * z)));
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]}, If[LessEqual[z, -3.5e-87], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7e-201], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e-106], t$95$1, If[LessEqual[z, 2.2e-22], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+102], t$95$1, N[(x * N[(18.0 * N[(t * N[(y * z), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot k\right) \cdot -27\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{-87}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-201}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{-106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-22}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+102}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if z < -3.50000000000000012e-87Initial program 80.8%
Simplified85.3%
Taylor expanded in x around inf 43.4%
Taylor expanded in t around inf 29.0%
associate-*r*27.9%
associate-*r*27.8%
associate-*r*27.9%
Simplified27.9%
Taylor expanded in x around 0 26.9%
*-commutative26.9%
Simplified26.9%
if -3.50000000000000012e-87 < z < -7.00000000000000016e-201Initial program 88.2%
Taylor expanded in x around 0 54.0%
Taylor expanded in b around 0 59.9%
Taylor expanded in a around inf 26.1%
*-commutative26.1%
Simplified26.1%
if -7.00000000000000016e-201 < z < 1.02e-106 or 2.2000000000000001e-22 < z < 1.6e102Initial program 86.1%
Simplified90.7%
Taylor expanded in j around inf 42.3%
if 1.02e-106 < z < 2.2000000000000001e-22Initial program 78.9%
Simplified79.3%
Taylor expanded in x around inf 44.6%
Taylor expanded in t around 0 23.4%
*-commutative23.4%
Simplified23.4%
if 1.6e102 < z Initial program 76.7%
Simplified82.8%
Taylor expanded in x around inf 66.0%
Taylor expanded in t around inf 54.4%
Final simplification37.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* j (* k -27.0)))) (t_2 (* 18.0 (* t (* x (* y z))))))
(if (<= z -1.16e+112)
t_2
(if (<= z -1.3e-49)
t_1
(if (<= z -6.5e-89)
t_2
(if (<= z -3e-200)
(* -4.0 (* t a))
(if (<= z 3.2e+133) t_1 (* x (* 18.0 (* t (* y z)))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if (z <= -1.16e+112) {
tmp = t_2;
} else if (z <= -1.3e-49) {
tmp = t_1;
} else if (z <= -6.5e-89) {
tmp = t_2;
} else if (z <= -3e-200) {
tmp = -4.0 * (t * a);
} else if (z <= 3.2e+133) {
tmp = t_1;
} else {
tmp = x * (18.0 * (t * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) + (j * (k * (-27.0d0)))
t_2 = 18.0d0 * (t * (x * (y * z)))
if (z <= (-1.16d+112)) then
tmp = t_2
else if (z <= (-1.3d-49)) then
tmp = t_1
else if (z <= (-6.5d-89)) then
tmp = t_2
else if (z <= (-3d-200)) then
tmp = (-4.0d0) * (t * a)
else if (z <= 3.2d+133) then
tmp = t_1
else
tmp = x * (18.0d0 * (t * (y * z)))
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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if (z <= -1.16e+112) {
tmp = t_2;
} else if (z <= -1.3e-49) {
tmp = t_1;
} else if (z <= -6.5e-89) {
tmp = t_2;
} else if (z <= -3e-200) {
tmp = -4.0 * (t * a);
} else if (z <= 3.2e+133) {
tmp = t_1;
} else {
tmp = x * (18.0 * (t * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (j * (k * -27.0)) t_2 = 18.0 * (t * (x * (y * z))) tmp = 0 if z <= -1.16e+112: tmp = t_2 elif z <= -1.3e-49: tmp = t_1 elif z <= -6.5e-89: tmp = t_2 elif z <= -3e-200: tmp = -4.0 * (t * a) elif z <= 3.2e+133: tmp = t_1 else: tmp = x * (18.0 * (t * (y * z))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))) t_2 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) tmp = 0.0 if (z <= -1.16e+112) tmp = t_2; elseif (z <= -1.3e-49) tmp = t_1; elseif (z <= -6.5e-89) tmp = t_2; elseif (z <= -3e-200) tmp = Float64(-4.0 * Float64(t * a)); elseif (z <= 3.2e+133) tmp = t_1; else tmp = Float64(x * Float64(18.0 * Float64(t * Float64(y * z)))); 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (j * (k * -27.0));
t_2 = 18.0 * (t * (x * (y * z)));
tmp = 0.0;
if (z <= -1.16e+112)
tmp = t_2;
elseif (z <= -1.3e-49)
tmp = t_1;
elseif (z <= -6.5e-89)
tmp = t_2;
elseif (z <= -3e-200)
tmp = -4.0 * (t * a);
elseif (z <= 3.2e+133)
tmp = t_1;
else
tmp = x * (18.0 * (t * (y * z)));
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.16e+112], t$95$2, If[LessEqual[z, -1.3e-49], t$95$1, If[LessEqual[z, -6.5e-89], t$95$2, If[LessEqual[z, -3e-200], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e+133], t$95$1, N[(x * N[(18.0 * N[(t * N[(y * z), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + j \cdot \left(k \cdot -27\right)\\
t_2 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;z \leq -1.16 \cdot 10^{+112}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{-89}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-200}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if z < -1.16e112 or -1.29999999999999997e-49 < z < -6.50000000000000034e-89Initial program 83.6%
Simplified85.7%
Taylor expanded in x around inf 50.1%
Taylor expanded in t around inf 36.2%
associate-*r*32.2%
associate-*r*32.2%
associate-*r*32.2%
Simplified32.2%
Taylor expanded in x around 0 36.2%
*-commutative36.2%
Simplified36.2%
if -1.16e112 < z < -1.29999999999999997e-49 or -2.99999999999999995e-200 < z < 3.19999999999999997e133Initial program 83.3%
Simplified87.3%
Taylor expanded in b around inf 48.3%
if -6.50000000000000034e-89 < z < -2.99999999999999995e-200Initial program 87.5%
Taylor expanded in x around 0 51.1%
Taylor expanded in b around 0 57.4%
Taylor expanded in a around inf 27.3%
*-commutative27.3%
Simplified27.3%
if 3.19999999999999997e133 < z Initial program 74.7%
Simplified84.1%
Taylor expanded in x around inf 70.9%
Taylor expanded in t around inf 59.4%
Final simplification46.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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) (* 27.0 (* j k)))) (t_2 (* 18.0 (* t (* x (* y z))))))
(if (<= z -1.25e+117)
t_2
(if (<= z -3.5e-49)
t_1
(if (<= z -2e-91)
t_2
(if (<= z -1.15e-200)
(* -4.0 (* t a))
(if (<= z 2.05e+133) t_1 (* x (* 18.0 (* t (* y z)))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if (z <= -1.25e+117) {
tmp = t_2;
} else if (z <= -3.5e-49) {
tmp = t_1;
} else if (z <= -2e-91) {
tmp = t_2;
} else if (z <= -1.15e-200) {
tmp = -4.0 * (t * a);
} else if (z <= 2.05e+133) {
tmp = t_1;
} else {
tmp = x * (18.0 * (t * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) - (27.0d0 * (j * k))
t_2 = 18.0d0 * (t * (x * (y * z)))
if (z <= (-1.25d+117)) then
tmp = t_2
else if (z <= (-3.5d-49)) then
tmp = t_1
else if (z <= (-2d-91)) then
tmp = t_2
else if (z <= (-1.15d-200)) then
tmp = (-4.0d0) * (t * a)
else if (z <= 2.05d+133) then
tmp = t_1
else
tmp = x * (18.0d0 * (t * (y * z)))
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;
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) - (27.0 * (j * k));
double t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if (z <= -1.25e+117) {
tmp = t_2;
} else if (z <= -3.5e-49) {
tmp = t_1;
} else if (z <= -2e-91) {
tmp = t_2;
} else if (z <= -1.15e-200) {
tmp = -4.0 * (t * a);
} else if (z <= 2.05e+133) {
tmp = t_1;
} else {
tmp = x * (18.0 * (t * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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) - (27.0 * (j * k)) t_2 = 18.0 * (t * (x * (y * z))) tmp = 0 if z <= -1.25e+117: tmp = t_2 elif z <= -3.5e-49: tmp = t_1 elif z <= -2e-91: tmp = t_2 elif z <= -1.15e-200: tmp = -4.0 * (t * a) elif z <= 2.05e+133: tmp = t_1 else: tmp = x * (18.0 * (t * (y * z))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) t_2 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) tmp = 0.0 if (z <= -1.25e+117) tmp = t_2; elseif (z <= -3.5e-49) tmp = t_1; elseif (z <= -2e-91) tmp = t_2; elseif (z <= -1.15e-200) tmp = Float64(-4.0 * Float64(t * a)); elseif (z <= 2.05e+133) tmp = t_1; else tmp = Float64(x * Float64(18.0 * Float64(t * Float64(y * z)))); 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])){:}
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) - (27.0 * (j * k));
t_2 = 18.0 * (t * (x * (y * z)));
tmp = 0.0;
if (z <= -1.25e+117)
tmp = t_2;
elseif (z <= -3.5e-49)
tmp = t_1;
elseif (z <= -2e-91)
tmp = t_2;
elseif (z <= -1.15e-200)
tmp = -4.0 * (t * a);
elseif (z <= 2.05e+133)
tmp = t_1;
else
tmp = x * (18.0 * (t * (y * z)));
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.25e+117], t$95$2, If[LessEqual[z, -3.5e-49], t$95$1, If[LessEqual[z, -2e-91], t$95$2, If[LessEqual[z, -1.15e-200], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.05e+133], t$95$1, N[(x * N[(18.0 * N[(t * N[(y * z), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
t_2 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;z \leq -1.25 \cdot 10^{+117}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-91}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-200}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if z < -1.24999999999999996e117 or -3.50000000000000006e-49 < z < -2.00000000000000004e-91Initial program 83.3%
Simplified85.4%
Taylor expanded in x around inf 49.1%
Taylor expanded in t around inf 34.9%
associate-*r*30.8%
associate-*r*30.8%
associate-*r*30.8%
Simplified30.8%
Taylor expanded in x around 0 34.9%
*-commutative34.9%
Simplified34.9%
if -1.24999999999999996e117 < z < -3.50000000000000006e-49 or -1.15000000000000004e-200 < z < 2.05000000000000002e133Initial program 83.4%
Taylor expanded in x around 0 65.4%
Taylor expanded in a around 0 48.8%
if -2.00000000000000004e-91 < z < -1.15000000000000004e-200Initial program 87.5%
Taylor expanded in x around 0 51.1%
Taylor expanded in b around 0 57.4%
Taylor expanded in a around inf 27.3%
*-commutative27.3%
Simplified27.3%
if 2.05000000000000002e133 < z Initial program 74.7%
Simplified84.1%
Taylor expanded in x around inf 70.9%
Taylor expanded in t around inf 59.4%
Final simplification46.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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) (* 27.0 (* j k))))
(t_2 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -9.8e-30)
t_2
(if (<= t -3.6e-302)
t_1
(if (<= t 1.12e-218)
(- (* -4.0 (* x i)) (* (* j 27.0) k))
(if (<= t 0.018) t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -9.8e-30) {
tmp = t_2;
} else if (t <= -3.6e-302) {
tmp = t_1;
} else if (t <= 1.12e-218) {
tmp = (-4.0 * (x * i)) - ((j * 27.0) * k);
} else if (t <= 0.018) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) - (27.0d0 * (j * k))
t_2 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-9.8d-30)) then
tmp = t_2
else if (t <= (-3.6d-302)) then
tmp = t_1
else if (t <= 1.12d-218) then
tmp = ((-4.0d0) * (x * i)) - ((j * 27.0d0) * k)
else if (t <= 0.018d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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) - (27.0 * (j * k));
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -9.8e-30) {
tmp = t_2;
} else if (t <= -3.6e-302) {
tmp = t_1;
} else if (t <= 1.12e-218) {
tmp = (-4.0 * (x * i)) - ((j * 27.0) * k);
} else if (t <= 0.018) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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) - (27.0 * (j * k)) t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -9.8e-30: tmp = t_2 elif t <= -3.6e-302: tmp = t_1 elif t <= 1.12e-218: tmp = (-4.0 * (x * i)) - ((j * 27.0) * k) elif t <= 0.018: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -9.8e-30) tmp = t_2; elseif (t <= -3.6e-302) tmp = t_1; elseif (t <= 1.12e-218) tmp = Float64(Float64(-4.0 * Float64(x * i)) - Float64(Float64(j * 27.0) * k)); elseif (t <= 0.018) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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) - (27.0 * (j * k));
t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -9.8e-30)
tmp = t_2;
elseif (t <= -3.6e-302)
tmp = t_1;
elseif (t <= 1.12e-218)
tmp = (-4.0 * (x * i)) - ((j * 27.0) * k);
elseif (t <= 0.018)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.8e-30], t$95$2, If[LessEqual[t, -3.6e-302], t$95$1, If[LessEqual[t, 1.12e-218], N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.018], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -9.8 \cdot 10^{-30}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -3.6 \cdot 10^{-302}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.12 \cdot 10^{-218}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;t \leq 0.018:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -9.79999999999999942e-30 or 0.0179999999999999986 < t Initial program 79.7%
Simplified87.3%
Taylor expanded in t around inf 69.4%
if -9.79999999999999942e-30 < t < -3.6000000000000001e-302 or 1.11999999999999996e-218 < t < 0.0179999999999999986Initial program 86.5%
Taylor expanded in x around 0 66.0%
Taylor expanded in a around 0 63.4%
if -3.6000000000000001e-302 < t < 1.11999999999999996e-218Initial program 76.5%
pow176.5%
associate-*l*86.0%
*-commutative86.0%
Applied egg-rr86.0%
unpow186.0%
associate-*l*94.9%
*-commutative94.9%
Simplified94.9%
Taylor expanded in i around inf 79.8%
Final simplification67.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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))) (* 4.0 i)))))
(if (<= x -1.7e+52)
t_1
(if (<= x 2.05e-8)
(- (* b c) (+ (* 4.0 (* t a)) (* 27.0 (* j k))))
(if (<= x 9.2e+107)
t_1
(if (<= x 7.5e+112)
(+ (* b c) (* j (* k -27.0)))
(* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -1.7e+52) {
tmp = t_1;
} else if (x <= 2.05e-8) {
tmp = (b * c) - ((4.0 * (t * a)) + (27.0 * (j * k)));
} else if (x <= 9.2e+107) {
tmp = t_1;
} else if (x <= 7.5e+112) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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))) - (4.0d0 * i))
if (x <= (-1.7d+52)) then
tmp = t_1
else if (x <= 2.05d-8) then
tmp = (b * c) - ((4.0d0 * (t * a)) + (27.0d0 * (j * k)))
else if (x <= 9.2d+107) then
tmp = t_1
else if (x <= 7.5d+112) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else
tmp = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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))) - (4.0 * i));
double tmp;
if (x <= -1.7e+52) {
tmp = t_1;
} else if (x <= 2.05e-8) {
tmp = (b * c) - ((4.0 * (t * a)) + (27.0 * (j * k)));
} else if (x <= 9.2e+107) {
tmp = t_1;
} else if (x <= 7.5e+112) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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))) - (4.0 * i)) tmp = 0 if x <= -1.7e+52: tmp = t_1 elif x <= 2.05e-8: tmp = (b * c) - ((4.0 * (t * a)) + (27.0 * (j * k))) elif x <= 9.2e+107: tmp = t_1 elif x <= 7.5e+112: tmp = (b * c) + (j * (k * -27.0)) else: tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(4.0 * i))) tmp = 0.0 if (x <= -1.7e+52) tmp = t_1; elseif (x <= 2.05e-8) tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + Float64(27.0 * Float64(j * k)))); elseif (x <= 9.2e+107) tmp = t_1; elseif (x <= 7.5e+112) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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))) - (4.0 * i));
tmp = 0.0;
if (x <= -1.7e+52)
tmp = t_1;
elseif (x <= 2.05e-8)
tmp = (b * c) - ((4.0 * (t * a)) + (27.0 * (j * k)));
elseif (x <= 9.2e+107)
tmp = t_1;
elseif (x <= 7.5e+112)
tmp = (b * c) + (j * (k * -27.0));
else
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.7e+52], t$95$1, If[LessEqual[x, 2.05e-8], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.2e+107], t$95$1, If[LessEqual[x, 7.5e+112], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -1.7 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.05 \cdot 10^{-8}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{elif}\;x \leq 9.2 \cdot 10^{+107}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{+112}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\end{array}
\end{array}
if x < -1.7e52 or 2.05000000000000016e-8 < x < 9.2000000000000001e107Initial program 78.5%
Simplified82.9%
Taylor expanded in x around inf 68.2%
if -1.7e52 < x < 2.05000000000000016e-8Initial program 92.7%
Taylor expanded in x around 0 75.4%
Taylor expanded in b around 0 76.9%
if 9.2000000000000001e107 < x < 7.5e112Initial program 75.0%
Simplified75.0%
Taylor expanded in b around inf 100.0%
if 7.5e112 < x Initial program 57.8%
Simplified71.7%
Taylor expanded in x around inf 78.0%
cancel-sign-sub-inv78.0%
associate-*r*78.1%
metadata-eval78.1%
Applied egg-rr78.1%
Final simplification75.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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) (* -4.0 (* t a)))))
(if (<= t -31000000000.0)
t_1
(if (<= t 0.0008)
(- (* b c) (* 27.0 (* j k)))
(if (<= t 6.2e+75) (* 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);
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) + (-4.0 * (t * a));
double tmp;
if (t <= -31000000000.0) {
tmp = t_1;
} else if (t <= 0.0008) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t <= 6.2e+75) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = ((j * k) * (-27.0d0)) + ((-4.0d0) * (t * a))
if (t <= (-31000000000.0d0)) then
tmp = t_1
else if (t <= 0.0008d0) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (t <= 6.2d+75) then
tmp = 18.0d0 * (t * (x * (y * z)))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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) + (-4.0 * (t * a));
double tmp;
if (t <= -31000000000.0) {
tmp = t_1;
} else if (t <= 0.0008) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t <= 6.2e+75) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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) + (-4.0 * (t * a)) tmp = 0 if t <= -31000000000.0: tmp = t_1 elif t <= 0.0008: tmp = (b * c) - (27.0 * (j * k)) elif t <= 6.2e+75: tmp = 18.0 * (t * (x * (y * z))) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(j * k) * -27.0) + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (t <= -31000000000.0) tmp = t_1; elseif (t <= 0.0008) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (t <= 6.2e+75) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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) + (-4.0 * (t * a));
tmp = 0.0;
if (t <= -31000000000.0)
tmp = t_1;
elseif (t <= 0.0008)
tmp = (b * c) - (27.0 * (j * k));
elseif (t <= 6.2e+75)
tmp = 18.0 * (t * (x * (y * z)));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(j * k), $MachinePrecision] * -27.0), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -31000000000.0], t$95$1, If[LessEqual[t, 0.0008], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e+75], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot k\right) \cdot -27 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;t \leq -31000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 0.0008:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+75}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.1e10 or 6.2000000000000002e75 < t Initial program 79.8%
Simplified88.2%
Taylor expanded in a around inf 55.2%
associate-*r*55.2%
*-commutative55.2%
Simplified55.2%
Taylor expanded in t around 0 55.2%
if -3.1e10 < t < 8.00000000000000038e-4Initial program 84.4%
Taylor expanded in x around 0 61.8%
Taylor expanded in a around 0 58.8%
if 8.00000000000000038e-4 < t < 6.2000000000000002e75Initial program 80.0%
Simplified86.7%
Taylor expanded in x around inf 80.8%
Taylor expanded in t around inf 74.1%
associate-*r*74.2%
associate-*r*74.1%
associate-*r*74.2%
Simplified74.2%
Taylor expanded in x around 0 74.2%
*-commutative74.2%
Simplified74.2%
Final simplification58.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (<= j -2e+94)
t_1
(if (<= j -6.2e-259) (* -4.0 (* t a)) (if (<= j 3.9e-169) (* b c) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 (j <= -2e+94) {
tmp = t_1;
} else if (j <= -6.2e-259) {
tmp = -4.0 * (t * a);
} else if (j <= 3.9e-169) {
tmp = b * c;
} 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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * k) * (-27.0d0)
if (j <= (-2d+94)) then
tmp = t_1
else if (j <= (-6.2d-259)) then
tmp = (-4.0d0) * (t * a)
else if (j <= 3.9d-169) then
tmp = b * c
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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * k) * -27.0;
double tmp;
if (j <= -2e+94) {
tmp = t_1;
} else if (j <= -6.2e-259) {
tmp = -4.0 * (t * a);
} else if (j <= 3.9e-169) {
tmp = b * c;
} 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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * k) * -27.0 tmp = 0 if j <= -2e+94: tmp = t_1 elif j <= -6.2e-259: tmp = -4.0 * (t * a) elif j <= 3.9e-169: tmp = b * c 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * k) * -27.0) tmp = 0.0 if (j <= -2e+94) tmp = t_1; elseif (j <= -6.2e-259) tmp = Float64(-4.0 * Float64(t * a)); elseif (j <= 3.9e-169) tmp = Float64(b * c); 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * k) * -27.0;
tmp = 0.0;
if (j <= -2e+94)
tmp = t_1;
elseif (j <= -6.2e-259)
tmp = -4.0 * (t * a);
elseif (j <= 3.9e-169)
tmp = b * c;
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]}, If[LessEqual[j, -2e+94], t$95$1, If[LessEqual[j, -6.2e-259], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3.9e-169], N[(b * c), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot k\right) \cdot -27\\
\mathbf{if}\;j \leq -2 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -6.2 \cdot 10^{-259}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;j \leq 3.9 \cdot 10^{-169}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -2e94 or 3.89999999999999977e-169 < j Initial program 81.8%
Simplified87.1%
Taylor expanded in j around inf 39.6%
if -2e94 < j < -6.1999999999999995e-259Initial program 80.6%
Taylor expanded in x around 0 54.4%
Taylor expanded in b around 0 54.4%
Taylor expanded in a around inf 28.2%
*-commutative28.2%
Simplified28.2%
if -6.1999999999999995e-259 < j < 3.89999999999999977e-169Initial program 86.6%
Taylor expanded in x around 0 54.9%
Taylor expanded in b around 0 54.9%
Taylor expanded in b around inf 31.8%
Final simplification35.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= j -4.3e+33) (not (<= j 4.2e-169))) (* (* j k) -27.0) (* b c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 ((j <= -4.3e+33) || !(j <= 4.2e-169)) {
tmp = (j * k) * -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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((j <= (-4.3d+33)) .or. (.not. (j <= 4.2d-169))) then
tmp = (j * k) * (-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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((j <= -4.3e+33) || !(j <= 4.2e-169)) {
tmp = (j * k) * -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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (j <= -4.3e+33) or not (j <= 4.2e-169): tmp = (j * k) * -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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((j <= -4.3e+33) || !(j <= 4.2e-169)) tmp = Float64(Float64(j * k) * -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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((j <= -4.3e+33) || ~((j <= 4.2e-169)))
tmp = (j * k) * -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. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[j, -4.3e+33], N[Not[LessEqual[j, 4.2e-169]], $MachinePrecision]], N[(N[(j * k), $MachinePrecision] * -27.0), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;j \leq -4.3 \cdot 10^{+33} \lor \neg \left(j \leq 4.2 \cdot 10^{-169}\right):\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if j < -4.30000000000000028e33 or 4.2000000000000001e-169 < j Initial program 82.6%
Simplified87.5%
Taylor expanded in j around inf 38.1%
if -4.30000000000000028e33 < j < 4.2000000000000001e-169Initial program 81.5%
Taylor expanded in x around 0 52.8%
Taylor expanded in b around 0 52.9%
Taylor expanded in b around inf 25.8%
Final simplification33.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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);
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.
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;
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]) [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]) 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])){:}
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. 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])\\\\
[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 82.2%
Taylor expanded in x around 0 57.3%
Taylor expanded in b around 0 58.5%
Taylor expanded in b around inf 20.1%
Final simplification20.1%
(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 2024053
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:alt
(if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))