
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 INFINITY)
t_1
(+ (* x (fma -4.0 i (* 18.0 (* z (* y t))))) (* j (* k -27.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) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = (x * fma(-4.0, i, (18.0 * (z * (y * t))))) + (j * (k * -27.0));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(x * fma(-4.0, i, Float64(18.0 * Float64(z * Float64(y * t))))) + Float64(j * Float64(k * -27.0))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(x * N[(-4.0 * i + N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.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(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(-4, i, 18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 95.6%
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%
Simplified22.6%
Taylor expanded in x around inf 61.4%
fma-def61.4%
associate-*r*58.2%
Simplified58.2%
Final simplification91.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
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 INFINITY) t_1 (+ (* j (* k -27.0)) (* -4.0 (* t a))))))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) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
}
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 * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
}
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) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = (j * (k * -27.0)) + (-4.0 * (t * a)) 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(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(t * a))); 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) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
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[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $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(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 95.6%
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%
Simplified22.6%
Taylor expanded in a around inf 52.5%
*-commutative52.5%
Simplified52.5%
Final simplification90.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 27.0) k))
(t_2 (* 4.0 (* x i)))
(t_3 (- (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) t_2)))
(if (<= t_1 -2e+266)
(+ (* j (* k -27.0)) (* -4.0 (* t a)))
(if (<= t_1 -5e+190)
t_3
(if (<= t_1 -1e-25)
(- (- (* b c) t_2) t_1)
(if (<= t_1 1e+116) t_3 (- (- (* b c) (* 4.0 (* t a))) t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 = 4.0 * (x * i);
double t_3 = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_2;
double tmp;
if (t_1 <= -2e+266) {
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
} else if (t_1 <= -5e+190) {
tmp = t_3;
} else if (t_1 <= -1e-25) {
tmp = ((b * c) - t_2) - t_1;
} else if (t_1 <= 1e+116) {
tmp = t_3;
} else {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (j * 27.0d0) * k
t_2 = 4.0d0 * (x * i)
t_3 = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - t_2
if (t_1 <= (-2d+266)) then
tmp = (j * (k * (-27.0d0))) + ((-4.0d0) * (t * a))
else if (t_1 <= (-5d+190)) then
tmp = t_3
else if (t_1 <= (-1d-25)) then
tmp = ((b * c) - t_2) - t_1
else if (t_1 <= 1d+116) then
tmp = t_3
else
tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = 4.0 * (x * i);
double t_3 = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_2;
double tmp;
if (t_1 <= -2e+266) {
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
} else if (t_1 <= -5e+190) {
tmp = t_3;
} else if (t_1 <= -1e-25) {
tmp = ((b * c) - t_2) - t_1;
} else if (t_1 <= 1e+116) {
tmp = t_3;
} else {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 = 4.0 * (x * i) t_3 = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_2 tmp = 0 if t_1 <= -2e+266: tmp = (j * (k * -27.0)) + (-4.0 * (t * a)) elif t_1 <= -5e+190: tmp = t_3 elif t_1 <= -1e-25: tmp = ((b * c) - t_2) - t_1 elif t_1 <= 1e+116: tmp = t_3 else: tmp = ((b * c) - (4.0 * (t * a))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(4.0 * Float64(x * i)) t_3 = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - t_2) tmp = 0.0 if (t_1 <= -2e+266) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(t * a))); elseif (t_1 <= -5e+190) tmp = t_3; elseif (t_1 <= -1e-25) tmp = Float64(Float64(Float64(b * c) - t_2) - t_1); elseif (t_1 <= 1e+116) tmp = t_3; else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 = 4.0 * (x * i);
t_3 = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_2;
tmp = 0.0;
if (t_1 <= -2e+266)
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
elseif (t_1 <= -5e+190)
tmp = t_3;
elseif (t_1 <= -1e-25)
tmp = ((b * c) - t_2) - t_1;
elseif (t_1 <= 1e+116)
tmp = t_3;
else
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+266], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e+190], t$95$3, If[LessEqual[t$95$1, -1e-25], N[(N[(N[(b * c), $MachinePrecision] - t$95$2), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$1, 1e+116], t$95$3, N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 := 4 \cdot \left(x \cdot i\right)\\
t_3 := \left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - t_2\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+266}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t_1 \leq -5 \cdot 10^{+190}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-25}:\\
\;\;\;\;\left(b \cdot c - t_2\right) - t_1\\
\mathbf{elif}\;t_1 \leq 10^{+116}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -2.0000000000000001e266Initial program 55.5%
Simplified59.2%
Taylor expanded in a around inf 82.2%
*-commutative82.2%
Simplified82.2%
if -2.0000000000000001e266 < (*.f64 (*.f64 j 27) k) < -5.00000000000000036e190 or -1.00000000000000004e-25 < (*.f64 (*.f64 j 27) k) < 1.00000000000000002e116Initial program 89.9%
Simplified90.7%
Taylor expanded in j around 0 87.1%
if -5.00000000000000036e190 < (*.f64 (*.f64 j 27) k) < -1.00000000000000004e-25Initial program 81.2%
Taylor expanded in t around 0 76.2%
if 1.00000000000000002e116 < (*.f64 (*.f64 j 27) k) Initial program 82.5%
Taylor expanded in x around 0 76.8%
Final simplification83.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) (* 4.0 (* t a))))
(t_2 (* j (* k -27.0)))
(t_3 (+ t_2 (* x (* i -4.0)))))
(if (<= j -2.7e+203)
(+ t_2 (* -4.0 (* t a)))
(if (<= j -1e+102)
t_3
(if (<= j -4.4e+35)
t_1
(if (<= j -1.35e-17)
(* 18.0 (* (* y z) (* x t)))
(if (<= j 2e-198)
t_1
(if (<= j 1.56e-114)
(* z (* t (* x (* 18.0 y))))
(if (<= j 4.4e-28)
(+ (* t (* a -4.0)) (* k (* j -27.0)))
t_3)))))))))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));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (x * (i * -4.0));
double tmp;
if (j <= -2.7e+203) {
tmp = t_2 + (-4.0 * (t * a));
} else if (j <= -1e+102) {
tmp = t_3;
} else if (j <= -4.4e+35) {
tmp = t_1;
} else if (j <= -1.35e-17) {
tmp = 18.0 * ((y * z) * (x * t));
} else if (j <= 2e-198) {
tmp = t_1;
} else if (j <= 1.56e-114) {
tmp = z * (t * (x * (18.0 * y)));
} else if (j <= 4.4e-28) {
tmp = (t * (a * -4.0)) + (k * (j * -27.0));
} else {
tmp = t_3;
}
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) - (4.0d0 * (t * a))
t_2 = j * (k * (-27.0d0))
t_3 = t_2 + (x * (i * (-4.0d0)))
if (j <= (-2.7d+203)) then
tmp = t_2 + ((-4.0d0) * (t * a))
else if (j <= (-1d+102)) then
tmp = t_3
else if (j <= (-4.4d+35)) then
tmp = t_1
else if (j <= (-1.35d-17)) then
tmp = 18.0d0 * ((y * z) * (x * t))
else if (j <= 2d-198) then
tmp = t_1
else if (j <= 1.56d-114) then
tmp = z * (t * (x * (18.0d0 * y)))
else if (j <= 4.4d-28) then
tmp = (t * (a * (-4.0d0))) + (k * (j * (-27.0d0)))
else
tmp = t_3
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));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (x * (i * -4.0));
double tmp;
if (j <= -2.7e+203) {
tmp = t_2 + (-4.0 * (t * a));
} else if (j <= -1e+102) {
tmp = t_3;
} else if (j <= -4.4e+35) {
tmp = t_1;
} else if (j <= -1.35e-17) {
tmp = 18.0 * ((y * z) * (x * t));
} else if (j <= 2e-198) {
tmp = t_1;
} else if (j <= 1.56e-114) {
tmp = z * (t * (x * (18.0 * y)));
} else if (j <= 4.4e-28) {
tmp = (t * (a * -4.0)) + (k * (j * -27.0));
} else {
tmp = t_3;
}
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)) t_2 = j * (k * -27.0) t_3 = t_2 + (x * (i * -4.0)) tmp = 0 if j <= -2.7e+203: tmp = t_2 + (-4.0 * (t * a)) elif j <= -1e+102: tmp = t_3 elif j <= -4.4e+35: tmp = t_1 elif j <= -1.35e-17: tmp = 18.0 * ((y * z) * (x * t)) elif j <= 2e-198: tmp = t_1 elif j <= 1.56e-114: tmp = z * (t * (x * (18.0 * y))) elif j <= 4.4e-28: tmp = (t * (a * -4.0)) + (k * (j * -27.0)) else: tmp = t_3 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(4.0 * Float64(t * a))) t_2 = Float64(j * Float64(k * -27.0)) t_3 = Float64(t_2 + Float64(x * Float64(i * -4.0))) tmp = 0.0 if (j <= -2.7e+203) tmp = Float64(t_2 + Float64(-4.0 * Float64(t * a))); elseif (j <= -1e+102) tmp = t_3; elseif (j <= -4.4e+35) tmp = t_1; elseif (j <= -1.35e-17) tmp = Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))); elseif (j <= 2e-198) tmp = t_1; elseif (j <= 1.56e-114) tmp = Float64(z * Float64(t * Float64(x * Float64(18.0 * y)))); elseif (j <= 4.4e-28) tmp = Float64(Float64(t * Float64(a * -4.0)) + Float64(k * Float64(j * -27.0))); else tmp = t_3; 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));
t_2 = j * (k * -27.0);
t_3 = t_2 + (x * (i * -4.0));
tmp = 0.0;
if (j <= -2.7e+203)
tmp = t_2 + (-4.0 * (t * a));
elseif (j <= -1e+102)
tmp = t_3;
elseif (j <= -4.4e+35)
tmp = t_1;
elseif (j <= -1.35e-17)
tmp = 18.0 * ((y * z) * (x * t));
elseif (j <= 2e-198)
tmp = t_1;
elseif (j <= 1.56e-114)
tmp = z * (t * (x * (18.0 * y)));
elseif (j <= 4.4e-28)
tmp = (t * (a * -4.0)) + (k * (j * -27.0));
else
tmp = t_3;
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[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -2.7e+203], N[(t$95$2 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -1e+102], t$95$3, If[LessEqual[j, -4.4e+35], t$95$1, If[LessEqual[j, -1.35e-17], N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 2e-198], t$95$1, If[LessEqual[j, 1.56e-114], N[(z * N[(t * N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 4.4e-28], N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]
\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 - 4 \cdot \left(t \cdot a\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
t_3 := t_2 + x \cdot \left(i \cdot -4\right)\\
\mathbf{if}\;j \leq -2.7 \cdot 10^{+203}:\\
\;\;\;\;t_2 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;j \leq -1 \cdot 10^{+102}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;j \leq -4.4 \cdot 10^{+35}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;j \leq -1.35 \cdot 10^{-17}:\\
\;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\
\mathbf{elif}\;j \leq 2 \cdot 10^{-198}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;j \leq 1.56 \cdot 10^{-114}:\\
\;\;\;\;z \cdot \left(t \cdot \left(x \cdot \left(18 \cdot y\right)\right)\right)\\
\mathbf{elif}\;j \leq 4.4 \cdot 10^{-28}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right) + k \cdot \left(j \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if j < -2.7e203Initial program 74.0%
Simplified77.6%
Taylor expanded in a around inf 78.4%
*-commutative78.4%
Simplified78.4%
if -2.7e203 < j < -9.99999999999999977e101 or 4.39999999999999992e-28 < j Initial program 79.4%
Simplified79.6%
Taylor expanded in i around inf 55.0%
associate-*r*55.0%
*-commutative55.0%
Simplified55.0%
if -9.99999999999999977e101 < j < -4.3999999999999997e35 or -1.3500000000000001e-17 < j < 1.9999999999999998e-198Initial program 87.9%
Simplified90.1%
associate-*r*87.9%
distribute-rgt-out--87.9%
associate-+l-87.9%
associate-*l*88.8%
*-commutative88.8%
*-commutative88.8%
fma-neg88.8%
Applied egg-rr88.8%
Taylor expanded in x around inf 81.8%
associate-*r*81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in x around 0 56.0%
if -4.3999999999999997e35 < j < -1.3500000000000001e-17Initial program 83.3%
Simplified83.1%
associate-*r*83.1%
distribute-rgt-out--83.1%
associate-*l*83.1%
*-commutative83.1%
*-commutative83.1%
Applied egg-rr83.1%
Taylor expanded in y around inf 67.8%
associate-*r*67.8%
Simplified67.8%
if 1.9999999999999998e-198 < j < 1.5599999999999999e-114Initial program 90.8%
Simplified86.4%
associate-*r*90.8%
distribute-rgt-out--90.8%
associate-*l*86.2%
*-commutative86.2%
*-commutative86.2%
Applied egg-rr86.2%
Taylor expanded in y around inf 20.0%
*-commutative20.0%
associate-*r*20.0%
associate-*r*20.0%
*-commutative20.0%
associate-*r*20.2%
*-commutative20.2%
*-commutative20.2%
associate-*l*20.1%
*-commutative20.1%
associate-*l*20.2%
Simplified20.2%
if 1.5599999999999999e-114 < j < 4.39999999999999992e-28Initial program 93.7%
Taylor expanded in x around 0 45.9%
Taylor expanded in b around 0 43.8%
mul-1-neg43.8%
associate-*r*43.8%
*-commutative43.8%
*-commutative43.8%
associate-*r*43.8%
*-commutative43.8%
associate-*r*43.8%
distribute-neg-in43.8%
distribute-rgt-neg-in43.8%
distribute-rgt-neg-in43.8%
metadata-eval43.8%
associate-*r*43.8%
distribute-lft-neg-out43.8%
*-commutative43.8%
distribute-rgt-neg-in43.8%
metadata-eval43.8%
Simplified43.8%
Final simplification54.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 (* 18.0 (* t (* x (* y z))))) (t_2 (* -27.0 (* j k))))
(if (<= j -2.8e+150)
t_2
(if (<= j -3.2e+103)
(* x (* i -4.0))
(if (<= j -1.3e+78)
(* -4.0 (* t a))
(if (<= j -3.3e+41)
t_2
(if (<= j -1.45e-19)
t_1
(if (<= j 2.45e-206)
(* b c)
(if (<= j 3.3e-114) t_1 (* k (* j -27.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 = 18.0 * (t * (x * (y * z)));
double t_2 = -27.0 * (j * k);
double tmp;
if (j <= -2.8e+150) {
tmp = t_2;
} else if (j <= -3.2e+103) {
tmp = x * (i * -4.0);
} else if (j <= -1.3e+78) {
tmp = -4.0 * (t * a);
} else if (j <= -3.3e+41) {
tmp = t_2;
} else if (j <= -1.45e-19) {
tmp = t_1;
} else if (j <= 2.45e-206) {
tmp = b * c;
} else if (j <= 3.3e-114) {
tmp = t_1;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = 18.0d0 * (t * (x * (y * z)))
t_2 = (-27.0d0) * (j * k)
if (j <= (-2.8d+150)) then
tmp = t_2
else if (j <= (-3.2d+103)) then
tmp = x * (i * (-4.0d0))
else if (j <= (-1.3d+78)) then
tmp = (-4.0d0) * (t * a)
else if (j <= (-3.3d+41)) then
tmp = t_2
else if (j <= (-1.45d-19)) then
tmp = t_1
else if (j <= 2.45d-206) then
tmp = b * c
else if (j <= 3.3d-114) then
tmp = t_1
else
tmp = k * (j * (-27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = 18.0 * (t * (x * (y * z)));
double t_2 = -27.0 * (j * k);
double tmp;
if (j <= -2.8e+150) {
tmp = t_2;
} else if (j <= -3.2e+103) {
tmp = x * (i * -4.0);
} else if (j <= -1.3e+78) {
tmp = -4.0 * (t * a);
} else if (j <= -3.3e+41) {
tmp = t_2;
} else if (j <= -1.45e-19) {
tmp = t_1;
} else if (j <= 2.45e-206) {
tmp = b * c;
} else if (j <= 3.3e-114) {
tmp = t_1;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 = 18.0 * (t * (x * (y * z))) t_2 = -27.0 * (j * k) tmp = 0 if j <= -2.8e+150: tmp = t_2 elif j <= -3.2e+103: tmp = x * (i * -4.0) elif j <= -1.3e+78: tmp = -4.0 * (t * a) elif j <= -3.3e+41: tmp = t_2 elif j <= -1.45e-19: tmp = t_1 elif j <= 2.45e-206: tmp = b * c elif j <= 3.3e-114: tmp = t_1 else: tmp = k * (j * -27.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(18.0 * Float64(t * Float64(x * Float64(y * z)))) t_2 = Float64(-27.0 * Float64(j * k)) tmp = 0.0 if (j <= -2.8e+150) tmp = t_2; elseif (j <= -3.2e+103) tmp = Float64(x * Float64(i * -4.0)); elseif (j <= -1.3e+78) tmp = Float64(-4.0 * Float64(t * a)); elseif (j <= -3.3e+41) tmp = t_2; elseif (j <= -1.45e-19) tmp = t_1; elseif (j <= 2.45e-206) tmp = Float64(b * c); elseif (j <= 3.3e-114) tmp = t_1; else tmp = Float64(k * Float64(j * -27.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 = 18.0 * (t * (x * (y * z)));
t_2 = -27.0 * (j * k);
tmp = 0.0;
if (j <= -2.8e+150)
tmp = t_2;
elseif (j <= -3.2e+103)
tmp = x * (i * -4.0);
elseif (j <= -1.3e+78)
tmp = -4.0 * (t * a);
elseif (j <= -3.3e+41)
tmp = t_2;
elseif (j <= -1.45e-19)
tmp = t_1;
elseif (j <= 2.45e-206)
tmp = b * c;
elseif (j <= 3.3e-114)
tmp = t_1;
else
tmp = k * (j * -27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -2.8e+150], t$95$2, If[LessEqual[j, -3.2e+103], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -1.3e+78], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -3.3e+41], t$95$2, If[LessEqual[j, -1.45e-19], t$95$1, If[LessEqual[j, 2.45e-206], N[(b * c), $MachinePrecision], If[LessEqual[j, 3.3e-114], t$95$1, N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
t_2 := -27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;j \leq -2.8 \cdot 10^{+150}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;j \leq -3.2 \cdot 10^{+103}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;j \leq -1.3 \cdot 10^{+78}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;j \leq -3.3 \cdot 10^{+41}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;j \leq -1.45 \cdot 10^{-19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;j \leq 2.45 \cdot 10^{-206}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;j \leq 3.3 \cdot 10^{-114}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if j < -2.80000000000000009e150 or -1.3e78 < j < -3.3e41Initial program 80.0%
Simplified82.4%
Taylor expanded in j around inf 55.2%
if -2.80000000000000009e150 < j < -3.19999999999999993e103Initial program 90.9%
Simplified90.8%
associate-*r*90.9%
distribute-rgt-out--90.9%
associate-+l-90.9%
associate-*l*73.2%
*-commutative73.2%
*-commutative73.2%
fma-neg73.2%
Applied egg-rr73.2%
Taylor expanded in i around inf 19.7%
*-commutative19.7%
*-commutative19.7%
associate-*r*19.7%
Simplified19.7%
if -3.19999999999999993e103 < j < -1.3e78Initial program 75.0%
Simplified100.0%
associate-*r*75.0%
distribute-rgt-out--75.0%
associate-+l-75.0%
associate-*l*75.0%
*-commutative75.0%
*-commutative75.0%
fma-neg75.0%
Applied egg-rr75.0%
Taylor expanded in a around inf 51.4%
*-commutative51.4%
*-commutative51.4%
Simplified51.4%
if -3.3e41 < j < -1.45e-19 or 2.45e-206 < j < 3.30000000000000035e-114Initial program 91.3%
Simplified88.6%
associate-*r*91.3%
distribute-rgt-out--91.3%
associate-*l*88.4%
*-commutative88.4%
*-commutative88.4%
Applied egg-rr88.4%
Taylor expanded in y around inf 30.3%
if -1.45e-19 < j < 2.45e-206Initial program 86.1%
Simplified87.5%
associate-*r*86.1%
distribute-rgt-out--86.1%
associate-+l-86.1%
associate-*l*88.4%
*-commutative88.4%
*-commutative88.4%
fma-neg88.5%
Applied egg-rr88.5%
Taylor expanded in b around inf 36.0%
if 3.30000000000000035e-114 < j Initial program 80.8%
Simplified82.1%
associate-*r*80.8%
distribute-rgt-out--80.8%
associate-+l-80.8%
associate-*l*80.9%
*-commutative80.9%
*-commutative80.9%
fma-neg80.9%
Applied egg-rr80.9%
Taylor expanded in j around inf 35.9%
associate-*r*35.8%
*-commutative35.8%
*-commutative35.8%
Simplified35.8%
Final simplification37.7%
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 (<= (* (* j 27.0) k) (- INFINITY))
(* -27.0 (* j k))
(-
(+ (* 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 (((j * 27.0) * k) <= -((double) INFINITY)) {
tmp = -27.0 * (j * k);
} 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 (((j * 27.0) * k) <= -Double.POSITIVE_INFINITY) {
tmp = -27.0 * (j * k);
} 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 ((j * 27.0) * k) <= -math.inf: tmp = -27.0 * (j * k) 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(Float64(j * 27.0) * k) <= Float64(-Inf)) tmp = Float64(-27.0 * Float64(j * k)); 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 (((j * 27.0) * k) <= -Inf)
tmp = -27.0 * (j * k);
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[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision], (-Infinity)], N[(-27.0 * N[(j * k), $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}\;\left(j \cdot 27\right) \cdot k \leq -\infty:\\
\;\;\;\;-27 \cdot \left(j \cdot k\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 (*.f64 j 27) k) < -inf.0Initial program 42.9%
Simplified47.6%
Taylor expanded in j around inf 85.7%
if -inf.0 < (*.f64 (*.f64 j 27) k) Initial program 87.7%
Simplified88.7%
Final simplification88.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) (* 4.0 (* t a))) (* (* j 27.0) k)))
(t_2 (* x (- (* z (* y (* 18.0 t))) (* 4.0 i)))))
(if (<= y -8.6e+250)
t_2
(if (<= y -2.9e+176)
t_1
(if (<= y -7.2e+117)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= y 8.2e-29) 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) - (4.0 * (t * a))) - ((j * 27.0) * k);
double t_2 = x * ((z * (y * (18.0 * t))) - (4.0 * i));
double tmp;
if (y <= -8.6e+250) {
tmp = t_2;
} else if (y <= -2.9e+176) {
tmp = t_1;
} else if (y <= -7.2e+117) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (y <= 8.2e-29) {
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) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
t_2 = x * ((z * (y * (18.0d0 * t))) - (4.0d0 * i))
if (y <= (-8.6d+250)) then
tmp = t_2
else if (y <= (-2.9d+176)) then
tmp = t_1
else if (y <= (-7.2d+117)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (y <= 8.2d-29) 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) - (4.0 * (t * a))) - ((j * 27.0) * k);
double t_2 = x * ((z * (y * (18.0 * t))) - (4.0 * i));
double tmp;
if (y <= -8.6e+250) {
tmp = t_2;
} else if (y <= -2.9e+176) {
tmp = t_1;
} else if (y <= -7.2e+117) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (y <= 8.2e-29) {
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) - (4.0 * (t * a))) - ((j * 27.0) * k) t_2 = x * ((z * (y * (18.0 * t))) - (4.0 * i)) tmp = 0 if y <= -8.6e+250: tmp = t_2 elif y <= -2.9e+176: tmp = t_1 elif y <= -7.2e+117: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif y <= 8.2e-29: 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(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)) t_2 = Float64(x * Float64(Float64(z * Float64(y * Float64(18.0 * t))) - Float64(4.0 * i))) tmp = 0.0 if (y <= -8.6e+250) tmp = t_2; elseif (y <= -2.9e+176) tmp = t_1; elseif (y <= -7.2e+117) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (y <= 8.2e-29) 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) - (4.0 * (t * a))) - ((j * 27.0) * k);
t_2 = x * ((z * (y * (18.0 * t))) - (4.0 * i));
tmp = 0.0;
if (y <= -8.6e+250)
tmp = t_2;
elseif (y <= -2.9e+176)
tmp = t_1;
elseif (y <= -7.2e+117)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (y <= 8.2e-29)
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[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(z * N[(y * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.6e+250], t$95$2, If[LessEqual[y, -2.9e+176], t$95$1, If[LessEqual[y, -7.2e+117], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.2e-29], 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(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
t_2 := x \cdot \left(z \cdot \left(y \cdot \left(18 \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;y \leq -8.6 \cdot 10^{+250}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -2.9 \cdot 10^{+176}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -7.2 \cdot 10^{+117}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-29}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -8.6e250 or 8.1999999999999996e-29 < y Initial program 76.9%
Simplified77.1%
Taylor expanded in x around inf 58.2%
expm1-log1p-u35.0%
expm1-udef35.0%
associate-*r*35.0%
Applied egg-rr35.0%
expm1-def35.0%
expm1-log1p58.2%
associate-*r*59.6%
*-commutative59.6%
Simplified59.6%
if -8.6e250 < y < -2.9000000000000001e176 or -7.20000000000000025e117 < y < 8.1999999999999996e-29Initial program 88.0%
Taylor expanded in x around 0 72.8%
if -2.9000000000000001e176 < y < -7.20000000000000025e117Initial program 75.2%
Simplified69.5%
Taylor expanded in x around inf 58.0%
Final simplification68.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= t -5e+90)
(and (not (<= t 2.4e+19)) (or (<= t 5.6e+87) (not (<= t 2.26e+111)))))
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(+ (* b c) (* j (* k -27.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -5e+90) || (!(t <= 2.4e+19) && ((t <= 5.6e+87) || !(t <= 2.26e+111)))) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-5d+90)) .or. (.not. (t <= 2.4d+19)) .and. (t <= 5.6d+87) .or. (.not. (t <= 2.26d+111))) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else
tmp = (b * c) + (j * (k * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -5e+90) || (!(t <= 2.4e+19) && ((t <= 5.6e+87) || !(t <= 2.26e+111)))) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -5e+90) or (not (t <= 2.4e+19) and ((t <= 5.6e+87) or not (t <= 2.26e+111))): tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) else: tmp = (b * c) + (j * (k * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -5e+90) || (!(t <= 2.4e+19) && ((t <= 5.6e+87) || !(t <= 2.26e+111)))) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); else tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -5e+90) || (~((t <= 2.4e+19)) && ((t <= 5.6e+87) || ~((t <= 2.26e+111)))))
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
else
tmp = (b * c) + (j * (k * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -5e+90], And[N[Not[LessEqual[t, 2.4e+19]], $MachinePrecision], Or[LessEqual[t, 5.6e+87], N[Not[LessEqual[t, 2.26e+111]], $MachinePrecision]]]], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.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}
\mathbf{if}\;t \leq -5 \cdot 10^{+90} \lor \neg \left(t \leq 2.4 \cdot 10^{+19}\right) \land \left(t \leq 5.6 \cdot 10^{+87} \lor \neg \left(t \leq 2.26 \cdot 10^{+111}\right)\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if t < -5.0000000000000004e90 or 2.4e19 < t < 5.6000000000000003e87 or 2.26000000000000011e111 < t Initial program 90.9%
Simplified92.0%
Taylor expanded in t around inf 73.0%
if -5.0000000000000004e90 < t < 2.4e19 or 5.6000000000000003e87 < t < 2.26000000000000011e111Initial program 79.6%
Simplified82.3%
Taylor expanded in b around inf 59.0%
Final simplification64.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -1.02e+91)
t_2
(if (<= t 1.05e-157)
(+ (* b c) t_1)
(if (<= t 6.8e+44)
(+ t_1 (* 18.0 (* (* y z) (* x t))))
(if (<= t 2.8e+110) (- (* b c) (* 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 = j * (k * -27.0);
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -1.02e+91) {
tmp = t_2;
} else if (t <= 1.05e-157) {
tmp = (b * c) + t_1;
} else if (t <= 6.8e+44) {
tmp = t_1 + (18.0 * ((y * z) * (x * t)));
} else if (t <= 2.8e+110) {
tmp = (b * c) - (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 = j * (k * (-27.0d0))
t_2 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-1.02d+91)) then
tmp = t_2
else if (t <= 1.05d-157) then
tmp = (b * c) + t_1
else if (t <= 6.8d+44) then
tmp = t_1 + (18.0d0 * ((y * z) * (x * t)))
else if (t <= 2.8d+110) then
tmp = (b * c) - (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 = j * (k * -27.0);
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -1.02e+91) {
tmp = t_2;
} else if (t <= 1.05e-157) {
tmp = (b * c) + t_1;
} else if (t <= 6.8e+44) {
tmp = t_1 + (18.0 * ((y * z) * (x * t)));
} else if (t <= 2.8e+110) {
tmp = (b * c) - (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 = j * (k * -27.0) t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -1.02e+91: tmp = t_2 elif t <= 1.05e-157: tmp = (b * c) + t_1 elif t <= 6.8e+44: tmp = t_1 + (18.0 * ((y * z) * (x * t))) elif t <= 2.8e+110: tmp = (b * c) - (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(j * Float64(k * -27.0)) t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -1.02e+91) tmp = t_2; elseif (t <= 1.05e-157) tmp = Float64(Float64(b * c) + t_1); elseif (t <= 6.8e+44) tmp = Float64(t_1 + Float64(18.0 * Float64(Float64(y * z) * Float64(x * t)))); elseif (t <= 2.8e+110) tmp = Float64(Float64(b * c) - 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 = j * (k * -27.0);
t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -1.02e+91)
tmp = t_2;
elseif (t <= 1.05e-157)
tmp = (b * c) + t_1;
elseif (t <= 6.8e+44)
tmp = t_1 + (18.0 * ((y * z) * (x * t)));
elseif (t <= 2.8e+110)
tmp = (b * c) - (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[(j * N[(k * -27.0), $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.02e+91], t$95$2, If[LessEqual[t, 1.05e-157], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 6.8e+44], N[(t$95$1 + N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+110], N[(N[(b * c), $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 := j \cdot \left(k \cdot -27\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.02 \cdot 10^{+91}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-157}:\\
\;\;\;\;b \cdot c + t_1\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{+44}:\\
\;\;\;\;t_1 + 18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+110}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.01999999999999992e91 or 2.79999999999999987e110 < t Initial program 89.5%
Simplified90.8%
Taylor expanded in t around inf 74.4%
if -1.01999999999999992e91 < t < 1.05e-157Initial program 76.9%
Simplified80.4%
Taylor expanded in b around inf 60.8%
if 1.05e-157 < t < 6.8e44Initial program 89.8%
Simplified89.8%
Taylor expanded in y around inf 47.7%
associate-*r*55.0%
Simplified55.0%
if 6.8e44 < t < 2.79999999999999987e110Initial program 93.1%
Simplified93.1%
associate-*r*93.1%
distribute-rgt-out--93.1%
associate-+l-93.1%
associate-*l*79.8%
*-commutative79.8%
*-commutative79.8%
fma-neg79.9%
Applied egg-rr79.9%
Taylor expanded in x around inf 79.9%
associate-*r*79.9%
*-commutative79.9%
Simplified79.9%
Taylor expanded in x around 0 74.0%
Final simplification65.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 (<= j -1.95e+149)
t_1
(if (<= j -1.32e+104)
(- (* b c) (* 4.0 (* x i)))
(if (<= j 2e-198)
(- (* b c) (* 4.0 (* t a)))
(if (<= j 9.5e-115) (* z (* t (* x (* 18.0 y)))) 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 (j <= -1.95e+149) {
tmp = t_1;
} else if (j <= -1.32e+104) {
tmp = (b * c) - (4.0 * (x * i));
} else if (j <= 2e-198) {
tmp = (b * c) - (4.0 * (t * a));
} else if (j <= 9.5e-115) {
tmp = z * (t * (x * (18.0 * y)));
} 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 (j <= (-1.95d+149)) then
tmp = t_1
else if (j <= (-1.32d+104)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (j <= 2d-198) then
tmp = (b * c) - (4.0d0 * (t * a))
else if (j <= 9.5d-115) then
tmp = z * (t * (x * (18.0d0 * y)))
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 (j <= -1.95e+149) {
tmp = t_1;
} else if (j <= -1.32e+104) {
tmp = (b * c) - (4.0 * (x * i));
} else if (j <= 2e-198) {
tmp = (b * c) - (4.0 * (t * a));
} else if (j <= 9.5e-115) {
tmp = z * (t * (x * (18.0 * y)));
} 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 j <= -1.95e+149: tmp = t_1 elif j <= -1.32e+104: tmp = (b * c) - (4.0 * (x * i)) elif j <= 2e-198: tmp = (b * c) - (4.0 * (t * a)) elif j <= 9.5e-115: tmp = z * (t * (x * (18.0 * y))) 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 * Float64(k * -27.0)) + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (j <= -1.95e+149) tmp = t_1; elseif (j <= -1.32e+104) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (j <= 2e-198) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); elseif (j <= 9.5e-115) tmp = Float64(z * Float64(t * Float64(x * Float64(18.0 * y)))); 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 (j <= -1.95e+149)
tmp = t_1;
elseif (j <= -1.32e+104)
tmp = (b * c) - (4.0 * (x * i));
elseif (j <= 2e-198)
tmp = (b * c) - (4.0 * (t * a));
elseif (j <= 9.5e-115)
tmp = z * (t * (x * (18.0 * y)));
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 * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.95e+149], t$95$1, If[LessEqual[j, -1.32e+104], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 2e-198], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 9.5e-115], N[(z * N[(t * N[(x * N[(18.0 * y), $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 := j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;j \leq -1.95 \cdot 10^{+149}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;j \leq -1.32 \cdot 10^{+104}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;j \leq 2 \cdot 10^{-198}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;j \leq 9.5 \cdot 10^{-115}:\\
\;\;\;\;z \cdot \left(t \cdot \left(x \cdot \left(18 \cdot y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if j < -1.95e149 or 9.4999999999999996e-115 < j Initial program 79.4%
Simplified81.1%
Taylor expanded in a around inf 54.9%
*-commutative54.9%
Simplified54.9%
if -1.95e149 < j < -1.32000000000000003e104Initial program 90.0%
Taylor expanded in t around 0 71.0%
Taylor expanded in j around 0 31.0%
if -1.32000000000000003e104 < j < 1.9999999999999998e-198Initial program 87.7%
Simplified89.7%
associate-*r*87.6%
distribute-rgt-out--87.6%
associate-+l-87.6%
associate-*l*88.4%
*-commutative88.4%
*-commutative88.4%
fma-neg88.4%
Applied egg-rr88.4%
Taylor expanded in x around inf 80.9%
associate-*r*80.9%
*-commutative80.9%
Simplified80.9%
Taylor expanded in x around 0 52.9%
if 1.9999999999999998e-198 < j < 9.4999999999999996e-115Initial program 90.3%
Simplified85.8%
associate-*r*90.3%
distribute-rgt-out--90.3%
associate-*l*85.6%
*-commutative85.6%
*-commutative85.6%
Applied egg-rr85.6%
Taylor expanded in y around inf 20.8%
*-commutative20.8%
associate-*r*20.9%
associate-*r*20.9%
*-commutative20.9%
associate-*r*21.0%
*-commutative21.0%
*-commutative21.0%
associate-*l*21.0%
*-commutative21.0%
associate-*l*21.0%
Simplified21.0%
Final simplification50.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
(if (<= j -1.75e+149)
(+ (* j (* k -27.0)) (* -4.0 (* t a)))
(if (<= j -9.5e+101)
(- (* b c) (* 4.0 (* x i)))
(if (<= j 2.9e-198)
(- (* b c) (* 4.0 (* t a)))
(if (<= j 7.7e-115)
(* z (* t (* x (* 18.0 y))))
(+ (* t (* a -4.0)) (* k (* j -27.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 tmp;
if (j <= -1.75e+149) {
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
} else if (j <= -9.5e+101) {
tmp = (b * c) - (4.0 * (x * i));
} else if (j <= 2.9e-198) {
tmp = (b * c) - (4.0 * (t * a));
} else if (j <= 7.7e-115) {
tmp = z * (t * (x * (18.0 * y)));
} else {
tmp = (t * (a * -4.0)) + (k * (j * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 <= (-1.75d+149)) then
tmp = (j * (k * (-27.0d0))) + ((-4.0d0) * (t * a))
else if (j <= (-9.5d+101)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (j <= 2.9d-198) then
tmp = (b * c) - (4.0d0 * (t * a))
else if (j <= 7.7d-115) then
tmp = z * (t * (x * (18.0d0 * y)))
else
tmp = (t * (a * (-4.0d0))) + (k * (j * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 <= -1.75e+149) {
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
} else if (j <= -9.5e+101) {
tmp = (b * c) - (4.0 * (x * i));
} else if (j <= 2.9e-198) {
tmp = (b * c) - (4.0 * (t * a));
} else if (j <= 7.7e-115) {
tmp = z * (t * (x * (18.0 * y)));
} else {
tmp = (t * (a * -4.0)) + (k * (j * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 <= -1.75e+149: tmp = (j * (k * -27.0)) + (-4.0 * (t * a)) elif j <= -9.5e+101: tmp = (b * c) - (4.0 * (x * i)) elif j <= 2.9e-198: tmp = (b * c) - (4.0 * (t * a)) elif j <= 7.7e-115: tmp = z * (t * (x * (18.0 * y))) else: tmp = (t * (a * -4.0)) + (k * (j * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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 <= -1.75e+149) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(t * a))); elseif (j <= -9.5e+101) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (j <= 2.9e-198) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); elseif (j <= 7.7e-115) tmp = Float64(z * Float64(t * Float64(x * Float64(18.0 * y)))); else tmp = Float64(Float64(t * Float64(a * -4.0)) + Float64(k * Float64(j * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 <= -1.75e+149)
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
elseif (j <= -9.5e+101)
tmp = (b * c) - (4.0 * (x * i));
elseif (j <= 2.9e-198)
tmp = (b * c) - (4.0 * (t * a));
elseif (j <= 7.7e-115)
tmp = z * (t * (x * (18.0 * y)));
else
tmp = (t * (a * -4.0)) + (k * (j * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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[j, -1.75e+149], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -9.5e+101], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 2.9e-198], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 7.7e-115], N[(z * N[(t * N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(k * N[(j * -27.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}
\mathbf{if}\;j \leq -1.75 \cdot 10^{+149}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;j \leq -9.5 \cdot 10^{+101}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;j \leq 2.9 \cdot 10^{-198}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;j \leq 7.7 \cdot 10^{-115}:\\
\;\;\;\;z \cdot \left(t \cdot \left(x \cdot \left(18 \cdot y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right) + k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if j < -1.75000000000000006e149Initial program 75.0%
Simplified78.0%
Taylor expanded in a around inf 66.7%
*-commutative66.7%
Simplified66.7%
if -1.75000000000000006e149 < j < -9.49999999999999947e101Initial program 90.0%
Taylor expanded in t around 0 71.0%
Taylor expanded in j around 0 31.0%
if -9.49999999999999947e101 < j < 2.90000000000000001e-198Initial program 87.7%
Simplified89.7%
associate-*r*87.6%
distribute-rgt-out--87.6%
associate-+l-87.6%
associate-*l*88.4%
*-commutative88.4%
*-commutative88.4%
fma-neg88.4%
Applied egg-rr88.4%
Taylor expanded in x around inf 80.9%
associate-*r*80.9%
*-commutative80.9%
Simplified80.9%
Taylor expanded in x around 0 52.9%
if 2.90000000000000001e-198 < j < 7.7000000000000002e-115Initial program 90.3%
Simplified85.8%
associate-*r*90.3%
distribute-rgt-out--90.3%
associate-*l*85.6%
*-commutative85.6%
*-commutative85.6%
Applied egg-rr85.6%
Taylor expanded in y around inf 20.8%
*-commutative20.8%
associate-*r*20.9%
associate-*r*20.9%
*-commutative20.9%
associate-*r*21.0%
*-commutative21.0%
*-commutative21.0%
associate-*l*21.0%
*-commutative21.0%
associate-*l*21.0%
Simplified21.0%
if 7.7000000000000002e-115 < j Initial program 81.0%
Taylor expanded in x around 0 60.5%
Taylor expanded in b around 0 50.6%
mul-1-neg50.6%
associate-*r*50.6%
*-commutative50.6%
*-commutative50.6%
associate-*r*50.5%
*-commutative50.5%
associate-*r*50.6%
distribute-neg-in50.6%
distribute-rgt-neg-in50.6%
distribute-rgt-neg-in50.6%
metadata-eval50.6%
associate-*r*50.5%
distribute-lft-neg-out50.5%
*-commutative50.5%
distribute-rgt-neg-in50.5%
metadata-eval50.5%
Simplified50.5%
Final simplification50.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 27.0) k))
(t_2 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -1.85e+233)
t_2
(if (<= t -7.2e-63)
(- (- (* b c) (* 4.0 (* t a))) t_1)
(if (<= t 2.1e+111) (- (- (* b c) (* 4.0 (* x i))) t_1) t_2)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -1.85e+233) {
tmp = t_2;
} else if (t <= -7.2e-63) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (t <= 2.1e+111) {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (j * 27.0d0) * k
t_2 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-1.85d+233)) then
tmp = t_2
else if (t <= (-7.2d-63)) then
tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
else if (t <= 2.1d+111) then
tmp = ((b * c) - (4.0d0 * (x * i))) - t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -1.85e+233) {
tmp = t_2;
} else if (t <= -7.2e-63) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (t <= 2.1e+111) {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -1.85e+233: tmp = t_2 elif t <= -7.2e-63: tmp = ((b * c) - (4.0 * (t * a))) - t_1 elif t <= 2.1e+111: tmp = ((b * c) - (4.0 * (x * i))) - t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -1.85e+233) tmp = t_2; elseif (t <= -7.2e-63) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1); elseif (t <= 2.1e+111) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_1); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -1.85e+233)
tmp = t_2;
elseif (t <= -7.2e-63)
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
elseif (t <= 2.1e+111)
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.85e+233], t$95$2, If[LessEqual[t, -7.2e-63], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, 2.1e+111], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1.85 \cdot 10^{+233}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{-63}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t_1\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+111}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.8499999999999999e233 or 2.09999999999999995e111 < t Initial program 87.7%
Simplified89.6%
Taylor expanded in t around inf 81.6%
if -1.8499999999999999e233 < t < -7.20000000000000016e-63Initial program 91.4%
Taylor expanded in x around 0 71.4%
if -7.20000000000000016e-63 < t < 2.09999999999999995e111Initial program 79.5%
Taylor expanded in t around 0 72.1%
Final simplification74.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 (* 18.0 (* t (* y (* x z))))))
(if (<= j -2.9e+150)
(* -27.0 (* j k))
(if (<= j -1.9e-19)
t_1
(if (<= j 4.8e-209)
(* b c)
(if (<= j 3.3e-114) t_1 (* k (* j -27.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 = 18.0 * (t * (y * (x * z)));
double tmp;
if (j <= -2.9e+150) {
tmp = -27.0 * (j * k);
} else if (j <= -1.9e-19) {
tmp = t_1;
} else if (j <= 4.8e-209) {
tmp = b * c;
} else if (j <= 3.3e-114) {
tmp = t_1;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = 18.0d0 * (t * (y * (x * z)))
if (j <= (-2.9d+150)) then
tmp = (-27.0d0) * (j * k)
else if (j <= (-1.9d-19)) then
tmp = t_1
else if (j <= 4.8d-209) then
tmp = b * c
else if (j <= 3.3d-114) then
tmp = t_1
else
tmp = k * (j * (-27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = 18.0 * (t * (y * (x * z)));
double tmp;
if (j <= -2.9e+150) {
tmp = -27.0 * (j * k);
} else if (j <= -1.9e-19) {
tmp = t_1;
} else if (j <= 4.8e-209) {
tmp = b * c;
} else if (j <= 3.3e-114) {
tmp = t_1;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 = 18.0 * (t * (y * (x * z))) tmp = 0 if j <= -2.9e+150: tmp = -27.0 * (j * k) elif j <= -1.9e-19: tmp = t_1 elif j <= 4.8e-209: tmp = b * c elif j <= 3.3e-114: tmp = t_1 else: tmp = k * (j * -27.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(18.0 * Float64(t * Float64(y * Float64(x * z)))) tmp = 0.0 if (j <= -2.9e+150) tmp = Float64(-27.0 * Float64(j * k)); elseif (j <= -1.9e-19) tmp = t_1; elseif (j <= 4.8e-209) tmp = Float64(b * c); elseif (j <= 3.3e-114) tmp = t_1; else tmp = Float64(k * Float64(j * -27.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 = 18.0 * (t * (y * (x * z)));
tmp = 0.0;
if (j <= -2.9e+150)
tmp = -27.0 * (j * k);
elseif (j <= -1.9e-19)
tmp = t_1;
elseif (j <= 4.8e-209)
tmp = b * c;
elseif (j <= 3.3e-114)
tmp = t_1;
else
tmp = k * (j * -27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(18.0 * N[(t * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -2.9e+150], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -1.9e-19], t$95$1, If[LessEqual[j, 4.8e-209], N[(b * c), $MachinePrecision], If[LessEqual[j, 3.3e-114], t$95$1, N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 := 18 \cdot \left(t \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{if}\;j \leq -2.9 \cdot 10^{+150}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;j \leq -1.9 \cdot 10^{-19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;j \leq 4.8 \cdot 10^{-209}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;j \leq 3.3 \cdot 10^{-114}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if j < -2.90000000000000011e150Initial program 74.1%
Simplified77.3%
Taylor expanded in j around inf 58.9%
if -2.90000000000000011e150 < j < -1.9e-19 or 4.8000000000000002e-209 < j < 3.30000000000000035e-114Initial program 91.5%
Simplified91.5%
associate-*r*91.4%
distribute-rgt-out--91.4%
associate-*l*84.8%
*-commutative84.8%
*-commutative84.8%
Applied egg-rr84.8%
Taylor expanded in y around inf 27.4%
expm1-log1p-u18.0%
expm1-udef17.9%
associate-*r*18.1%
Applied egg-rr18.1%
expm1-def18.2%
expm1-log1p29.0%
associate-*r*27.4%
*-commutative27.4%
associate-*l*29.1%
Simplified29.1%
if -1.9e-19 < j < 4.8000000000000002e-209Initial program 86.1%
Simplified87.5%
associate-*r*86.1%
distribute-rgt-out--86.1%
associate-+l-86.1%
associate-*l*88.4%
*-commutative88.4%
*-commutative88.4%
fma-neg88.5%
Applied egg-rr88.5%
Taylor expanded in b around inf 36.0%
if 3.30000000000000035e-114 < j Initial program 80.8%
Simplified82.1%
associate-*r*80.8%
distribute-rgt-out--80.8%
associate-+l-80.8%
associate-*l*80.9%
*-commutative80.9%
*-commutative80.9%
fma-neg80.9%
Applied egg-rr80.9%
Taylor expanded in j around inf 35.9%
associate-*r*35.8%
*-commutative35.8%
*-commutative35.8%
Simplified35.8%
Final simplification37.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
(if (<= j -3.25e+150)
(* -27.0 (* j k))
(if (<= j -1.08e-79)
(* 18.0 (* (* y z) (* x t)))
(if (<= j 4.4e-204)
(* b c)
(if (<= j 3.3e-114) (* 18.0 (* t (* y (* x z)))) (* k (* j -27.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 tmp;
if (j <= -3.25e+150) {
tmp = -27.0 * (j * k);
} else if (j <= -1.08e-79) {
tmp = 18.0 * ((y * z) * (x * t));
} else if (j <= 4.4e-204) {
tmp = b * c;
} else if (j <= 3.3e-114) {
tmp = 18.0 * (t * (y * (x * z)));
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 <= (-3.25d+150)) then
tmp = (-27.0d0) * (j * k)
else if (j <= (-1.08d-79)) then
tmp = 18.0d0 * ((y * z) * (x * t))
else if (j <= 4.4d-204) then
tmp = b * c
else if (j <= 3.3d-114) then
tmp = 18.0d0 * (t * (y * (x * z)))
else
tmp = k * (j * (-27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 <= -3.25e+150) {
tmp = -27.0 * (j * k);
} else if (j <= -1.08e-79) {
tmp = 18.0 * ((y * z) * (x * t));
} else if (j <= 4.4e-204) {
tmp = b * c;
} else if (j <= 3.3e-114) {
tmp = 18.0 * (t * (y * (x * z)));
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 <= -3.25e+150: tmp = -27.0 * (j * k) elif j <= -1.08e-79: tmp = 18.0 * ((y * z) * (x * t)) elif j <= 4.4e-204: tmp = b * c elif j <= 3.3e-114: tmp = 18.0 * (t * (y * (x * z))) else: tmp = k * (j * -27.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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 <= -3.25e+150) tmp = Float64(-27.0 * Float64(j * k)); elseif (j <= -1.08e-79) tmp = Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))); elseif (j <= 4.4e-204) tmp = Float64(b * c); elseif (j <= 3.3e-114) tmp = Float64(18.0 * Float64(t * Float64(y * Float64(x * z)))); else tmp = Float64(k * Float64(j * -27.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 <= -3.25e+150)
tmp = -27.0 * (j * k);
elseif (j <= -1.08e-79)
tmp = 18.0 * ((y * z) * (x * t));
elseif (j <= 4.4e-204)
tmp = b * c;
elseif (j <= 3.3e-114)
tmp = 18.0 * (t * (y * (x * z)));
else
tmp = k * (j * -27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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[j, -3.25e+150], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -1.08e-79], N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 4.4e-204], N[(b * c), $MachinePrecision], If[LessEqual[j, 3.3e-114], N[(18.0 * N[(t * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 -3.25 \cdot 10^{+150}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;j \leq -1.08 \cdot 10^{-79}:\\
\;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\
\mathbf{elif}\;j \leq 4.4 \cdot 10^{-204}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;j \leq 3.3 \cdot 10^{-114}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if j < -3.25000000000000016e150Initial program 74.1%
Simplified77.3%
Taylor expanded in j around inf 58.9%
if -3.25000000000000016e150 < j < -1.0800000000000001e-79Initial program 90.9%
Simplified95.4%
associate-*r*90.9%
distribute-rgt-out--90.9%
associate-*l*84.2%
*-commutative84.2%
*-commutative84.2%
Applied egg-rr84.2%
Taylor expanded in y around inf 31.3%
associate-*r*33.5%
Simplified33.5%
if -1.0800000000000001e-79 < j < 4.3999999999999997e-204Initial program 85.9%
Simplified86.1%
associate-*r*85.9%
distribute-rgt-out--85.9%
associate-+l-85.9%
associate-*l*88.5%
*-commutative88.5%
*-commutative88.5%
fma-neg88.6%
Applied egg-rr88.6%
Taylor expanded in b around inf 37.2%
if 4.3999999999999997e-204 < j < 3.30000000000000035e-114Initial program 91.2%
Simplified87.0%
associate-*r*91.2%
distribute-rgt-out--91.2%
associate-*l*86.8%
*-commutative86.8%
*-commutative86.8%
Applied egg-rr86.8%
Taylor expanded in y around inf 19.4%
expm1-log1p-u14.3%
expm1-udef14.1%
associate-*r*14.1%
Applied egg-rr14.1%
expm1-def14.4%
expm1-log1p19.4%
associate-*r*19.4%
*-commutative19.4%
associate-*l*23.6%
Simplified23.6%
if 3.30000000000000035e-114 < j Initial program 80.8%
Simplified82.1%
associate-*r*80.8%
distribute-rgt-out--80.8%
associate-+l-80.8%
associate-*l*80.9%
*-commutative80.9%
*-commutative80.9%
fma-neg80.9%
Applied egg-rr80.9%
Taylor expanded in j around inf 35.9%
associate-*r*35.8%
*-commutative35.8%
*-commutative35.8%
Simplified35.8%
Final simplification37.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
(if (<= j -2.8e+150)
(* -27.0 (* j k))
(if (<= j -2.7e-80)
(* 18.0 (* (* y z) (* x t)))
(if (<= j 1.75e-198)
(* b c)
(if (<= j 3.3e-114) (* z (* t (* x (* 18.0 y)))) (* k (* j -27.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 tmp;
if (j <= -2.8e+150) {
tmp = -27.0 * (j * k);
} else if (j <= -2.7e-80) {
tmp = 18.0 * ((y * z) * (x * t));
} else if (j <= 1.75e-198) {
tmp = b * c;
} else if (j <= 3.3e-114) {
tmp = z * (t * (x * (18.0 * y)));
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 <= (-2.8d+150)) then
tmp = (-27.0d0) * (j * k)
else if (j <= (-2.7d-80)) then
tmp = 18.0d0 * ((y * z) * (x * t))
else if (j <= 1.75d-198) then
tmp = b * c
else if (j <= 3.3d-114) then
tmp = z * (t * (x * (18.0d0 * y)))
else
tmp = k * (j * (-27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 <= -2.8e+150) {
tmp = -27.0 * (j * k);
} else if (j <= -2.7e-80) {
tmp = 18.0 * ((y * z) * (x * t));
} else if (j <= 1.75e-198) {
tmp = b * c;
} else if (j <= 3.3e-114) {
tmp = z * (t * (x * (18.0 * y)));
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 <= -2.8e+150: tmp = -27.0 * (j * k) elif j <= -2.7e-80: tmp = 18.0 * ((y * z) * (x * t)) elif j <= 1.75e-198: tmp = b * c elif j <= 3.3e-114: tmp = z * (t * (x * (18.0 * y))) else: tmp = k * (j * -27.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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 <= -2.8e+150) tmp = Float64(-27.0 * Float64(j * k)); elseif (j <= -2.7e-80) tmp = Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))); elseif (j <= 1.75e-198) tmp = Float64(b * c); elseif (j <= 3.3e-114) tmp = Float64(z * Float64(t * Float64(x * Float64(18.0 * y)))); else tmp = Float64(k * Float64(j * -27.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 <= -2.8e+150)
tmp = -27.0 * (j * k);
elseif (j <= -2.7e-80)
tmp = 18.0 * ((y * z) * (x * t));
elseif (j <= 1.75e-198)
tmp = b * c;
elseif (j <= 3.3e-114)
tmp = z * (t * (x * (18.0 * y)));
else
tmp = k * (j * -27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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[j, -2.8e+150], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -2.7e-80], N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.75e-198], N[(b * c), $MachinePrecision], If[LessEqual[j, 3.3e-114], N[(z * N[(t * N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;j \leq -2.8 \cdot 10^{+150}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;j \leq -2.7 \cdot 10^{-80}:\\
\;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\
\mathbf{elif}\;j \leq 1.75 \cdot 10^{-198}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;j \leq 3.3 \cdot 10^{-114}:\\
\;\;\;\;z \cdot \left(t \cdot \left(x \cdot \left(18 \cdot y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if j < -2.80000000000000009e150Initial program 74.1%
Simplified77.3%
Taylor expanded in j around inf 58.9%
if -2.80000000000000009e150 < j < -2.7000000000000002e-80Initial program 90.9%
Simplified95.4%
associate-*r*90.9%
distribute-rgt-out--90.9%
associate-*l*84.2%
*-commutative84.2%
*-commutative84.2%
Applied egg-rr84.2%
Taylor expanded in y around inf 31.3%
associate-*r*33.5%
Simplified33.5%
if -2.7000000000000002e-80 < j < 1.75000000000000013e-198Initial program 86.1%
Simplified86.3%
associate-*r*86.1%
distribute-rgt-out--86.1%
associate-+l-86.1%
associate-*l*88.7%
*-commutative88.7%
*-commutative88.7%
fma-neg88.7%
Applied egg-rr88.7%
Taylor expanded in b around inf 36.7%
if 1.75000000000000013e-198 < j < 3.30000000000000035e-114Initial program 90.8%
Simplified86.4%
associate-*r*90.8%
distribute-rgt-out--90.8%
associate-*l*86.2%
*-commutative86.2%
*-commutative86.2%
Applied egg-rr86.2%
Taylor expanded in y around inf 20.0%
*-commutative20.0%
associate-*r*20.0%
associate-*r*20.0%
*-commutative20.0%
associate-*r*20.2%
*-commutative20.2%
*-commutative20.2%
associate-*l*20.1%
*-commutative20.1%
associate-*l*20.2%
Simplified20.2%
if 3.30000000000000035e-114 < j Initial program 80.8%
Simplified82.1%
associate-*r*80.8%
distribute-rgt-out--80.8%
associate-+l-80.8%
associate-*l*80.9%
*-commutative80.9%
*-commutative80.9%
fma-neg80.9%
Applied egg-rr80.9%
Taylor expanded in j around inf 35.9%
associate-*r*35.8%
*-commutative35.8%
*-commutative35.8%
Simplified35.8%
Final simplification37.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) (* j (* k -27.0)))))
(if (<= j -7.5e+135)
t_1
(if (<= j 6.5e-204)
(- (* b c) (* 4.0 (* t a)))
(if (<= j 3.2e-128)
(* z (* t (* x (* 18.0 y))))
(if (<= j 1.7e-93) (- (* b c) (* 4.0 (* x i))) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 tmp;
if (j <= -7.5e+135) {
tmp = t_1;
} else if (j <= 6.5e-204) {
tmp = (b * c) - (4.0 * (t * a));
} else if (j <= 3.2e-128) {
tmp = z * (t * (x * (18.0 * y)));
} else if (j <= 1.7e-93) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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) + (j * (k * (-27.0d0)))
if (j <= (-7.5d+135)) then
tmp = t_1
else if (j <= 6.5d-204) then
tmp = (b * c) - (4.0d0 * (t * a))
else if (j <= 3.2d-128) then
tmp = z * (t * (x * (18.0d0 * y)))
else if (j <= 1.7d-93) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 tmp;
if (j <= -7.5e+135) {
tmp = t_1;
} else if (j <= 6.5e-204) {
tmp = (b * c) - (4.0 * (t * a));
} else if (j <= 3.2e-128) {
tmp = z * (t * (x * (18.0 * y)));
} else if (j <= 1.7e-93) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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)) tmp = 0 if j <= -7.5e+135: tmp = t_1 elif j <= 6.5e-204: tmp = (b * c) - (4.0 * (t * a)) elif j <= 3.2e-128: tmp = z * (t * (x * (18.0 * y))) elif j <= 1.7e-93: tmp = (b * c) - (4.0 * (x * i)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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))) tmp = 0.0 if (j <= -7.5e+135) tmp = t_1; elseif (j <= 6.5e-204) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); elseif (j <= 3.2e-128) tmp = Float64(z * Float64(t * Float64(x * Float64(18.0 * y)))); elseif (j <= 1.7e-93) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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));
tmp = 0.0;
if (j <= -7.5e+135)
tmp = t_1;
elseif (j <= 6.5e-204)
tmp = (b * c) - (4.0 * (t * a));
elseif (j <= 3.2e-128)
tmp = z * (t * (x * (18.0 * y)));
elseif (j <= 1.7e-93)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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]}, If[LessEqual[j, -7.5e+135], t$95$1, If[LessEqual[j, 6.5e-204], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3.2e-128], N[(z * N[(t * N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.7e-93], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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)\\
\mathbf{if}\;j \leq -7.5 \cdot 10^{+135}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;j \leq 6.5 \cdot 10^{-204}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;j \leq 3.2 \cdot 10^{-128}:\\
\;\;\;\;z \cdot \left(t \cdot \left(x \cdot \left(18 \cdot y\right)\right)\right)\\
\mathbf{elif}\;j \leq 1.7 \cdot 10^{-93}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if j < -7.49999999999999947e135 or 1.70000000000000001e-93 < j Initial program 80.0%
Simplified81.7%
Taylor expanded in b around inf 50.2%
if -7.49999999999999947e135 < j < 6.49999999999999939e-204Initial program 87.1%
Simplified89.0%
associate-*r*87.1%
distribute-rgt-out--87.1%
associate-+l-87.1%
associate-*l*86.9%
*-commutative86.9%
*-commutative86.9%
fma-neg86.9%
Applied egg-rr86.9%
Taylor expanded in x around inf 77.7%
associate-*r*77.7%
*-commutative77.7%
Simplified77.7%
Taylor expanded in x around 0 51.5%
if 6.49999999999999939e-204 < j < 3.1999999999999998e-128Initial program 88.8%
Simplified83.4%
associate-*r*88.8%
distribute-rgt-out--88.8%
associate-*l*83.2%
*-commutative83.2%
*-commutative83.2%
Applied egg-rr83.2%
Taylor expanded in y around inf 13.3%
*-commutative13.3%
associate-*r*13.3%
associate-*r*13.3%
*-commutative13.3%
associate-*r*13.5%
*-commutative13.5%
*-commutative13.5%
associate-*l*13.5%
*-commutative13.5%
associate-*l*13.5%
Simplified13.5%
if 3.1999999999999998e-128 < j < 1.70000000000000001e-93Initial program 99.7%
Taylor expanded in t around 0 52.7%
Taylor expanded in j around 0 51.9%
Final simplification48.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
(if (<= j -2.8e+150)
(* -27.0 (* j k))
(if (<= j -1.1e+102)
(* x (* i -4.0))
(if (<= j -6.2e-43)
(* -4.0 (* t a))
(if (<= j 3.3e-114) (* b c) (* k (* j -27.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 <= -2.8e+150) {
tmp = -27.0 * (j * k);
} else if (j <= -1.1e+102) {
tmp = x * (i * -4.0);
} else if (j <= -6.2e-43) {
tmp = -4.0 * (t * a);
} else if (j <= 3.3e-114) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 <= (-2.8d+150)) then
tmp = (-27.0d0) * (j * k)
else if (j <= (-1.1d+102)) then
tmp = x * (i * (-4.0d0))
else if (j <= (-6.2d-43)) then
tmp = (-4.0d0) * (t * a)
else if (j <= 3.3d-114) then
tmp = b * c
else
tmp = k * (j * (-27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 <= -2.8e+150) {
tmp = -27.0 * (j * k);
} else if (j <= -1.1e+102) {
tmp = x * (i * -4.0);
} else if (j <= -6.2e-43) {
tmp = -4.0 * (t * a);
} else if (j <= 3.3e-114) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 <= -2.8e+150: tmp = -27.0 * (j * k) elif j <= -1.1e+102: tmp = x * (i * -4.0) elif j <= -6.2e-43: tmp = -4.0 * (t * a) elif j <= 3.3e-114: tmp = b * c else: tmp = k * (j * -27.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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 <= -2.8e+150) tmp = Float64(-27.0 * Float64(j * k)); elseif (j <= -1.1e+102) tmp = Float64(x * Float64(i * -4.0)); elseif (j <= -6.2e-43) tmp = Float64(-4.0 * Float64(t * a)); elseif (j <= 3.3e-114) tmp = Float64(b * c); else tmp = Float64(k * Float64(j * -27.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 <= -2.8e+150)
tmp = -27.0 * (j * k);
elseif (j <= -1.1e+102)
tmp = x * (i * -4.0);
elseif (j <= -6.2e-43)
tmp = -4.0 * (t * a);
elseif (j <= 3.3e-114)
tmp = b * c;
else
tmp = k * (j * -27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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[j, -2.8e+150], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -1.1e+102], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -6.2e-43], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3.3e-114], N[(b * c), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;j \leq -2.8 \cdot 10^{+150}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;j \leq -1.1 \cdot 10^{+102}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;j \leq -6.2 \cdot 10^{-43}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;j \leq 3.3 \cdot 10^{-114}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if j < -2.80000000000000009e150Initial program 74.1%
Simplified77.3%
Taylor expanded in j around inf 58.9%
if -2.80000000000000009e150 < j < -1.10000000000000004e102Initial program 90.9%
Simplified90.8%
associate-*r*90.9%
distribute-rgt-out--90.9%
associate-+l-90.9%
associate-*l*73.2%
*-commutative73.2%
*-commutative73.2%
fma-neg73.2%
Applied egg-rr73.2%
Taylor expanded in i around inf 19.7%
*-commutative19.7%
*-commutative19.7%
associate-*r*19.7%
Simplified19.7%
if -1.10000000000000004e102 < j < -6.1999999999999999e-43Initial program 89.3%
Simplified96.4%
associate-*r*89.2%
distribute-rgt-out--89.2%
associate-+l-89.2%
associate-*l*85.7%
*-commutative85.7%
*-commutative85.7%
fma-neg85.7%
Applied egg-rr85.7%
Taylor expanded in a around inf 26.6%
*-commutative26.6%
*-commutative26.6%
Simplified26.6%
if -6.1999999999999999e-43 < j < 3.30000000000000035e-114Initial program 87.9%
Simplified87.0%
associate-*r*87.9%
distribute-rgt-out--87.9%
associate-+l-87.9%
associate-*l*88.7%
*-commutative88.7%
*-commutative88.7%
fma-neg88.7%
Applied egg-rr88.7%
Taylor expanded in b around inf 35.9%
if 3.30000000000000035e-114 < j Initial program 80.8%
Simplified82.1%
associate-*r*80.8%
distribute-rgt-out--80.8%
associate-+l-80.8%
associate-*l*80.9%
*-commutative80.9%
*-commutative80.9%
fma-neg80.9%
Applied egg-rr80.9%
Taylor expanded in j around inf 35.9%
associate-*r*35.8%
*-commutative35.8%
*-commutative35.8%
Simplified35.8%
Final simplification36.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 (or (<= t -1.55e+92) (not (<= t 1.1e-8))) (- (* b c) (* 4.0 (* t a))) (+ (* b c) (* j (* k -27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -1.55e+92) || !(t <= 1.1e-8)) {
tmp = (b * c) - (4.0 * (t * a));
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-1.55d+92)) .or. (.not. (t <= 1.1d-8))) then
tmp = (b * c) - (4.0d0 * (t * a))
else
tmp = (b * c) + (j * (k * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -1.55e+92) || !(t <= 1.1e-8)) {
tmp = (b * c) - (4.0 * (t * a));
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -1.55e+92) or not (t <= 1.1e-8): tmp = (b * c) - (4.0 * (t * a)) else: tmp = (b * c) + (j * (k * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -1.55e+92) || !(t <= 1.1e-8)) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); else tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -1.55e+92) || ~((t <= 1.1e-8)))
tmp = (b * c) - (4.0 * (t * a));
else
tmp = (b * c) + (j * (k * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -1.55e+92], N[Not[LessEqual[t, 1.1e-8]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.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}
\mathbf{if}\;t \leq -1.55 \cdot 10^{+92} \lor \neg \left(t \leq 1.1 \cdot 10^{-8}\right):\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if t < -1.5500000000000001e92 or 1.0999999999999999e-8 < t Initial program 91.2%
Simplified92.1%
associate-*r*91.2%
distribute-rgt-out--91.2%
associate-+l-91.2%
associate-*l*82.6%
*-commutative82.6%
*-commutative82.6%
fma-neg82.6%
Applied egg-rr82.6%
Taylor expanded in x around inf 77.7%
associate-*r*77.7%
*-commutative77.7%
Simplified77.7%
Taylor expanded in x around 0 52.1%
if -1.5500000000000001e92 < t < 1.0999999999999999e-8Initial program 78.3%
Simplified81.2%
Taylor expanded in b around inf 57.0%
Final simplification54.8%
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 (<= t -1e+195)
(* -4.0 (* t a))
(if (<= t 5.8e+111)
(+ (* b c) (* j (* k -27.0)))
(* 18.0 (* t (* x (* 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 tmp;
if (t <= -1e+195) {
tmp = -4.0 * (t * a);
} else if (t <= 5.8e+111) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = 18.0 * (t * (x * (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) :: tmp
if (t <= (-1d+195)) then
tmp = (-4.0d0) * (t * a)
else if (t <= 5.8d+111) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else
tmp = 18.0d0 * (t * (x * (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 tmp;
if (t <= -1e+195) {
tmp = -4.0 * (t * a);
} else if (t <= 5.8e+111) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = 18.0 * (t * (x * (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): tmp = 0 if t <= -1e+195: tmp = -4.0 * (t * a) elif t <= 5.8e+111: tmp = (b * c) + (j * (k * -27.0)) else: tmp = 18.0 * (t * (x * (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) tmp = 0.0 if (t <= -1e+195) tmp = Float64(-4.0 * Float64(t * a)); elseif (t <= 5.8e+111) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); else tmp = Float64(18.0 * Float64(t * Float64(x * 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)
tmp = 0.0;
if (t <= -1e+195)
tmp = -4.0 * (t * a);
elseif (t <= 5.8e+111)
tmp = (b * c) + (j * (k * -27.0));
else
tmp = 18.0 * (t * (x * (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_] := If[LessEqual[t, -1e+195], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e+111], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(18.0 * N[(t * N[(x * 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}
\mathbf{if}\;t \leq -1 \cdot 10^{+195}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+111}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if t < -9.99999999999999977e194Initial program 90.4%
Simplified90.4%
associate-*r*90.4%
distribute-rgt-out--90.4%
associate-+l-90.4%
associate-*l*85.9%
*-commutative85.9%
*-commutative85.9%
fma-neg85.9%
Applied egg-rr85.9%
Taylor expanded in a around inf 53.5%
*-commutative53.5%
*-commutative53.5%
Simplified53.5%
if -9.99999999999999977e194 < t < 5.7999999999999999e111Initial program 82.8%
Simplified85.0%
Taylor expanded in b around inf 54.3%
if 5.7999999999999999e111 < t Initial program 86.3%
Simplified88.8%
associate-*r*86.3%
distribute-rgt-out--86.3%
associate-*l*77.4%
*-commutative77.4%
*-commutative77.4%
Applied egg-rr77.4%
Taylor expanded in y around inf 44.3%
Final simplification52.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 (if (or (<= j -4.4e+141) (not (<= j 3.3e-114))) (* -27.0 (* j k)) (* 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.4e+141) || !(j <= 3.3e-114)) {
tmp = -27.0 * (j * k);
} 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.4d+141)) .or. (.not. (j <= 3.3d-114))) then
tmp = (-27.0d0) * (j * k)
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.4e+141) || !(j <= 3.3e-114)) {
tmp = -27.0 * (j * k);
} 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.4e+141) or not (j <= 3.3e-114): tmp = -27.0 * (j * k) 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.4e+141) || !(j <= 3.3e-114)) tmp = Float64(-27.0 * Float64(j * k)); 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.4e+141) || ~((j <= 3.3e-114)))
tmp = -27.0 * (j * k);
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.4e+141], N[Not[LessEqual[j, 3.3e-114]], $MachinePrecision]], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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.4 \cdot 10^{+141} \lor \neg \left(j \leq 3.3 \cdot 10^{-114}\right):\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if j < -4.4e141 or 3.30000000000000035e-114 < j Initial program 79.9%
Simplified81.6%
Taylor expanded in j around inf 41.9%
if -4.4e141 < j < 3.30000000000000035e-114Initial program 88.0%
Simplified88.8%
associate-*r*88.0%
distribute-rgt-out--88.0%
associate-+l-88.0%
associate-*l*87.1%
*-commutative87.1%
*-commutative87.1%
fma-neg87.1%
Applied egg-rr87.1%
Taylor expanded in b around inf 30.8%
Final simplification36.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 (if (<= j -2.3e+141) (* -27.0 (* j k)) (if (<= j 2.8e-114) (* b c) (* k (* j -27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 <= -2.3e+141) {
tmp = -27.0 * (j * k);
} else if (j <= 2.8e-114) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 <= (-2.3d+141)) then
tmp = (-27.0d0) * (j * k)
else if (j <= 2.8d-114) then
tmp = b * c
else
tmp = k * (j * (-27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 <= -2.3e+141) {
tmp = -27.0 * (j * k);
} else if (j <= 2.8e-114) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 <= -2.3e+141: tmp = -27.0 * (j * k) elif j <= 2.8e-114: tmp = b * c else: tmp = k * (j * -27.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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 <= -2.3e+141) tmp = Float64(-27.0 * Float64(j * k)); elseif (j <= 2.8e-114) tmp = Float64(b * c); else tmp = Float64(k * Float64(j * -27.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 <= -2.3e+141)
tmp = -27.0 * (j * k);
elseif (j <= 2.8e-114)
tmp = b * c;
else
tmp = k * (j * -27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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[j, -2.3e+141], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 2.8e-114], N[(b * c), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;j \leq -2.3 \cdot 10^{+141}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;j \leq 2.8 \cdot 10^{-114}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if j < -2.3000000000000002e141Initial program 77.7%
Simplified80.4%
Taylor expanded in j around inf 56.6%
if -2.3000000000000002e141 < j < 2.8000000000000001e-114Initial program 88.0%
Simplified88.8%
associate-*r*88.0%
distribute-rgt-out--88.0%
associate-+l-88.0%
associate-*l*87.1%
*-commutative87.1%
*-commutative87.1%
fma-neg87.1%
Applied egg-rr87.1%
Taylor expanded in b around inf 30.8%
if 2.8000000000000001e-114 < j Initial program 80.8%
Simplified82.1%
associate-*r*80.8%
distribute-rgt-out--80.8%
associate-+l-80.8%
associate-*l*80.9%
*-commutative80.9%
*-commutative80.9%
fma-neg80.9%
Applied egg-rr80.9%
Taylor expanded in j around inf 35.9%
associate-*r*35.8%
*-commutative35.8%
*-commutative35.8%
Simplified35.8%
Final simplification36.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 (* 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 84.1%
Simplified84.9%
associate-*r*84.1%
distribute-rgt-out--84.1%
associate-+l-84.1%
associate-*l*82.5%
*-commutative82.5%
*-commutative82.5%
fma-neg82.5%
Applied egg-rr82.5%
Taylor expanded in b around inf 23.5%
Final simplification23.5%
(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 2024021
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:herbie-target
(if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))