
(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 34 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(- (* b c) (- (* t (* a 4.0)) (* t (* z (* y (* x 18.0))))))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 INFINITY) t_1 (* t (+ (* 18.0 (* z (* x y))) (* a -4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((b * c) - ((t * (a * 4.0)) - (t * (z * (y * (x * 18.0)))))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((b * c) - ((t * (a * 4.0)) - (t * (z * (y * (x * 18.0)))))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (((b * c) - ((t * (a * 4.0)) - (t * (z * (y * (x * 18.0)))))) - ((x * 4.0) * i)) - ((j * 27.0) * k) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(b * c) - Float64(Float64(t * Float64(a * 4.0)) - Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))))) - 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(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) + Float64(a * -4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (((b * c) - ((t * (a * 4.0)) - (t * (z * (y * (x * 18.0)))))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(b * c), $MachinePrecision] - N[(N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision] - N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(b \cdot c - \left(t \cdot \left(a \cdot 4\right) - t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)\right)\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}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 97.4%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Simplified16.7%
Taylor expanded in t around inf 63.0%
cancel-sign-sub-inv63.0%
associate-*r*62.6%
metadata-eval62.6%
Applied egg-rr62.6%
Final simplification94.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (or (<= t_1 -1e+70) (not (<= t_1 2e-13)))
(- (- (* (* z (* x y)) (* 18.0 t)) (* 4.0 (+ (* x i) (* t a)))) t_1)
(-
(- (* b c) (* t (- (* a 4.0) (* 18.0 (* x (* y z))))))
(* 4.0 (* x i))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if ((t_1 <= -1e+70) || !(t_1 <= 2e-13)) {
tmp = (((z * (x * y)) * (18.0 * t)) - (4.0 * ((x * i) + (t * a)))) - t_1;
} else {
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if ((t_1 <= (-1d+70)) .or. (.not. (t_1 <= 2d-13))) then
tmp = (((z * (x * y)) * (18.0d0 * t)) - (4.0d0 * ((x * i) + (t * a)))) - t_1
else
tmp = ((b * c) - (t * ((a * 4.0d0) - (18.0d0 * (x * (y * z)))))) - (4.0d0 * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if ((t_1 <= -1e+70) || !(t_1 <= 2e-13)) {
tmp = (((z * (x * y)) * (18.0 * t)) - (4.0 * ((x * i) + (t * a)))) - t_1;
} else {
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if (t_1 <= -1e+70) or not (t_1 <= 2e-13): tmp = (((z * (x * y)) * (18.0 * t)) - (4.0 * ((x * i) + (t * a)))) - t_1 else: tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if ((t_1 <= -1e+70) || !(t_1 <= 2e-13)) tmp = Float64(Float64(Float64(Float64(z * Float64(x * y)) * Float64(18.0 * t)) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - t_1); else tmp = Float64(Float64(Float64(b * c) - Float64(t * Float64(Float64(a * 4.0) - Float64(18.0 * Float64(x * Float64(y * z)))))) - Float64(4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if ((t_1 <= -1e+70) || ~((t_1 <= 2e-13)))
tmp = (((z * (x * y)) * (18.0 * t)) - (4.0 * ((x * i) + (t * a)))) - t_1;
else
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+70], N[Not[LessEqual[t$95$1, 2e-13]], $MachinePrecision]], N[(N[(N[(N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] - N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+70} \lor \neg \left(t\_1 \leq 2 \cdot 10^{-13}\right):\\
\;\;\;\;\left(\left(z \cdot \left(x \cdot y\right)\right) \cdot \left(18 \cdot t\right) - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - t \cdot \left(a \cdot 4 - 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.00000000000000007e70 or 2.0000000000000001e-13 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 83.9%
Taylor expanded in b around 0 80.9%
associate-*r*77.1%
distribute-lft-out77.1%
*-commutative77.1%
Simplified77.1%
Taylor expanded in t around 0 80.9%
associate-*r*80.9%
associate-*r*81.9%
Simplified81.9%
if -1.00000000000000007e70 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.0000000000000001e-13Initial program 91.4%
Simplified90.8%
Taylor expanded in j around 0 89.6%
Final simplification86.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (or (<= t_1 -1e+70) (not (<= t_1 2e-34)))
(- (- (* 18.0 (* x (* t (* y z)))) (* 4.0 (+ (* x i) (* t a)))) t_1)
(-
(- (* b c) (* t (- (* a 4.0) (* 18.0 (* x (* y z))))))
(* 4.0 (* x i))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if ((t_1 <= -1e+70) || !(t_1 <= 2e-34)) {
tmp = ((18.0 * (x * (t * (y * z)))) - (4.0 * ((x * i) + (t * a)))) - t_1;
} else {
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if ((t_1 <= (-1d+70)) .or. (.not. (t_1 <= 2d-34))) then
tmp = ((18.0d0 * (x * (t * (y * z)))) - (4.0d0 * ((x * i) + (t * a)))) - t_1
else
tmp = ((b * c) - (t * ((a * 4.0d0) - (18.0d0 * (x * (y * z)))))) - (4.0d0 * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if ((t_1 <= -1e+70) || !(t_1 <= 2e-34)) {
tmp = ((18.0 * (x * (t * (y * z)))) - (4.0 * ((x * i) + (t * a)))) - t_1;
} else {
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if (t_1 <= -1e+70) or not (t_1 <= 2e-34): tmp = ((18.0 * (x * (t * (y * z)))) - (4.0 * ((x * i) + (t * a)))) - t_1 else: tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if ((t_1 <= -1e+70) || !(t_1 <= 2e-34)) tmp = Float64(Float64(Float64(18.0 * Float64(x * Float64(t * Float64(y * z)))) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - t_1); else tmp = Float64(Float64(Float64(b * c) - Float64(t * Float64(Float64(a * 4.0) - Float64(18.0 * Float64(x * Float64(y * z)))))) - Float64(4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if ((t_1 <= -1e+70) || ~((t_1 <= 2e-34)))
tmp = ((18.0 * (x * (t * (y * z)))) - (4.0 * ((x * i) + (t * a)))) - t_1;
else
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+70], N[Not[LessEqual[t$95$1, 2e-34]], $MachinePrecision]], N[(N[(N[(18.0 * N[(x * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] - N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+70} \lor \neg \left(t\_1 \leq 2 \cdot 10^{-34}\right):\\
\;\;\;\;\left(18 \cdot \left(x \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - t \cdot \left(a \cdot 4 - 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.00000000000000007e70 or 1.99999999999999986e-34 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 83.5%
Taylor expanded in b around 0 79.8%
associate-*r*77.1%
distribute-lft-out77.1%
*-commutative77.1%
Simplified77.1%
Taylor expanded in t around 0 79.8%
associate-*r*77.1%
*-commutative77.1%
associate-*l*79.9%
*-commutative79.9%
Simplified79.9%
if -1.00000000000000007e70 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.99999999999999986e-34Initial program 91.8%
Simplified91.3%
Taylor expanded in j around 0 90.0%
Final simplification85.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -1e+97)
(-
(* t (- (* -18.0 (* z (* x (- y)))) (* 4.0 (+ a (* i (/ x t))))))
(* (* j 27.0) k))
(if (<= t 1.4e+110)
(-
(+ (* (* x (* 18.0 y)) (* z t)) (- (* b c) (* t (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(-
(- (* b c) (* t (- (* a 4.0) (* 18.0 (* x (* y z))))))
(* 4.0 (* x i))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -1e+97) {
tmp = (t * ((-18.0 * (z * (x * -y))) - (4.0 * (a + (i * (x / t)))))) - ((j * 27.0) * k);
} else if (t <= 1.4e+110) {
tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - (t * (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (t <= (-1d+97)) then
tmp = (t * (((-18.0d0) * (z * (x * -y))) - (4.0d0 * (a + (i * (x / t)))))) - ((j * 27.0d0) * k)
else if (t <= 1.4d+110) then
tmp = (((x * (18.0d0 * y)) * (z * t)) + ((b * c) - (t * (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = ((b * c) - (t * ((a * 4.0d0) - (18.0d0 * (x * (y * z)))))) - (4.0d0 * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -1e+97) {
tmp = (t * ((-18.0 * (z * (x * -y))) - (4.0 * (a + (i * (x / t)))))) - ((j * 27.0) * k);
} else if (t <= 1.4e+110) {
tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - (t * (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -1e+97: tmp = (t * ((-18.0 * (z * (x * -y))) - (4.0 * (a + (i * (x / t)))))) - ((j * 27.0) * k) elif t <= 1.4e+110: tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - (t * (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -1e+97) tmp = Float64(Float64(t * Float64(Float64(-18.0 * Float64(z * Float64(x * Float64(-y)))) - Float64(4.0 * Float64(a + Float64(i * Float64(x / t)))))) - Float64(Float64(j * 27.0) * k)); elseif (t <= 1.4e+110) tmp = Float64(Float64(Float64(Float64(x * Float64(18.0 * y)) * Float64(z * t)) + Float64(Float64(b * c) - Float64(t * Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(Float64(Float64(b * c) - Float64(t * Float64(Float64(a * 4.0) - Float64(18.0 * Float64(x * Float64(y * z)))))) - Float64(4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= -1e+97)
tmp = (t * ((-18.0 * (z * (x * -y))) - (4.0 * (a + (i * (x / t)))))) - ((j * 27.0) * k);
elseif (t <= 1.4e+110)
tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - (t * (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -1e+97], N[(N[(t * N[(N[(-18.0 * N[(z * N[(x * (-y)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a + N[(i * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.4e+110], N[(N[(N[(N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] - N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{+97}:\\
\;\;\;\;t \cdot \left(-18 \cdot \left(z \cdot \left(x \cdot \left(-y\right)\right)\right) - 4 \cdot \left(a + i \cdot \frac{x}{t}\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{+110}:\\
\;\;\;\;\left(\left(x \cdot \left(18 \cdot y\right)\right) \cdot \left(z \cdot t\right) + \left(b \cdot c - t \cdot \left(a \cdot 4\right)\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - t \cdot \left(a \cdot 4 - 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if t < -1.0000000000000001e97Initial program 85.0%
Taylor expanded in b around 0 90.0%
associate-*r*87.6%
distribute-lft-out87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in t around -inf 95.0%
mul-1-neg95.0%
*-commutative95.0%
distribute-rgt-neg-in95.0%
associate--l+95.0%
*-commutative95.0%
associate-*r*94.9%
cancel-sign-sub-inv94.9%
metadata-eval94.9%
+-commutative94.9%
distribute-lft-out94.9%
associate-/l*92.4%
Simplified92.4%
if -1.0000000000000001e97 < t < 1.39999999999999993e110Initial program 90.7%
Simplified87.6%
associate-*r*91.2%
distribute-rgt-out--90.7%
associate-+l-90.7%
associate-*l*91.6%
fma-neg92.2%
associate-*l*92.2%
*-commutative92.2%
Applied egg-rr92.2%
fma-undefine91.6%
unsub-neg91.6%
*-commutative91.6%
Simplified91.6%
if 1.39999999999999993e110 < t Initial program 79.0%
Simplified81.7%
Taylor expanded in j around 0 90.9%
Final simplification91.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* x i) (* t a)))
(t_2 (* (* j 27.0) k))
(t_3 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -3.1e+187)
t_3
(if (<= t -1.15e+112)
(- (* -4.0 t_1) t_2)
(if (<= t -5.8e-129)
(- (+ (* b c) (* (* x (* 18.0 y)) (* z t))) (* x (* 4.0 i)))
(if (<= t 6e+123) (- (- (* b c) (* 4.0 t_1)) t_2) t_3))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * i) + (t * a);
double t_2 = (j * 27.0) * k;
double t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -3.1e+187) {
tmp = t_3;
} else if (t <= -1.15e+112) {
tmp = (-4.0 * t_1) - t_2;
} else if (t <= -5.8e-129) {
tmp = ((b * c) + ((x * (18.0 * y)) * (z * t))) - (x * (4.0 * i));
} else if (t <= 6e+123) {
tmp = ((b * c) - (4.0 * t_1)) - t_2;
} 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.
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 = (x * i) + (t * a)
t_2 = (j * 27.0d0) * k
t_3 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-3.1d+187)) then
tmp = t_3
else if (t <= (-1.15d+112)) then
tmp = ((-4.0d0) * t_1) - t_2
else if (t <= (-5.8d-129)) then
tmp = ((b * c) + ((x * (18.0d0 * y)) * (z * t))) - (x * (4.0d0 * i))
else if (t <= 6d+123) then
tmp = ((b * c) - (4.0d0 * t_1)) - t_2
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;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * i) + (t * a);
double t_2 = (j * 27.0) * k;
double t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -3.1e+187) {
tmp = t_3;
} else if (t <= -1.15e+112) {
tmp = (-4.0 * t_1) - t_2;
} else if (t <= -5.8e-129) {
tmp = ((b * c) + ((x * (18.0 * y)) * (z * t))) - (x * (4.0 * i));
} else if (t <= 6e+123) {
tmp = ((b * c) - (4.0 * t_1)) - t_2;
} 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]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (x * i) + (t * a) t_2 = (j * 27.0) * k t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -3.1e+187: tmp = t_3 elif t <= -1.15e+112: tmp = (-4.0 * t_1) - t_2 elif t <= -5.8e-129: tmp = ((b * c) + ((x * (18.0 * y)) * (z * t))) - (x * (4.0 * i)) elif t <= 6e+123: tmp = ((b * c) - (4.0 * t_1)) - t_2 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]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(x * i) + Float64(t * a)) t_2 = Float64(Float64(j * 27.0) * k) t_3 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -3.1e+187) tmp = t_3; elseif (t <= -1.15e+112) tmp = Float64(Float64(-4.0 * t_1) - t_2); elseif (t <= -5.8e-129) tmp = Float64(Float64(Float64(b * c) + Float64(Float64(x * Float64(18.0 * y)) * Float64(z * t))) - Float64(x * Float64(4.0 * i))); elseif (t <= 6e+123) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * t_1)) - t_2); 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (x * i) + (t * a);
t_2 = (j * 27.0) * k;
t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -3.1e+187)
tmp = t_3;
elseif (t <= -1.15e+112)
tmp = (-4.0 * t_1) - t_2;
elseif (t <= -5.8e-129)
tmp = ((b * c) + ((x * (18.0 * y)) * (z * t))) - (x * (4.0 * i));
elseif (t <= 6e+123)
tmp = ((b * c) - (4.0 * t_1)) - t_2;
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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.1e+187], t$95$3, If[LessEqual[t, -1.15e+112], N[(N[(-4.0 * t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[t, -5.8e-129], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e+123], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - t$95$2), $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])\\
\\
\begin{array}{l}
t_1 := x \cdot i + t \cdot a\\
t_2 := \left(j \cdot 27\right) \cdot k\\
t_3 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -3.1 \cdot 10^{+187}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -1.15 \cdot 10^{+112}:\\
\;\;\;\;-4 \cdot t\_1 - t\_2\\
\mathbf{elif}\;t \leq -5.8 \cdot 10^{-129}:\\
\;\;\;\;\left(b \cdot c + \left(x \cdot \left(18 \cdot y\right)\right) \cdot \left(z \cdot t\right)\right) - x \cdot \left(4 \cdot i\right)\\
\mathbf{elif}\;t \leq 6 \cdot 10^{+123}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot t\_1\right) - t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if t < -3.10000000000000012e187 or 6.00000000000000016e123 < t Initial program 79.8%
Simplified85.1%
Taylor expanded in t around inf 85.6%
if -3.10000000000000012e187 < t < -1.15e112Initial program 88.2%
Taylor expanded in b around 0 99.9%
associate-*r*100.0%
distribute-lft-out100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y around 0 77.5%
if -1.15e112 < t < -5.80000000000000034e-129Initial program 92.4%
Simplified83.6%
associate-*r*92.4%
distribute-rgt-out--92.4%
associate-+l-92.4%
associate-*l*92.4%
fma-neg92.4%
associate-*l*90.6%
*-commutative90.6%
Applied egg-rr90.6%
fma-undefine90.6%
unsub-neg90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in x around inf 86.8%
associate-*r*86.8%
*-commutative86.8%
Simplified86.8%
Taylor expanded in t around 0 75.7%
neg-mul-175.7%
distribute-rgt-neg-in75.7%
Simplified75.7%
if -5.80000000000000034e-129 < t < 6.00000000000000016e123Initial program 90.1%
Taylor expanded in y around 0 87.9%
distribute-lft-out87.9%
*-commutative87.9%
Simplified87.9%
Final simplification84.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= t -2e+93)
(- (* t (- (* -18.0 (* z (* x (- y)))) (* 4.0 (+ a (* i (/ x t)))))) t_1)
(if (<= t -1.15e-211)
(-
(+ (* (* x (* 18.0 y)) (* z t)) (- (* b c) (* t (* a 4.0))))
(* x (* 4.0 i)))
(if (<= t 3.4e+106)
(- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) t_1)
(-
(- (* b c) (* t (- (* a 4.0) (* 18.0 (* x (* y z))))))
(* 4.0 (* x i))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t <= -2e+93) {
tmp = (t * ((-18.0 * (z * (x * -y))) - (4.0 * (a + (i * (x / t)))))) - t_1;
} else if (t <= -1.15e-211) {
tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - (t * (a * 4.0)))) - (x * (4.0 * i));
} else if (t <= 3.4e+106) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1;
} else {
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if (t <= (-2d+93)) then
tmp = (t * (((-18.0d0) * (z * (x * -y))) - (4.0d0 * (a + (i * (x / t)))))) - t_1
else if (t <= (-1.15d-211)) then
tmp = (((x * (18.0d0 * y)) * (z * t)) + ((b * c) - (t * (a * 4.0d0)))) - (x * (4.0d0 * i))
else if (t <= 3.4d+106) then
tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - t_1
else
tmp = ((b * c) - (t * ((a * 4.0d0) - (18.0d0 * (x * (y * z)))))) - (4.0d0 * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t <= -2e+93) {
tmp = (t * ((-18.0 * (z * (x * -y))) - (4.0 * (a + (i * (x / t)))))) - t_1;
} else if (t <= -1.15e-211) {
tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - (t * (a * 4.0)))) - (x * (4.0 * i));
} else if (t <= 3.4e+106) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1;
} else {
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if t <= -2e+93: tmp = (t * ((-18.0 * (z * (x * -y))) - (4.0 * (a + (i * (x / t)))))) - t_1 elif t <= -1.15e-211: tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - (t * (a * 4.0)))) - (x * (4.0 * i)) elif t <= 3.4e+106: tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1 else: tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t <= -2e+93) tmp = Float64(Float64(t * Float64(Float64(-18.0 * Float64(z * Float64(x * Float64(-y)))) - Float64(4.0 * Float64(a + Float64(i * Float64(x / t)))))) - t_1); elseif (t <= -1.15e-211) tmp = Float64(Float64(Float64(Float64(x * Float64(18.0 * y)) * Float64(z * t)) + Float64(Float64(b * c) - Float64(t * Float64(a * 4.0)))) - Float64(x * Float64(4.0 * i))); elseif (t <= 3.4e+106) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - t_1); else tmp = Float64(Float64(Float64(b * c) - Float64(t * Float64(Float64(a * 4.0) - Float64(18.0 * Float64(x * Float64(y * z)))))) - Float64(4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if (t <= -2e+93)
tmp = (t * ((-18.0 * (z * (x * -y))) - (4.0 * (a + (i * (x / t)))))) - t_1;
elseif (t <= -1.15e-211)
tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - (t * (a * 4.0)))) - (x * (4.0 * i));
elseif (t <= 3.4e+106)
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1;
else
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t, -2e+93], N[(N[(t * N[(N[(-18.0 * N[(z * N[(x * (-y)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a + N[(i * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, -1.15e-211], N[(N[(N[(N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e+106], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] - N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t \leq -2 \cdot 10^{+93}:\\
\;\;\;\;t \cdot \left(-18 \cdot \left(z \cdot \left(x \cdot \left(-y\right)\right)\right) - 4 \cdot \left(a + i \cdot \frac{x}{t}\right)\right) - t\_1\\
\mathbf{elif}\;t \leq -1.15 \cdot 10^{-211}:\\
\;\;\;\;\left(\left(x \cdot \left(18 \cdot y\right)\right) \cdot \left(z \cdot t\right) + \left(b \cdot c - t \cdot \left(a \cdot 4\right)\right)\right) - x \cdot \left(4 \cdot i\right)\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{+106}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - t \cdot \left(a \cdot 4 - 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if t < -2.00000000000000009e93Initial program 85.7%
Taylor expanded in b around 0 90.4%
associate-*r*88.2%
distribute-lft-out88.2%
*-commutative88.2%
Simplified88.2%
Taylor expanded in t around -inf 95.2%
mul-1-neg95.2%
*-commutative95.2%
distribute-rgt-neg-in95.2%
associate--l+95.2%
*-commutative95.2%
associate-*r*95.1%
cancel-sign-sub-inv95.1%
metadata-eval95.1%
+-commutative95.1%
distribute-lft-out95.1%
associate-/l*92.7%
Simplified92.7%
if -2.00000000000000009e93 < t < -1.14999999999999994e-211Initial program 92.8%
Simplified84.7%
associate-*r*92.8%
distribute-rgt-out--92.8%
associate-+l-92.8%
associate-*l*92.7%
fma-neg92.7%
associate-*l*92.7%
*-commutative92.7%
Applied egg-rr92.7%
fma-undefine92.7%
unsub-neg92.7%
*-commutative92.7%
Simplified92.7%
Taylor expanded in x around inf 84.4%
associate-*r*84.4%
*-commutative84.4%
Simplified84.4%
if -1.14999999999999994e-211 < t < 3.39999999999999994e106Initial program 89.2%
Taylor expanded in y around 0 89.3%
distribute-lft-out89.3%
*-commutative89.3%
Simplified89.3%
if 3.39999999999999994e106 < t Initial program 79.0%
Simplified81.7%
Taylor expanded in j around 0 90.9%
Final simplification88.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 4.0 (+ (* x i) (* t a)))) (t_2 (* (* j 27.0) k)))
(if (<= t -1.55e+94)
(- (- (* 18.0 (* x (* t (* y z)))) t_1) t_2)
(if (<= t -1.15e-211)
(-
(+ (* (* x (* 18.0 y)) (* z t)) (- (* b c) (* t (* a 4.0))))
(* x (* 4.0 i)))
(if (<= t 3.5e+106)
(- (- (* b c) t_1) t_2)
(-
(- (* b c) (* t (- (* a 4.0) (* 18.0 (* x (* y z))))))
(* 4.0 (* x i))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * ((x * i) + (t * a));
double t_2 = (j * 27.0) * k;
double tmp;
if (t <= -1.55e+94) {
tmp = ((18.0 * (x * (t * (y * z)))) - t_1) - t_2;
} else if (t <= -1.15e-211) {
tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - (t * (a * 4.0)))) - (x * (4.0 * i));
} else if (t <= 3.5e+106) {
tmp = ((b * c) - t_1) - t_2;
} else {
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 4.0d0 * ((x * i) + (t * a))
t_2 = (j * 27.0d0) * k
if (t <= (-1.55d+94)) then
tmp = ((18.0d0 * (x * (t * (y * z)))) - t_1) - t_2
else if (t <= (-1.15d-211)) then
tmp = (((x * (18.0d0 * y)) * (z * t)) + ((b * c) - (t * (a * 4.0d0)))) - (x * (4.0d0 * i))
else if (t <= 3.5d+106) then
tmp = ((b * c) - t_1) - t_2
else
tmp = ((b * c) - (t * ((a * 4.0d0) - (18.0d0 * (x * (y * z)))))) - (4.0d0 * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * ((x * i) + (t * a));
double t_2 = (j * 27.0) * k;
double tmp;
if (t <= -1.55e+94) {
tmp = ((18.0 * (x * (t * (y * z)))) - t_1) - t_2;
} else if (t <= -1.15e-211) {
tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - (t * (a * 4.0)))) - (x * (4.0 * i));
} else if (t <= 3.5e+106) {
tmp = ((b * c) - t_1) - t_2;
} else {
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * ((x * i) + (t * a)) t_2 = (j * 27.0) * k tmp = 0 if t <= -1.55e+94: tmp = ((18.0 * (x * (t * (y * z)))) - t_1) - t_2 elif t <= -1.15e-211: tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - (t * (a * 4.0)))) - (x * (4.0 * i)) elif t <= 3.5e+106: tmp = ((b * c) - t_1) - t_2 else: tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(Float64(x * i) + Float64(t * a))) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t <= -1.55e+94) tmp = Float64(Float64(Float64(18.0 * Float64(x * Float64(t * Float64(y * z)))) - t_1) - t_2); elseif (t <= -1.15e-211) tmp = Float64(Float64(Float64(Float64(x * Float64(18.0 * y)) * Float64(z * t)) + Float64(Float64(b * c) - Float64(t * Float64(a * 4.0)))) - Float64(x * Float64(4.0 * i))); elseif (t <= 3.5e+106) tmp = Float64(Float64(Float64(b * c) - t_1) - t_2); else tmp = Float64(Float64(Float64(b * c) - Float64(t * Float64(Float64(a * 4.0) - Float64(18.0 * Float64(x * Float64(y * z)))))) - Float64(4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 4.0 * ((x * i) + (t * a));
t_2 = (j * 27.0) * k;
tmp = 0.0;
if (t <= -1.55e+94)
tmp = ((18.0 * (x * (t * (y * z)))) - t_1) - t_2;
elseif (t <= -1.15e-211)
tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - (t * (a * 4.0)))) - (x * (4.0 * i));
elseif (t <= 3.5e+106)
tmp = ((b * c) - t_1) - t_2;
else
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t, -1.55e+94], N[(N[(N[(18.0 * N[(x * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[t, -1.15e-211], N[(N[(N[(N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e+106], N[(N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] - N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i + t \cdot a\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t \leq -1.55 \cdot 10^{+94}:\\
\;\;\;\;\left(18 \cdot \left(x \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) - t\_1\right) - t\_2\\
\mathbf{elif}\;t \leq -1.15 \cdot 10^{-211}:\\
\;\;\;\;\left(\left(x \cdot \left(18 \cdot y\right)\right) \cdot \left(z \cdot t\right) + \left(b \cdot c - t \cdot \left(a \cdot 4\right)\right)\right) - x \cdot \left(4 \cdot i\right)\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{+106}:\\
\;\;\;\;\left(b \cdot c - t\_1\right) - t\_2\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - t \cdot \left(a \cdot 4 - 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if t < -1.54999999999999996e94Initial program 85.7%
Taylor expanded in b around 0 90.4%
associate-*r*88.2%
distribute-lft-out88.2%
*-commutative88.2%
Simplified88.2%
Taylor expanded in t around 0 90.4%
associate-*r*88.2%
*-commutative88.2%
associate-*l*90.4%
*-commutative90.4%
Simplified90.4%
if -1.54999999999999996e94 < t < -1.14999999999999994e-211Initial program 92.8%
Simplified84.7%
associate-*r*92.8%
distribute-rgt-out--92.8%
associate-+l-92.8%
associate-*l*92.7%
fma-neg92.7%
associate-*l*92.7%
*-commutative92.7%
Applied egg-rr92.7%
fma-undefine92.7%
unsub-neg92.7%
*-commutative92.7%
Simplified92.7%
Taylor expanded in x around inf 84.4%
associate-*r*84.4%
*-commutative84.4%
Simplified84.4%
if -1.14999999999999994e-211 < t < 3.49999999999999981e106Initial program 89.2%
Taylor expanded in y around 0 89.3%
distribute-lft-out89.3%
*-commutative89.3%
Simplified89.3%
if 3.49999999999999981e106 < t Initial program 79.0%
Simplified81.7%
Taylor expanded in j around 0 90.9%
Final simplification88.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= z 3.4e+253)
(-
(+ (* b c) (* t (- (* (* y z) (* x 18.0)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(* z (+ (* -4.0 (/ (* x i) z)) (* 18.0 (* t (* x y)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= 3.4e+253) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = z * ((-4.0 * ((x * i) / z)) + (18.0 * (t * (x * y))));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (z <= 3.4d+253) then
tmp = ((b * c) + (t * (((y * z) * (x * 18.0d0)) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = z * (((-4.0d0) * ((x * i) / z)) + (18.0d0 * (t * (x * y))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= 3.4e+253) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = z * ((-4.0 * ((x * i) / z)) + (18.0 * (t * (x * y))));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if z <= 3.4e+253: tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = z * ((-4.0 * ((x * i) / z)) + (18.0 * (t * (x * y)))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (z <= 3.4e+253) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(y * z) * Float64(x * 18.0)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(z * Float64(Float64(-4.0 * Float64(Float64(x * i) / z)) + Float64(18.0 * Float64(t * Float64(x * y))))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (z <= 3.4e+253)
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = z * ((-4.0 * ((x * i) / z)) + (18.0 * (t * (x * y))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[z, 3.4e+253], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(-4.0 * N[(N[(x * i), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 3.4 \cdot 10^{+253}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-4 \cdot \frac{x \cdot i}{z} + 18 \cdot \left(t \cdot \left(x \cdot y\right)\right)\right)\\
\end{array}
\end{array}
if z < 3.40000000000000017e253Initial program 89.2%
Simplified88.4%
if 3.40000000000000017e253 < z Initial program 72.1%
Simplified65.7%
Taylor expanded in x around inf 59.0%
Taylor expanded in z around inf 79.1%
Final simplification87.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= z 5.2e+253)
(-
(- (- (* b c) (* (* x 4.0) i)) (* t (- (* a 4.0) (* x (* z (* 18.0 y))))))
(* (* j 27.0) k))
(* z (+ (* -4.0 (/ (* x i) z)) (* 18.0 (* t (* x y)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= 5.2e+253) {
tmp = (((b * c) - ((x * 4.0) * i)) - (t * ((a * 4.0) - (x * (z * (18.0 * y)))))) - ((j * 27.0) * k);
} else {
tmp = z * ((-4.0 * ((x * i) / z)) + (18.0 * (t * (x * y))));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (z <= 5.2d+253) then
tmp = (((b * c) - ((x * 4.0d0) * i)) - (t * ((a * 4.0d0) - (x * (z * (18.0d0 * y)))))) - ((j * 27.0d0) * k)
else
tmp = z * (((-4.0d0) * ((x * i) / z)) + (18.0d0 * (t * (x * y))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= 5.2e+253) {
tmp = (((b * c) - ((x * 4.0) * i)) - (t * ((a * 4.0) - (x * (z * (18.0 * y)))))) - ((j * 27.0) * k);
} else {
tmp = z * ((-4.0 * ((x * i) / z)) + (18.0 * (t * (x * y))));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if z <= 5.2e+253: tmp = (((b * c) - ((x * 4.0) * i)) - (t * ((a * 4.0) - (x * (z * (18.0 * y)))))) - ((j * 27.0) * k) else: tmp = z * ((-4.0 * ((x * i) / z)) + (18.0 * (t * (x * y)))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (z <= 5.2e+253) tmp = Float64(Float64(Float64(Float64(b * c) - Float64(Float64(x * 4.0) * i)) - Float64(t * Float64(Float64(a * 4.0) - Float64(x * Float64(z * Float64(18.0 * y)))))) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(z * Float64(Float64(-4.0 * Float64(Float64(x * i) / z)) + Float64(18.0 * Float64(t * Float64(x * y))))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (z <= 5.2e+253)
tmp = (((b * c) - ((x * 4.0) * i)) - (t * ((a * 4.0) - (x * (z * (18.0 * y)))))) - ((j * 27.0) * k);
else
tmp = z * ((-4.0 * ((x * i) / z)) + (18.0 * (t * (x * y))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[z, 5.2e+253], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] - N[(x * N[(z * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(-4.0 * N[(N[(x * i), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 5.2 \cdot 10^{+253}:\\
\;\;\;\;\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - t \cdot \left(a \cdot 4 - x \cdot \left(z \cdot \left(18 \cdot y\right)\right)\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-4 \cdot \frac{x \cdot i}{z} + 18 \cdot \left(t \cdot \left(x \cdot y\right)\right)\right)\\
\end{array}
\end{array}
if z < 5.2e253Initial program 89.2%
associate--l+89.2%
distribute-rgt-out--90.1%
associate-*r*88.4%
associate-*l*88.5%
associate-*r*88.1%
*-commutative88.1%
Applied egg-rr88.1%
if 5.2e253 < z Initial program 72.1%
Simplified65.7%
Taylor expanded in x around inf 59.0%
Taylor expanded in z around inf 79.1%
Final simplification87.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -5e+179)
(* b c)
(if (<= (* b c) -5e-173)
(* j (* k -27.0))
(if (<= (* b c) 2e+79)
(* x (* i -4.0))
(if (<= (* b c) 1e+168) (* -4.0 (* t a)) (* b c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -5e+179) {
tmp = b * c;
} else if ((b * c) <= -5e-173) {
tmp = j * (k * -27.0);
} else if ((b * c) <= 2e+79) {
tmp = x * (i * -4.0);
} else if ((b * c) <= 1e+168) {
tmp = -4.0 * (t * a);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-5d+179)) then
tmp = b * c
else if ((b * c) <= (-5d-173)) then
tmp = j * (k * (-27.0d0))
else if ((b * c) <= 2d+79) then
tmp = x * (i * (-4.0d0))
else if ((b * c) <= 1d+168) then
tmp = (-4.0d0) * (t * a)
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -5e+179) {
tmp = b * c;
} else if ((b * c) <= -5e-173) {
tmp = j * (k * -27.0);
} else if ((b * c) <= 2e+79) {
tmp = x * (i * -4.0);
} else if ((b * c) <= 1e+168) {
tmp = -4.0 * (t * a);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -5e+179: tmp = b * c elif (b * c) <= -5e-173: tmp = j * (k * -27.0) elif (b * c) <= 2e+79: tmp = x * (i * -4.0) elif (b * c) <= 1e+168: tmp = -4.0 * (t * a) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -5e+179) tmp = Float64(b * c); elseif (Float64(b * c) <= -5e-173) tmp = Float64(j * Float64(k * -27.0)); elseif (Float64(b * c) <= 2e+79) tmp = Float64(x * Float64(i * -4.0)); elseif (Float64(b * c) <= 1e+168) tmp = Float64(-4.0 * Float64(t * a)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -5e+179)
tmp = b * c;
elseif ((b * c) <= -5e-173)
tmp = j * (k * -27.0);
elseif ((b * c) <= 2e+79)
tmp = x * (i * -4.0);
elseif ((b * c) <= 1e+168)
tmp = -4.0 * (t * a);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -5e+179], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5e-173], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e+79], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1e+168], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+179}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-173}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+79}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 10^{+168}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -5e179 or 9.9999999999999993e167 < (*.f64 b c) Initial program 79.6%
associate--l+79.6%
distribute-rgt-out--81.5%
associate-*r*79.6%
associate-*l*79.6%
associate-*r*79.6%
*-commutative79.6%
Applied egg-rr79.6%
Taylor expanded in b around inf 68.9%
if -5e179 < (*.f64 b c) < -5.0000000000000002e-173Initial program 84.8%
Simplified86.6%
associate-*r*88.1%
distribute-rgt-out--84.7%
associate-+l-84.7%
associate-*l*81.2%
fma-neg82.9%
associate-*l*82.9%
*-commutative82.9%
Applied egg-rr82.9%
fma-undefine81.2%
unsub-neg81.2%
*-commutative81.2%
Simplified81.2%
Taylor expanded in j around inf 34.0%
metadata-eval34.0%
distribute-lft-neg-in34.0%
associate-*r*34.1%
*-commutative34.1%
associate-*r*34.0%
distribute-rgt-neg-in34.0%
distribute-lft-neg-in34.0%
metadata-eval34.0%
*-commutative34.0%
Simplified34.0%
if -5.0000000000000002e-173 < (*.f64 b c) < 1.99999999999999993e79Initial program 92.7%
Simplified90.3%
associate-*r*92.7%
distribute-rgt-out--92.7%
associate-+l-92.7%
associate-*l*90.1%
fma-neg90.1%
associate-*l*89.4%
*-commutative89.4%
Applied egg-rr89.4%
fma-undefine89.4%
unsub-neg89.4%
*-commutative89.4%
Simplified89.4%
Taylor expanded in i around inf 32.1%
associate-*r*32.1%
metadata-eval32.1%
distribute-lft-neg-in32.1%
distribute-lft-neg-in32.1%
*-commutative32.1%
distribute-rgt-neg-in32.1%
distribute-lft-neg-in32.1%
metadata-eval32.1%
*-commutative32.1%
Simplified32.1%
if 1.99999999999999993e79 < (*.f64 b c) < 9.9999999999999993e167Initial program 94.9%
Simplified90.2%
associate-*r*95.0%
distribute-rgt-out--95.0%
associate-+l-95.0%
associate-*l*85.0%
fma-neg85.0%
associate-*l*84.9%
*-commutative84.9%
Applied egg-rr84.9%
fma-undefine84.9%
unsub-neg84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in a around inf 43.2%
*-commutative43.2%
*-commutative43.2%
Simplified43.2%
Final simplification41.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -4.5e-116) (not (<= t 1.8e+115))) (- (- (* b c) (* t (- (* a 4.0) (* 18.0 (* x (* y z)))))) (* 4.0 (* x i))) (- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) (* (* j 27.0) k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -4.5e-116) || !(t <= 1.8e+115)) {
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i));
} else {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-4.5d-116)) .or. (.not. (t <= 1.8d+115))) then
tmp = ((b * c) - (t * ((a * 4.0d0) - (18.0d0 * (x * (y * z)))))) - (4.0d0 * (x * i))
else
tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - ((j * 27.0d0) * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -4.5e-116) || !(t <= 1.8e+115)) {
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i));
} else {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -4.5e-116) or not (t <= 1.8e+115): tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i)) else: tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -4.5e-116) || !(t <= 1.8e+115)) tmp = Float64(Float64(Float64(b * c) - Float64(t * Float64(Float64(a * 4.0) - Float64(18.0 * Float64(x * Float64(y * z)))))) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - Float64(Float64(j * 27.0) * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -4.5e-116) || ~((t <= 1.8e+115)))
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - (4.0 * (x * i));
else
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -4.5e-116], N[Not[LessEqual[t, 1.8e+115]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] - N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{-116} \lor \neg \left(t \leq 1.8 \cdot 10^{+115}\right):\\
\;\;\;\;\left(b \cdot c - t \cdot \left(a \cdot 4 - 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if t < -4.50000000000000012e-116 or 1.8e115 < t Initial program 86.2%
Simplified85.4%
Taylor expanded in j around 0 81.6%
if -4.50000000000000012e-116 < t < 1.8e115Initial program 90.3%
Taylor expanded in y around 0 87.4%
distribute-lft-out87.4%
*-commutative87.4%
Simplified87.4%
Final simplification84.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* x i) (* t a))) (t_2 (* (* j 27.0) k)))
(if (or (<= t_2 -1e+70) (not (<= t_2 5e+80)))
(- (* -4.0 t_1) t_2)
(- (* b c) (* 4.0 t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * i) + (t * a);
double t_2 = (j * 27.0) * k;
double tmp;
if ((t_2 <= -1e+70) || !(t_2 <= 5e+80)) {
tmp = (-4.0 * t_1) - t_2;
} else {
tmp = (b * c) - (4.0 * t_1);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x * i) + (t * a)
t_2 = (j * 27.0d0) * k
if ((t_2 <= (-1d+70)) .or. (.not. (t_2 <= 5d+80))) then
tmp = ((-4.0d0) * t_1) - t_2
else
tmp = (b * c) - (4.0d0 * t_1)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * i) + (t * a);
double t_2 = (j * 27.0) * k;
double tmp;
if ((t_2 <= -1e+70) || !(t_2 <= 5e+80)) {
tmp = (-4.0 * t_1) - t_2;
} else {
tmp = (b * c) - (4.0 * t_1);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (x * i) + (t * a) t_2 = (j * 27.0) * k tmp = 0 if (t_2 <= -1e+70) or not (t_2 <= 5e+80): tmp = (-4.0 * t_1) - t_2 else: tmp = (b * c) - (4.0 * t_1) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(x * i) + Float64(t * a)) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if ((t_2 <= -1e+70) || !(t_2 <= 5e+80)) tmp = Float64(Float64(-4.0 * t_1) - t_2); else tmp = Float64(Float64(b * c) - Float64(4.0 * t_1)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (x * i) + (t * a);
t_2 = (j * 27.0) * k;
tmp = 0.0;
if ((t_2 <= -1e+70) || ~((t_2 <= 5e+80)))
tmp = (-4.0 * t_1) - t_2;
else
tmp = (b * c) - (4.0 * t_1);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[Or[LessEqual[t$95$2, -1e+70], N[Not[LessEqual[t$95$2, 5e+80]], $MachinePrecision]], N[(N[(-4.0 * t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot i + t \cdot a\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+70} \lor \neg \left(t\_2 \leq 5 \cdot 10^{+80}\right):\\
\;\;\;\;-4 \cdot t\_1 - t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.00000000000000007e70 or 4.99999999999999961e80 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 83.5%
Taylor expanded in b around 0 82.3%
associate-*r*78.2%
distribute-lft-out78.2%
*-commutative78.2%
Simplified78.2%
Taylor expanded in y around 0 74.1%
if -1.00000000000000007e70 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.99999999999999961e80Initial program 91.3%
Simplified89.5%
associate-*r*93.2%
distribute-rgt-out--91.3%
associate-+l-91.3%
associate-*l*88.6%
fma-neg89.3%
associate-*l*88.7%
*-commutative88.7%
Applied egg-rr88.7%
fma-undefine88.0%
unsub-neg88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in x around inf 86.9%
associate-*r*86.9%
*-commutative86.9%
Simplified86.9%
Taylor expanded in y around 0 70.3%
distribute-lft-out70.3%
*-commutative70.3%
Simplified70.3%
Final simplification71.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= (* b c) -4e+31)
(+ (* b c) t_1)
(if (<= (* b c) -5e-88)
(* t (* z (* y (* x 18.0))))
(if (<= (* b c) 2e+79)
(+ t_1 (* i (* x -4.0)))
(- (* b c) (* 4.0 (* t a))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if ((b * c) <= -4e+31) {
tmp = (b * c) + t_1;
} else if ((b * c) <= -5e-88) {
tmp = t * (z * (y * (x * 18.0)));
} else if ((b * c) <= 2e+79) {
tmp = t_1 + (i * (x * -4.0));
} else {
tmp = (b * c) - (4.0 * (t * a));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if ((b * c) <= (-4d+31)) then
tmp = (b * c) + t_1
else if ((b * c) <= (-5d-88)) then
tmp = t * (z * (y * (x * 18.0d0)))
else if ((b * c) <= 2d+79) then
tmp = t_1 + (i * (x * (-4.0d0)))
else
tmp = (b * c) - (4.0d0 * (t * a))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if ((b * c) <= -4e+31) {
tmp = (b * c) + t_1;
} else if ((b * c) <= -5e-88) {
tmp = t * (z * (y * (x * 18.0)));
} else if ((b * c) <= 2e+79) {
tmp = t_1 + (i * (x * -4.0));
} else {
tmp = (b * c) - (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]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if (b * c) <= -4e+31: tmp = (b * c) + t_1 elif (b * c) <= -5e-88: tmp = t * (z * (y * (x * 18.0))) elif (b * c) <= 2e+79: tmp = t_1 + (i * (x * -4.0)) else: tmp = (b * c) - (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]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (Float64(b * c) <= -4e+31) tmp = Float64(Float64(b * c) + t_1); elseif (Float64(b * c) <= -5e-88) tmp = Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))); elseif (Float64(b * c) <= 2e+79) tmp = Float64(t_1 + Float64(i * Float64(x * -4.0))); else tmp = Float64(Float64(b * c) - 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
tmp = 0.0;
if ((b * c) <= -4e+31)
tmp = (b * c) + t_1;
elseif ((b * c) <= -5e-88)
tmp = t * (z * (y * (x * 18.0)));
elseif ((b * c) <= 2e+79)
tmp = t_1 + (i * (x * -4.0));
else
tmp = (b * c) - (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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -4e+31], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5e-88], N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e+79], N[(t$95$1 + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $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])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -4 \cdot 10^{+31}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-88}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+79}:\\
\;\;\;\;t\_1 + i \cdot \left(x \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -3.9999999999999999e31Initial program 82.6%
Simplified84.3%
Taylor expanded in b around inf 62.5%
if -3.9999999999999999e31 < (*.f64 b c) < -5.00000000000000009e-88Initial program 77.7%
Simplified83.2%
Taylor expanded in t around inf 72.6%
Taylor expanded in x around inf 61.9%
associate-*r*61.9%
associate-*r*61.9%
associate-*r*61.9%
Simplified61.9%
if -5.00000000000000009e-88 < (*.f64 b c) < 1.99999999999999993e79Initial program 92.0%
Simplified89.8%
Taylor expanded in i around inf 51.9%
metadata-eval51.9%
distribute-lft-neg-in51.9%
*-commutative51.9%
associate-*r*51.9%
distribute-rgt-neg-in51.9%
distribute-rgt-neg-in51.9%
metadata-eval51.9%
*-commutative51.9%
Simplified51.9%
if 1.99999999999999993e79 < (*.f64 b c) Initial program 89.7%
Taylor expanded in x around 0 73.6%
Taylor expanded in j around 0 68.9%
Final simplification57.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -5e+179)
(* b c)
(if (<= (* b c) -5e+59)
(* -27.0 (* j k))
(if (<= (* b c) 4e+157) (* t (* z (* y (* x 18.0)))) (* b c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -5e+179) {
tmp = b * c;
} else if ((b * c) <= -5e+59) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 4e+157) {
tmp = t * (z * (y * (x * 18.0)));
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-5d+179)) then
tmp = b * c
else if ((b * c) <= (-5d+59)) then
tmp = (-27.0d0) * (j * k)
else if ((b * c) <= 4d+157) then
tmp = t * (z * (y * (x * 18.0d0)))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -5e+179) {
tmp = b * c;
} else if ((b * c) <= -5e+59) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 4e+157) {
tmp = t * (z * (y * (x * 18.0)));
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -5e+179: tmp = b * c elif (b * c) <= -5e+59: tmp = -27.0 * (j * k) elif (b * c) <= 4e+157: tmp = t * (z * (y * (x * 18.0))) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -5e+179) tmp = Float64(b * c); elseif (Float64(b * c) <= -5e+59) tmp = Float64(-27.0 * Float64(j * k)); elseif (Float64(b * c) <= 4e+157) tmp = Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -5e+179)
tmp = b * c;
elseif ((b * c) <= -5e+59)
tmp = -27.0 * (j * k);
elseif ((b * c) <= 4e+157)
tmp = t * (z * (y * (x * 18.0)));
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -5e+179], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5e+59], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4e+157], N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+179}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{+59}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq 4 \cdot 10^{+157}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -5e179 or 3.99999999999999993e157 < (*.f64 b c) Initial program 81.6%
associate--l+81.6%
distribute-rgt-out--83.3%
associate-*r*81.7%
associate-*l*81.7%
associate-*r*81.7%
*-commutative81.7%
Applied egg-rr81.7%
Taylor expanded in b around inf 65.6%
if -5e179 < (*.f64 b c) < -4.9999999999999997e59Initial program 86.6%
Simplified86.9%
Taylor expanded in j around inf 45.6%
if -4.9999999999999997e59 < (*.f64 b c) < 3.99999999999999993e157Initial program 90.8%
Simplified89.1%
Taylor expanded in t around inf 51.4%
Taylor expanded in x around inf 33.4%
associate-*r*35.5%
associate-*r*35.5%
associate-*r*35.6%
Simplified35.6%
Final simplification43.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -5e+179)
(* b c)
(if (<= (* b c) -5e+59)
(* -27.0 (* j k))
(if (<= (* b c) 4e+157) (* 18.0 (* t (* x (* y z)))) (* b c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -5e+179) {
tmp = b * c;
} else if ((b * c) <= -5e+59) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 4e+157) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-5d+179)) then
tmp = b * c
else if ((b * c) <= (-5d+59)) then
tmp = (-27.0d0) * (j * k)
else if ((b * c) <= 4d+157) then
tmp = 18.0d0 * (t * (x * (y * z)))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -5e+179) {
tmp = b * c;
} else if ((b * c) <= -5e+59) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 4e+157) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -5e+179: tmp = b * c elif (b * c) <= -5e+59: tmp = -27.0 * (j * k) elif (b * c) <= 4e+157: tmp = 18.0 * (t * (x * (y * z))) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -5e+179) tmp = Float64(b * c); elseif (Float64(b * c) <= -5e+59) tmp = Float64(-27.0 * Float64(j * k)); elseif (Float64(b * c) <= 4e+157) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -5e+179)
tmp = b * c;
elseif ((b * c) <= -5e+59)
tmp = -27.0 * (j * k);
elseif ((b * c) <= 4e+157)
tmp = 18.0 * (t * (x * (y * z)));
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -5e+179], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5e+59], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4e+157], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+179}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{+59}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq 4 \cdot 10^{+157}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -5e179 or 3.99999999999999993e157 < (*.f64 b c) Initial program 81.6%
associate--l+81.6%
distribute-rgt-out--83.3%
associate-*r*81.7%
associate-*l*81.7%
associate-*r*81.7%
*-commutative81.7%
Applied egg-rr81.7%
Taylor expanded in b around inf 65.6%
if -5e179 < (*.f64 b c) < -4.9999999999999997e59Initial program 86.6%
Simplified86.9%
Taylor expanded in j around inf 45.6%
if -4.9999999999999997e59 < (*.f64 b c) < 3.99999999999999993e157Initial program 90.8%
Simplified89.1%
associate-*r*91.4%
distribute-rgt-out--90.8%
associate-+l-90.8%
associate-*l*87.3%
fma-neg87.3%
associate-*l*86.7%
*-commutative86.7%
Applied egg-rr86.7%
fma-undefine86.7%
unsub-neg86.7%
*-commutative86.7%
Simplified86.7%
Taylor expanded in x around inf 71.3%
associate-*r*71.3%
*-commutative71.3%
Simplified71.3%
Taylor expanded in y around inf 33.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 4.0 (* x i)))))
(if (<= x -1.02e+164)
(* 18.0 (* t (* x (* y z))))
(if (<= x -7.2e-32)
t_1
(if (<= x 1.45e-235)
(+ (* -4.0 (* t a)) (* j (* k -27.0)))
(if (<= x 4.8e+96) (- (* b c) (* 4.0 (* t a))) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (x * i));
double tmp;
if (x <= -1.02e+164) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= -7.2e-32) {
tmp = t_1;
} else if (x <= 1.45e-235) {
tmp = (-4.0 * (t * a)) + (j * (k * -27.0));
} else if (x <= 4.8e+96) {
tmp = (b * c) - (4.0 * (t * a));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) - (4.0d0 * (x * i))
if (x <= (-1.02d+164)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (x <= (-7.2d-32)) then
tmp = t_1
else if (x <= 1.45d-235) then
tmp = ((-4.0d0) * (t * a)) + (j * (k * (-27.0d0)))
else if (x <= 4.8d+96) then
tmp = (b * c) - (4.0d0 * (t * a))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (x * i));
double tmp;
if (x <= -1.02e+164) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= -7.2e-32) {
tmp = t_1;
} else if (x <= 1.45e-235) {
tmp = (-4.0 * (t * a)) + (j * (k * -27.0));
} else if (x <= 4.8e+96) {
tmp = (b * c) - (4.0 * (t * a));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (4.0 * (x * i)) tmp = 0 if x <= -1.02e+164: tmp = 18.0 * (t * (x * (y * z))) elif x <= -7.2e-32: tmp = t_1 elif x <= 1.45e-235: tmp = (-4.0 * (t * a)) + (j * (k * -27.0)) elif x <= 4.8e+96: tmp = (b * c) - (4.0 * (t * a)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) tmp = 0.0 if (x <= -1.02e+164) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (x <= -7.2e-32) tmp = t_1; elseif (x <= 1.45e-235) tmp = Float64(Float64(-4.0 * Float64(t * a)) + Float64(j * Float64(k * -27.0))); elseif (x <= 4.8e+96) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (4.0 * (x * i));
tmp = 0.0;
if (x <= -1.02e+164)
tmp = 18.0 * (t * (x * (y * z)));
elseif (x <= -7.2e-32)
tmp = t_1;
elseif (x <= 1.45e-235)
tmp = (-4.0 * (t * a)) + (j * (k * -27.0));
elseif (x <= 4.8e+96)
tmp = (b * c) - (4.0 * (t * a));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.02e+164], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -7.2e-32], t$95$1, If[LessEqual[x, 1.45e-235], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.8e+96], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;x \leq -1.02 \cdot 10^{+164}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq -7.2 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{-235}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{+96}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.02e164Initial program 73.7%
Simplified84.1%
associate-*r*79.0%
distribute-rgt-out--73.7%
associate-+l-73.7%
associate-*l*73.6%
fma-neg73.6%
associate-*l*73.7%
*-commutative73.7%
Applied egg-rr73.7%
fma-undefine73.7%
unsub-neg73.7%
*-commutative73.7%
Simplified73.7%
Taylor expanded in x around inf 74.1%
associate-*r*74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in y around inf 73.9%
if -1.02e164 < x < -7.19999999999999986e-32 or 4.79999999999999986e96 < x Initial program 81.0%
Taylor expanded in t around 0 61.6%
Taylor expanded in j around 0 52.9%
if -7.19999999999999986e-32 < x < 1.45000000000000004e-235Initial program 94.2%
Simplified87.1%
Taylor expanded in a around inf 63.0%
*-commutative63.0%
Simplified63.0%
if 1.45000000000000004e-235 < x < 4.79999999999999986e96Initial program 97.1%
Taylor expanded in x around 0 67.7%
Taylor expanded in j around 0 56.3%
Final simplification58.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= x -2.8e+17)
(- (- (* 18.0 (* t (* x (* y z)))) (* 4.0 (* x i))) t_1)
(if (<= x 1.5e+152)
(- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) t_1)
(* x (- (* 18.0 (* z (* y t))) (* 4.0 i)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (x <= -2.8e+17) {
tmp = ((18.0 * (t * (x * (y * z)))) - (4.0 * (x * i))) - t_1;
} else if (x <= 1.5e+152) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1;
} else {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if (x <= (-2.8d+17)) then
tmp = ((18.0d0 * (t * (x * (y * z)))) - (4.0d0 * (x * i))) - t_1
else if (x <= 1.5d+152) then
tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - t_1
else
tmp = x * ((18.0d0 * (z * (y * t))) - (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (x <= -2.8e+17) {
tmp = ((18.0 * (t * (x * (y * z)))) - (4.0 * (x * i))) - t_1;
} else if (x <= 1.5e+152) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1;
} else {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if x <= -2.8e+17: tmp = ((18.0 * (t * (x * (y * z)))) - (4.0 * (x * i))) - t_1 elif x <= 1.5e+152: tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1 else: tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (x <= -2.8e+17) tmp = Float64(Float64(Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) - Float64(4.0 * Float64(x * i))) - t_1); elseif (x <= 1.5e+152) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - t_1); else tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if (x <= -2.8e+17)
tmp = ((18.0 * (t * (x * (y * z)))) - (4.0 * (x * i))) - t_1;
elseif (x <= 1.5e+152)
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1;
else
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[x, -2.8e+17], N[(N[(N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[x, 1.5e+152], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;x \leq -2.8 \cdot 10^{+17}:\\
\;\;\;\;\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) - 4 \cdot \left(x \cdot i\right)\right) - t\_1\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{+152}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if x < -2.8e17Initial program 85.9%
Taylor expanded in b around 0 89.4%
associate-*r*83.5%
distribute-lft-out83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in a around 0 87.6%
if -2.8e17 < x < 1.49999999999999995e152Initial program 93.1%
Taylor expanded in y around 0 81.6%
distribute-lft-out81.6%
*-commutative81.6%
Simplified81.6%
if 1.49999999999999995e152 < x Initial program 74.0%
Simplified76.1%
Taylor expanded in x around inf 78.6%
pow178.6%
Applied egg-rr78.6%
unpow178.6%
associate-*r*80.8%
Simplified80.8%
Final simplification82.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -6.6e+19)
(+ (* 18.0 (* t (* x (* y z)))) (* -4.0 (* x i)))
(if (<= x 1.05e+152)
(- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) (* (* j 27.0) k))
(* x (- (* 18.0 (* z (* y t))) (* 4.0 i))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -6.6e+19) {
tmp = (18.0 * (t * (x * (y * z)))) + (-4.0 * (x * i));
} else if (x <= 1.05e+152) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
} else {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-6.6d+19)) then
tmp = (18.0d0 * (t * (x * (y * z)))) + ((-4.0d0) * (x * i))
else if (x <= 1.05d+152) then
tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - ((j * 27.0d0) * k)
else
tmp = x * ((18.0d0 * (z * (y * t))) - (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -6.6e+19) {
tmp = (18.0 * (t * (x * (y * z)))) + (-4.0 * (x * i));
} else if (x <= 1.05e+152) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
} else {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -6.6e+19: tmp = (18.0 * (t * (x * (y * z)))) + (-4.0 * (x * i)) elif x <= 1.05e+152: tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k) else: tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -6.6e+19) tmp = Float64(Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) + Float64(-4.0 * Float64(x * i))); elseif (x <= 1.05e+152) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -6.6e+19)
tmp = (18.0 * (t * (x * (y * z)))) + (-4.0 * (x * i));
elseif (x <= 1.05e+152)
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
else
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -6.6e+19], N[(N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e+152], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.6 \cdot 10^{+19}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{+152}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if x < -6.6e19Initial program 85.9%
Simplified91.9%
Taylor expanded in x around inf 74.0%
Taylor expanded in t around 0 75.9%
if -6.6e19 < x < 1.0500000000000001e152Initial program 93.1%
Taylor expanded in y around 0 81.6%
distribute-lft-out81.6%
*-commutative81.6%
Simplified81.6%
if 1.0500000000000001e152 < x Initial program 74.0%
Simplified76.1%
Taylor expanded in x around inf 78.6%
pow178.6%
Applied egg-rr78.6%
unpow178.6%
associate-*r*80.8%
Simplified80.8%
Final simplification80.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -5.6e+14)
(+ (* 18.0 (* t (* x (* y z)))) (* -4.0 (* x i)))
(if (<= x 2.9e-174)
(- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) k))
(if (<= x 2.85e+107)
(- (* b c) (* 4.0 (+ (* x i) (* t a))))
(* x (- (* 18.0 (* z (* y t))) (* 4.0 i)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -5.6e+14) {
tmp = (18.0 * (t * (x * (y * z)))) + (-4.0 * (x * i));
} else if (x <= 2.9e-174) {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else if (x <= 2.85e+107) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-5.6d+14)) then
tmp = (18.0d0 * (t * (x * (y * z)))) + ((-4.0d0) * (x * i))
else if (x <= 2.9d-174) then
tmp = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
else if (x <= 2.85d+107) then
tmp = (b * c) - (4.0d0 * ((x * i) + (t * a)))
else
tmp = x * ((18.0d0 * (z * (y * t))) - (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -5.6e+14) {
tmp = (18.0 * (t * (x * (y * z)))) + (-4.0 * (x * i));
} else if (x <= 2.9e-174) {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else if (x <= 2.85e+107) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -5.6e+14: tmp = (18.0 * (t * (x * (y * z)))) + (-4.0 * (x * i)) elif x <= 2.9e-174: tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k) elif x <= 2.85e+107: tmp = (b * c) - (4.0 * ((x * i) + (t * a))) else: tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -5.6e+14) tmp = Float64(Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) + Float64(-4.0 * Float64(x * i))); elseif (x <= 2.9e-174) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); elseif (x <= 2.85e+107) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -5.6e+14)
tmp = (18.0 * (t * (x * (y * z)))) + (-4.0 * (x * i));
elseif (x <= 2.9e-174)
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
elseif (x <= 2.85e+107)
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
else
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -5.6e+14], N[(N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.9e-174], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.85e+107], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.6 \cdot 10^{+14}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{-174}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;x \leq 2.85 \cdot 10^{+107}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if x < -5.6e14Initial program 85.9%
Simplified91.9%
Taylor expanded in x around inf 74.0%
Taylor expanded in t around 0 75.9%
if -5.6e14 < x < 2.9000000000000001e-174Initial program 92.6%
Taylor expanded in x around 0 78.8%
if 2.9000000000000001e-174 < x < 2.84999999999999986e107Initial program 96.4%
Simplified94.6%
associate-*r*96.4%
distribute-rgt-out--96.4%
associate-+l-96.4%
associate-*l*98.0%
fma-neg98.0%
associate-*l*98.0%
*-commutative98.0%
Applied egg-rr98.0%
fma-undefine98.0%
unsub-neg98.0%
*-commutative98.0%
Simplified98.0%
Taylor expanded in x around inf 88.9%
associate-*r*88.9%
*-commutative88.9%
Simplified88.9%
Taylor expanded in y around 0 72.6%
distribute-lft-out72.6%
*-commutative72.6%
Simplified72.6%
if 2.84999999999999986e107 < x Initial program 75.5%
Simplified78.9%
Taylor expanded in x around inf 74.4%
pow174.4%
Applied egg-rr74.4%
unpow174.4%
associate-*r*77.9%
Simplified77.9%
Final simplification76.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -7e-8)
(+ (* 18.0 (* t (* x (* y z)))) (* -4.0 (* x i)))
(if (<= x 1.2e-234)
(+ (* -4.0 (* t a)) (* j (* k -27.0)))
(if (<= x 7.2e+110)
(- (* b c) (* 4.0 (+ (* x i) (* t a))))
(* x (- (* 18.0 (* z (* y t))) (* 4.0 i)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -7e-8) {
tmp = (18.0 * (t * (x * (y * z)))) + (-4.0 * (x * i));
} else if (x <= 1.2e-234) {
tmp = (-4.0 * (t * a)) + (j * (k * -27.0));
} else if (x <= 7.2e+110) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-7d-8)) then
tmp = (18.0d0 * (t * (x * (y * z)))) + ((-4.0d0) * (x * i))
else if (x <= 1.2d-234) then
tmp = ((-4.0d0) * (t * a)) + (j * (k * (-27.0d0)))
else if (x <= 7.2d+110) then
tmp = (b * c) - (4.0d0 * ((x * i) + (t * a)))
else
tmp = x * ((18.0d0 * (z * (y * t))) - (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -7e-8) {
tmp = (18.0 * (t * (x * (y * z)))) + (-4.0 * (x * i));
} else if (x <= 1.2e-234) {
tmp = (-4.0 * (t * a)) + (j * (k * -27.0));
} else if (x <= 7.2e+110) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -7e-8: tmp = (18.0 * (t * (x * (y * z)))) + (-4.0 * (x * i)) elif x <= 1.2e-234: tmp = (-4.0 * (t * a)) + (j * (k * -27.0)) elif x <= 7.2e+110: tmp = (b * c) - (4.0 * ((x * i) + (t * a))) else: tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -7e-8) tmp = Float64(Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) + Float64(-4.0 * Float64(x * i))); elseif (x <= 1.2e-234) tmp = Float64(Float64(-4.0 * Float64(t * a)) + Float64(j * Float64(k * -27.0))); elseif (x <= 7.2e+110) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -7e-8)
tmp = (18.0 * (t * (x * (y * z)))) + (-4.0 * (x * i));
elseif (x <= 1.2e-234)
tmp = (-4.0 * (t * a)) + (j * (k * -27.0));
elseif (x <= 7.2e+110)
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
else
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -7e-8], N[(N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.2e-234], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.2e+110], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7 \cdot 10^{-8}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{-234}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{+110}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if x < -7.00000000000000048e-8Initial program 86.5%
Simplified92.2%
Taylor expanded in x around inf 73.1%
Taylor expanded in t around 0 74.9%
if -7.00000000000000048e-8 < x < 1.1999999999999999e-234Initial program 90.9%
Simplified85.8%
Taylor expanded in a around inf 60.4%
*-commutative60.4%
Simplified60.4%
if 1.1999999999999999e-234 < x < 7.1999999999999994e110Initial program 97.2%
Simplified91.7%
associate-*r*97.2%
distribute-rgt-out--97.2%
associate-+l-97.2%
associate-*l*94.2%
fma-neg94.2%
associate-*l*92.8%
*-commutative92.8%
Applied egg-rr92.8%
fma-undefine92.8%
unsub-neg92.8%
*-commutative92.8%
Simplified92.8%
Taylor expanded in x around inf 83.1%
associate-*r*83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in y around 0 69.6%
distribute-lft-out69.6%
*-commutative69.6%
Simplified69.6%
if 7.1999999999999994e110 < x Initial program 75.5%
Simplified78.9%
Taylor expanded in x around inf 74.4%
pow174.4%
Applied egg-rr74.4%
unpow174.4%
associate-*r*77.9%
Simplified77.9%
Final simplification69.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -8.4e-8)
(* x (+ (* (* y z) (* 18.0 t)) (* i -4.0)))
(if (<= x 9.8e-235)
(+ (* -4.0 (* t a)) (* j (* k -27.0)))
(if (<= x 9.8e+107)
(- (* b c) (* 4.0 (+ (* x i) (* t a))))
(* x (- (* 18.0 (* z (* y t))) (* 4.0 i)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -8.4e-8) {
tmp = x * (((y * z) * (18.0 * t)) + (i * -4.0));
} else if (x <= 9.8e-235) {
tmp = (-4.0 * (t * a)) + (j * (k * -27.0));
} else if (x <= 9.8e+107) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-8.4d-8)) then
tmp = x * (((y * z) * (18.0d0 * t)) + (i * (-4.0d0)))
else if (x <= 9.8d-235) then
tmp = ((-4.0d0) * (t * a)) + (j * (k * (-27.0d0)))
else if (x <= 9.8d+107) then
tmp = (b * c) - (4.0d0 * ((x * i) + (t * a)))
else
tmp = x * ((18.0d0 * (z * (y * t))) - (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -8.4e-8) {
tmp = x * (((y * z) * (18.0 * t)) + (i * -4.0));
} else if (x <= 9.8e-235) {
tmp = (-4.0 * (t * a)) + (j * (k * -27.0));
} else if (x <= 9.8e+107) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -8.4e-8: tmp = x * (((y * z) * (18.0 * t)) + (i * -4.0)) elif x <= 9.8e-235: tmp = (-4.0 * (t * a)) + (j * (k * -27.0)) elif x <= 9.8e+107: tmp = (b * c) - (4.0 * ((x * i) + (t * a))) else: tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -8.4e-8) tmp = Float64(x * Float64(Float64(Float64(y * z) * Float64(18.0 * t)) + Float64(i * -4.0))); elseif (x <= 9.8e-235) tmp = Float64(Float64(-4.0 * Float64(t * a)) + Float64(j * Float64(k * -27.0))); elseif (x <= 9.8e+107) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -8.4e-8)
tmp = x * (((y * z) * (18.0 * t)) + (i * -4.0));
elseif (x <= 9.8e-235)
tmp = (-4.0 * (t * a)) + (j * (k * -27.0));
elseif (x <= 9.8e+107)
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
else
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -8.4e-8], N[(x * N[(N[(N[(y * z), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.8e-235], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.8e+107], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.4 \cdot 10^{-8}:\\
\;\;\;\;x \cdot \left(\left(y \cdot z\right) \cdot \left(18 \cdot t\right) + i \cdot -4\right)\\
\mathbf{elif}\;x \leq 9.8 \cdot 10^{-235}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;x \leq 9.8 \cdot 10^{+107}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if x < -8.39999999999999978e-8Initial program 86.5%
associate--l+86.5%
distribute-rgt-out--88.4%
associate-*r*92.2%
associate-*l*92.2%
associate-*r*92.2%
*-commutative92.2%
Applied egg-rr92.2%
Taylor expanded in x around inf 73.1%
cancel-sign-sub-inv73.1%
associate-*r*73.1%
metadata-eval73.1%
Simplified73.1%
if -8.39999999999999978e-8 < x < 9.79999999999999931e-235Initial program 90.9%
Simplified85.8%
Taylor expanded in a around inf 60.4%
*-commutative60.4%
Simplified60.4%
if 9.79999999999999931e-235 < x < 9.8000000000000003e107Initial program 97.2%
Simplified91.7%
associate-*r*97.2%
distribute-rgt-out--97.2%
associate-+l-97.2%
associate-*l*94.2%
fma-neg94.2%
associate-*l*92.8%
*-commutative92.8%
Applied egg-rr92.8%
fma-undefine92.8%
unsub-neg92.8%
*-commutative92.8%
Simplified92.8%
Taylor expanded in x around inf 83.1%
associate-*r*83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in y around 0 69.6%
distribute-lft-out69.6%
*-commutative69.6%
Simplified69.6%
if 9.8000000000000003e107 < x Initial program 75.5%
Simplified78.9%
Taylor expanded in x around inf 74.4%
pow174.4%
Applied egg-rr74.4%
unpow174.4%
associate-*r*77.9%
Simplified77.9%
Final simplification69.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -6.5e-8)
(* x (+ (* (* y z) (* 18.0 t)) (* i -4.0)))
(if (<= x 1.6e-235)
(+ (* -4.0 (* t a)) (* j (* k -27.0)))
(if (<= x 3.2e-92)
(- (* b c) (* 4.0 (* t a)))
(* x (- (* 18.0 (* z (* y t))) (* 4.0 i)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -6.5e-8) {
tmp = x * (((y * z) * (18.0 * t)) + (i * -4.0));
} else if (x <= 1.6e-235) {
tmp = (-4.0 * (t * a)) + (j * (k * -27.0));
} else if (x <= 3.2e-92) {
tmp = (b * c) - (4.0 * (t * a));
} else {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-6.5d-8)) then
tmp = x * (((y * z) * (18.0d0 * t)) + (i * (-4.0d0)))
else if (x <= 1.6d-235) then
tmp = ((-4.0d0) * (t * a)) + (j * (k * (-27.0d0)))
else if (x <= 3.2d-92) then
tmp = (b * c) - (4.0d0 * (t * a))
else
tmp = x * ((18.0d0 * (z * (y * t))) - (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -6.5e-8) {
tmp = x * (((y * z) * (18.0 * t)) + (i * -4.0));
} else if (x <= 1.6e-235) {
tmp = (-4.0 * (t * a)) + (j * (k * -27.0));
} else if (x <= 3.2e-92) {
tmp = (b * c) - (4.0 * (t * a));
} else {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -6.5e-8: tmp = x * (((y * z) * (18.0 * t)) + (i * -4.0)) elif x <= 1.6e-235: tmp = (-4.0 * (t * a)) + (j * (k * -27.0)) elif x <= 3.2e-92: tmp = (b * c) - (4.0 * (t * a)) else: tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -6.5e-8) tmp = Float64(x * Float64(Float64(Float64(y * z) * Float64(18.0 * t)) + Float64(i * -4.0))); elseif (x <= 1.6e-235) tmp = Float64(Float64(-4.0 * Float64(t * a)) + Float64(j * Float64(k * -27.0))); elseif (x <= 3.2e-92) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -6.5e-8)
tmp = x * (((y * z) * (18.0 * t)) + (i * -4.0));
elseif (x <= 1.6e-235)
tmp = (-4.0 * (t * a)) + (j * (k * -27.0));
elseif (x <= 3.2e-92)
tmp = (b * c) - (4.0 * (t * a));
else
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -6.5e-8], N[(x * N[(N[(N[(y * z), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.6e-235], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.2e-92], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{-8}:\\
\;\;\;\;x \cdot \left(\left(y \cdot z\right) \cdot \left(18 \cdot t\right) + i \cdot -4\right)\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{-235}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{-92}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if x < -6.49999999999999997e-8Initial program 86.5%
associate--l+86.5%
distribute-rgt-out--88.4%
associate-*r*92.2%
associate-*l*92.2%
associate-*r*92.2%
*-commutative92.2%
Applied egg-rr92.2%
Taylor expanded in x around inf 73.1%
cancel-sign-sub-inv73.1%
associate-*r*73.1%
metadata-eval73.1%
Simplified73.1%
if -6.49999999999999997e-8 < x < 1.6000000000000001e-235Initial program 90.9%
Simplified85.8%
Taylor expanded in a around inf 60.4%
*-commutative60.4%
Simplified60.4%
if 1.6000000000000001e-235 < x < 3.1999999999999997e-92Initial program 99.9%
Taylor expanded in x around 0 77.1%
Taylor expanded in j around 0 68.3%
if 3.1999999999999997e-92 < x Initial program 82.9%
Simplified85.0%
Taylor expanded in x around inf 62.3%
pow162.3%
Applied egg-rr62.3%
unpow162.3%
associate-*r*64.5%
Simplified64.5%
Final simplification65.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -1.15e-7)
(* x (+ (* (* y z) (* 18.0 t)) (* i -4.0)))
(if (<= x 2.7e-235)
(+ (* -4.0 (* t a)) (* j (* k -27.0)))
(if (<= x 4.5e+57)
(- (* b c) (* 4.0 (* t a)))
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -1.15e-7) {
tmp = x * (((y * z) * (18.0 * t)) + (i * -4.0));
} else if (x <= 2.7e-235) {
tmp = (-4.0 * (t * a)) + (j * (k * -27.0));
} else if (x <= 4.5e+57) {
tmp = (b * c) - (4.0 * (t * a));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-1.15d-7)) then
tmp = x * (((y * z) * (18.0d0 * t)) + (i * (-4.0d0)))
else if (x <= 2.7d-235) then
tmp = ((-4.0d0) * (t * a)) + (j * (k * (-27.0d0)))
else if (x <= 4.5d+57) then
tmp = (b * c) - (4.0d0 * (t * a))
else
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -1.15e-7) {
tmp = x * (((y * z) * (18.0 * t)) + (i * -4.0));
} else if (x <= 2.7e-235) {
tmp = (-4.0 * (t * a)) + (j * (k * -27.0));
} else if (x <= 4.5e+57) {
tmp = (b * c) - (4.0 * (t * a));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -1.15e-7: tmp = x * (((y * z) * (18.0 * t)) + (i * -4.0)) elif x <= 2.7e-235: tmp = (-4.0 * (t * a)) + (j * (k * -27.0)) elif x <= 4.5e+57: tmp = (b * c) - (4.0 * (t * a)) else: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -1.15e-7) tmp = Float64(x * Float64(Float64(Float64(y * z) * Float64(18.0 * t)) + Float64(i * -4.0))); elseif (x <= 2.7e-235) tmp = Float64(Float64(-4.0 * Float64(t * a)) + Float64(j * Float64(k * -27.0))); elseif (x <= 4.5e+57) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -1.15e-7)
tmp = x * (((y * z) * (18.0 * t)) + (i * -4.0));
elseif (x <= 2.7e-235)
tmp = (-4.0 * (t * a)) + (j * (k * -27.0));
elseif (x <= 4.5e+57)
tmp = (b * c) - (4.0 * (t * a));
else
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -1.15e-7], N[(x * N[(N[(N[(y * z), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.7e-235], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.5e+57], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.15 \cdot 10^{-7}:\\
\;\;\;\;x \cdot \left(\left(y \cdot z\right) \cdot \left(18 \cdot t\right) + i \cdot -4\right)\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{-235}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+57}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if x < -1.14999999999999997e-7Initial program 86.5%
associate--l+86.5%
distribute-rgt-out--88.4%
associate-*r*92.2%
associate-*l*92.2%
associate-*r*92.2%
*-commutative92.2%
Applied egg-rr92.2%
Taylor expanded in x around inf 73.1%
cancel-sign-sub-inv73.1%
associate-*r*73.1%
metadata-eval73.1%
Simplified73.1%
if -1.14999999999999997e-7 < x < 2.7000000000000002e-235Initial program 90.9%
Simplified85.8%
Taylor expanded in a around inf 60.4%
*-commutative60.4%
Simplified60.4%
if 2.7000000000000002e-235 < x < 4.49999999999999996e57Initial program 96.7%
Taylor expanded in x around 0 67.2%
Taylor expanded in j around 0 58.8%
if 4.49999999999999996e57 < x Initial program 79.8%
Simplified82.6%
Taylor expanded in x around inf 70.3%
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.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (+ (* (* y z) (* 18.0 t)) (* i -4.0)))))
(if (<= x -8e-8)
t_1
(if (<= x 7e-237)
(+ (* -4.0 (* t a)) (* j (* k -27.0)))
(if (<= x 6.2e+56) (- (* b c) (* 4.0 (* t a))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (((y * z) * (18.0 * t)) + (i * -4.0));
double tmp;
if (x <= -8e-8) {
tmp = t_1;
} else if (x <= 7e-237) {
tmp = (-4.0 * (t * a)) + (j * (k * -27.0));
} else if (x <= 6.2e+56) {
tmp = (b * c) - (4.0 * (t * a));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * (((y * z) * (18.0d0 * t)) + (i * (-4.0d0)))
if (x <= (-8d-8)) then
tmp = t_1
else if (x <= 7d-237) then
tmp = ((-4.0d0) * (t * a)) + (j * (k * (-27.0d0)))
else if (x <= 6.2d+56) then
tmp = (b * c) - (4.0d0 * (t * a))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (((y * z) * (18.0 * t)) + (i * -4.0));
double tmp;
if (x <= -8e-8) {
tmp = t_1;
} else if (x <= 7e-237) {
tmp = (-4.0 * (t * a)) + (j * (k * -27.0));
} else if (x <= 6.2e+56) {
tmp = (b * c) - (4.0 * (t * a));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (((y * z) * (18.0 * t)) + (i * -4.0)) tmp = 0 if x <= -8e-8: tmp = t_1 elif x <= 7e-237: tmp = (-4.0 * (t * a)) + (j * (k * -27.0)) elif x <= 6.2e+56: tmp = (b * c) - (4.0 * (t * a)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(Float64(y * z) * Float64(18.0 * t)) + Float64(i * -4.0))) tmp = 0.0 if (x <= -8e-8) tmp = t_1; elseif (x <= 7e-237) tmp = Float64(Float64(-4.0 * Float64(t * a)) + Float64(j * Float64(k * -27.0))); elseif (x <= 6.2e+56) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * (((y * z) * (18.0 * t)) + (i * -4.0));
tmp = 0.0;
if (x <= -8e-8)
tmp = t_1;
elseif (x <= 7e-237)
tmp = (-4.0 * (t * a)) + (j * (k * -27.0));
elseif (x <= 6.2e+56)
tmp = (b * c) - (4.0 * (t * a));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(N[(y * z), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8e-8], t$95$1, If[LessEqual[x, 7e-237], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.2e+56], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(\left(y \cdot z\right) \cdot \left(18 \cdot t\right) + i \cdot -4\right)\\
\mathbf{if}\;x \leq -8 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-237}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+56}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -8.0000000000000002e-8 or 6.20000000000000009e56 < x Initial program 82.7%
associate--l+82.7%
distribute-rgt-out--84.3%
associate-*r*86.7%
associate-*l*86.7%
associate-*r*86.7%
*-commutative86.7%
Applied egg-rr86.7%
Taylor expanded in x around inf 71.5%
cancel-sign-sub-inv71.5%
associate-*r*71.5%
metadata-eval71.5%
Simplified71.5%
if -8.0000000000000002e-8 < x < 6.99999999999999966e-237Initial program 90.9%
Simplified85.8%
Taylor expanded in a around inf 60.4%
*-commutative60.4%
Simplified60.4%
if 6.99999999999999966e-237 < x < 6.20000000000000009e56Initial program 96.7%
Taylor expanded in x around 0 67.2%
Taylor expanded in j around 0 58.8%
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.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -9e+159)
(* b c)
(if (<= (* b c) -7.6e-175)
(* j (* k -27.0))
(if (<= (* b c) 2.3e+157) (* x (* i -4.0)) (* b c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -9e+159) {
tmp = b * c;
} else if ((b * c) <= -7.6e-175) {
tmp = j * (k * -27.0);
} else if ((b * c) <= 2.3e+157) {
tmp = x * (i * -4.0);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-9d+159)) then
tmp = b * c
else if ((b * c) <= (-7.6d-175)) then
tmp = j * (k * (-27.0d0))
else if ((b * c) <= 2.3d+157) then
tmp = x * (i * (-4.0d0))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -9e+159) {
tmp = b * c;
} else if ((b * c) <= -7.6e-175) {
tmp = j * (k * -27.0);
} else if ((b * c) <= 2.3e+157) {
tmp = x * (i * -4.0);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -9e+159: tmp = b * c elif (b * c) <= -7.6e-175: tmp = j * (k * -27.0) elif (b * c) <= 2.3e+157: tmp = x * (i * -4.0) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -9e+159) tmp = Float64(b * c); elseif (Float64(b * c) <= -7.6e-175) tmp = Float64(j * Float64(k * -27.0)); elseif (Float64(b * c) <= 2.3e+157) tmp = Float64(x * Float64(i * -4.0)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -9e+159)
tmp = b * c;
elseif ((b * c) <= -7.6e-175)
tmp = j * (k * -27.0);
elseif ((b * c) <= 2.3e+157)
tmp = x * (i * -4.0);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -9e+159], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -7.6e-175], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.3e+157], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -9 \cdot 10^{+159}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -7.6 \cdot 10^{-175}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 2.3 \cdot 10^{+157}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -9.00000000000000053e159 or 2.30000000000000004e157 < (*.f64 b c) Initial program 81.6%
associate--l+81.6%
distribute-rgt-out--83.3%
associate-*r*81.7%
associate-*l*81.7%
associate-*r*81.7%
*-commutative81.7%
Applied egg-rr81.7%
Taylor expanded in b around inf 65.6%
if -9.00000000000000053e159 < (*.f64 b c) < -7.6e-175Initial program 84.8%
Simplified86.6%
associate-*r*88.1%
distribute-rgt-out--84.7%
associate-+l-84.7%
associate-*l*81.2%
fma-neg82.9%
associate-*l*82.9%
*-commutative82.9%
Applied egg-rr82.9%
fma-undefine81.2%
unsub-neg81.2%
*-commutative81.2%
Simplified81.2%
Taylor expanded in j around inf 34.0%
metadata-eval34.0%
distribute-lft-neg-in34.0%
associate-*r*34.1%
*-commutative34.1%
associate-*r*34.0%
distribute-rgt-neg-in34.0%
distribute-lft-neg-in34.0%
metadata-eval34.0%
*-commutative34.0%
Simplified34.0%
if -7.6e-175 < (*.f64 b c) < 2.30000000000000004e157Initial program 92.7%
Simplified89.8%
associate-*r*92.7%
distribute-rgt-out--92.7%
associate-+l-92.7%
associate-*l*89.7%
fma-neg89.7%
associate-*l*89.0%
*-commutative89.0%
Applied egg-rr89.0%
fma-undefine89.0%
unsub-neg89.0%
*-commutative89.0%
Simplified89.0%
Taylor expanded in i around inf 29.9%
associate-*r*29.9%
metadata-eval29.9%
distribute-lft-neg-in29.9%
distribute-lft-neg-in29.9%
*-commutative29.9%
distribute-rgt-neg-in29.9%
distribute-lft-neg-in29.9%
metadata-eval29.9%
*-commutative29.9%
Simplified29.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -1.75e+32)
(* 18.0 (* t (* x (* y z))))
(if (<= x 1.7e-278)
(- (* b c) (* 27.0 (* j k)))
(if (<= x 5.5e+98)
(- (* b c) (* 4.0 (* t a)))
(- (* b c) (* 4.0 (* x i)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -1.75e+32) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= 1.7e-278) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 5.5e+98) {
tmp = (b * c) - (4.0 * (t * a));
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-1.75d+32)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (x <= 1.7d-278) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (x <= 5.5d+98) then
tmp = (b * c) - (4.0d0 * (t * a))
else
tmp = (b * c) - (4.0d0 * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -1.75e+32) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= 1.7e-278) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 5.5e+98) {
tmp = (b * c) - (4.0 * (t * a));
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -1.75e+32: tmp = 18.0 * (t * (x * (y * z))) elif x <= 1.7e-278: tmp = (b * c) - (27.0 * (j * k)) elif x <= 5.5e+98: tmp = (b * c) - (4.0 * (t * a)) else: tmp = (b * c) - (4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -1.75e+32) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (x <= 1.7e-278) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (x <= 5.5e+98) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -1.75e+32)
tmp = 18.0 * (t * (x * (y * z)));
elseif (x <= 1.7e-278)
tmp = (b * c) - (27.0 * (j * k));
elseif (x <= 5.5e+98)
tmp = (b * c) - (4.0 * (t * a));
else
tmp = (b * c) - (4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -1.75e+32], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.7e-278], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.5e+98], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.75 \cdot 10^{+32}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{-278}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 5.5 \cdot 10^{+98}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if x < -1.75e32Initial program 85.0%
Simplified91.4%
associate-*r*87.2%
distribute-rgt-out--85.0%
associate-+l-85.0%
associate-*l*85.0%
fma-neg85.0%
associate-*l*85.0%
*-commutative85.0%
Applied egg-rr85.0%
fma-undefine85.0%
unsub-neg85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in x around inf 77.0%
associate-*r*77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in y around inf 52.0%
if -1.75e32 < x < 1.7e-278Initial program 90.1%
Taylor expanded in t around 0 63.0%
Taylor expanded in i around 0 57.1%
if 1.7e-278 < x < 5.49999999999999946e98Initial program 97.5%
Taylor expanded in x around 0 71.0%
Taylor expanded in j around 0 56.2%
if 5.49999999999999946e98 < x Initial program 76.4%
Taylor expanded in t around 0 58.7%
Taylor expanded in j around 0 56.8%
Final simplification55.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -2.95e+32)
(* 18.0 (* t (* x (* y z))))
(if (<= x 3.5e-278)
(+ (* b c) (* j (* k -27.0)))
(if (<= x 8.5e+96)
(- (* b c) (* 4.0 (* t a)))
(- (* b c) (* 4.0 (* x i)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -2.95e+32) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= 3.5e-278) {
tmp = (b * c) + (j * (k * -27.0));
} else if (x <= 8.5e+96) {
tmp = (b * c) - (4.0 * (t * a));
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-2.95d+32)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (x <= 3.5d-278) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (x <= 8.5d+96) then
tmp = (b * c) - (4.0d0 * (t * a))
else
tmp = (b * c) - (4.0d0 * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -2.95e+32) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= 3.5e-278) {
tmp = (b * c) + (j * (k * -27.0));
} else if (x <= 8.5e+96) {
tmp = (b * c) - (4.0 * (t * a));
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -2.95e+32: tmp = 18.0 * (t * (x * (y * z))) elif x <= 3.5e-278: tmp = (b * c) + (j * (k * -27.0)) elif x <= 8.5e+96: tmp = (b * c) - (4.0 * (t * a)) else: tmp = (b * c) - (4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -2.95e+32) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (x <= 3.5e-278) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (x <= 8.5e+96) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -2.95e+32)
tmp = 18.0 * (t * (x * (y * z)));
elseif (x <= 3.5e-278)
tmp = (b * c) + (j * (k * -27.0));
elseif (x <= 8.5e+96)
tmp = (b * c) - (4.0 * (t * a));
else
tmp = (b * c) - (4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -2.95e+32], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.5e-278], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.5e+96], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.95 \cdot 10^{+32}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-278}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{+96}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if x < -2.94999999999999983e32Initial program 85.0%
Simplified91.4%
associate-*r*87.2%
distribute-rgt-out--85.0%
associate-+l-85.0%
associate-*l*85.0%
fma-neg85.0%
associate-*l*85.0%
*-commutative85.0%
Applied egg-rr85.0%
fma-undefine85.0%
unsub-neg85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in x around inf 77.0%
associate-*r*77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in y around inf 52.0%
if -2.94999999999999983e32 < x < 3.4999999999999997e-278Initial program 90.1%
Simplified84.7%
Taylor expanded in b around inf 57.0%
if 3.4999999999999997e-278 < x < 8.50000000000000025e96Initial program 97.5%
Taylor expanded in x around 0 71.0%
Taylor expanded in j around 0 56.2%
if 8.50000000000000025e96 < x Initial program 76.4%
Taylor expanded in t around 0 58.7%
Taylor expanded in j around 0 56.8%
Final simplification55.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -2.9e+32)
(* 18.0 (* t (* x (* y z))))
(if (<= x 3e-278)
(+ (* b c) (* j (* k -27.0)))
(if (<= x 3.6e+114) (- (* b c) (* 4.0 (* t a))) (* x (* i -4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -2.9e+32) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= 3e-278) {
tmp = (b * c) + (j * (k * -27.0));
} else if (x <= 3.6e+114) {
tmp = (b * c) - (4.0 * (t * a));
} else {
tmp = x * (i * -4.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-2.9d+32)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (x <= 3d-278) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (x <= 3.6d+114) then
tmp = (b * c) - (4.0d0 * (t * a))
else
tmp = x * (i * (-4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -2.9e+32) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= 3e-278) {
tmp = (b * c) + (j * (k * -27.0));
} else if (x <= 3.6e+114) {
tmp = (b * c) - (4.0 * (t * a));
} else {
tmp = x * (i * -4.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -2.9e+32: tmp = 18.0 * (t * (x * (y * z))) elif x <= 3e-278: tmp = (b * c) + (j * (k * -27.0)) elif x <= 3.6e+114: tmp = (b * c) - (4.0 * (t * a)) else: tmp = x * (i * -4.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -2.9e+32) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (x <= 3e-278) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (x <= 3.6e+114) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); else tmp = Float64(x * Float64(i * -4.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -2.9e+32)
tmp = 18.0 * (t * (x * (y * z)));
elseif (x <= 3e-278)
tmp = (b * c) + (j * (k * -27.0));
elseif (x <= 3.6e+114)
tmp = (b * c) - (4.0 * (t * a));
else
tmp = x * (i * -4.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -2.9e+32], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3e-278], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.6e+114], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.9 \cdot 10^{+32}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-278}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{+114}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\end{array}
\end{array}
if x < -2.90000000000000003e32Initial program 85.0%
Simplified91.4%
associate-*r*87.2%
distribute-rgt-out--85.0%
associate-+l-85.0%
associate-*l*85.0%
fma-neg85.0%
associate-*l*85.0%
*-commutative85.0%
Applied egg-rr85.0%
fma-undefine85.0%
unsub-neg85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in x around inf 77.0%
associate-*r*77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in y around inf 52.0%
if -2.90000000000000003e32 < x < 3e-278Initial program 90.1%
Simplified84.7%
Taylor expanded in b around inf 57.0%
if 3e-278 < x < 3.6000000000000001e114Initial program 97.6%
Taylor expanded in x around 0 69.7%
Taylor expanded in j around 0 55.5%
if 3.6000000000000001e114 < x Initial program 75.1%
Simplified78.5%
associate-*r*76.9%
distribute-rgt-out--75.1%
associate-+l-75.1%
associate-*l*71.5%
fma-neg71.5%
associate-*l*71.6%
*-commutative71.6%
Applied egg-rr71.6%
fma-undefine71.6%
unsub-neg71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in i around inf 46.2%
associate-*r*46.2%
metadata-eval46.2%
distribute-lft-neg-in46.2%
distribute-lft-neg-in46.2%
*-commutative46.2%
distribute-rgt-neg-in46.2%
distribute-lft-neg-in46.2%
metadata-eval46.2%
*-commutative46.2%
Simplified46.2%
Final simplification53.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -1.65e-103) (not (<= t 5.6e+49))) (* t (+ (* 18.0 (* z (* x y))) (* a -4.0))) (- (* b c) (* 4.0 (* x i)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -1.65e-103) || !(t <= 5.6e+49)) {
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-1.65d-103)) .or. (.not. (t <= 5.6d+49))) then
tmp = t * ((18.0d0 * (z * (x * y))) + (a * (-4.0d0)))
else
tmp = (b * c) - (4.0d0 * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -1.65e-103) || !(t <= 5.6e+49)) {
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -1.65e-103) or not (t <= 5.6e+49): tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0)) else: tmp = (b * c) - (4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -1.65e-103) || !(t <= 5.6e+49)) tmp = Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) + Float64(a * -4.0))); else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -1.65e-103) || ~((t <= 5.6e+49)))
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
else
tmp = (b * c) - (4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -1.65e-103], N[Not[LessEqual[t, 5.6e+49]], $MachinePrecision]], N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{-103} \lor \neg \left(t \leq 5.6 \cdot 10^{+49}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if t < -1.64999999999999995e-103 or 5.5999999999999996e49 < t Initial program 85.6%
Simplified85.6%
Taylor expanded in t around inf 63.5%
cancel-sign-sub-inv63.5%
associate-*r*65.6%
metadata-eval65.6%
Applied egg-rr65.6%
if -1.64999999999999995e-103 < t < 5.5999999999999996e49Initial program 91.2%
Taylor expanded in t around 0 79.7%
Taylor expanded in j around 0 56.4%
Final simplification61.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -1.6e-103)
(* t (+ (* 18.0 (* z (* x y))) (* a -4.0)))
(if (<= t 3.05e+50)
(- (* b c) (* 4.0 (* x i)))
(* t (- (* 18.0 (* x (* y z))) (* a 4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -1.6e-103) {
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
} else if (t <= 3.05e+50) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (t <= (-1.6d-103)) then
tmp = t * ((18.0d0 * (z * (x * y))) + (a * (-4.0d0)))
else if (t <= 3.05d+50) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -1.6e-103) {
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
} else if (t <= 3.05e+50) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -1.6e-103: tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0)) elif t <= 3.05e+50: tmp = (b * c) - (4.0 * (x * i)) else: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -1.6e-103) tmp = Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) + Float64(a * -4.0))); elseif (t <= 3.05e+50) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= -1.6e-103)
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
elseif (t <= 3.05e+50)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -1.6e-103], N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.05e+50], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{-103}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right)\\
\mathbf{elif}\;t \leq 3.05 \cdot 10^{+50}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -1.59999999999999988e-103Initial program 87.8%
Simplified85.6%
Taylor expanded in t around inf 57.1%
cancel-sign-sub-inv57.1%
associate-*r*61.6%
metadata-eval61.6%
Applied egg-rr61.6%
if -1.59999999999999988e-103 < t < 3.05000000000000013e50Initial program 91.2%
Taylor expanded in t around 0 79.7%
Taylor expanded in j around 0 56.4%
if 3.05000000000000013e50 < t Initial program 81.8%
Simplified85.6%
Taylor expanded in t around inf 74.3%
Final simplification61.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -1.1e-103)
(* t (+ (* 18.0 (* z (* x y))) (* a -4.0)))
(if (<= t 4e+50)
(- (* b c) (* 4.0 (* x i)))
(* t (+ (* a -4.0) (* (* y z) (* x 18.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -1.1e-103) {
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
} else if (t <= 4e+50) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t * ((a * -4.0) + ((y * z) * (x * 18.0)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (t <= (-1.1d-103)) then
tmp = t * ((18.0d0 * (z * (x * y))) + (a * (-4.0d0)))
else if (t <= 4d+50) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = t * ((a * (-4.0d0)) + ((y * z) * (x * 18.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -1.1e-103) {
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
} else if (t <= 4e+50) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t * ((a * -4.0) + ((y * z) * (x * 18.0)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -1.1e-103: tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0)) elif t <= 4e+50: tmp = (b * c) - (4.0 * (x * i)) else: tmp = t * ((a * -4.0) + ((y * z) * (x * 18.0))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -1.1e-103) tmp = Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) + Float64(a * -4.0))); elseif (t <= 4e+50) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(t * Float64(Float64(a * -4.0) + Float64(Float64(y * z) * Float64(x * 18.0)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= -1.1e-103)
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
elseif (t <= 4e+50)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = t * ((a * -4.0) + ((y * z) * (x * 18.0)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -1.1e-103], N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e+50], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{-103}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right)\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+50}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot -4 + \left(y \cdot z\right) \cdot \left(x \cdot 18\right)\right)\\
\end{array}
\end{array}
if t < -1.1e-103Initial program 87.8%
Simplified85.6%
Taylor expanded in t around inf 57.1%
cancel-sign-sub-inv57.1%
associate-*r*61.6%
metadata-eval61.6%
Applied egg-rr61.6%
if -1.1e-103 < t < 4.0000000000000003e50Initial program 91.2%
Taylor expanded in t around 0 79.7%
Taylor expanded in j around 0 56.4%
if 4.0000000000000003e50 < t Initial program 81.8%
Simplified85.6%
associate-*r*83.8%
distribute-rgt-out--81.7%
associate-+l-81.7%
associate-*l*73.5%
fma-neg75.6%
associate-*l*75.6%
*-commutative75.6%
Applied egg-rr75.6%
fma-undefine73.5%
unsub-neg73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in x around inf 72.1%
associate-*r*72.1%
*-commutative72.1%
Simplified72.1%
Taylor expanded in t around inf 74.3%
cancel-sign-sub-inv74.3%
associate-*r*74.2%
metadata-eval74.2%
*-commutative74.2%
Simplified74.2%
Final simplification61.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -1.06e+160) (not (<= (* b c) 2.1e+160))) (* b c) (* -27.0 (* j k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.06e+160) || !((b * c) <= 2.1e+160)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-1.06d+160)) .or. (.not. ((b * c) <= 2.1d+160))) then
tmp = b * c
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.06e+160) || !((b * c) <= 2.1e+160)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -1.06e+160) or not ((b * c) <= 2.1e+160): tmp = b * c else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -1.06e+160) || !(Float64(b * c) <= 2.1e+160)) tmp = Float64(b * c); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -1.06e+160) || ~(((b * c) <= 2.1e+160)))
tmp = b * c;
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -1.06e+160], N[Not[LessEqual[N[(b * c), $MachinePrecision], 2.1e+160]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.06 \cdot 10^{+160} \lor \neg \left(b \cdot c \leq 2.1 \cdot 10^{+160}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.0599999999999999e160 or 2.09999999999999997e160 < (*.f64 b c) Initial program 81.6%
associate--l+81.6%
distribute-rgt-out--83.3%
associate-*r*81.7%
associate-*l*81.7%
associate-*r*81.7%
*-commutative81.7%
Applied egg-rr81.7%
Taylor expanded in b around inf 65.6%
if -1.0599999999999999e160 < (*.f64 b c) < 2.09999999999999997e160Initial program 90.3%
Simplified88.9%
Taylor expanded in j around inf 24.9%
Final simplification34.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= x -2.2e+31) (* 18.0 (* t (* x (* y z)))) (if (<= x 2.7e+139) (+ (* b c) (* j (* k -27.0))) (* x (* i -4.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -2.2e+31) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= 2.7e+139) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = x * (i * -4.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-2.2d+31)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (x <= 2.7d+139) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else
tmp = x * (i * (-4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -2.2e+31) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= 2.7e+139) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = x * (i * -4.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -2.2e+31: tmp = 18.0 * (t * (x * (y * z))) elif x <= 2.7e+139: tmp = (b * c) + (j * (k * -27.0)) else: tmp = x * (i * -4.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -2.2e+31) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (x <= 2.7e+139) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); else tmp = Float64(x * Float64(i * -4.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -2.2e+31)
tmp = 18.0 * (t * (x * (y * z)));
elseif (x <= 2.7e+139)
tmp = (b * c) + (j * (k * -27.0));
else
tmp = x * (i * -4.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -2.2e+31], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.7e+139], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{+31}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{+139}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\end{array}
\end{array}
if x < -2.2000000000000001e31Initial program 85.0%
Simplified91.4%
associate-*r*87.2%
distribute-rgt-out--85.0%
associate-+l-85.0%
associate-*l*85.0%
fma-neg85.0%
associate-*l*85.0%
*-commutative85.0%
Applied egg-rr85.0%
fma-undefine85.0%
unsub-neg85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in x around inf 77.0%
associate-*r*77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in y around inf 52.0%
if -2.2000000000000001e31 < x < 2.6999999999999998e139Initial program 93.6%
Simplified89.3%
Taylor expanded in b around inf 50.1%
if 2.6999999999999998e139 < x Initial program 75.1%
Simplified76.9%
associate-*r*75.1%
distribute-rgt-out--75.1%
associate-+l-75.1%
associate-*l*71.3%
fma-neg71.3%
associate-*l*71.3%
*-commutative71.3%
Applied egg-rr71.3%
fma-undefine71.3%
unsub-neg71.3%
*-commutative71.3%
Simplified71.3%
Taylor expanded in i around inf 47.8%
associate-*r*47.8%
metadata-eval47.8%
distribute-lft-neg-in47.8%
distribute-lft-neg-in47.8%
*-commutative47.8%
distribute-rgt-neg-in47.8%
distribute-lft-neg-in47.8%
metadata-eval47.8%
*-commutative47.8%
Simplified47.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 88.3%
associate--l+88.3%
distribute-rgt-out--89.5%
associate-*r*87.2%
associate-*l*87.2%
associate-*r*86.8%
*-commutative86.8%
Applied egg-rr86.8%
Taylor expanded in b around inf 21.3%
(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 2024148
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:alt
(! :herbie-platform default (if (< t -8105407698770699/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))) (if (< t 8284013971902611/50000000000000) (+ (- (* (* 18 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4)) (- (* c b) (* 27 (* k j)))) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))