
(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 21 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 (* (* x 4.0) i)) (t_2 (* (* j 27.0) k)) (t_3 (* t (* a 4.0))))
(if (<=
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) t_3) (* b c)) t_1) t_2)
INFINITY)
(- (- (+ (* b c) (- (* t (* z (* 18.0 (* x y)))) t_3)) t_1) t_2)
(*
(- k)
(+ (* j 27.0) (/ (* t (+ (* a 4.0) (* -18.0 (* x (* y z))))) k))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * 4.0) * i;
double t_2 = (j * 27.0) * k;
double t_3 = t * (a * 4.0);
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - t_3) + (b * c)) - t_1) - t_2) <= ((double) INFINITY)) {
tmp = (((b * c) + ((t * (z * (18.0 * (x * y)))) - t_3)) - t_1) - t_2;
} else {
tmp = -k * ((j * 27.0) + ((t * ((a * 4.0) + (-18.0 * (x * (y * z))))) / k));
}
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 = (x * 4.0) * i;
double t_2 = (j * 27.0) * k;
double t_3 = t * (a * 4.0);
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - t_3) + (b * c)) - t_1) - t_2) <= Double.POSITIVE_INFINITY) {
tmp = (((b * c) + ((t * (z * (18.0 * (x * y)))) - t_3)) - t_1) - t_2;
} else {
tmp = -k * ((j * 27.0) + ((t * ((a * 4.0) + (-18.0 * (x * (y * z))))) / 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): t_1 = (x * 4.0) * i t_2 = (j * 27.0) * k t_3 = t * (a * 4.0) tmp = 0 if ((((((((x * 18.0) * y) * z) * t) - t_3) + (b * c)) - t_1) - t_2) <= math.inf: tmp = (((b * c) + ((t * (z * (18.0 * (x * y)))) - t_3)) - t_1) - t_2 else: tmp = -k * ((j * 27.0) + ((t * ((a * 4.0) + (-18.0 * (x * (y * z))))) / k)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(x * 4.0) * i) t_2 = Float64(Float64(j * 27.0) * k) t_3 = Float64(t * Float64(a * 4.0)) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - t_3) + Float64(b * c)) - t_1) - t_2) <= Inf) tmp = Float64(Float64(Float64(Float64(b * c) + Float64(Float64(t * Float64(z * Float64(18.0 * Float64(x * y)))) - t_3)) - t_1) - t_2); else tmp = Float64(Float64(-k) * Float64(Float64(j * 27.0) + Float64(Float64(t * Float64(Float64(a * 4.0) + Float64(-18.0 * Float64(x * Float64(y * z))))) / 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)
t_1 = (x * 4.0) * i;
t_2 = (j * 27.0) * k;
t_3 = t * (a * 4.0);
tmp = 0.0;
if (((((((((x * 18.0) * y) * z) * t) - t_3) + (b * c)) - t_1) - t_2) <= Inf)
tmp = (((b * c) + ((t * (z * (18.0 * (x * y)))) - t_3)) - t_1) - t_2;
else
tmp = -k * ((j * 27.0) + ((t * ((a * 4.0) + (-18.0 * (x * (y * z))))) / 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_] := Block[{t$95$1 = N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - t$95$3), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], Infinity], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * N[(z * N[(18.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], N[((-k) * N[(N[(j * 27.0), $MachinePrecision] + N[(N[(t * N[(N[(a * 4.0), $MachinePrecision] + N[(-18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 4\right) \cdot i\\
t_2 := \left(j \cdot 27\right) \cdot k\\
t_3 := t \cdot \left(a \cdot 4\right)\\
\mathbf{if}\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t\_3\right) + b \cdot c\right) - t\_1\right) - t\_2 \leq \infty:\\
\;\;\;\;\left(\left(b \cdot c + \left(t \cdot \left(z \cdot \left(18 \cdot \left(x \cdot y\right)\right)\right) - t\_3\right)\right) - t\_1\right) - t\_2\\
\mathbf{else}:\\
\;\;\;\;\left(-k\right) \cdot \left(j \cdot 27 + \frac{t \cdot \left(a \cdot 4 + -18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)}{k}\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 95.6%
Taylor expanded in x around 0 95.7%
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%
Taylor expanded in t around -inf 53.7%
associate-*r*53.7%
neg-mul-153.7%
cancel-sign-sub-inv53.7%
metadata-eval53.7%
*-commutative53.7%
associate-*r*53.7%
Simplified53.7%
Taylor expanded in k around inf 71.6%
Final simplification93.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (+ t_1 (* -4.0 (* x i))))
(t_3 (* t (- (* 18.0 (* z (* x y))) (* a 4.0)))))
(if (<= (* b c) -8.5e+154)
(- (* b c) (* 4.0 (* t a)))
(if (<= (* b c) -2.2e-6)
t_3
(if (<= (* b c) 8.5e-244)
t_2
(if (<= (* b c) 2.7e-91)
t_3
(if (<= (* b c) 1.5e+27) t_2 (+ (* b c) t_1))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (-4.0 * (x * i));
double t_3 = t * ((18.0 * (z * (x * y))) - (a * 4.0));
double tmp;
if ((b * c) <= -8.5e+154) {
tmp = (b * c) - (4.0 * (t * a));
} else if ((b * c) <= -2.2e-6) {
tmp = t_3;
} else if ((b * c) <= 8.5e-244) {
tmp = t_2;
} else if ((b * c) <= 2.7e-91) {
tmp = t_3;
} else if ((b * c) <= 1.5e+27) {
tmp = t_2;
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = t_1 + ((-4.0d0) * (x * i))
t_3 = t * ((18.0d0 * (z * (x * y))) - (a * 4.0d0))
if ((b * c) <= (-8.5d+154)) then
tmp = (b * c) - (4.0d0 * (t * a))
else if ((b * c) <= (-2.2d-6)) then
tmp = t_3
else if ((b * c) <= 8.5d-244) then
tmp = t_2
else if ((b * c) <= 2.7d-91) then
tmp = t_3
else if ((b * c) <= 1.5d+27) then
tmp = t_2
else
tmp = (b * c) + t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (-4.0 * (x * i));
double t_3 = t * ((18.0 * (z * (x * y))) - (a * 4.0));
double tmp;
if ((b * c) <= -8.5e+154) {
tmp = (b * c) - (4.0 * (t * a));
} else if ((b * c) <= -2.2e-6) {
tmp = t_3;
} else if ((b * c) <= 8.5e-244) {
tmp = t_2;
} else if ((b * c) <= 2.7e-91) {
tmp = t_3;
} else if ((b * c) <= 1.5e+27) {
tmp = t_2;
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = t_1 + (-4.0 * (x * i)) t_3 = t * ((18.0 * (z * (x * y))) - (a * 4.0)) tmp = 0 if (b * c) <= -8.5e+154: tmp = (b * c) - (4.0 * (t * a)) elif (b * c) <= -2.2e-6: tmp = t_3 elif (b * c) <= 8.5e-244: tmp = t_2 elif (b * c) <= 2.7e-91: tmp = t_3 elif (b * c) <= 1.5e+27: tmp = t_2 else: tmp = (b * c) + t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(t_1 + Float64(-4.0 * Float64(x * i))) t_3 = Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) - Float64(a * 4.0))) tmp = 0.0 if (Float64(b * c) <= -8.5e+154) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); elseif (Float64(b * c) <= -2.2e-6) tmp = t_3; elseif (Float64(b * c) <= 8.5e-244) tmp = t_2; elseif (Float64(b * c) <= 2.7e-91) tmp = t_3; elseif (Float64(b * c) <= 1.5e+27) tmp = t_2; else tmp = Float64(Float64(b * c) + t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = t_1 + (-4.0 * (x * i));
t_3 = t * ((18.0 * (z * (x * y))) - (a * 4.0));
tmp = 0.0;
if ((b * c) <= -8.5e+154)
tmp = (b * c) - (4.0 * (t * a));
elseif ((b * c) <= -2.2e-6)
tmp = t_3;
elseif ((b * c) <= 8.5e-244)
tmp = t_2;
elseif ((b * c) <= 2.7e-91)
tmp = t_3;
elseif ((b * c) <= 1.5e+27)
tmp = t_2;
else
tmp = (b * c) + t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -8.5e+154], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2.2e-6], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 8.5e-244], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 2.7e-91], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 1.5e+27], t$95$2, N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t\_1 + -4 \cdot \left(x \cdot i\right)\\
t_3 := t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;b \cdot c \leq -8.5 \cdot 10^{+154}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;b \cdot c \leq -2.2 \cdot 10^{-6}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \cdot c \leq 8.5 \cdot 10^{-244}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 2.7 \cdot 10^{-91}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \cdot c \leq 1.5 \cdot 10^{+27}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t\_1\\
\end{array}
\end{array}
if (*.f64 b c) < -8.5000000000000002e154Initial program 72.6%
Taylor expanded in x around 0 73.4%
Taylor expanded in j around 0 76.0%
if -8.5000000000000002e154 < (*.f64 b c) < -2.2000000000000001e-6 or 8.4999999999999999e-244 < (*.f64 b c) < 2.6999999999999997e-91Initial program 83.2%
Simplified81.8%
Taylor expanded in t around inf 60.5%
pow160.5%
Applied egg-rr60.5%
unpow160.5%
associate-*r*68.3%
Simplified68.3%
if -2.2000000000000001e-6 < (*.f64 b c) < 8.4999999999999999e-244 or 2.6999999999999997e-91 < (*.f64 b c) < 1.49999999999999988e27Initial program 90.2%
Simplified92.1%
Taylor expanded in i around inf 64.2%
if 1.49999999999999988e27 < (*.f64 b c) Initial program 86.3%
Simplified86.4%
Taylor expanded in b around inf 62.5%
Final simplification66.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 27.0) k)))
(if (<= t_1 -5e+115)
(* (- k) (+ (* j 27.0) (/ (* t (+ (* a 4.0) (* -18.0 (* x (* y z))))) k)))
(if (<= t_1 5e+67)
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(* x (* 4.0 i)))
(- (- (* b c) (* 4.0 (+ (* t a) (* x i)))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -5e+115) {
tmp = -k * ((j * 27.0) + ((t * ((a * 4.0) + (-18.0 * (x * (y * z))))) / k));
} else if (t_1 <= 5e+67) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - (x * (4.0 * i));
} else {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - 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 = (j * 27.0d0) * k
if (t_1 <= (-5d+115)) then
tmp = -k * ((j * 27.0d0) + ((t * ((a * 4.0d0) + ((-18.0d0) * (x * (y * z))))) / k))
else if (t_1 <= 5d+67) then
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - (x * (4.0d0 * i))
else
tmp = ((b * c) - (4.0d0 * ((t * a) + (x * i)))) - 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 = (j * 27.0) * k;
double tmp;
if (t_1 <= -5e+115) {
tmp = -k * ((j * 27.0) + ((t * ((a * 4.0) + (-18.0 * (x * (y * z))))) / k));
} else if (t_1 <= 5e+67) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - (x * (4.0 * i));
} else {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - 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 = (j * 27.0) * k tmp = 0 if t_1 <= -5e+115: tmp = -k * ((j * 27.0) + ((t * ((a * 4.0) + (-18.0 * (x * (y * z))))) / k)) elif t_1 <= 5e+67: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - (x * (4.0 * i)) else: tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - 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(j * 27.0) * k) tmp = 0.0 if (t_1 <= -5e+115) tmp = Float64(Float64(-k) * Float64(Float64(j * 27.0) + Float64(Float64(t * Float64(Float64(a * 4.0) + Float64(-18.0 * Float64(x * Float64(y * z))))) / k))); elseif (t_1 <= 5e+67) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(x * Float64(4.0 * i))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))) - 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 = (j * 27.0) * k;
tmp = 0.0;
if (t_1 <= -5e+115)
tmp = -k * ((j * 27.0) + ((t * ((a * 4.0) + (-18.0 * (x * (y * z))))) / k));
elseif (t_1 <= 5e+67)
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - (x * (4.0 * i));
else
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - 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[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+115], N[((-k) * N[(N[(j * 27.0), $MachinePrecision] + N[(N[(t * N[(N[(a * 4.0), $MachinePrecision] + N[(-18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+67], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+115}:\\
\;\;\;\;\left(-k\right) \cdot \left(j \cdot 27 + \frac{t \cdot \left(a \cdot 4 + -18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)}{k}\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+67}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - x \cdot \left(4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.00000000000000008e115Initial program 79.4%
Taylor expanded in t around -inf 79.3%
associate-*r*79.3%
neg-mul-179.3%
cancel-sign-sub-inv79.3%
metadata-eval79.3%
*-commutative79.3%
associate-*r*79.3%
Simplified79.3%
Taylor expanded in k around inf 88.7%
if -5.00000000000000008e115 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.99999999999999976e67Initial program 85.7%
Simplified86.4%
Taylor expanded in x around inf 84.0%
associate-*r*84.0%
*-commutative84.0%
Simplified84.0%
if 4.99999999999999976e67 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 88.6%
Taylor expanded in y around 0 86.9%
distribute-lft-out86.9%
*-commutative86.9%
Simplified86.9%
Final simplification85.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 (<= y -7.8e+264)
(*
y
(-
(+ (* -4.0 (/ (* t a) y)) (* 18.0 (* t (* x z))))
(* 27.0 (/ (* j k) y))))
(if (or (<= y -6.4e+108) (not (<= y 2e-47)))
(- (+ (- (* b c) (* (* x 4.0) i)) (* y (* (* x z) (* 18.0 t)))) t_1)
(- (- (* b c) (* 4.0 (+ (* t a) (* x i)))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (y <= -7.8e+264) {
tmp = y * (((-4.0 * ((t * a) / y)) + (18.0 * (t * (x * z)))) - (27.0 * ((j * k) / y)));
} else if ((y <= -6.4e+108) || !(y <= 2e-47)) {
tmp = (((b * c) - ((x * 4.0) * i)) + (y * ((x * z) * (18.0 * t)))) - t_1;
} else {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - 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 = (j * 27.0d0) * k
if (y <= (-7.8d+264)) then
tmp = y * ((((-4.0d0) * ((t * a) / y)) + (18.0d0 * (t * (x * z)))) - (27.0d0 * ((j * k) / y)))
else if ((y <= (-6.4d+108)) .or. (.not. (y <= 2d-47))) then
tmp = (((b * c) - ((x * 4.0d0) * i)) + (y * ((x * z) * (18.0d0 * t)))) - t_1
else
tmp = ((b * c) - (4.0d0 * ((t * a) + (x * i)))) - 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 = (j * 27.0) * k;
double tmp;
if (y <= -7.8e+264) {
tmp = y * (((-4.0 * ((t * a) / y)) + (18.0 * (t * (x * z)))) - (27.0 * ((j * k) / y)));
} else if ((y <= -6.4e+108) || !(y <= 2e-47)) {
tmp = (((b * c) - ((x * 4.0) * i)) + (y * ((x * z) * (18.0 * t)))) - t_1;
} else {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - 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 = (j * 27.0) * k tmp = 0 if y <= -7.8e+264: tmp = y * (((-4.0 * ((t * a) / y)) + (18.0 * (t * (x * z)))) - (27.0 * ((j * k) / y))) elif (y <= -6.4e+108) or not (y <= 2e-47): tmp = (((b * c) - ((x * 4.0) * i)) + (y * ((x * z) * (18.0 * t)))) - t_1 else: tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - 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(j * 27.0) * k) tmp = 0.0 if (y <= -7.8e+264) tmp = Float64(y * Float64(Float64(Float64(-4.0 * Float64(Float64(t * a) / y)) + Float64(18.0 * Float64(t * Float64(x * z)))) - Float64(27.0 * Float64(Float64(j * k) / y)))); elseif ((y <= -6.4e+108) || !(y <= 2e-47)) tmp = Float64(Float64(Float64(Float64(b * c) - Float64(Float64(x * 4.0) * i)) + Float64(y * Float64(Float64(x * z) * Float64(18.0 * t)))) - t_1); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))) - 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 = (j * 27.0) * k;
tmp = 0.0;
if (y <= -7.8e+264)
tmp = y * (((-4.0 * ((t * a) / y)) + (18.0 * (t * (x * z)))) - (27.0 * ((j * k) / y)));
elseif ((y <= -6.4e+108) || ~((y <= 2e-47)))
tmp = (((b * c) - ((x * 4.0) * i)) + (y * ((x * z) * (18.0 * t)))) - t_1;
else
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - 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[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[y, -7.8e+264], N[(y * N[(N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(N[(j * k), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -6.4e+108], N[Not[LessEqual[y, 2e-47]], $MachinePrecision]], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(x * z), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;y \leq -7.8 \cdot 10^{+264}:\\
\;\;\;\;y \cdot \left(\left(-4 \cdot \frac{t \cdot a}{y} + 18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right) - 27 \cdot \frac{j \cdot k}{y}\right)\\
\mathbf{elif}\;y \leq -6.4 \cdot 10^{+108} \lor \neg \left(y \leq 2 \cdot 10^{-47}\right):\\
\;\;\;\;\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) + y \cdot \left(\left(x \cdot z\right) \cdot \left(18 \cdot t\right)\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - t\_1\\
\end{array}
\end{array}
if y < -7.79999999999999987e264Initial program 63.9%
Taylor expanded in t around -inf 73.8%
associate-*r*73.8%
neg-mul-173.8%
cancel-sign-sub-inv73.8%
metadata-eval73.8%
*-commutative73.8%
associate-*r*73.8%
Simplified73.8%
Taylor expanded in y around inf 91.0%
if -7.79999999999999987e264 < y < -6.3999999999999998e108 or 1.9999999999999999e-47 < y Initial program 80.0%
associate--l+80.0%
distribute-rgt-out--81.0%
associate-*r*81.1%
associate-*l*81.1%
associate-*r*81.2%
*-commutative81.2%
Applied egg-rr81.2%
Taylor expanded in y around inf 89.3%
Taylor expanded in a around 0 81.0%
associate-*r*81.0%
*-commutative81.0%
*-commutative81.0%
Simplified81.0%
if -6.3999999999999998e108 < y < 1.9999999999999999e-47Initial program 90.0%
Taylor expanded in y around 0 86.4%
distribute-lft-out86.4%
*-commutative86.4%
Simplified86.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
(if (<= (* (* j 27.0) k) (- INFINITY))
(* (- k) (+ (* j 27.0) (/ (* t (+ (* a 4.0) (* -18.0 (* x (* y z))))) k)))
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* j (* 27.0 k)) (* x (* 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 (((j * 27.0) * k) <= -((double) INFINITY)) {
tmp = -k * ((j * 27.0) + ((t * ((a * 4.0) + (-18.0 * (x * (y * z))))) / k));
} else {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((j * (27.0 * k)) + (x * (4.0 * i)));
}
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 tmp;
if (((j * 27.0) * k) <= -Double.POSITIVE_INFINITY) {
tmp = -k * ((j * 27.0) + ((t * ((a * 4.0) + (-18.0 * (x * (y * z))))) / k));
} else {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((j * (27.0 * k)) + (x * (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 ((j * 27.0) * k) <= -math.inf: tmp = -k * ((j * 27.0) + ((t * ((a * 4.0) + (-18.0 * (x * (y * z))))) / k)) else: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((j * (27.0 * k)) + (x * (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 (Float64(Float64(j * 27.0) * k) <= Float64(-Inf)) tmp = Float64(Float64(-k) * Float64(Float64(j * 27.0) + Float64(Float64(t * Float64(Float64(a * 4.0) + Float64(-18.0 * Float64(x * Float64(y * z))))) / k))); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(j * Float64(27.0 * k)) + Float64(x * 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 (((j * 27.0) * k) <= -Inf)
tmp = -k * ((j * 27.0) + ((t * ((a * 4.0) + (-18.0 * (x * (y * z))))) / k));
else
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((j * (27.0 * k)) + (x * (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[N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision], (-Infinity)], N[((-k) * N[(N[(j * 27.0), $MachinePrecision] + N[(N[(t * N[(N[(a * 4.0), $MachinePrecision] + N[(-18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision] + N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(j \cdot 27\right) \cdot k \leq -\infty:\\
\;\;\;\;\left(-k\right) \cdot \left(j \cdot 27 + \frac{t \cdot \left(a \cdot 4 + -18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)}{k}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(j \cdot \left(27 \cdot k\right) + x \cdot \left(4 \cdot i\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -inf.0Initial program 63.2%
Taylor expanded in t around -inf 73.7%
associate-*r*73.7%
neg-mul-173.7%
cancel-sign-sub-inv73.7%
metadata-eval73.7%
*-commutative73.7%
associate-*r*73.7%
Simplified73.7%
Taylor expanded in k around inf 100.0%
if -inf.0 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 86.9%
Simplified88.3%
Final simplification89.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 (<= t_1 (- INFINITY))
(* (- k) (+ (* j 27.0) (/ (* t (+ (* a 4.0) (* -18.0 (* x (* y z))))) k)))
(-
(+
(* t (- (* x (* z (* 18.0 y))) (* a 4.0)))
(- (* b c) (* (* x 4.0) i)))
t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = -k * ((j * 27.0) + ((t * ((a * 4.0) + (-18.0 * (x * (y * z))))) / k));
} else {
tmp = ((t * ((x * (z * (18.0 * y))) - (a * 4.0))) + ((b * c) - ((x * 4.0) * i))) - t_1;
}
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 = (j * 27.0) * k;
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = -k * ((j * 27.0) + ((t * ((a * 4.0) + (-18.0 * (x * (y * z))))) / k));
} else {
tmp = ((t * ((x * (z * (18.0 * y))) - (a * 4.0))) + ((b * c) - ((x * 4.0) * i))) - 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 = (j * 27.0) * k tmp = 0 if t_1 <= -math.inf: tmp = -k * ((j * 27.0) + ((t * ((a * 4.0) + (-18.0 * (x * (y * z))))) / k)) else: tmp = ((t * ((x * (z * (18.0 * y))) - (a * 4.0))) + ((b * c) - ((x * 4.0) * i))) - 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(j * 27.0) * k) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(-k) * Float64(Float64(j * 27.0) + Float64(Float64(t * Float64(Float64(a * 4.0) + Float64(-18.0 * Float64(x * Float64(y * z))))) / k))); else tmp = Float64(Float64(Float64(t * Float64(Float64(x * Float64(z * Float64(18.0 * y))) - Float64(a * 4.0))) + Float64(Float64(b * c) - Float64(Float64(x * 4.0) * i))) - 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 = (j * 27.0) * k;
tmp = 0.0;
if (t_1 <= -Inf)
tmp = -k * ((j * 27.0) + ((t * ((a * 4.0) + (-18.0 * (x * (y * z))))) / k));
else
tmp = ((t * ((x * (z * (18.0 * y))) - (a * 4.0))) + ((b * c) - ((x * 4.0) * i))) - 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[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[((-k) * N[(N[(j * 27.0), $MachinePrecision] + N[(N[(t * N[(N[(a * 4.0), $MachinePrecision] + N[(-18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * N[(N[(x * N[(z * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\left(-k\right) \cdot \left(j \cdot 27 + \frac{t \cdot \left(a \cdot 4 + -18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)}{k}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot \left(x \cdot \left(z \cdot \left(18 \cdot y\right)\right) - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -inf.0Initial program 63.2%
Taylor expanded in t around -inf 73.7%
associate-*r*73.7%
neg-mul-173.7%
cancel-sign-sub-inv73.7%
metadata-eval73.7%
*-commutative73.7%
associate-*r*73.7%
Simplified73.7%
Taylor expanded in k around inf 100.0%
if -inf.0 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 86.9%
associate--l+86.9%
distribute-rgt-out--88.6%
associate-*r*88.3%
associate-*l*88.3%
associate-*r*88.3%
*-commutative88.3%
Applied egg-rr88.3%
Final simplification89.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 (* k -27.0))))
(if (<= t -2.5e+19)
(* t (+ (* (* x 18.0) (* y z)) (* a -4.0)))
(if (<= t 7e-297)
(+ t_1 (* -4.0 (* x i)))
(if (<= t 6e-46)
(+ (* b c) t_1)
(if (<= t 2.15e+83)
(* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))
(* 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 = j * (k * -27.0);
double tmp;
if (t <= -2.5e+19) {
tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0));
} else if (t <= 7e-297) {
tmp = t_1 + (-4.0 * (x * i));
} else if (t <= 6e-46) {
tmp = (b * c) + t_1;
} else if (t <= 2.15e+83) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else {
tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if (t <= (-2.5d+19)) then
tmp = t * (((x * 18.0d0) * (y * z)) + (a * (-4.0d0)))
else if (t <= 7d-297) then
tmp = t_1 + ((-4.0d0) * (x * i))
else if (t <= 6d-46) then
tmp = (b * c) + t_1
else if (t <= 2.15d+83) then
tmp = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
else
tmp = t * ((18.0d0 * (z * (x * y))) - (a * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (t <= -2.5e+19) {
tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0));
} else if (t <= 7e-297) {
tmp = t_1 + (-4.0 * (x * i));
} else if (t <= 6e-46) {
tmp = (b * c) + t_1;
} else if (t <= 2.15e+83) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} 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 = j * (k * -27.0) tmp = 0 if t <= -2.5e+19: tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0)) elif t <= 7e-297: tmp = t_1 + (-4.0 * (x * i)) elif t <= 6e-46: tmp = (b * c) + t_1 elif t <= 2.15e+83: tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)) 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(j * Float64(k * -27.0)) tmp = 0.0 if (t <= -2.5e+19) tmp = Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) + Float64(a * -4.0))); elseif (t <= 7e-297) tmp = Float64(t_1 + Float64(-4.0 * Float64(x * i))); elseif (t <= 6e-46) tmp = Float64(Float64(b * c) + t_1); elseif (t <= 2.15e+83) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))); 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 = j * (k * -27.0);
tmp = 0.0;
if (t <= -2.5e+19)
tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0));
elseif (t <= 7e-297)
tmp = t_1 + (-4.0 * (x * i));
elseif (t <= 6e-46)
tmp = (b * c) + t_1;
elseif (t <= 2.15e+83)
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.5e+19], N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e-297], N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e-46], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 2.15e+83], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;t \leq -2.5 \cdot 10^{+19}:\\
\;\;\;\;t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot -4\right)\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-297}:\\
\;\;\;\;t\_1 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-46}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{+83}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\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 t < -2.5e19Initial program 71.5%
Simplified81.0%
Taylor expanded in t around inf 64.5%
cancel-sign-sub-inv64.5%
associate-*r*64.5%
metadata-eval64.5%
Applied egg-rr64.5%
if -2.5e19 < t < 6.9999999999999998e-297Initial program 87.0%
Simplified87.3%
Taylor expanded in i around inf 58.4%
if 6.9999999999999998e-297 < t < 5.99999999999999975e-46Initial program 86.8%
Simplified86.9%
Taylor expanded in b around inf 67.0%
if 5.99999999999999975e-46 < t < 2.15e83Initial program 88.1%
associate--l+88.1%
distribute-rgt-out--91.0%
associate-*r*88.2%
associate-*l*88.2%
associate-*r*88.2%
*-commutative88.2%
Applied egg-rr88.2%
Taylor expanded in x around inf 62.9%
cancel-sign-sub-inv62.9%
metadata-eval62.9%
associate-*r*62.9%
*-commutative62.9%
Simplified62.9%
if 2.15e83 < t Initial program 90.1%
Simplified90.1%
Taylor expanded in t around inf 78.8%
pow178.8%
Applied egg-rr78.8%
unpow178.8%
associate-*r*78.8%
Simplified78.8%
Final simplification65.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= t -1.85e+16)
(* t (+ (* (* x 18.0) (* y z)) (* a -4.0)))
(if (<= t 7e-296)
(+ t_1 (* -4.0 (* x i)))
(if (<= t 1.6e-45)
(+ (* b c) t_1)
(if (<= t 5.5e+83)
(* x (+ (* i -4.0) (* 18.0 (* y (* z t)))))
(* 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 = j * (k * -27.0);
double tmp;
if (t <= -1.85e+16) {
tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0));
} else if (t <= 7e-296) {
tmp = t_1 + (-4.0 * (x * i));
} else if (t <= 1.6e-45) {
tmp = (b * c) + t_1;
} else if (t <= 5.5e+83) {
tmp = x * ((i * -4.0) + (18.0 * (y * (z * t))));
} else {
tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if (t <= (-1.85d+16)) then
tmp = t * (((x * 18.0d0) * (y * z)) + (a * (-4.0d0)))
else if (t <= 7d-296) then
tmp = t_1 + ((-4.0d0) * (x * i))
else if (t <= 1.6d-45) then
tmp = (b * c) + t_1
else if (t <= 5.5d+83) then
tmp = x * ((i * (-4.0d0)) + (18.0d0 * (y * (z * t))))
else
tmp = t * ((18.0d0 * (z * (x * y))) - (a * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (t <= -1.85e+16) {
tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0));
} else if (t <= 7e-296) {
tmp = t_1 + (-4.0 * (x * i));
} else if (t <= 1.6e-45) {
tmp = (b * c) + t_1;
} else if (t <= 5.5e+83) {
tmp = x * ((i * -4.0) + (18.0 * (y * (z * t))));
} 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 = j * (k * -27.0) tmp = 0 if t <= -1.85e+16: tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0)) elif t <= 7e-296: tmp = t_1 + (-4.0 * (x * i)) elif t <= 1.6e-45: tmp = (b * c) + t_1 elif t <= 5.5e+83: tmp = x * ((i * -4.0) + (18.0 * (y * (z * t)))) 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(j * Float64(k * -27.0)) tmp = 0.0 if (t <= -1.85e+16) tmp = Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) + Float64(a * -4.0))); elseif (t <= 7e-296) tmp = Float64(t_1 + Float64(-4.0 * Float64(x * i))); elseif (t <= 1.6e-45) tmp = Float64(Float64(b * c) + t_1); elseif (t <= 5.5e+83) tmp = Float64(x * Float64(Float64(i * -4.0) + Float64(18.0 * Float64(y * Float64(z * t))))); 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 = j * (k * -27.0);
tmp = 0.0;
if (t <= -1.85e+16)
tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0));
elseif (t <= 7e-296)
tmp = t_1 + (-4.0 * (x * i));
elseif (t <= 1.6e-45)
tmp = (b * c) + t_1;
elseif (t <= 5.5e+83)
tmp = x * ((i * -4.0) + (18.0 * (y * (z * t))));
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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.85e+16], N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e-296], N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.6e-45], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 5.5e+83], N[(x * N[(N[(i * -4.0), $MachinePrecision] + N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;t \leq -1.85 \cdot 10^{+16}:\\
\;\;\;\;t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot -4\right)\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-296}:\\
\;\;\;\;t\_1 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-45}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+83}:\\
\;\;\;\;x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\
\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 t < -1.85e16Initial program 71.5%
Simplified81.0%
Taylor expanded in t around inf 64.5%
cancel-sign-sub-inv64.5%
associate-*r*64.5%
metadata-eval64.5%
Applied egg-rr64.5%
if -1.85e16 < t < 6.9999999999999998e-296Initial program 87.0%
Simplified87.3%
Taylor expanded in i around inf 58.4%
if 6.9999999999999998e-296 < t < 1.60000000000000004e-45Initial program 86.8%
Simplified86.9%
Taylor expanded in b around inf 67.0%
if 1.60000000000000004e-45 < t < 5.4999999999999996e83Initial program 88.1%
associate--l+88.1%
distribute-rgt-out--91.0%
associate-*r*88.2%
associate-*l*88.2%
associate-*r*88.2%
*-commutative88.2%
Applied egg-rr88.2%
Taylor expanded in x around inf 62.9%
cancel-sign-sub-inv62.9%
metadata-eval62.9%
associate-*r*62.9%
*-commutative62.9%
Simplified62.9%
Taylor expanded in y around 0 62.9%
associate-*r*62.9%
*-commutative62.9%
associate-*l*62.9%
Simplified62.9%
if 5.4999999999999996e83 < t Initial program 90.1%
Simplified90.1%
Taylor expanded in t around inf 78.8%
pow178.8%
Applied egg-rr78.8%
unpow178.8%
associate-*r*78.8%
Simplified78.8%
Final simplification65.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (or (<= t_1 -5e+115) (not (<= t_1 2e+121)))
(- (- (* b c) (* 4.0 (* t a))) t_1)
(- (* b c) (* 4.0 (+ (* t a) (* 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 <= -5e+115) || !(t_1 <= 2e+121)) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else {
tmp = (b * c) - (4.0 * ((t * a) + (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 <= (-5d+115)) .or. (.not. (t_1 <= 2d+121))) then
tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
else
tmp = (b * c) - (4.0d0 * ((t * a) + (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 <= -5e+115) || !(t_1 <= 2e+121)) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else {
tmp = (b * c) - (4.0 * ((t * a) + (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 <= -5e+115) or not (t_1 <= 2e+121): tmp = ((b * c) - (4.0 * (t * a))) - t_1 else: tmp = (b * c) - (4.0 * ((t * a) + (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 <= -5e+115) || !(t_1 <= 2e+121)) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1); else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + 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 <= -5e+115) || ~((t_1 <= 2e+121)))
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
else
tmp = (b * c) - (4.0 * ((t * a) + (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, -5e+115], N[Not[LessEqual[t$95$1, 2e+121]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+115} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+121}\right):\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.00000000000000008e115 or 2.00000000000000007e121 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.3%
Taylor expanded in x around 0 79.1%
if -5.00000000000000008e115 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.00000000000000007e121Initial program 85.7%
Taylor expanded in y around 0 71.3%
distribute-lft-out71.3%
*-commutative71.3%
Simplified71.3%
Taylor expanded in j around 0 67.9%
Final simplification71.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= (* b c) -5e+154)
(- (* b c) (* 4.0 (* t a)))
(if (<= (* b c) -0.000225)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= (* b c) 4.1e+26) (+ t_1 (* -4.0 (* x i))) (+ (* b c) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if ((b * c) <= -5e+154) {
tmp = (b * c) - (4.0 * (t * a));
} else if ((b * c) <= -0.000225) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if ((b * c) <= 4.1e+26) {
tmp = t_1 + (-4.0 * (x * i));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if ((b * c) <= (-5d+154)) then
tmp = (b * c) - (4.0d0 * (t * a))
else if ((b * c) <= (-0.000225d0)) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if ((b * c) <= 4.1d+26) then
tmp = t_1 + ((-4.0d0) * (x * i))
else
tmp = (b * c) + t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if ((b * c) <= -5e+154) {
tmp = (b * c) - (4.0 * (t * a));
} else if ((b * c) <= -0.000225) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if ((b * c) <= 4.1e+26) {
tmp = t_1 + (-4.0 * (x * i));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if (b * c) <= -5e+154: tmp = (b * c) - (4.0 * (t * a)) elif (b * c) <= -0.000225: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif (b * c) <= 4.1e+26: tmp = t_1 + (-4.0 * (x * i)) else: tmp = (b * c) + t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (Float64(b * c) <= -5e+154) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); elseif (Float64(b * c) <= -0.000225) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (Float64(b * c) <= 4.1e+26) tmp = Float64(t_1 + Float64(-4.0 * Float64(x * i))); else tmp = Float64(Float64(b * c) + t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
tmp = 0.0;
if ((b * c) <= -5e+154)
tmp = (b * c) - (4.0 * (t * a));
elseif ((b * c) <= -0.000225)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif ((b * c) <= 4.1e+26)
tmp = t_1 + (-4.0 * (x * i));
else
tmp = (b * c) + t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -5e+154], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -0.000225], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4.1e+26], N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+154}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;b \cdot c \leq -0.000225:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;b \cdot c \leq 4.1 \cdot 10^{+26}:\\
\;\;\;\;t\_1 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t\_1\\
\end{array}
\end{array}
if (*.f64 b c) < -5.00000000000000004e154Initial program 72.6%
Taylor expanded in x around 0 73.4%
Taylor expanded in j around 0 76.0%
if -5.00000000000000004e154 < (*.f64 b c) < -2.2499999999999999e-4Initial program 85.8%
Simplified88.8%
Taylor expanded in t around inf 66.4%
if -2.2499999999999999e-4 < (*.f64 b c) < 4.09999999999999983e26Initial program 88.3%
Simplified88.5%
Taylor expanded in i around inf 58.5%
if 4.09999999999999983e26 < (*.f64 b c) Initial program 86.3%
Simplified86.4%
Taylor expanded in b around inf 62.5%
Final simplification63.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= (* b c) -2.05e+155)
(- (* b c) (* 4.0 (* t a)))
(if (<= (* b c) -3.35e-6)
(* t (+ (* (* x 18.0) (* y z)) (* a -4.0)))
(if (<= (* b c) 6.6e+25) (+ t_1 (* -4.0 (* x i))) (+ (* b c) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if ((b * c) <= -2.05e+155) {
tmp = (b * c) - (4.0 * (t * a));
} else if ((b * c) <= -3.35e-6) {
tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0));
} else if ((b * c) <= 6.6e+25) {
tmp = t_1 + (-4.0 * (x * i));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if ((b * c) <= (-2.05d+155)) then
tmp = (b * c) - (4.0d0 * (t * a))
else if ((b * c) <= (-3.35d-6)) then
tmp = t * (((x * 18.0d0) * (y * z)) + (a * (-4.0d0)))
else if ((b * c) <= 6.6d+25) then
tmp = t_1 + ((-4.0d0) * (x * i))
else
tmp = (b * c) + t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if ((b * c) <= -2.05e+155) {
tmp = (b * c) - (4.0 * (t * a));
} else if ((b * c) <= -3.35e-6) {
tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0));
} else if ((b * c) <= 6.6e+25) {
tmp = t_1 + (-4.0 * (x * i));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if (b * c) <= -2.05e+155: tmp = (b * c) - (4.0 * (t * a)) elif (b * c) <= -3.35e-6: tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0)) elif (b * c) <= 6.6e+25: tmp = t_1 + (-4.0 * (x * i)) else: tmp = (b * c) + t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (Float64(b * c) <= -2.05e+155) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); elseif (Float64(b * c) <= -3.35e-6) tmp = Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) + Float64(a * -4.0))); elseif (Float64(b * c) <= 6.6e+25) tmp = Float64(t_1 + Float64(-4.0 * Float64(x * i))); else tmp = Float64(Float64(b * c) + t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
tmp = 0.0;
if ((b * c) <= -2.05e+155)
tmp = (b * c) - (4.0 * (t * a));
elseif ((b * c) <= -3.35e-6)
tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0));
elseif ((b * c) <= 6.6e+25)
tmp = t_1 + (-4.0 * (x * i));
else
tmp = (b * c) + t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2.05e+155], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -3.35e-6], N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 6.6e+25], N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -2.05 \cdot 10^{+155}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;b \cdot c \leq -3.35 \cdot 10^{-6}:\\
\;\;\;\;t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 6.6 \cdot 10^{+25}:\\
\;\;\;\;t\_1 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t\_1\\
\end{array}
\end{array}
if (*.f64 b c) < -2.0499999999999999e155Initial program 72.6%
Taylor expanded in x around 0 73.4%
Taylor expanded in j around 0 76.0%
if -2.0499999999999999e155 < (*.f64 b c) < -3.35e-6Initial program 85.8%
Simplified88.8%
Taylor expanded in t around inf 66.4%
cancel-sign-sub-inv66.4%
associate-*r*66.3%
metadata-eval66.3%
Applied egg-rr66.3%
if -3.35e-6 < (*.f64 b c) < 6.6000000000000002e25Initial program 88.3%
Simplified88.5%
Taylor expanded in i around inf 58.5%
if 6.6000000000000002e25 < (*.f64 b c) Initial program 86.3%
Simplified86.4%
Taylor expanded in b around inf 62.5%
Final simplification63.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= y -9.2e+250) (not (<= y 4.5e-8))) (* y (- (* (* x z) (* 18.0 t)) (* 27.0 (/ (* j k) y)))) (- (- (* b c) (* 4.0 (+ (* t a) (* x i)))) (* (* 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 ((y <= -9.2e+250) || !(y <= 4.5e-8)) {
tmp = y * (((x * z) * (18.0 * t)) - (27.0 * ((j * k) / y)));
} else {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((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 ((y <= (-9.2d+250)) .or. (.not. (y <= 4.5d-8))) then
tmp = y * (((x * z) * (18.0d0 * t)) - (27.0d0 * ((j * k) / y)))
else
tmp = ((b * c) - (4.0d0 * ((t * a) + (x * i)))) - ((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 ((y <= -9.2e+250) || !(y <= 4.5e-8)) {
tmp = y * (((x * z) * (18.0 * t)) - (27.0 * ((j * k) / y)));
} else {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (y <= -9.2e+250) or not (y <= 4.5e-8): tmp = y * (((x * z) * (18.0 * t)) - (27.0 * ((j * k) / y))) else: tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((y <= -9.2e+250) || !(y <= 4.5e-8)) tmp = Float64(y * Float64(Float64(Float64(x * z) * Float64(18.0 * t)) - Float64(27.0 * Float64(Float64(j * k) / y)))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))) - 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 ((y <= -9.2e+250) || ~((y <= 4.5e-8)))
tmp = y * (((x * z) * (18.0 * t)) - (27.0 * ((j * k) / y)));
else
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[y, -9.2e+250], N[Not[LessEqual[y, 4.5e-8]], $MachinePrecision]], N[(y * N[(N[(N[(x * z), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(N[(j * k), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $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}\;y \leq -9.2 \cdot 10^{+250} \lor \neg \left(y \leq 4.5 \cdot 10^{-8}\right):\\
\;\;\;\;y \cdot \left(\left(x \cdot z\right) \cdot \left(18 \cdot t\right) - 27 \cdot \frac{j \cdot k}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if y < -9.2000000000000005e250 or 4.49999999999999993e-8 < y Initial program 78.3%
Taylor expanded in t around -inf 70.8%
associate-*r*70.8%
neg-mul-170.8%
cancel-sign-sub-inv70.8%
metadata-eval70.8%
*-commutative70.8%
associate-*r*70.8%
Simplified70.8%
Taylor expanded in y around inf 79.2%
Taylor expanded in a around 0 69.9%
associate-*r*79.5%
*-commutative79.5%
*-commutative79.5%
Simplified69.9%
if -9.2000000000000005e250 < y < 4.49999999999999993e-8Initial program 87.9%
Taylor expanded in y around 0 82.5%
distribute-lft-out82.5%
*-commutative82.5%
Simplified82.5%
Final simplification78.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= y -9.5e+201)
(- (* t (- (* a (- 4.0)) (* (* y z) (* x -18.0)))) t_1)
(if (<= y 4.5e-8)
(- (- (* b c) (* 4.0 (+ (* t a) (* x i)))) t_1)
(* y (- (* (* x z) (* 18.0 t)) (* 27.0 (/ (* j k) y))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (y <= -9.5e+201) {
tmp = (t * ((a * -4.0) - ((y * z) * (x * -18.0)))) - t_1;
} else if (y <= 4.5e-8) {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1;
} else {
tmp = y * (((x * z) * (18.0 * t)) - (27.0 * ((j * k) / y)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if (y <= (-9.5d+201)) then
tmp = (t * ((a * -4.0d0) - ((y * z) * (x * (-18.0d0))))) - t_1
else if (y <= 4.5d-8) then
tmp = ((b * c) - (4.0d0 * ((t * a) + (x * i)))) - t_1
else
tmp = y * (((x * z) * (18.0d0 * t)) - (27.0d0 * ((j * k) / y)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (y <= -9.5e+201) {
tmp = (t * ((a * -4.0) - ((y * z) * (x * -18.0)))) - t_1;
} else if (y <= 4.5e-8) {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1;
} else {
tmp = y * (((x * z) * (18.0 * t)) - (27.0 * ((j * k) / y)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if y <= -9.5e+201: tmp = (t * ((a * -4.0) - ((y * z) * (x * -18.0)))) - t_1 elif y <= 4.5e-8: tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1 else: tmp = y * (((x * z) * (18.0 * t)) - (27.0 * ((j * k) / y))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (y <= -9.5e+201) tmp = Float64(Float64(t * Float64(Float64(a * Float64(-4.0)) - Float64(Float64(y * z) * Float64(x * -18.0)))) - t_1); elseif (y <= 4.5e-8) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))) - t_1); else tmp = Float64(y * Float64(Float64(Float64(x * z) * Float64(18.0 * t)) - Float64(27.0 * Float64(Float64(j * k) / y)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if (y <= -9.5e+201)
tmp = (t * ((a * -4.0) - ((y * z) * (x * -18.0)))) - t_1;
elseif (y <= 4.5e-8)
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1;
else
tmp = y * (((x * z) * (18.0 * t)) - (27.0 * ((j * k) / y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[y, -9.5e+201], N[(N[(t * N[(N[(a * (-4.0)), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] * N[(x * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[y, 4.5e-8], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(y * N[(N[(N[(x * z), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(N[(j * k), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{+201}:\\
\;\;\;\;t \cdot \left(a \cdot \left(-4\right) - \left(y \cdot z\right) \cdot \left(x \cdot -18\right)\right) - t\_1\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-8}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(x \cdot z\right) \cdot \left(18 \cdot t\right) - 27 \cdot \frac{j \cdot k}{y}\right)\\
\end{array}
\end{array}
if y < -9.5000000000000002e201Initial program 59.4%
Taylor expanded in t around -inf 69.5%
associate-*r*69.5%
neg-mul-169.5%
cancel-sign-sub-inv69.5%
metadata-eval69.5%
*-commutative69.5%
associate-*r*69.5%
Simplified69.5%
if -9.5000000000000002e201 < y < 4.49999999999999993e-8Initial program 90.1%
Taylor expanded in y around 0 83.7%
distribute-lft-out83.7%
*-commutative83.7%
Simplified83.7%
if 4.49999999999999993e-8 < y Initial program 80.6%
Taylor expanded in t around -inf 69.7%
associate-*r*69.7%
neg-mul-169.7%
cancel-sign-sub-inv69.7%
metadata-eval69.7%
*-commutative69.7%
associate-*r*69.7%
Simplified69.7%
Taylor expanded in y around inf 76.7%
Taylor expanded in a around 0 65.6%
associate-*r*80.4%
*-commutative80.4%
*-commutative80.4%
Simplified65.6%
Final simplification78.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 (<= (* b c) -3e+154)
(* b c)
(if (<= (* b c) -7.5e-5)
(* t (* a -4.0))
(if (<= (* b c) 1.35e+163) (* j (* k -27.0)) (* b c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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) <= -3e+154) {
tmp = b * c;
} else if ((b * c) <= -7.5e-5) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 1.35e+163) {
tmp = j * (k * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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) <= (-3d+154)) then
tmp = b * c
else if ((b * c) <= (-7.5d-5)) then
tmp = t * (a * (-4.0d0))
else if ((b * c) <= 1.35d+163) then
tmp = j * (k * (-27.0d0))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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) <= -3e+154) {
tmp = b * c;
} else if ((b * c) <= -7.5e-5) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 1.35e+163) {
tmp = j * (k * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -3e+154: tmp = b * c elif (b * c) <= -7.5e-5: tmp = t * (a * -4.0) elif (b * c) <= 1.35e+163: tmp = j * (k * -27.0) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -3e+154) tmp = Float64(b * c); elseif (Float64(b * c) <= -7.5e-5) tmp = Float64(t * Float64(a * -4.0)); elseif (Float64(b * c) <= 1.35e+163) tmp = Float64(j * Float64(k * -27.0)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -3e+154)
tmp = b * c;
elseif ((b * c) <= -7.5e-5)
tmp = t * (a * -4.0);
elseif ((b * c) <= 1.35e+163)
tmp = j * (k * -27.0);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -3e+154], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -7.5e-5], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.35e+163], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -3 \cdot 10^{+154}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -7.5 \cdot 10^{-5}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 1.35 \cdot 10^{+163}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -3.00000000000000026e154 or 1.35e163 < (*.f64 b c) Initial program 76.6%
associate--l+76.6%
distribute-rgt-out--78.2%
associate-*r*81.3%
associate-*l*81.3%
associate-*r*81.3%
*-commutative81.3%
Applied egg-rr81.3%
Taylor expanded in b around inf 63.9%
if -3.00000000000000026e154 < (*.f64 b c) < -7.49999999999999934e-5Initial program 85.8%
associate--l+85.8%
distribute-rgt-out--88.7%
associate-*r*88.8%
associate-*l*88.8%
associate-*r*88.9%
*-commutative88.9%
Applied egg-rr88.9%
Taylor expanded in a around inf 38.5%
associate-*r*38.5%
metadata-eval38.5%
distribute-lft-neg-in38.5%
distribute-lft-neg-in38.5%
distribute-rgt-neg-out38.5%
*-commutative38.5%
distribute-lft-neg-out38.5%
distribute-rgt-neg-in38.5%
distribute-lft-neg-in38.5%
metadata-eval38.5%
Simplified38.5%
if -7.49999999999999934e-5 < (*.f64 b c) < 1.35e163Initial program 88.5%
associate--l+88.5%
distribute-rgt-out--89.8%
associate-*r*88.0%
associate-*l*88.0%
associate-*r*88.0%
*-commutative88.0%
Applied egg-rr88.0%
Taylor expanded in j around inf 35.6%
metadata-eval35.6%
distribute-lft-neg-in35.6%
*-commutative35.6%
associate-*r*35.6%
distribute-rgt-neg-in35.6%
distribute-rgt-neg-in35.6%
metadata-eval35.6%
Simplified35.6%
Final simplification43.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -270000000.0)
(- (* b c) (* 4.0 (+ (* t a) (* x i))))
(if (<= t 1.15e+84)
(- (- (* b c) (* 4.0 (* x i))) (* (* j 27.0) k))
(* 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 tmp;
if (t <= -270000000.0) {
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
} else if (t <= 1.15e+84) {
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
} else {
tmp = t * ((18.0 * (z * (x * y))) - (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 <= (-270000000.0d0)) then
tmp = (b * c) - (4.0d0 * ((t * a) + (x * i)))
else if (t <= 1.15d+84) then
tmp = ((b * c) - (4.0d0 * (x * i))) - ((j * 27.0d0) * k)
else
tmp = t * ((18.0d0 * (z * (x * y))) - (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 <= -270000000.0) {
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
} else if (t <= 1.15e+84) {
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
} 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): tmp = 0 if t <= -270000000.0: tmp = (b * c) - (4.0 * ((t * a) + (x * i))) elif t <= 1.15e+84: tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k) 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) tmp = 0.0 if (t <= -270000000.0) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))); elseif (t <= 1.15e+84) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(Float64(j * 27.0) * k)); 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)
tmp = 0.0;
if (t <= -270000000.0)
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
elseif (t <= 1.15e+84)
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
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_] := If[LessEqual[t, -270000000.0], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+84], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], 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}
\mathbf{if}\;t \leq -270000000:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+84}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\
\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 t < -2.7e8Initial program 72.8%
Taylor expanded in y around 0 70.8%
distribute-lft-out70.8%
*-commutative70.8%
Simplified70.8%
Taylor expanded in j around 0 68.9%
if -2.7e8 < t < 1.1499999999999999e84Initial program 87.0%
Taylor expanded in t around 0 70.8%
if 1.1499999999999999e84 < t Initial program 90.1%
Simplified90.1%
Taylor expanded in t around inf 78.8%
pow178.8%
Applied egg-rr78.8%
unpow178.8%
associate-*r*78.8%
Simplified78.8%
Final simplification72.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= (* b c) -5.2e+37)
(- (* b c) (* 4.0 (* t a)))
(if (<= (* b c) 3.5e+24) (+ t_1 (* -4.0 (* x i))) (+ (* b c) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if ((b * c) <= -5.2e+37) {
tmp = (b * c) - (4.0 * (t * a));
} else if ((b * c) <= 3.5e+24) {
tmp = t_1 + (-4.0 * (x * i));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if ((b * c) <= (-5.2d+37)) then
tmp = (b * c) - (4.0d0 * (t * a))
else if ((b * c) <= 3.5d+24) then
tmp = t_1 + ((-4.0d0) * (x * i))
else
tmp = (b * c) + t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if ((b * c) <= -5.2e+37) {
tmp = (b * c) - (4.0 * (t * a));
} else if ((b * c) <= 3.5e+24) {
tmp = t_1 + (-4.0 * (x * i));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if (b * c) <= -5.2e+37: tmp = (b * c) - (4.0 * (t * a)) elif (b * c) <= 3.5e+24: tmp = t_1 + (-4.0 * (x * i)) else: tmp = (b * c) + t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (Float64(b * c) <= -5.2e+37) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); elseif (Float64(b * c) <= 3.5e+24) tmp = Float64(t_1 + Float64(-4.0 * Float64(x * i))); else tmp = Float64(Float64(b * c) + t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
tmp = 0.0;
if ((b * c) <= -5.2e+37)
tmp = (b * c) - (4.0 * (t * a));
elseif ((b * c) <= 3.5e+24)
tmp = t_1 + (-4.0 * (x * i));
else
tmp = (b * c) + t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -5.2e+37], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.5e+24], N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -5.2 \cdot 10^{+37}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;b \cdot c \leq 3.5 \cdot 10^{+24}:\\
\;\;\;\;t\_1 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t\_1\\
\end{array}
\end{array}
if (*.f64 b c) < -5.1999999999999998e37Initial program 78.5%
Taylor expanded in x around 0 66.8%
Taylor expanded in j around 0 64.0%
if -5.1999999999999998e37 < (*.f64 b c) < 3.5000000000000002e24Initial program 87.8%
Simplified87.9%
Taylor expanded in i around inf 57.3%
if 3.5000000000000002e24 < (*.f64 b c) Initial program 86.3%
Simplified86.4%
Taylor expanded in b around inf 62.5%
Final simplification59.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* t (* z (* x y))))))
(if (<= y -8.2e+127)
t_1
(if (<= y -1e+43)
(- (* b c) (* 4.0 (* t a)))
(if (<= y 2.7e-47) (+ (* b c) (* j (* k -27.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 = 18.0 * (t * (z * (x * y)));
double tmp;
if (y <= -8.2e+127) {
tmp = t_1;
} else if (y <= -1e+43) {
tmp = (b * c) - (4.0 * (t * a));
} else if (y <= 2.7e-47) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 18.0d0 * (t * (z * (x * y)))
if (y <= (-8.2d+127)) then
tmp = t_1
else if (y <= (-1d+43)) then
tmp = (b * c) - (4.0d0 * (t * a))
else if (y <= 2.7d-47) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (t * (z * (x * y)));
double tmp;
if (y <= -8.2e+127) {
tmp = t_1;
} else if (y <= -1e+43) {
tmp = (b * c) - (4.0 * (t * a));
} else if (y <= 2.7e-47) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (t * (z * (x * y))) tmp = 0 if y <= -8.2e+127: tmp = t_1 elif y <= -1e+43: tmp = (b * c) - (4.0 * (t * a)) elif y <= 2.7e-47: tmp = (b * c) + (j * (k * -27.0)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(t * Float64(z * Float64(x * y)))) tmp = 0.0 if (y <= -8.2e+127) tmp = t_1; elseif (y <= -1e+43) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); elseif (y <= 2.7e-47) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (t * (z * (x * y)));
tmp = 0.0;
if (y <= -8.2e+127)
tmp = t_1;
elseif (y <= -1e+43)
tmp = (b * c) - (4.0 * (t * a));
elseif (y <= 2.7e-47)
tmp = (b * c) + (j * (k * -27.0));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(t * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.2e+127], t$95$1, If[LessEqual[y, -1e+43], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e-47], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(t \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{if}\;y \leq -8.2 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1 \cdot 10^{+43}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-47}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -8.19999999999999965e127 or 2.6999999999999998e-47 < y Initial program 78.1%
associate--l+78.1%
distribute-rgt-out--79.0%
associate-*r*78.3%
associate-*l*78.2%
associate-*r*78.3%
*-commutative78.3%
Applied egg-rr78.3%
Taylor expanded in y around inf 44.4%
*-commutative44.4%
associate-*r*48.3%
Simplified48.3%
if -8.19999999999999965e127 < y < -1.00000000000000001e43Initial program 94.8%
Taylor expanded in x around 0 62.9%
Taylor expanded in j around 0 53.9%
if -1.00000000000000001e43 < y < 2.6999999999999998e-47Initial program 89.3%
Simplified93.2%
Taylor expanded in b around inf 48.3%
Final simplification48.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= k -5.2e-55)
(+ (* a (* t -4.0)) t_1)
(if (<= k 1.82e+186)
(- (* b c) (* 4.0 (+ (* t a) (* x i))))
(+ (* b c) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (k <= -5.2e-55) {
tmp = (a * (t * -4.0)) + t_1;
} else if (k <= 1.82e+186) {
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if (k <= (-5.2d-55)) then
tmp = (a * (t * (-4.0d0))) + t_1
else if (k <= 1.82d+186) then
tmp = (b * c) - (4.0d0 * ((t * a) + (x * i)))
else
tmp = (b * c) + t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (k <= -5.2e-55) {
tmp = (a * (t * -4.0)) + t_1;
} else if (k <= 1.82e+186) {
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if k <= -5.2e-55: tmp = (a * (t * -4.0)) + t_1 elif k <= 1.82e+186: tmp = (b * c) - (4.0 * ((t * a) + (x * i))) else: tmp = (b * c) + t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (k <= -5.2e-55) tmp = Float64(Float64(a * Float64(t * -4.0)) + t_1); elseif (k <= 1.82e+186) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))); else tmp = Float64(Float64(b * c) + t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
tmp = 0.0;
if (k <= -5.2e-55)
tmp = (a * (t * -4.0)) + t_1;
elseif (k <= 1.82e+186)
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
else
tmp = (b * c) + t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -5.2e-55], N[(N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[k, 1.82e+186], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;k \leq -5.2 \cdot 10^{-55}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right) + t\_1\\
\mathbf{elif}\;k \leq 1.82 \cdot 10^{+186}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t\_1\\
\end{array}
\end{array}
if k < -5.1999999999999998e-55Initial program 88.4%
Simplified91.3%
Taylor expanded in a around inf 62.2%
metadata-eval62.2%
distribute-lft-neg-in62.2%
*-commutative62.2%
associate-*l*62.2%
distribute-lft-neg-in62.2%
distribute-lft-neg-in62.2%
metadata-eval62.2%
Simplified62.2%
if -5.1999999999999998e-55 < k < 1.8200000000000001e186Initial program 84.6%
Taylor expanded in y around 0 72.4%
distribute-lft-out72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in j around 0 61.2%
if 1.8200000000000001e186 < k Initial program 79.8%
Simplified79.9%
Taylor expanded in b around inf 65.3%
Final simplification61.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= y -1.8e+227) (not (<= y 3.1e-46))) (* 18.0 (* t (* z (* x y)))) (+ (* b c) (* j (* k -27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((y <= -1.8e+227) || !(y <= 3.1e-46)) {
tmp = 18.0 * (t * (z * (x * y)));
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 ((y <= (-1.8d+227)) .or. (.not. (y <= 3.1d-46))) then
tmp = 18.0d0 * (t * (z * (x * y)))
else
tmp = (b * c) + (j * (k * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 ((y <= -1.8e+227) || !(y <= 3.1e-46)) {
tmp = 18.0 * (t * (z * (x * y)));
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (y <= -1.8e+227) or not (y <= 3.1e-46): tmp = 18.0 * (t * (z * (x * y))) else: tmp = (b * c) + (j * (k * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((y <= -1.8e+227) || !(y <= 3.1e-46)) tmp = Float64(18.0 * Float64(t * Float64(z * Float64(x * y)))); else tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((y <= -1.8e+227) || ~((y <= 3.1e-46)))
tmp = 18.0 * (t * (z * (x * y)));
else
tmp = (b * c) + (j * (k * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[y, -1.8e+227], N[Not[LessEqual[y, 3.1e-46]], $MachinePrecision]], N[(18.0 * N[(t * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+227} \lor \neg \left(y \leq 3.1 \cdot 10^{-46}\right):\\
\;\;\;\;18 \cdot \left(t \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if y < -1.79999999999999996e227 or 3.1000000000000001e-46 < y Initial program 77.9%
associate--l+77.9%
distribute-rgt-out--79.1%
associate-*r*78.1%
associate-*l*78.0%
associate-*r*78.1%
*-commutative78.1%
Applied egg-rr78.1%
Taylor expanded in y around inf 42.9%
*-commutative42.9%
associate-*r*46.6%
Simplified46.6%
if -1.79999999999999996e227 < y < 3.1000000000000001e-46Initial program 88.8%
Simplified91.8%
Taylor expanded in b around inf 46.9%
Final simplification46.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -1.05e+148) (not (<= (* b c) 5.7e+163))) (* b c) (* (* j k) -27.0)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.05e+148) || !((b * c) <= 5.7e+163)) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-1.05d+148)) .or. (.not. ((b * c) <= 5.7d+163))) then
tmp = b * c
else
tmp = (j * k) * (-27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.05e+148) || !((b * c) <= 5.7e+163)) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -1.05e+148) or not ((b * c) <= 5.7e+163): tmp = b * c else: tmp = (j * k) * -27.0 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -1.05e+148) || !(Float64(b * c) <= 5.7e+163)) tmp = Float64(b * c); else tmp = Float64(Float64(j * k) * -27.0); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -1.05e+148) || ~(((b * c) <= 5.7e+163)))
tmp = b * c;
else
tmp = (j * k) * -27.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -1.05e+148], N[Not[LessEqual[N[(b * c), $MachinePrecision], 5.7e+163]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(N[(j * k), $MachinePrecision] * -27.0), $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.05 \cdot 10^{+148} \lor \neg \left(b \cdot c \leq 5.7 \cdot 10^{+163}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\end{array}
\end{array}
if (*.f64 b c) < -1.04999999999999999e148 or 5.6999999999999998e163 < (*.f64 b c) Initial program 77.7%
associate--l+77.7%
distribute-rgt-out--79.2%
associate-*r*82.2%
associate-*l*82.2%
associate-*r*82.2%
*-commutative82.2%
Applied egg-rr82.2%
Taylor expanded in b around inf 61.2%
if -1.04999999999999999e148 < (*.f64 b c) < 5.6999999999999998e163Initial program 87.8%
Simplified88.5%
Taylor expanded in j around inf 32.1%
Final simplification39.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 85.2%
associate--l+85.2%
distribute-rgt-out--86.7%
associate-*r*86.4%
associate-*l*86.4%
associate-*r*86.4%
*-commutative86.4%
Applied egg-rr86.4%
Taylor expanded in b around inf 19.6%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
(t_2
(-
(- (* (* 18.0 t) (* (* x y) z)) t_1)
(- (* (* k j) 27.0) (* c b)))))
(if (< t -1.6210815397541398e-69)
t_2
(if (< t 165.68027943805222)
(+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((a * t) + (i * x)) * 4.0d0
t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
if (t < (-1.6210815397541398d-69)) then
tmp = t_2
else if (t < 165.68027943805222d0) then
tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((a * t) + (i * x)) * 4.0 t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)) tmp = 0 if t < -1.6210815397541398e-69: tmp = t_2 elif t < 165.68027943805222: tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0) t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b))) tmp = 0.0 if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((a * t) + (i * x)) * 4.0; t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)); tmp = 0.0; if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t\_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t\_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024132
(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)))