
(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
(if (or (<= t -2e-30) (not (<= t 2e-75)))
(+
(fma t (fma x (* 18.0 (* y z)) (* a -4.0)) (fma b c (* x (* -4.0 i))))
(* j (* k -27.0)))
(-
(-
(+ (- (* y (* (* x 18.0) (* t z))) (* t (* a 4.0))) (* b c))
(* i (* x 4.0)))
(* k (* j 27.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 <= -2e-30) || !(t <= 2e-75)) {
tmp = fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), fma(b, c, (x * (-4.0 * i)))) + (j * (k * -27.0));
} else {
tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -2e-30) || !(t <= 2e-75)) tmp = Float64(fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0)), fma(b, c, Float64(x * Float64(-4.0 * i)))) + Float64(j * Float64(k * -27.0))); else tmp = Float64(Float64(Float64(Float64(Float64(y * Float64(Float64(x * 18.0) * Float64(t * z))) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -2e-30], N[Not[LessEqual[t, 2e-75]], $MachinePrecision]], N[(N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(y * N[(N[(x * 18.0), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-30} \lor \neg \left(t \leq 2 \cdot 10^{-75}\right):\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(-4 \cdot i\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(y \cdot \left(\left(x \cdot 18\right) \cdot \left(t \cdot z\right)\right) - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if t < -2e-30 or 1.9999999999999999e-75 < t Initial program 86.4%
Simplified93.8%
if -2e-30 < t < 1.9999999999999999e-75Initial program 89.4%
pow189.4%
associate-*l*94.5%
*-commutative94.5%
Applied egg-rr94.5%
unpow194.5%
associate-*l*97.6%
*-commutative97.6%
Simplified97.6%
Final simplification95.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* i (* x 4.0)))
(t_2 (* t (* a 4.0)))
(t_3 (- (+ (* b c) (- (* t (* z (* y (* x 18.0)))) t_2)) t_1))
(t_4 (* k (* j 27.0))))
(if (<= t_3 (- INFINITY))
(- (- (+ (- (* y (* (* x 18.0) (* t z))) t_2) (* b c)) t_1) t_4)
(if (<= t_3 INFINITY)
(- t_3 t_4)
(* x (- (* 18.0 (* t (* y z))) (* i 4.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = i * (x * 4.0);
double t_2 = t * (a * 4.0);
double t_3 = ((b * c) + ((t * (z * (y * (x * 18.0)))) - t_2)) - t_1;
double t_4 = k * (j * 27.0);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = ((((y * ((x * 18.0) * (t * z))) - t_2) + (b * c)) - t_1) - t_4;
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_3 - t_4;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = i * (x * 4.0);
double t_2 = t * (a * 4.0);
double t_3 = ((b * c) + ((t * (z * (y * (x * 18.0)))) - t_2)) - t_1;
double t_4 = k * (j * 27.0);
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = ((((y * ((x * 18.0) * (t * z))) - t_2) + (b * c)) - t_1) - t_4;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_3 - t_4;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = i * (x * 4.0) t_2 = t * (a * 4.0) t_3 = ((b * c) + ((t * (z * (y * (x * 18.0)))) - t_2)) - t_1 t_4 = k * (j * 27.0) tmp = 0 if t_3 <= -math.inf: tmp = ((((y * ((x * 18.0) * (t * z))) - t_2) + (b * c)) - t_1) - t_4 elif t_3 <= math.inf: tmp = t_3 - t_4 else: tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(i * Float64(x * 4.0)) t_2 = Float64(t * Float64(a * 4.0)) t_3 = Float64(Float64(Float64(b * c) + Float64(Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))) - t_2)) - t_1) t_4 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(Float64(Float64(Float64(Float64(y * Float64(Float64(x * 18.0) * Float64(t * z))) - t_2) + Float64(b * c)) - t_1) - t_4); elseif (t_3 <= Inf) tmp = Float64(t_3 - t_4); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = i * (x * 4.0);
t_2 = t * (a * 4.0);
t_3 = ((b * c) + ((t * (z * (y * (x * 18.0)))) - t_2)) - t_1;
t_4 = k * (j * 27.0);
tmp = 0.0;
if (t_3 <= -Inf)
tmp = ((((y * ((x * 18.0) * (t * z))) - t_2) + (b * c)) - t_1) - t_4;
elseif (t_3 <= Inf)
tmp = t_3 - t_4;
else
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(N[(N[(N[(N[(y * N[(N[(x * 18.0), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$4), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(t$95$3 - t$95$4), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := i \cdot \left(x \cdot 4\right)\\
t_2 := t \cdot \left(a \cdot 4\right)\\
t_3 := \left(b \cdot c + \left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t\_2\right)\right) - t\_1\\
t_4 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;\left(\left(\left(y \cdot \left(\left(x \cdot 18\right) \cdot \left(t \cdot z\right)\right) - t\_2\right) + b \cdot c\right) - t\_1\right) - t\_4\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3 - t\_4\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\end{array}
\end{array}
if (-.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)) < -inf.0Initial program 79.7%
pow179.7%
associate-*l*87.7%
*-commutative87.7%
Applied egg-rr87.7%
unpow187.7%
associate-*l*95.6%
*-commutative95.6%
Simplified95.6%
if -inf.0 < (-.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)) < +inf.0Initial program 96.9%
if +inf.0 < (-.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)) Initial program 0.0%
Simplified25.0%
Taylor expanded in x around inf 75.0%
Final simplification95.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= t -1e-23) (not (<= t 2e-47)))
(-
(+ (* b c) (* t (- (* (* y z) (* x 18.0)) (* a 4.0))))
(+ (* x (* i 4.0)) (* j (* k 27.0))))
(-
(-
(+ (- (* y (* (* x 18.0) (* t z))) (* t (* a 4.0))) (* b c))
(* i (* x 4.0)))
(* k (* j 27.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -1e-23) || !(t <= 2e-47)) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-1d-23)) .or. (.not. (t <= 2d-47))) then
tmp = ((b * c) + (t * (((y * z) * (x * 18.0d0)) - (a * 4.0d0)))) - ((x * (i * 4.0d0)) + (j * (k * 27.0d0)))
else
tmp = ((((y * ((x * 18.0d0) * (t * z))) - (t * (a * 4.0d0))) + (b * c)) - (i * (x * 4.0d0))) - (k * (j * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -1e-23) || !(t <= 2e-47)) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -1e-23) or not (t <= 2e-47): tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0))) else: tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -1e-23) || !(t <= 2e-47)) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(y * z) * Float64(x * 18.0)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); else tmp = Float64(Float64(Float64(Float64(Float64(y * Float64(Float64(x * 18.0) * Float64(t * z))) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -1e-23) || ~((t <= 2e-47)))
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
else
tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -1e-23], N[Not[LessEqual[t, 2e-47]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(y * N[(N[(x * 18.0), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-23} \lor \neg \left(t \leq 2 \cdot 10^{-47}\right):\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(y \cdot \left(\left(x \cdot 18\right) \cdot \left(t \cdot z\right)\right) - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if t < -9.9999999999999996e-24 or 1.9999999999999999e-47 < t Initial program 85.7%
Simplified90.6%
if -9.9999999999999996e-24 < t < 1.9999999999999999e-47Initial program 90.0%
pow190.0%
associate-*l*94.8%
*-commutative94.8%
Applied egg-rr94.8%
unpow194.8%
associate-*l*97.7%
*-commutative97.7%
Simplified97.7%
Final simplification93.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 (* k (* j 27.0))))
(if (<= t_1 -5e+242)
(+ (* j (* k -27.0)) (* b c))
(if (<= t_1 2e+20)
(-
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(* 4.0 (* x i)))
(- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (t_1 <= -5e+242) {
tmp = (j * (k * -27.0)) + (b * c);
} else if (t_1 <= 2e+20) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} else {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = k * (j * 27.0d0)
if (t_1 <= (-5d+242)) then
tmp = (j * (k * (-27.0d0))) + (b * c)
else if (t_1 <= 2d+20) then
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - (4.0d0 * (x * i))
else
tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = k * (j * 27.0);
double tmp;
if (t_1 <= -5e+242) {
tmp = (j * (k * -27.0)) + (b * c);
} else if (t_1 <= 2e+20) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} else {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * 27.0) tmp = 0 if t_1 <= -5e+242: tmp = (j * (k * -27.0)) + (b * c) elif t_1 <= 2e+20: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i)) else: tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_1 <= -5e+242) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); elseif (t_1 <= 2e+20) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * 27.0);
tmp = 0.0;
if (t_1 <= -5e+242)
tmp = (j * (k * -27.0)) + (b * c);
elseif (t_1 <= 2e+20)
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
else
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+242], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+20], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 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 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+242}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+20}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.0000000000000004e242Initial program 77.3%
Simplified95.3%
Taylor expanded in b around inf 99.9%
if -5.0000000000000004e242 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2e20Initial program 91.0%
Simplified91.1%
Taylor expanded in j around 0 86.8%
if 2e20 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 81.5%
Taylor expanded in y around 0 83.3%
distribute-lft-out83.3%
*-commutative83.3%
Simplified83.3%
Final simplification87.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 (* k (* j 27.0)))
(t_2 (* x (- (* (* t y) (* 18.0 z)) (* i 4.0)))))
(if (<= x -3.2e+34)
t_2
(if (<= x 1.5e-96)
(- (- (* b c) (* 4.0 (* t a))) t_1)
(if (<= x 7.4e+33)
(- (- (* b c) (* 4.0 (* x i))) t_1)
(if (<= x 4.2e+142)
t_2
(if (<= x 5.3e+173)
(- (* -4.0 (+ (* x i) (* t a))) t_1)
(* x (- (* 18.0 (* t (* y z))) (* i 4.0))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double t_2 = x * (((t * y) * (18.0 * z)) - (i * 4.0));
double tmp;
if (x <= -3.2e+34) {
tmp = t_2;
} else if (x <= 1.5e-96) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (x <= 7.4e+33) {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
} else if (x <= 4.2e+142) {
tmp = t_2;
} else if (x <= 5.3e+173) {
tmp = (-4.0 * ((x * i) + (t * a))) - t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = k * (j * 27.0d0)
t_2 = x * (((t * y) * (18.0d0 * z)) - (i * 4.0d0))
if (x <= (-3.2d+34)) then
tmp = t_2
else if (x <= 1.5d-96) then
tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
else if (x <= 7.4d+33) then
tmp = ((b * c) - (4.0d0 * (x * i))) - t_1
else if (x <= 4.2d+142) then
tmp = t_2
else if (x <= 5.3d+173) then
tmp = ((-4.0d0) * ((x * i) + (t * a))) - t_1
else
tmp = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double t_2 = x * (((t * y) * (18.0 * z)) - (i * 4.0));
double tmp;
if (x <= -3.2e+34) {
tmp = t_2;
} else if (x <= 1.5e-96) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (x <= 7.4e+33) {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
} else if (x <= 4.2e+142) {
tmp = t_2;
} else if (x <= 5.3e+173) {
tmp = (-4.0 * ((x * i) + (t * a))) - t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * 27.0) t_2 = x * (((t * y) * (18.0 * z)) - (i * 4.0)) tmp = 0 if x <= -3.2e+34: tmp = t_2 elif x <= 1.5e-96: tmp = ((b * c) - (4.0 * (t * a))) - t_1 elif x <= 7.4e+33: tmp = ((b * c) - (4.0 * (x * i))) - t_1 elif x <= 4.2e+142: tmp = t_2 elif x <= 5.3e+173: tmp = (-4.0 * ((x * i) + (t * a))) - t_1 else: tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) t_2 = Float64(x * Float64(Float64(Float64(t * y) * Float64(18.0 * z)) - Float64(i * 4.0))) tmp = 0.0 if (x <= -3.2e+34) tmp = t_2; elseif (x <= 1.5e-96) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1); elseif (x <= 7.4e+33) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_1); elseif (x <= 4.2e+142) tmp = t_2; elseif (x <= 5.3e+173) tmp = Float64(Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) - t_1); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * 27.0);
t_2 = x * (((t * y) * (18.0 * z)) - (i * 4.0));
tmp = 0.0;
if (x <= -3.2e+34)
tmp = t_2;
elseif (x <= 1.5e-96)
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
elseif (x <= 7.4e+33)
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
elseif (x <= 4.2e+142)
tmp = t_2;
elseif (x <= 5.3e+173)
tmp = (-4.0 * ((x * i) + (t * a))) - t_1;
else
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(N[(t * y), $MachinePrecision] * N[(18.0 * z), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.2e+34], t$95$2, If[LessEqual[x, 1.5e-96], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[x, 7.4e+33], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[x, 4.2e+142], t$95$2, If[LessEqual[x, 5.3e+173], N[(N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
t_2 := x \cdot \left(\left(t \cdot y\right) \cdot \left(18 \cdot z\right) - i \cdot 4\right)\\
\mathbf{if}\;x \leq -3.2 \cdot 10^{+34}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{-96}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\mathbf{elif}\;x \leq 7.4 \cdot 10^{+33}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t\_1\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{+142}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 5.3 \cdot 10^{+173}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\end{array}
\end{array}
if x < -3.1999999999999998e34 or 7.3999999999999997e33 < x < 4.2e142Initial program 80.8%
Simplified84.6%
Taylor expanded in x around inf 76.1%
pow176.1%
*-commutative76.1%
associate-*r*74.9%
Applied egg-rr74.9%
unpow174.9%
associate-*l*74.9%
Simplified74.9%
if -3.1999999999999998e34 < x < 1.5e-96Initial program 95.6%
Taylor expanded in x around 0 80.3%
if 1.5e-96 < x < 7.3999999999999997e33Initial program 95.7%
Taylor expanded in t around 0 75.3%
if 4.2e142 < x < 5.29999999999999999e173Initial program 55.6%
pow155.6%
associate-*l*55.6%
*-commutative55.6%
Applied egg-rr55.6%
unpow155.6%
associate-*l*66.7%
*-commutative66.7%
Simplified66.7%
Taylor expanded in y around 0 100.0%
distribute-lft-out100.0%
*-commutative100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in b around 0 100.0%
if 5.29999999999999999e173 < x Initial program 78.5%
Simplified81.6%
Taylor expanded in x around inf 87.6%
Final simplification79.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 (* k (* j 27.0)))
(t_2 (- (- (* b c) (* 4.0 (* x i))) t_1))
(t_3
(+ (* j (* k -27.0)) (* t (+ (* 18.0 (* x (* y z))) (* a -4.0))))))
(if (<= t -2e-17)
t_3
(if (<= t -1.5e-36)
t_2
(if (<= t -1.68e-124)
(- (* -4.0 (+ (* x i) (* t a))) t_1)
(if (<= t 2.1e-24) t_2 t_3))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double t_2 = ((b * c) - (4.0 * (x * i))) - t_1;
double t_3 = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0)));
double tmp;
if (t <= -2e-17) {
tmp = t_3;
} else if (t <= -1.5e-36) {
tmp = t_2;
} else if (t <= -1.68e-124) {
tmp = (-4.0 * ((x * i) + (t * a))) - t_1;
} else if (t <= 2.1e-24) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = k * (j * 27.0d0)
t_2 = ((b * c) - (4.0d0 * (x * i))) - t_1
t_3 = (j * (k * (-27.0d0))) + (t * ((18.0d0 * (x * (y * z))) + (a * (-4.0d0))))
if (t <= (-2d-17)) then
tmp = t_3
else if (t <= (-1.5d-36)) then
tmp = t_2
else if (t <= (-1.68d-124)) then
tmp = ((-4.0d0) * ((x * i) + (t * a))) - t_1
else if (t <= 2.1d-24) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double t_2 = ((b * c) - (4.0 * (x * i))) - t_1;
double t_3 = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0)));
double tmp;
if (t <= -2e-17) {
tmp = t_3;
} else if (t <= -1.5e-36) {
tmp = t_2;
} else if (t <= -1.68e-124) {
tmp = (-4.0 * ((x * i) + (t * a))) - t_1;
} else if (t <= 2.1e-24) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * 27.0) t_2 = ((b * c) - (4.0 * (x * i))) - t_1 t_3 = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0))) tmp = 0 if t <= -2e-17: tmp = t_3 elif t <= -1.5e-36: tmp = t_2 elif t <= -1.68e-124: tmp = (-4.0 * ((x * i) + (t * a))) - t_1 elif t <= 2.1e-24: tmp = t_2 else: tmp = t_3 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) t_2 = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_1) t_3 = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(a * -4.0)))) tmp = 0.0 if (t <= -2e-17) tmp = t_3; elseif (t <= -1.5e-36) tmp = t_2; elseif (t <= -1.68e-124) tmp = Float64(Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) - t_1); elseif (t <= 2.1e-24) tmp = t_2; else tmp = t_3; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * 27.0);
t_2 = ((b * c) - (4.0 * (x * i))) - t_1;
t_3 = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0)));
tmp = 0.0;
if (t <= -2e-17)
tmp = t_3;
elseif (t <= -1.5e-36)
tmp = t_2;
elseif (t <= -1.68e-124)
tmp = (-4.0 * ((x * i) + (t * a))) - t_1;
elseif (t <= 2.1e-24)
tmp = t_2;
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e-17], t$95$3, If[LessEqual[t, -1.5e-36], t$95$2, If[LessEqual[t, -1.68e-124], N[(N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, 2.1e-24], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
t_2 := \left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t\_1\\
t_3 := j \cdot \left(k \cdot -27\right) + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\
\mathbf{if}\;t \leq -2 \cdot 10^{-17}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -1.5 \cdot 10^{-36}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.68 \cdot 10^{-124}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right) - t\_1\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-24}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if t < -2.00000000000000014e-17 or 2.0999999999999999e-24 < t Initial program 85.2%
Simplified92.9%
Taylor expanded in t around inf 75.5%
if -2.00000000000000014e-17 < t < -1.5000000000000001e-36 or -1.68e-124 < t < 2.0999999999999999e-24Initial program 90.1%
Taylor expanded in t around 0 86.3%
if -1.5000000000000001e-36 < t < -1.68e-124Initial program 90.3%
pow190.3%
associate-*l*95.0%
*-commutative95.0%
Applied egg-rr95.0%
unpow195.0%
associate-*l*94.9%
*-commutative94.9%
Simplified94.9%
Taylor expanded in y around 0 75.3%
distribute-lft-out75.3%
*-commutative75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in b around 0 70.2%
Final simplification79.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) 5e+218)
(-
(+ (* b c) (* t (- (* (* y z) (* x 18.0)) (* a 4.0))))
(+ (* x (* i 4.0)) (* j (* k 27.0))))
(- (* c (+ b (* -4.0 (/ (* x i) c)))) (* k (* j 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) <= 5e+218) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = (c * (b + (-4.0 * ((x * i) / c)))) - (k * (j * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= 5d+218) then
tmp = ((b * c) + (t * (((y * z) * (x * 18.0d0)) - (a * 4.0d0)))) - ((x * (i * 4.0d0)) + (j * (k * 27.0d0)))
else
tmp = (c * (b + ((-4.0d0) * ((x * i) / c)))) - (k * (j * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= 5e+218) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = (c * (b + (-4.0 * ((x * i) / c)))) - (k * (j * 27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= 5e+218: tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0))) else: tmp = (c * (b + (-4.0 * ((x * i) / c)))) - (k * (j * 27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= 5e+218) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(y * z) * Float64(x * 18.0)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); else tmp = Float64(Float64(c * Float64(b + Float64(-4.0 * Float64(Float64(x * i) / c)))) - Float64(k * Float64(j * 27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= 5e+218)
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
else
tmp = (c * (b + (-4.0 * ((x * i) / c)))) - (k * (j * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], 5e+218], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * N[(b + N[(-4.0 * N[(N[(x * i), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq 5 \cdot 10^{+218}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(b + -4 \cdot \frac{x \cdot i}{c}\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if (*.f64 b c) < 4.99999999999999983e218Initial program 88.6%
Simplified89.9%
if 4.99999999999999983e218 < (*.f64 b c) Initial program 78.3%
Taylor expanded in t around 0 87.0%
Taylor expanded in c around inf 95.7%
Final simplification90.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j 27.0))))
(if (<= x -5e+34)
(* x (- (* (* t y) (* 18.0 z)) (* i 4.0)))
(if (<= x 122.0)
(- (- (* b c) (* 4.0 (* t a))) t_1)
(if (or (<= x 2.4e+143) (not (<= x 5e+173)))
(* x (- (* 18.0 (* t (* y z))) (* i 4.0)))
(- (* -4.0 (+ (* x i) (* t a))) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (x <= -5e+34) {
tmp = x * (((t * y) * (18.0 * z)) - (i * 4.0));
} else if (x <= 122.0) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if ((x <= 2.4e+143) || !(x <= 5e+173)) {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
} else {
tmp = (-4.0 * ((x * i) + (t * a))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = k * (j * 27.0d0)
if (x <= (-5d+34)) then
tmp = x * (((t * y) * (18.0d0 * z)) - (i * 4.0d0))
else if (x <= 122.0d0) then
tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
else if ((x <= 2.4d+143) .or. (.not. (x <= 5d+173))) then
tmp = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
else
tmp = ((-4.0d0) * ((x * i) + (t * a))) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = k * (j * 27.0);
double tmp;
if (x <= -5e+34) {
tmp = x * (((t * y) * (18.0 * z)) - (i * 4.0));
} else if (x <= 122.0) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if ((x <= 2.4e+143) || !(x <= 5e+173)) {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
} else {
tmp = (-4.0 * ((x * i) + (t * a))) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * 27.0) tmp = 0 if x <= -5e+34: tmp = x * (((t * y) * (18.0 * z)) - (i * 4.0)) elif x <= 122.0: tmp = ((b * c) - (4.0 * (t * a))) - t_1 elif (x <= 2.4e+143) or not (x <= 5e+173): tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0)) else: tmp = (-4.0 * ((x * i) + (t * a))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (x <= -5e+34) tmp = Float64(x * Float64(Float64(Float64(t * y) * Float64(18.0 * z)) - Float64(i * 4.0))); elseif (x <= 122.0) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1); elseif ((x <= 2.4e+143) || !(x <= 5e+173)) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))); else tmp = Float64(Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * 27.0);
tmp = 0.0;
if (x <= -5e+34)
tmp = x * (((t * y) * (18.0 * z)) - (i * 4.0));
elseif (x <= 122.0)
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
elseif ((x <= 2.4e+143) || ~((x <= 5e+173)))
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
else
tmp = (-4.0 * ((x * i) + (t * a))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5e+34], N[(x * N[(N[(N[(t * y), $MachinePrecision] * N[(18.0 * z), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 122.0], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[Or[LessEqual[x, 2.4e+143], N[Not[LessEqual[x, 5e+173]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;x \leq -5 \cdot 10^{+34}:\\
\;\;\;\;x \cdot \left(\left(t \cdot y\right) \cdot \left(18 \cdot z\right) - i \cdot 4\right)\\
\mathbf{elif}\;x \leq 122:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{+143} \lor \neg \left(x \leq 5 \cdot 10^{+173}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right) - t\_1\\
\end{array}
\end{array}
if x < -4.9999999999999998e34Initial program 76.8%
Simplified80.4%
Taylor expanded in x around inf 75.2%
pow175.2%
*-commutative75.2%
associate-*r*75.2%
Applied egg-rr75.2%
unpow175.2%
associate-*l*75.2%
Simplified75.2%
if -4.9999999999999998e34 < x < 122Initial program 95.4%
Taylor expanded in x around 0 76.8%
if 122 < x < 2.3999999999999998e143 or 5.00000000000000034e173 < x Initial program 85.5%
Simplified88.6%
Taylor expanded in x around inf 81.0%
if 2.3999999999999998e143 < x < 5.00000000000000034e173Initial program 55.6%
pow155.6%
associate-*l*55.6%
*-commutative55.6%
Applied egg-rr55.6%
unpow155.6%
associate-*l*66.7%
*-commutative66.7%
Simplified66.7%
Taylor expanded in y around 0 100.0%
distribute-lft-out100.0%
*-commutative100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in b around 0 100.0%
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
(let* ((t_1 (* t (+ (* 18.0 (* x (* y z))) (* a -4.0))))
(t_2 (* j (* k -27.0))))
(if (<= t -1.12e+35)
t_1
(if (<= t 1.85e-200)
(+ t_2 (* i (* x -4.0)))
(if (<= t 2.55e-95)
(+ t_2 (* b c))
(if (<= t 2e+17) (- (* x (* -4.0 i)) (* k (* j 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 = t * ((18.0 * (x * (y * z))) + (a * -4.0));
double t_2 = j * (k * -27.0);
double tmp;
if (t <= -1.12e+35) {
tmp = t_1;
} else if (t <= 1.85e-200) {
tmp = t_2 + (i * (x * -4.0));
} else if (t <= 2.55e-95) {
tmp = t_2 + (b * c);
} else if (t <= 2e+17) {
tmp = (x * (-4.0 * i)) - (k * (j * 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) :: t_2
real(8) :: tmp
t_1 = t * ((18.0d0 * (x * (y * z))) + (a * (-4.0d0)))
t_2 = j * (k * (-27.0d0))
if (t <= (-1.12d+35)) then
tmp = t_1
else if (t <= 1.85d-200) then
tmp = t_2 + (i * (x * (-4.0d0)))
else if (t <= 2.55d-95) then
tmp = t_2 + (b * c)
else if (t <= 2d+17) then
tmp = (x * ((-4.0d0) * i)) - (k * (j * 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 = t * ((18.0 * (x * (y * z))) + (a * -4.0));
double t_2 = j * (k * -27.0);
double tmp;
if (t <= -1.12e+35) {
tmp = t_1;
} else if (t <= 1.85e-200) {
tmp = t_2 + (i * (x * -4.0));
} else if (t <= 2.55e-95) {
tmp = t_2 + (b * c);
} else if (t <= 2e+17) {
tmp = (x * (-4.0 * i)) - (k * (j * 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 = t * ((18.0 * (x * (y * z))) + (a * -4.0)) t_2 = j * (k * -27.0) tmp = 0 if t <= -1.12e+35: tmp = t_1 elif t <= 1.85e-200: tmp = t_2 + (i * (x * -4.0)) elif t <= 2.55e-95: tmp = t_2 + (b * c) elif t <= 2e+17: tmp = (x * (-4.0 * i)) - (k * (j * 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(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(a * -4.0))) t_2 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (t <= -1.12e+35) tmp = t_1; elseif (t <= 1.85e-200) tmp = Float64(t_2 + Float64(i * Float64(x * -4.0))); elseif (t <= 2.55e-95) tmp = Float64(t_2 + Float64(b * c)); elseif (t <= 2e+17) tmp = Float64(Float64(x * Float64(-4.0 * i)) - Float64(k * Float64(j * 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 = t * ((18.0 * (x * (y * z))) + (a * -4.0));
t_2 = j * (k * -27.0);
tmp = 0.0;
if (t <= -1.12e+35)
tmp = t_1;
elseif (t <= 1.85e-200)
tmp = t_2 + (i * (x * -4.0));
elseif (t <= 2.55e-95)
tmp = t_2 + (b * c);
elseif (t <= 2e+17)
tmp = (x * (-4.0 * i)) - (k * (j * 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[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.12e+35], t$95$1, If[LessEqual[t, 1.85e-200], N[(t$95$2 + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.55e-95], N[(t$95$2 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e+17], N[(N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 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 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;t \leq -1.12 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{-200}:\\
\;\;\;\;t\_2 + i \cdot \left(x \cdot -4\right)\\
\mathbf{elif}\;t \leq 2.55 \cdot 10^{-95}:\\
\;\;\;\;t\_2 + b \cdot c\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+17}:\\
\;\;\;\;x \cdot \left(-4 \cdot i\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.12000000000000003e35 or 2e17 < t Initial program 85.7%
Simplified94.3%
Taylor expanded in t around inf 77.6%
Taylor expanded in t around inf 68.4%
if -1.12000000000000003e35 < t < 1.85000000000000005e-200Initial program 88.7%
Simplified85.9%
Taylor expanded in i around inf 55.7%
associate-*r*55.7%
*-commutative55.7%
associate-*r*55.7%
*-commutative55.7%
*-commutative55.7%
Simplified55.7%
if 1.85000000000000005e-200 < t < 2.55e-95Initial program 95.4%
Simplified90.8%
Taylor expanded in b around inf 69.3%
if 2.55e-95 < t < 2e17Initial program 84.9%
pow184.9%
associate-*l*88.3%
*-commutative88.3%
Applied egg-rr88.3%
unpow188.3%
associate-*l*81.3%
*-commutative81.3%
Simplified81.3%
Taylor expanded in i around inf 69.7%
*-commutative69.7%
*-commutative69.7%
associate-*r*69.7%
Simplified69.7%
Final simplification63.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* x i))) (t_2 (* k (* j -27.0))))
(if (<= b -7.6e+157)
(* b c)
(if (<= b -6.3e+63)
t_1
(if (<= b -6e+22)
t_2
(if (<= b -1.55e-281) t_1 (if (<= b 1e-18) t_2 (* b c))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (x * i);
double t_2 = k * (j * -27.0);
double tmp;
if (b <= -7.6e+157) {
tmp = b * c;
} else if (b <= -6.3e+63) {
tmp = t_1;
} else if (b <= -6e+22) {
tmp = t_2;
} else if (b <= -1.55e-281) {
tmp = t_1;
} else if (b <= 1e-18) {
tmp = t_2;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * (x * i)
t_2 = k * (j * (-27.0d0))
if (b <= (-7.6d+157)) then
tmp = b * c
else if (b <= (-6.3d+63)) then
tmp = t_1
else if (b <= (-6d+22)) then
tmp = t_2
else if (b <= (-1.55d-281)) then
tmp = t_1
else if (b <= 1d-18) then
tmp = t_2
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (x * i);
double t_2 = k * (j * -27.0);
double tmp;
if (b <= -7.6e+157) {
tmp = b * c;
} else if (b <= -6.3e+63) {
tmp = t_1;
} else if (b <= -6e+22) {
tmp = t_2;
} else if (b <= -1.55e-281) {
tmp = t_1;
} else if (b <= 1e-18) {
tmp = t_2;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * (x * i) t_2 = k * (j * -27.0) tmp = 0 if b <= -7.6e+157: tmp = b * c elif b <= -6.3e+63: tmp = t_1 elif b <= -6e+22: tmp = t_2 elif b <= -1.55e-281: tmp = t_1 elif b <= 1e-18: tmp = t_2 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(x * i)) t_2 = Float64(k * Float64(j * -27.0)) tmp = 0.0 if (b <= -7.6e+157) tmp = Float64(b * c); elseif (b <= -6.3e+63) tmp = t_1; elseif (b <= -6e+22) tmp = t_2; elseif (b <= -1.55e-281) tmp = t_1; elseif (b <= 1e-18) tmp = t_2; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * (x * i);
t_2 = k * (j * -27.0);
tmp = 0.0;
if (b <= -7.6e+157)
tmp = b * c;
elseif (b <= -6.3e+63)
tmp = t_1;
elseif (b <= -6e+22)
tmp = t_2;
elseif (b <= -1.55e-281)
tmp = t_1;
elseif (b <= 1e-18)
tmp = t_2;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -7.6e+157], N[(b * c), $MachinePrecision], If[LessEqual[b, -6.3e+63], t$95$1, If[LessEqual[b, -6e+22], t$95$2, If[LessEqual[b, -1.55e-281], t$95$1, If[LessEqual[b, 1e-18], t$95$2, N[(b * c), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i\right)\\
t_2 := k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;b \leq -7.6 \cdot 10^{+157}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \leq -6.3 \cdot 10^{+63}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -6 \cdot 10^{+22}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -1.55 \cdot 10^{-281}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 10^{-18}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if b < -7.6000000000000002e157 or 1.0000000000000001e-18 < b Initial program 82.5%
pow182.5%
associate-*l*82.5%
*-commutative82.5%
Applied egg-rr82.5%
unpow182.5%
associate-*l*81.6%
*-commutative81.6%
Simplified81.6%
Taylor expanded in b around inf 56.5%
Taylor expanded in j around inf 54.3%
cancel-sign-sub-inv54.3%
associate-/l*54.3%
metadata-eval54.3%
*-commutative54.3%
Simplified54.3%
Taylor expanded in j around 0 40.5%
if -7.6000000000000002e157 < b < -6.2999999999999998e63 or -6e22 < b < -1.5500000000000001e-281Initial program 88.1%
pow188.1%
associate-*l*89.7%
*-commutative89.7%
Applied egg-rr89.7%
unpow189.7%
associate-*l*89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in y around 0 78.4%
distribute-lft-out78.4%
*-commutative78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in b around 0 69.5%
Taylor expanded in i around inf 36.4%
*-commutative36.4%
Simplified36.4%
if -6.2999999999999998e63 < b < -6e22 or -1.5500000000000001e-281 < b < 1.0000000000000001e-18Initial program 93.8%
Simplified93.9%
Taylor expanded in j around inf 31.3%
metadata-eval31.3%
distribute-lft-neg-in31.3%
associate-*r*31.4%
*-commutative31.4%
distribute-rgt-neg-in31.4%
distribute-lft-neg-in31.4%
metadata-eval31.4%
Simplified31.4%
Final simplification36.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (+ (* x i) (* t a)))) (t_2 (+ (* j (* k -27.0)) (* b c))))
(if (<= c -4.5e-28)
t_2
(if (<= c -2.05e-265)
t_1
(if (<= c 3.8e-260)
(* z (* (* x 18.0) (* t y)))
(if (<= c 7.5e+36) t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * ((x * i) + (t * a));
double t_2 = (j * (k * -27.0)) + (b * c);
double tmp;
if (c <= -4.5e-28) {
tmp = t_2;
} else if (c <= -2.05e-265) {
tmp = t_1;
} else if (c <= 3.8e-260) {
tmp = z * ((x * 18.0) * (t * y));
} else if (c <= 7.5e+36) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * ((x * i) + (t * a))
t_2 = (j * (k * (-27.0d0))) + (b * c)
if (c <= (-4.5d-28)) then
tmp = t_2
else if (c <= (-2.05d-265)) then
tmp = t_1
else if (c <= 3.8d-260) then
tmp = z * ((x * 18.0d0) * (t * y))
else if (c <= 7.5d+36) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * ((x * i) + (t * a));
double t_2 = (j * (k * -27.0)) + (b * c);
double tmp;
if (c <= -4.5e-28) {
tmp = t_2;
} else if (c <= -2.05e-265) {
tmp = t_1;
} else if (c <= 3.8e-260) {
tmp = z * ((x * 18.0) * (t * y));
} else if (c <= 7.5e+36) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * ((x * i) + (t * a)) t_2 = (j * (k * -27.0)) + (b * c) tmp = 0 if c <= -4.5e-28: tmp = t_2 elif c <= -2.05e-265: tmp = t_1 elif c <= 3.8e-260: tmp = z * ((x * 18.0) * (t * y)) elif c <= 7.5e+36: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) t_2 = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)) tmp = 0.0 if (c <= -4.5e-28) tmp = t_2; elseif (c <= -2.05e-265) tmp = t_1; elseif (c <= 3.8e-260) tmp = Float64(z * Float64(Float64(x * 18.0) * Float64(t * y))); elseif (c <= 7.5e+36) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * ((x * i) + (t * a));
t_2 = (j * (k * -27.0)) + (b * c);
tmp = 0.0;
if (c <= -4.5e-28)
tmp = t_2;
elseif (c <= -2.05e-265)
tmp = t_1;
elseif (c <= 3.8e-260)
tmp = z * ((x * 18.0) * (t * y));
elseif (c <= 7.5e+36)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -4.5e-28], t$95$2, If[LessEqual[c, -2.05e-265], t$95$1, If[LessEqual[c, 3.8e-260], N[(z * N[(N[(x * 18.0), $MachinePrecision] * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 7.5e+36], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\
t_2 := j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{if}\;c \leq -4.5 \cdot 10^{-28}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq -2.05 \cdot 10^{-265}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 3.8 \cdot 10^{-260}:\\
\;\;\;\;z \cdot \left(\left(x \cdot 18\right) \cdot \left(t \cdot y\right)\right)\\
\mathbf{elif}\;c \leq 7.5 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if c < -4.4999999999999998e-28 or 7.50000000000000054e36 < c Initial program 87.7%
Simplified90.2%
Taylor expanded in b around inf 58.5%
if -4.4999999999999998e-28 < c < -2.05e-265 or 3.8000000000000003e-260 < c < 7.50000000000000054e36Initial program 89.3%
pow189.3%
associate-*l*89.2%
*-commutative89.2%
Applied egg-rr89.2%
unpow189.2%
associate-*l*90.1%
*-commutative90.1%
Simplified90.1%
Taylor expanded in y around 0 79.8%
distribute-lft-out79.8%
*-commutative79.8%
*-commutative79.8%
Simplified79.8%
Taylor expanded in b around 0 74.7%
Taylor expanded in j around 0 60.3%
if -2.05e-265 < c < 3.8000000000000003e-260Initial program 80.2%
Simplified80.3%
Taylor expanded in x around inf 68.7%
Taylor expanded in z around inf 63.3%
Taylor expanded in i around 0 53.4%
*-commutative53.4%
associate-*r*53.2%
associate-*l*53.3%
*-commutative53.3%
associate-*l*53.3%
*-commutative53.3%
Simplified53.3%
Final simplification58.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 (* -4.0 (+ (* x i) (* t a)))))
(if (<= b -1.05e+205)
(* b c)
(if (<= b -9.5e-279)
t_1
(if (<= b 9e-290) (* -27.0 (* j k)) (if (<= b 1.9e-82) t_1 (* b c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * ((x * i) + (t * a));
double tmp;
if (b <= -1.05e+205) {
tmp = b * c;
} else if (b <= -9.5e-279) {
tmp = t_1;
} else if (b <= 9e-290) {
tmp = -27.0 * (j * k);
} else if (b <= 1.9e-82) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * ((x * i) + (t * a))
if (b <= (-1.05d+205)) then
tmp = b * c
else if (b <= (-9.5d-279)) then
tmp = t_1
else if (b <= 9d-290) then
tmp = (-27.0d0) * (j * k)
else if (b <= 1.9d-82) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * ((x * i) + (t * a));
double tmp;
if (b <= -1.05e+205) {
tmp = b * c;
} else if (b <= -9.5e-279) {
tmp = t_1;
} else if (b <= 9e-290) {
tmp = -27.0 * (j * k);
} else if (b <= 1.9e-82) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * ((x * i) + (t * a)) tmp = 0 if b <= -1.05e+205: tmp = b * c elif b <= -9.5e-279: tmp = t_1 elif b <= 9e-290: tmp = -27.0 * (j * k) elif b <= 1.9e-82: tmp = t_1 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) tmp = 0.0 if (b <= -1.05e+205) tmp = Float64(b * c); elseif (b <= -9.5e-279) tmp = t_1; elseif (b <= 9e-290) tmp = Float64(-27.0 * Float64(j * k)); elseif (b <= 1.9e-82) tmp = t_1; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * ((x * i) + (t * a));
tmp = 0.0;
if (b <= -1.05e+205)
tmp = b * c;
elseif (b <= -9.5e-279)
tmp = t_1;
elseif (b <= 9e-290)
tmp = -27.0 * (j * k);
elseif (b <= 1.9e-82)
tmp = t_1;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.05e+205], N[(b * c), $MachinePrecision], If[LessEqual[b, -9.5e-279], t$95$1, If[LessEqual[b, 9e-290], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.9e-82], t$95$1, N[(b * c), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{if}\;b \leq -1.05 \cdot 10^{+205}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \leq -9.5 \cdot 10^{-279}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 9 \cdot 10^{-290}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if b < -1.05e205 or 1.9000000000000001e-82 < b Initial program 84.4%
pow184.4%
associate-*l*84.4%
*-commutative84.4%
Applied egg-rr84.4%
unpow184.4%
associate-*l*85.4%
*-commutative85.4%
Simplified85.4%
Taylor expanded in b around inf 52.8%
Taylor expanded in j around inf 50.0%
cancel-sign-sub-inv50.0%
associate-/l*49.9%
metadata-eval49.9%
*-commutative49.9%
Simplified49.9%
Taylor expanded in j around 0 33.4%
if -1.05e205 < b < -9.4999999999999996e-279 or 9e-290 < b < 1.9000000000000001e-82Initial program 89.0%
pow189.0%
associate-*l*88.8%
*-commutative88.8%
Applied egg-rr88.8%
unpow188.8%
associate-*l*88.5%
*-commutative88.5%
Simplified88.5%
Taylor expanded in y around 0 78.4%
distribute-lft-out78.4%
*-commutative78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in b around 0 67.1%
Taylor expanded in j around 0 49.4%
if -9.4999999999999996e-279 < b < 9e-290Initial program 99.5%
Simplified99.7%
Taylor expanded in j around inf 46.2%
Final simplification43.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -2.3e+34)
(* x (- (* (* t y) (* 18.0 z)) (* i 4.0)))
(if (<= x -2.1e-192)
(- (* -4.0 (+ (* x i) (* t a))) (* k (* j 27.0)))
(if (<= x 8e-98)
(+ (* j (* k -27.0)) (* b c))
(* x (- (* 18.0 (* t (* y z))) (* i 4.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -2.3e+34) {
tmp = x * (((t * y) * (18.0 * z)) - (i * 4.0));
} else if (x <= -2.1e-192) {
tmp = (-4.0 * ((x * i) + (t * a))) - (k * (j * 27.0));
} else if (x <= 8e-98) {
tmp = (j * (k * -27.0)) + (b * c);
} else {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-2.3d+34)) then
tmp = x * (((t * y) * (18.0d0 * z)) - (i * 4.0d0))
else if (x <= (-2.1d-192)) then
tmp = ((-4.0d0) * ((x * i) + (t * a))) - (k * (j * 27.0d0))
else if (x <= 8d-98) then
tmp = (j * (k * (-27.0d0))) + (b * c)
else
tmp = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -2.3e+34) {
tmp = x * (((t * y) * (18.0 * z)) - (i * 4.0));
} else if (x <= -2.1e-192) {
tmp = (-4.0 * ((x * i) + (t * a))) - (k * (j * 27.0));
} else if (x <= 8e-98) {
tmp = (j * (k * -27.0)) + (b * c);
} else {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -2.3e+34: tmp = x * (((t * y) * (18.0 * z)) - (i * 4.0)) elif x <= -2.1e-192: tmp = (-4.0 * ((x * i) + (t * a))) - (k * (j * 27.0)) elif x <= 8e-98: tmp = (j * (k * -27.0)) + (b * c) else: tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -2.3e+34) tmp = Float64(x * Float64(Float64(Float64(t * y) * Float64(18.0 * z)) - Float64(i * 4.0))); elseif (x <= -2.1e-192) tmp = Float64(Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) - Float64(k * Float64(j * 27.0))); elseif (x <= 8e-98) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -2.3e+34)
tmp = x * (((t * y) * (18.0 * z)) - (i * 4.0));
elseif (x <= -2.1e-192)
tmp = (-4.0 * ((x * i) + (t * a))) - (k * (j * 27.0));
elseif (x <= 8e-98)
tmp = (j * (k * -27.0)) + (b * c);
else
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -2.3e+34], N[(x * N[(N[(N[(t * y), $MachinePrecision] * N[(18.0 * z), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.1e-192], N[(N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8e-98], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{+34}:\\
\;\;\;\;x \cdot \left(\left(t \cdot y\right) \cdot \left(18 \cdot z\right) - i \cdot 4\right)\\
\mathbf{elif}\;x \leq -2.1 \cdot 10^{-192}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{elif}\;x \leq 8 \cdot 10^{-98}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\end{array}
\end{array}
if x < -2.2999999999999998e34Initial program 76.8%
Simplified80.4%
Taylor expanded in x around inf 75.2%
pow175.2%
*-commutative75.2%
associate-*r*75.2%
Applied egg-rr75.2%
unpow175.2%
associate-*l*75.2%
Simplified75.2%
if -2.2999999999999998e34 < x < -2.09999999999999993e-192Initial program 95.2%
pow195.2%
associate-*l*90.6%
*-commutative90.6%
Applied egg-rr90.6%
unpow190.6%
associate-*l*90.9%
*-commutative90.9%
Simplified90.9%
Taylor expanded in y around 0 90.7%
distribute-lft-out90.7%
*-commutative90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in b around 0 77.1%
if -2.09999999999999993e-192 < x < 7.99999999999999951e-98Initial program 95.7%
Simplified88.8%
Taylor expanded in b around inf 73.4%
if 7.99999999999999951e-98 < x Initial program 84.2%
Simplified89.9%
Taylor expanded in x around inf 70.2%
Final simplification73.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -4.8e+34)
(* x (- (* (* t y) (* 18.0 z)) (* i 4.0)))
(if (<= x -1.6e-144)
(* -4.0 (+ (* x i) (* t a)))
(if (<= x 5.1e-98)
(+ (* j (* k -27.0)) (* b c))
(* x (- (* 18.0 (* t (* y z))) (* i 4.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -4.8e+34) {
tmp = x * (((t * y) * (18.0 * z)) - (i * 4.0));
} else if (x <= -1.6e-144) {
tmp = -4.0 * ((x * i) + (t * a));
} else if (x <= 5.1e-98) {
tmp = (j * (k * -27.0)) + (b * c);
} else {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-4.8d+34)) then
tmp = x * (((t * y) * (18.0d0 * z)) - (i * 4.0d0))
else if (x <= (-1.6d-144)) then
tmp = (-4.0d0) * ((x * i) + (t * a))
else if (x <= 5.1d-98) then
tmp = (j * (k * (-27.0d0))) + (b * c)
else
tmp = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -4.8e+34) {
tmp = x * (((t * y) * (18.0 * z)) - (i * 4.0));
} else if (x <= -1.6e-144) {
tmp = -4.0 * ((x * i) + (t * a));
} else if (x <= 5.1e-98) {
tmp = (j * (k * -27.0)) + (b * c);
} else {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -4.8e+34: tmp = x * (((t * y) * (18.0 * z)) - (i * 4.0)) elif x <= -1.6e-144: tmp = -4.0 * ((x * i) + (t * a)) elif x <= 5.1e-98: tmp = (j * (k * -27.0)) + (b * c) else: tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -4.8e+34) tmp = Float64(x * Float64(Float64(Float64(t * y) * Float64(18.0 * z)) - Float64(i * 4.0))); elseif (x <= -1.6e-144) tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))); elseif (x <= 5.1e-98) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -4.8e+34)
tmp = x * (((t * y) * (18.0 * z)) - (i * 4.0));
elseif (x <= -1.6e-144)
tmp = -4.0 * ((x * i) + (t * a));
elseif (x <= 5.1e-98)
tmp = (j * (k * -27.0)) + (b * c);
else
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -4.8e+34], N[(x * N[(N[(N[(t * y), $MachinePrecision] * N[(18.0 * z), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.6e-144], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.1e-98], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{+34}:\\
\;\;\;\;x \cdot \left(\left(t \cdot y\right) \cdot \left(18 \cdot z\right) - i \cdot 4\right)\\
\mathbf{elif}\;x \leq -1.6 \cdot 10^{-144}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{-98}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\end{array}
\end{array}
if x < -4.79999999999999974e34Initial program 76.8%
Simplified80.4%
Taylor expanded in x around inf 75.2%
pow175.2%
*-commutative75.2%
associate-*r*75.2%
Applied egg-rr75.2%
unpow175.2%
associate-*l*75.2%
Simplified75.2%
if -4.79999999999999974e34 < x < -1.59999999999999986e-144Initial program 94.0%
pow194.0%
associate-*l*91.0%
*-commutative91.0%
Applied egg-rr91.0%
unpow191.0%
associate-*l*91.4%
*-commutative91.4%
Simplified91.4%
Taylor expanded in y around 0 88.3%
distribute-lft-out88.3%
*-commutative88.3%
*-commutative88.3%
Simplified88.3%
Taylor expanded in b around 0 71.1%
Taylor expanded in j around 0 65.8%
if -1.59999999999999986e-144 < x < 5.10000000000000022e-98Initial program 96.1%
Simplified90.1%
Taylor expanded in b around inf 71.5%
if 5.10000000000000022e-98 < x Initial program 84.2%
Simplified89.9%
Taylor expanded in x around inf 70.2%
Final simplification71.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 (* x (- (* 18.0 (* t (* y z))) (* i 4.0)))))
(if (<= x -2.5e+34)
t_1
(if (<= x -1.6e-144)
(* -4.0 (+ (* x i) (* t a)))
(if (<= x 8e-98) (+ (* j (* k -27.0)) (* 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 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
double tmp;
if (x <= -2.5e+34) {
tmp = t_1;
} else if (x <= -1.6e-144) {
tmp = -4.0 * ((x * i) + (t * a));
} else if (x <= 8e-98) {
tmp = (j * (k * -27.0)) + (b * c);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
if (x <= (-2.5d+34)) then
tmp = t_1
else if (x <= (-1.6d-144)) then
tmp = (-4.0d0) * ((x * i) + (t * a))
else if (x <= 8d-98) then
tmp = (j * (k * (-27.0d0))) + (b * c)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
double tmp;
if (x <= -2.5e+34) {
tmp = t_1;
} else if (x <= -1.6e-144) {
tmp = -4.0 * ((x * i) + (t * a));
} else if (x <= 8e-98) {
tmp = (j * (k * -27.0)) + (b * c);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0)) tmp = 0 if x <= -2.5e+34: tmp = t_1 elif x <= -1.6e-144: tmp = -4.0 * ((x * i) + (t * a)) elif x <= 8e-98: tmp = (j * (k * -27.0)) + (b * c) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))) tmp = 0.0 if (x <= -2.5e+34) tmp = t_1; elseif (x <= -1.6e-144) tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))); elseif (x <= 8e-98) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
tmp = 0.0;
if (x <= -2.5e+34)
tmp = t_1;
elseif (x <= -1.6e-144)
tmp = -4.0 * ((x * i) + (t * a));
elseif (x <= 8e-98)
tmp = (j * (k * -27.0)) + (b * c);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.5e+34], t$95$1, If[LessEqual[x, -1.6e-144], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8e-98], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\mathbf{if}\;x \leq -2.5 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.6 \cdot 10^{-144}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{elif}\;x \leq 8 \cdot 10^{-98}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.4999999999999999e34 or 7.99999999999999951e-98 < x Initial program 81.4%
Simplified86.2%
Taylor expanded in x around inf 72.1%
if -2.4999999999999999e34 < x < -1.59999999999999986e-144Initial program 94.0%
pow194.0%
associate-*l*91.0%
*-commutative91.0%
Applied egg-rr91.0%
unpow191.0%
associate-*l*91.4%
*-commutative91.4%
Simplified91.4%
Taylor expanded in y around 0 88.3%
distribute-lft-out88.3%
*-commutative88.3%
*-commutative88.3%
Simplified88.3%
Taylor expanded in b around 0 71.1%
Taylor expanded in j around 0 65.8%
if -1.59999999999999986e-144 < x < 7.99999999999999951e-98Initial program 96.1%
Simplified90.1%
Taylor expanded in b around inf 71.5%
Final simplification71.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 (<= b -2.45e+151)
(* b c)
(if (<= b -8.2e-94)
(* -27.0 (* j k))
(if (<= b -6.8e-238)
(* -4.0 (* t a))
(if (<= b 7.6e-13) (* k (* j -27.0)) (* b c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (b <= -2.45e+151) {
tmp = b * c;
} else if (b <= -8.2e-94) {
tmp = -27.0 * (j * k);
} else if (b <= -6.8e-238) {
tmp = -4.0 * (t * a);
} else if (b <= 7.6e-13) {
tmp = k * (j * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (b <= (-2.45d+151)) then
tmp = b * c
else if (b <= (-8.2d-94)) then
tmp = (-27.0d0) * (j * k)
else if (b <= (-6.8d-238)) then
tmp = (-4.0d0) * (t * a)
else if (b <= 7.6d-13) then
tmp = k * (j * (-27.0d0))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (b <= -2.45e+151) {
tmp = b * c;
} else if (b <= -8.2e-94) {
tmp = -27.0 * (j * k);
} else if (b <= -6.8e-238) {
tmp = -4.0 * (t * a);
} else if (b <= 7.6e-13) {
tmp = k * (j * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if b <= -2.45e+151: tmp = b * c elif b <= -8.2e-94: tmp = -27.0 * (j * k) elif b <= -6.8e-238: tmp = -4.0 * (t * a) elif b <= 7.6e-13: tmp = k * (j * -27.0) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (b <= -2.45e+151) tmp = Float64(b * c); elseif (b <= -8.2e-94) tmp = Float64(-27.0 * Float64(j * k)); elseif (b <= -6.8e-238) tmp = Float64(-4.0 * Float64(t * a)); elseif (b <= 7.6e-13) tmp = Float64(k * Float64(j * -27.0)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (b <= -2.45e+151)
tmp = b * c;
elseif (b <= -8.2e-94)
tmp = -27.0 * (j * k);
elseif (b <= -6.8e-238)
tmp = -4.0 * (t * a);
elseif (b <= 7.6e-13)
tmp = k * (j * -27.0);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[b, -2.45e+151], N[(b * c), $MachinePrecision], If[LessEqual[b, -8.2e-94], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -6.8e-238], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.6e-13], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.45 \cdot 10^{+151}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \leq -8.2 \cdot 10^{-94}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \leq -6.8 \cdot 10^{-238}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;b \leq 7.6 \cdot 10^{-13}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if b < -2.45e151 or 7.5999999999999999e-13 < b Initial program 82.0%
pow182.0%
associate-*l*82.0%
*-commutative82.0%
Applied egg-rr82.0%
unpow182.0%
associate-*l*81.1%
*-commutative81.1%
Simplified81.1%
Taylor expanded in b around inf 55.7%
Taylor expanded in j around inf 53.6%
cancel-sign-sub-inv53.6%
associate-/l*53.6%
metadata-eval53.6%
*-commutative53.6%
Simplified53.6%
Taylor expanded in j around 0 40.3%
if -2.45e151 < b < -8.20000000000000001e-94Initial program 90.1%
Simplified93.5%
Taylor expanded in j around inf 28.7%
if -8.20000000000000001e-94 < b < -6.79999999999999966e-238Initial program 86.2%
pow186.2%
associate-*l*88.4%
*-commutative88.4%
Applied egg-rr88.4%
unpow188.4%
associate-*l*92.6%
*-commutative92.6%
Simplified92.6%
Taylor expanded in y around 0 69.9%
distribute-lft-out69.9%
*-commutative69.9%
*-commutative69.9%
Simplified69.9%
Taylor expanded in b around 0 63.4%
Taylor expanded in a around inf 23.6%
*-commutative23.6%
Simplified23.6%
if -6.79999999999999966e-238 < b < 7.5999999999999999e-13Initial program 94.0%
Simplified94.1%
Taylor expanded in j around inf 27.5%
metadata-eval27.5%
distribute-lft-neg-in27.5%
associate-*r*27.5%
*-commutative27.5%
distribute-rgt-neg-in27.5%
distribute-lft-neg-in27.5%
metadata-eval27.5%
Simplified27.5%
Final simplification31.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 (<= t 2e+66) (- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) (* k (* j 27.0))) (+ (* j (* k -27.0)) (* t (+ (* 18.0 (* x (* y z))) (* a -4.0))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= 2e+66) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (j * 27.0));
} else {
tmp = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (t <= 2d+66) then
tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - (k * (j * 27.0d0))
else
tmp = (j * (k * (-27.0d0))) + (t * ((18.0d0 * (x * (y * z))) + (a * (-4.0d0))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= 2e+66) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (j * 27.0));
} else {
tmp = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= 2e+66: tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (j * 27.0)) else: tmp = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= 2e+66) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - Float64(k * Float64(j * 27.0))); else tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(a * -4.0)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= 2e+66)
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (j * 27.0));
else
tmp = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, 2e+66], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2 \cdot 10^{+66}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\
\end{array}
\end{array}
if t < 1.99999999999999989e66Initial program 88.3%
Taylor expanded in y around 0 82.7%
distribute-lft-out82.7%
*-commutative82.7%
Simplified82.7%
if 1.99999999999999989e66 < t Initial program 85.1%
Simplified94.4%
Taylor expanded in t around inf 78.2%
Final simplification81.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 (<= z -2.32e-63)
(* t (* (* 18.0 z) (* x y)))
(if (<= z 6.5e+239)
(* -4.0 (+ (* x i) (* t a)))
(* z (* (* x 18.0) (* t y))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= -2.32e-63) {
tmp = t * ((18.0 * z) * (x * y));
} else if (z <= 6.5e+239) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = z * ((x * 18.0) * (t * y));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (z <= (-2.32d-63)) then
tmp = t * ((18.0d0 * z) * (x * y))
else if (z <= 6.5d+239) then
tmp = (-4.0d0) * ((x * i) + (t * a))
else
tmp = z * ((x * 18.0d0) * (t * y))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= -2.32e-63) {
tmp = t * ((18.0 * z) * (x * y));
} else if (z <= 6.5e+239) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = z * ((x * 18.0) * (t * y));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if z <= -2.32e-63: tmp = t * ((18.0 * z) * (x * y)) elif z <= 6.5e+239: tmp = -4.0 * ((x * i) + (t * a)) else: tmp = z * ((x * 18.0) * (t * y)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (z <= -2.32e-63) tmp = Float64(t * Float64(Float64(18.0 * z) * Float64(x * y))); elseif (z <= 6.5e+239) tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))); else tmp = Float64(z * Float64(Float64(x * 18.0) * Float64(t * y))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (z <= -2.32e-63)
tmp = t * ((18.0 * z) * (x * y));
elseif (z <= 6.5e+239)
tmp = -4.0 * ((x * i) + (t * a));
else
tmp = z * ((x * 18.0) * (t * y));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[z, -2.32e-63], N[(t * N[(N[(18.0 * z), $MachinePrecision] * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+239], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(x * 18.0), $MachinePrecision] * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.32 \cdot 10^{-63}:\\
\;\;\;\;t \cdot \left(\left(18 \cdot z\right) \cdot \left(x \cdot y\right)\right)\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+239}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\left(x \cdot 18\right) \cdot \left(t \cdot y\right)\right)\\
\end{array}
\end{array}
if z < -2.3199999999999999e-63Initial program 89.0%
Simplified89.0%
Taylor expanded in x around inf 53.5%
pow153.5%
*-commutative53.5%
associate-*r*53.2%
Applied egg-rr53.2%
unpow153.2%
associate-*l*53.2%
Simplified53.2%
Taylor expanded in t around inf 36.8%
*-commutative36.8%
associate-*r*36.8%
associate-*r*38.1%
associate-*l*38.2%
*-commutative38.2%
Simplified38.2%
if -2.3199999999999999e-63 < z < 6.5e239Initial program 88.7%
pow188.7%
associate-*l*88.0%
*-commutative88.0%
Applied egg-rr88.0%
unpow188.0%
associate-*l*89.8%
*-commutative89.8%
Simplified89.8%
Taylor expanded in y around 0 82.2%
distribute-lft-out82.2%
*-commutative82.2%
*-commutative82.2%
Simplified82.2%
Taylor expanded in b around 0 65.3%
Taylor expanded in j around 0 47.5%
if 6.5e239 < z Initial program 71.7%
Simplified66.0%
Taylor expanded in x around inf 54.2%
Taylor expanded in z around inf 53.7%
Taylor expanded in i around 0 53.6%
*-commutative53.6%
associate-*r*53.7%
associate-*l*53.7%
*-commutative53.7%
associate-*l*53.7%
*-commutative53.7%
Simplified53.7%
Final simplification45.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= b -2.45e+151) (not (<= b 1.6e-9))) (* b c) (* k (* j -27.0))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 <= -2.45e+151) || !(b <= 1.6e-9)) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 <= (-2.45d+151)) .or. (.not. (b <= 1.6d-9))) then
tmp = b * c
else
tmp = k * (j * (-27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 <= -2.45e+151) || !(b <= 1.6e-9)) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b <= -2.45e+151) or not (b <= 1.6e-9): tmp = b * c else: tmp = k * (j * -27.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((b <= -2.45e+151) || !(b <= 1.6e-9)) tmp = Float64(b * c); else tmp = Float64(k * Float64(j * -27.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b <= -2.45e+151) || ~((b <= 1.6e-9)))
tmp = b * c;
else
tmp = k * (j * -27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[b, -2.45e+151], N[Not[LessEqual[b, 1.6e-9]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.45 \cdot 10^{+151} \lor \neg \left(b \leq 1.6 \cdot 10^{-9}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if b < -2.45e151 or 1.60000000000000006e-9 < b Initial program 82.0%
pow182.0%
associate-*l*82.0%
*-commutative82.0%
Applied egg-rr82.0%
unpow182.0%
associate-*l*81.1%
*-commutative81.1%
Simplified81.1%
Taylor expanded in b around inf 55.7%
Taylor expanded in j around inf 53.6%
cancel-sign-sub-inv53.6%
associate-/l*53.6%
metadata-eval53.6%
*-commutative53.6%
Simplified53.6%
Taylor expanded in j around 0 40.3%
if -2.45e151 < b < 1.60000000000000006e-9Initial program 90.7%
Simplified92.5%
Taylor expanded in j around inf 24.5%
metadata-eval24.5%
distribute-lft-neg-in24.5%
associate-*r*24.5%
*-commutative24.5%
distribute-rgt-neg-in24.5%
distribute-lft-neg-in24.5%
metadata-eval24.5%
Simplified24.5%
Final simplification30.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 (<= b -2.45e+151) (not (<= b 1.06e-9))) (* b c) (* -27.0 (* j k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b <= -2.45e+151) || !(b <= 1.06e-9)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b <= (-2.45d+151)) .or. (.not. (b <= 1.06d-9))) then
tmp = b * c
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b <= -2.45e+151) || !(b <= 1.06e-9)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b <= -2.45e+151) or not (b <= 1.06e-9): tmp = b * c else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((b <= -2.45e+151) || !(b <= 1.06e-9)) tmp = Float64(b * c); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b <= -2.45e+151) || ~((b <= 1.06e-9)))
tmp = b * c;
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[b, -2.45e+151], N[Not[LessEqual[b, 1.06e-9]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.45 \cdot 10^{+151} \lor \neg \left(b \leq 1.06 \cdot 10^{-9}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if b < -2.45e151 or 1.0600000000000001e-9 < b Initial program 82.0%
pow182.0%
associate-*l*82.0%
*-commutative82.0%
Applied egg-rr82.0%
unpow182.0%
associate-*l*81.1%
*-commutative81.1%
Simplified81.1%
Taylor expanded in b around inf 55.7%
Taylor expanded in j around inf 53.6%
cancel-sign-sub-inv53.6%
associate-/l*53.6%
metadata-eval53.6%
*-commutative53.6%
Simplified53.6%
Taylor expanded in j around 0 40.3%
if -2.45e151 < b < 1.0600000000000001e-9Initial program 90.7%
Simplified92.5%
Taylor expanded in j around inf 24.5%
Final simplification30.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 (* 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 87.7%
pow187.7%
associate-*l*87.5%
*-commutative87.5%
Applied egg-rr87.5%
unpow187.5%
associate-*l*87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in b around inf 40.5%
Taylor expanded in j around inf 39.9%
cancel-sign-sub-inv39.9%
associate-/l*40.8%
metadata-eval40.8%
*-commutative40.8%
Simplified40.8%
Taylor expanded in j around 0 20.7%
(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 2024100
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:alt
(if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))