
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k))
(t_2
(-
(-
(+ (- (* t (* (* (* x 18.0) y) z)) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
t_1)))
(if (<= t_2 (- INFINITY))
(-
(+ (* b c) (- (* x (fma (* 18.0 t) (* y z) (* i -4.0))) (* 4.0 (* t a))))
t_1)
(if (<= t_2 5e+288)
t_2
(if (<= t_2 INFINITY)
(-
(+
(* t (- (* (* x 18.0) (* y z)) (* a 4.0)))
(- (* b c) (* x (* 4.0 i))))
(* j (* 27.0 k)))
(* x (fma 18.0 (* z (* y t)) (* i -4.0))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = ((((t * (((x * 18.0) * y) * z)) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - t_1;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = ((b * c) + ((x * fma((18.0 * t), (y * z), (i * -4.0))) - (4.0 * (t * a)))) - t_1;
} else if (t_2 <= 5e+288) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k));
} else {
tmp = x * fma(18.0, (z * (y * t)), (i * -4.0));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(Float64(Float64(Float64(Float64(t * Float64(Float64(Float64(x * 18.0) * y) * z)) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - t_1) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(Float64(b * c) + Float64(Float64(x * fma(Float64(18.0 * t), Float64(y * z), Float64(i * -4.0))) - Float64(4.0 * Float64(t * a)))) - t_1); elseif (t_2 <= 5e+288) tmp = t_2; elseif (t_2 <= Inf) tmp = Float64(Float64(Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0))) + Float64(Float64(b * c) - Float64(x * Float64(4.0 * i)))) - Float64(j * Float64(27.0 * k))); else tmp = Float64(x * fma(18.0, Float64(z * Float64(y * t)), Float64(i * -4.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_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(x * N[(N[(18.0 * t), $MachinePrecision] * N[(y * z), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 5e+288], t$95$2, If[LessEqual[t$95$2, Infinity], N[(N[(N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(18.0 * N[(z * N[(y * t), $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 := \left(j \cdot 27\right) \cdot k\\
t_2 := \left(\left(\left(t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - t\_1\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\left(b \cdot c + \left(x \cdot \mathsf{fma}\left(18 \cdot t, y \cdot z, i \cdot -4\right) - 4 \cdot \left(t \cdot a\right)\right)\right) - t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+288}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(18, z \cdot \left(y \cdot t\right), i \cdot -4\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < -inf.0Initial program 89.0%
Taylor expanded in x around 0 93.7%
associate--l+93.7%
cancel-sign-sub-inv93.7%
associate-*r*93.7%
fma-define93.7%
metadata-eval93.7%
*-commutative93.7%
Applied egg-rr93.7%
if -inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < 5.0000000000000003e288Initial program 99.8%
if 5.0000000000000003e288 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 94.1%
Simplified94.1%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) Initial program 0.0%
Simplified23.3%
Taylor expanded in x around inf 73.8%
+-commutative73.8%
metadata-eval73.8%
cancel-sign-sub-inv73.8%
cancel-sign-sub-inv73.8%
metadata-eval73.8%
fma-undefine73.8%
associate-*r*77.2%
Simplified77.2%
Final simplification94.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k))
(t_2
(-
(-
(+ (- (* t (* (* (* x 18.0) y) z)) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
t_1)))
(if (<= t_2 (- INFINITY))
(-
(-
(+ (* b c) (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))))
(* 4.0 (* t a)))
t_1)
(if (<= t_2 5e+288)
t_2
(if (<= t_2 INFINITY)
(-
(+
(* t (- (* (* x 18.0) (* y z)) (* a 4.0)))
(- (* b c) (* x (* 4.0 i))))
(* j (* 27.0 k)))
(* x (fma 18.0 (* z (* y t)) (* i -4.0))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = ((((t * (((x * 18.0) * y) * z)) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - t_1;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - (4.0 * (t * a))) - t_1;
} else if (t_2 <= 5e+288) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k));
} else {
tmp = x * fma(18.0, (z * (y * t)), (i * -4.0));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(Float64(Float64(Float64(Float64(t * Float64(Float64(Float64(x * 18.0) * y) * z)) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - t_1) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)))) - Float64(4.0 * Float64(t * a))) - t_1); elseif (t_2 <= 5e+288) tmp = t_2; elseif (t_2 <= Inf) tmp = Float64(Float64(Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0))) + Float64(Float64(b * c) - Float64(x * Float64(4.0 * i)))) - Float64(j * Float64(27.0 * k))); else tmp = Float64(x * fma(18.0, Float64(z * Float64(y * t)), Float64(i * -4.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_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 5e+288], t$95$2, If[LessEqual[t$95$2, Infinity], N[(N[(N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(18.0 * N[(z * N[(y * t), $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 := \left(j \cdot 27\right) \cdot k\\
t_2 := \left(\left(\left(t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - t\_1\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\left(\left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\right) - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+288}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(18, z \cdot \left(y \cdot t\right), i \cdot -4\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < -inf.0Initial program 89.0%
Taylor expanded in x around 0 93.7%
if -inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < 5.0000000000000003e288Initial program 99.8%
if 5.0000000000000003e288 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 94.1%
Simplified94.1%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) Initial program 0.0%
Simplified23.3%
Taylor expanded in x around inf 73.8%
+-commutative73.8%
metadata-eval73.8%
cancel-sign-sub-inv73.8%
cancel-sign-sub-inv73.8%
metadata-eval73.8%
fma-undefine73.8%
associate-*r*77.2%
Simplified77.2%
Final simplification94.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k))
(t_2
(-
(-
(+ (- (* t (* (* (* x 18.0) y) z)) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
t_1))
(t_3 (* 18.0 (* t (* y z)))))
(if (<= t_2 (- INFINITY))
(- (- (+ (* b c) (* x (- t_3 (* 4.0 i)))) (* 4.0 (* t a))) t_1)
(if (<= t_2 5e+288)
t_2
(if (<= t_2 INFINITY)
(-
(+
(* t (- (* (* x 18.0) (* y z)) (* a 4.0)))
(- (* b c) (* x (* 4.0 i))))
(* j (* 27.0 k)))
(* x (+ (* i -4.0) 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 = (j * 27.0) * k;
double t_2 = ((((t * (((x * 18.0) * y) * z)) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - t_1;
double t_3 = 18.0 * (t * (y * z));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (((b * c) + (x * (t_3 - (4.0 * i)))) - (4.0 * (t * a))) - t_1;
} else if (t_2 <= 5e+288) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k));
} else {
tmp = x * ((i * -4.0) + t_3);
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = ((((t * (((x * 18.0) * y) * z)) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - t_1;
double t_3 = 18.0 * (t * (y * z));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (((b * c) + (x * (t_3 - (4.0 * i)))) - (4.0 * (t * a))) - t_1;
} else if (t_2 <= 5e+288) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k));
} else {
tmp = x * ((i * -4.0) + 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 = (j * 27.0) * k t_2 = ((((t * (((x * 18.0) * y) * z)) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - t_1 t_3 = 18.0 * (t * (y * z)) tmp = 0 if t_2 <= -math.inf: tmp = (((b * c) + (x * (t_3 - (4.0 * i)))) - (4.0 * (t * a))) - t_1 elif t_2 <= 5e+288: tmp = t_2 elif t_2 <= math.inf: tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k)) else: tmp = x * ((i * -4.0) + t_3) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(Float64(Float64(Float64(Float64(t * Float64(Float64(Float64(x * 18.0) * y) * z)) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - t_1) t_3 = Float64(18.0 * Float64(t * Float64(y * z))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(Float64(Float64(b * c) + Float64(x * Float64(t_3 - Float64(4.0 * i)))) - Float64(4.0 * Float64(t * a))) - t_1); elseif (t_2 <= 5e+288) tmp = t_2; elseif (t_2 <= Inf) tmp = Float64(Float64(Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0))) + Float64(Float64(b * c) - Float64(x * Float64(4.0 * i)))) - Float64(j * Float64(27.0 * k))); else tmp = Float64(x * Float64(Float64(i * -4.0) + 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 = (j * 27.0) * k;
t_2 = ((((t * (((x * 18.0) * y) * z)) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - t_1;
t_3 = 18.0 * (t * (y * z));
tmp = 0.0;
if (t_2 <= -Inf)
tmp = (((b * c) + (x * (t_3 - (4.0 * i)))) - (4.0 * (t * a))) - t_1;
elseif (t_2 <= 5e+288)
tmp = t_2;
elseif (t_2 <= Inf)
tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k));
else
tmp = x * ((i * -4.0) + t_3);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(x * N[(t$95$3 - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 5e+288], t$95$2, If[LessEqual[t$95$2, Infinity], N[(N[(N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(i * -4.0), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := \left(\left(\left(t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - t\_1\\
t_3 := 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\left(\left(b \cdot c + x \cdot \left(t\_3 - 4 \cdot i\right)\right) - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+288}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(i \cdot -4 + t\_3\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < -inf.0Initial program 89.0%
Taylor expanded in x around 0 93.7%
if -inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < 5.0000000000000003e288Initial program 99.8%
if 5.0000000000000003e288 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 94.1%
Simplified94.1%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) Initial program 0.0%
Simplified23.3%
Taylor expanded in x around inf 73.8%
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 (* x (* (* z t) (* 18.0 y)))) (t_2 (* i (* x -4.0))))
(if (<= x -1e+125)
t_2
(if (<= x -1.14e-38)
t_1
(if (<= x 6e-305)
(* k (* j -27.0))
(if (<= x 2.5e-258)
(* b c)
(if (<= x 9.4e-181)
(* j (* k -27.0))
(if (<= x 9.8e+35) (* b c) (if (<= x 2.6e+148) 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 = x * ((z * t) * (18.0 * y));
double t_2 = i * (x * -4.0);
double tmp;
if (x <= -1e+125) {
tmp = t_2;
} else if (x <= -1.14e-38) {
tmp = t_1;
} else if (x <= 6e-305) {
tmp = k * (j * -27.0);
} else if (x <= 2.5e-258) {
tmp = b * c;
} else if (x <= 9.4e-181) {
tmp = j * (k * -27.0);
} else if (x <= 9.8e+35) {
tmp = b * c;
} else if (x <= 2.6e+148) {
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 = x * ((z * t) * (18.0d0 * y))
t_2 = i * (x * (-4.0d0))
if (x <= (-1d+125)) then
tmp = t_2
else if (x <= (-1.14d-38)) then
tmp = t_1
else if (x <= 6d-305) then
tmp = k * (j * (-27.0d0))
else if (x <= 2.5d-258) then
tmp = b * c
else if (x <= 9.4d-181) then
tmp = j * (k * (-27.0d0))
else if (x <= 9.8d+35) then
tmp = b * c
else if (x <= 2.6d+148) 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 = x * ((z * t) * (18.0 * y));
double t_2 = i * (x * -4.0);
double tmp;
if (x <= -1e+125) {
tmp = t_2;
} else if (x <= -1.14e-38) {
tmp = t_1;
} else if (x <= 6e-305) {
tmp = k * (j * -27.0);
} else if (x <= 2.5e-258) {
tmp = b * c;
} else if (x <= 9.4e-181) {
tmp = j * (k * -27.0);
} else if (x <= 9.8e+35) {
tmp = b * c;
} else if (x <= 2.6e+148) {
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 = x * ((z * t) * (18.0 * y)) t_2 = i * (x * -4.0) tmp = 0 if x <= -1e+125: tmp = t_2 elif x <= -1.14e-38: tmp = t_1 elif x <= 6e-305: tmp = k * (j * -27.0) elif x <= 2.5e-258: tmp = b * c elif x <= 9.4e-181: tmp = j * (k * -27.0) elif x <= 9.8e+35: tmp = b * c elif x <= 2.6e+148: 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(x * Float64(Float64(z * t) * Float64(18.0 * y))) t_2 = Float64(i * Float64(x * -4.0)) tmp = 0.0 if (x <= -1e+125) tmp = t_2; elseif (x <= -1.14e-38) tmp = t_1; elseif (x <= 6e-305) tmp = Float64(k * Float64(j * -27.0)); elseif (x <= 2.5e-258) tmp = Float64(b * c); elseif (x <= 9.4e-181) tmp = Float64(j * Float64(k * -27.0)); elseif (x <= 9.8e+35) tmp = Float64(b * c); elseif (x <= 2.6e+148) 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 = x * ((z * t) * (18.0 * y));
t_2 = i * (x * -4.0);
tmp = 0.0;
if (x <= -1e+125)
tmp = t_2;
elseif (x <= -1.14e-38)
tmp = t_1;
elseif (x <= 6e-305)
tmp = k * (j * -27.0);
elseif (x <= 2.5e-258)
tmp = b * c;
elseif (x <= 9.4e-181)
tmp = j * (k * -27.0);
elseif (x <= 9.8e+35)
tmp = b * c;
elseif (x <= 2.6e+148)
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[(x * N[(N[(z * t), $MachinePrecision] * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1e+125], t$95$2, If[LessEqual[x, -1.14e-38], t$95$1, If[LessEqual[x, 6e-305], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.5e-258], N[(b * c), $MachinePrecision], If[LessEqual[x, 9.4e-181], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.8e+35], N[(b * c), $MachinePrecision], If[LessEqual[x, 2.6e+148], 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 := x \cdot \left(\left(z \cdot t\right) \cdot \left(18 \cdot y\right)\right)\\
t_2 := i \cdot \left(x \cdot -4\right)\\
\mathbf{if}\;x \leq -1 \cdot 10^{+125}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -1.14 \cdot 10^{-38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 6 \cdot 10^{-305}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{-258}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;x \leq 9.4 \cdot 10^{-181}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;x \leq 9.8 \cdot 10^{+35}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{+148}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -9.9999999999999992e124 or 2.6e148 < x Initial program 66.6%
Simplified72.6%
Taylor expanded in i around inf 57.6%
*-commutative57.6%
associate-*r*57.6%
Simplified57.6%
if -9.9999999999999992e124 < x < -1.1399999999999999e-38 or 9.8000000000000005e35 < x < 2.6e148Initial program 93.6%
Taylor expanded in x around 0 93.5%
Taylor expanded in a around 0 76.5%
Taylor expanded in t around inf 37.9%
*-commutative37.9%
associate-*r*41.9%
*-commutative41.9%
associate-*r*48.3%
associate-*r*48.3%
*-commutative48.3%
associate-*l*48.3%
associate-*r*48.3%
*-commutative48.3%
*-commutative48.3%
associate-*l*44.1%
Simplified44.1%
if -1.1399999999999999e-38 < x < 6.0000000000000002e-305Initial program 92.4%
Taylor expanded in x around 0 83.5%
associate--l+83.5%
cancel-sign-sub-inv83.5%
associate-*r*83.5%
fma-define83.5%
metadata-eval83.5%
*-commutative83.5%
Applied egg-rr83.5%
Taylor expanded in j around inf 37.8%
*-commutative37.8%
*-commutative37.8%
associate-*r*37.7%
Simplified37.7%
if 6.0000000000000002e-305 < x < 2.4999999999999999e-258 or 9.3999999999999995e-181 < x < 9.8000000000000005e35Initial program 90.1%
Simplified85.4%
Taylor expanded in b around inf 45.5%
if 2.4999999999999999e-258 < x < 9.3999999999999995e-181Initial program 99.9%
Simplified100.0%
Taylor expanded in j around inf 58.2%
metadata-eval58.2%
distribute-lft-neg-in58.2%
associate-*r*58.1%
*-commutative58.1%
associate-*r*58.2%
distribute-rgt-neg-in58.2%
*-commutative58.2%
distribute-rgt-neg-in58.2%
metadata-eval58.2%
Simplified58.2%
Final simplification48.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* t (* y z)))))
(if (<= x -1.75e+201)
(+ (* b c) (* x (- t_1 (* 4.0 i))))
(if (<= x 3.7e+189)
(-
(+
(* t (- (* (* x 18.0) (* y z)) (* a 4.0)))
(- (* b c) (* x (* 4.0 i))))
(* j (* 27.0 k)))
(* x (+ (* i -4.0) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (t * (y * z));
double tmp;
if (x <= -1.75e+201) {
tmp = (b * c) + (x * (t_1 - (4.0 * i)));
} else if (x <= 3.7e+189) {
tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k));
} else {
tmp = x * ((i * -4.0) + t_1);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 18.0d0 * (t * (y * z))
if (x <= (-1.75d+201)) then
tmp = (b * c) + (x * (t_1 - (4.0d0 * i)))
else if (x <= 3.7d+189) then
tmp = ((t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0))) + ((b * c) - (x * (4.0d0 * i)))) - (j * (27.0d0 * k))
else
tmp = x * ((i * (-4.0d0)) + t_1)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (t * (y * z));
double tmp;
if (x <= -1.75e+201) {
tmp = (b * c) + (x * (t_1 - (4.0 * i)));
} else if (x <= 3.7e+189) {
tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k));
} else {
tmp = x * ((i * -4.0) + t_1);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (t * (y * z)) tmp = 0 if x <= -1.75e+201: tmp = (b * c) + (x * (t_1 - (4.0 * i))) elif x <= 3.7e+189: tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k)) else: tmp = x * ((i * -4.0) + t_1) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(t * Float64(y * z))) tmp = 0.0 if (x <= -1.75e+201) tmp = Float64(Float64(b * c) + Float64(x * Float64(t_1 - Float64(4.0 * i)))); elseif (x <= 3.7e+189) tmp = Float64(Float64(Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0))) + Float64(Float64(b * c) - Float64(x * Float64(4.0 * i)))) - Float64(j * Float64(27.0 * k))); else tmp = Float64(x * Float64(Float64(i * -4.0) + t_1)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (t * (y * z));
tmp = 0.0;
if (x <= -1.75e+201)
tmp = (b * c) + (x * (t_1 - (4.0 * i)));
elseif (x <= 3.7e+189)
tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k));
else
tmp = x * ((i * -4.0) + t_1);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.75e+201], N[(N[(b * c), $MachinePrecision] + N[(x * N[(t$95$1 - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.7e+189], N[(N[(N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(i * -4.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;x \leq -1.75 \cdot 10^{+201}:\\
\;\;\;\;b \cdot c + x \cdot \left(t\_1 - 4 \cdot i\right)\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{+189}:\\
\;\;\;\;\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(i \cdot -4 + t\_1\right)\\
\end{array}
\end{array}
if x < -1.7500000000000001e201Initial program 52.2%
Taylor expanded in x around 0 77.8%
Taylor expanded in a around 0 85.2%
Taylor expanded in j around 0 88.9%
if -1.7500000000000001e201 < x < 3.70000000000000021e189Initial program 91.4%
Simplified90.0%
if 3.70000000000000021e189 < x Initial program 56.8%
Simplified65.4%
Taylor expanded in x around inf 95.6%
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 (- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) k)))
(t_2 (* x (+ (* i -4.0) (* 18.0 (* t (* y z)))))))
(if (<= x -1.56e+140)
t_2
(if (<= x 4.2e-156)
t_1
(if (<= x 7.5e+33)
(- (- (* b c) (* 4.0 (* x i))) (* j (* 27.0 k)))
(if (<= x 1.25e+54) 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 = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
double t_2 = x * ((i * -4.0) + (18.0 * (t * (y * z))));
double tmp;
if (x <= -1.56e+140) {
tmp = t_2;
} else if (x <= 4.2e-156) {
tmp = t_1;
} else if (x <= 7.5e+33) {
tmp = ((b * c) - (4.0 * (x * i))) - (j * (27.0 * k));
} else if (x <= 1.25e+54) {
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 = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
t_2 = x * ((i * (-4.0d0)) + (18.0d0 * (t * (y * z))))
if (x <= (-1.56d+140)) then
tmp = t_2
else if (x <= 4.2d-156) then
tmp = t_1
else if (x <= 7.5d+33) then
tmp = ((b * c) - (4.0d0 * (x * i))) - (j * (27.0d0 * k))
else if (x <= 1.25d+54) 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 = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
double t_2 = x * ((i * -4.0) + (18.0 * (t * (y * z))));
double tmp;
if (x <= -1.56e+140) {
tmp = t_2;
} else if (x <= 4.2e-156) {
tmp = t_1;
} else if (x <= 7.5e+33) {
tmp = ((b * c) - (4.0 * (x * i))) - (j * (27.0 * k));
} else if (x <= 1.25e+54) {
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 = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k) t_2 = x * ((i * -4.0) + (18.0 * (t * (y * z)))) tmp = 0 if x <= -1.56e+140: tmp = t_2 elif x <= 4.2e-156: tmp = t_1 elif x <= 7.5e+33: tmp = ((b * c) - (4.0 * (x * i))) - (j * (27.0 * k)) elif x <= 1.25e+54: 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(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)) t_2 = Float64(x * Float64(Float64(i * -4.0) + Float64(18.0 * Float64(t * Float64(y * z))))) tmp = 0.0 if (x <= -1.56e+140) tmp = t_2; elseif (x <= 4.2e-156) tmp = t_1; elseif (x <= 7.5e+33) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(j * Float64(27.0 * k))); elseif (x <= 1.25e+54) 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 = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
t_2 = x * ((i * -4.0) + (18.0 * (t * (y * z))));
tmp = 0.0;
if (x <= -1.56e+140)
tmp = t_2;
elseif (x <= 4.2e-156)
tmp = t_1;
elseif (x <= 7.5e+33)
tmp = ((b * c) - (4.0 * (x * i))) - (j * (27.0 * k));
elseif (x <= 1.25e+54)
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[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(i * -4.0), $MachinePrecision] + N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.56e+140], t$95$2, If[LessEqual[x, 4.2e-156], t$95$1, If[LessEqual[x, 7.5e+33], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.25e+54], 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 := \left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
t_2 := x \cdot \left(i \cdot -4 + 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;x \leq -1.56 \cdot 10^{+140}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{-156}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{+33}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -1.56000000000000002e140 or 1.25000000000000001e54 < x Initial program 68.6%
Simplified74.2%
Taylor expanded in x around inf 80.5%
if -1.56000000000000002e140 < x < 4.20000000000000025e-156 or 7.50000000000000046e33 < x < 1.25000000000000001e54Initial program 93.6%
Taylor expanded in x around 0 78.8%
if 4.20000000000000025e-156 < x < 7.50000000000000046e33Initial program 88.5%
Simplified86.3%
Taylor expanded in t around 0 73.0%
Final simplification78.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 (* t (* a -4.0))))
(if (<= t -2.8e+78)
t_1
(if (<= t -1.65e-197)
(* b c)
(if (<= t 6.2e-101)
(* i (* x -4.0))
(if (<= t 2.8e-36)
(* b c)
(if (<= t 5.4e+252) (* 18.0 (* t (* x (* y z)))) t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 * (a * -4.0);
double tmp;
if (t <= -2.8e+78) {
tmp = t_1;
} else if (t <= -1.65e-197) {
tmp = b * c;
} else if (t <= 6.2e-101) {
tmp = i * (x * -4.0);
} else if (t <= 2.8e-36) {
tmp = b * c;
} else if (t <= 5.4e+252) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = t * (a * (-4.0d0))
if (t <= (-2.8d+78)) then
tmp = t_1
else if (t <= (-1.65d-197)) then
tmp = b * c
else if (t <= 6.2d-101) then
tmp = i * (x * (-4.0d0))
else if (t <= 2.8d-36) then
tmp = b * c
else if (t <= 5.4d+252) then
tmp = 18.0d0 * (t * (x * (y * z)))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 * (a * -4.0);
double tmp;
if (t <= -2.8e+78) {
tmp = t_1;
} else if (t <= -1.65e-197) {
tmp = b * c;
} else if (t <= 6.2e-101) {
tmp = i * (x * -4.0);
} else if (t <= 2.8e-36) {
tmp = b * c;
} else if (t <= 5.4e+252) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * (a * -4.0) tmp = 0 if t <= -2.8e+78: tmp = t_1 elif t <= -1.65e-197: tmp = b * c elif t <= 6.2e-101: tmp = i * (x * -4.0) elif t <= 2.8e-36: tmp = b * c elif t <= 5.4e+252: tmp = 18.0 * (t * (x * (y * z))) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(a * -4.0)) tmp = 0.0 if (t <= -2.8e+78) tmp = t_1; elseif (t <= -1.65e-197) tmp = Float64(b * c); elseif (t <= 6.2e-101) tmp = Float64(i * Float64(x * -4.0)); elseif (t <= 2.8e-36) tmp = Float64(b * c); elseif (t <= 5.4e+252) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * (a * -4.0);
tmp = 0.0;
if (t <= -2.8e+78)
tmp = t_1;
elseif (t <= -1.65e-197)
tmp = b * c;
elseif (t <= 6.2e-101)
tmp = i * (x * -4.0);
elseif (t <= 2.8e-36)
tmp = b * c;
elseif (t <= 5.4e+252)
tmp = 18.0 * (t * (x * (y * z)));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e+78], t$95$1, If[LessEqual[t, -1.65e-197], N[(b * c), $MachinePrecision], If[LessEqual[t, 6.2e-101], N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-36], N[(b * c), $MachinePrecision], If[LessEqual[t, 5.4e+252], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.65 \cdot 10^{-197}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{-101}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-36}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{+252}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.8000000000000001e78 or 5.40000000000000021e252 < t Initial program 79.2%
Simplified81.1%
Taylor expanded in a around inf 50.8%
*-commutative50.8%
*-commutative50.8%
associate-*r*50.8%
*-commutative50.8%
Simplified50.8%
if -2.8000000000000001e78 < t < -1.6499999999999999e-197 or 6.19999999999999946e-101 < t < 2.8000000000000001e-36Initial program 91.1%
Simplified91.2%
Taylor expanded in b around inf 40.1%
if -1.6499999999999999e-197 < t < 6.19999999999999946e-101Initial program 81.6%
Simplified81.7%
Taylor expanded in i around inf 40.7%
*-commutative40.7%
associate-*r*40.7%
Simplified40.7%
if 2.8000000000000001e-36 < t < 5.40000000000000021e252Initial program 83.7%
Simplified84.0%
Taylor expanded in y around inf 42.3%
Final simplification43.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (* a -4.0))))
(if (<= t -1.1e+74)
t_1
(if (<= t -4.8e-194)
(* b c)
(if (<= t 6.8e-101)
(* i (* x -4.0))
(if (<= t 4.5e-18)
(* b c)
(if (<= t 1.45e+246) (* t (* 18.0 (* y (* x z)))) 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 * (a * -4.0);
double tmp;
if (t <= -1.1e+74) {
tmp = t_1;
} else if (t <= -4.8e-194) {
tmp = b * c;
} else if (t <= 6.8e-101) {
tmp = i * (x * -4.0);
} else if (t <= 4.5e-18) {
tmp = b * c;
} else if (t <= 1.45e+246) {
tmp = t * (18.0 * (y * (x * z)));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = t * (a * (-4.0d0))
if (t <= (-1.1d+74)) then
tmp = t_1
else if (t <= (-4.8d-194)) then
tmp = b * c
else if (t <= 6.8d-101) then
tmp = i * (x * (-4.0d0))
else if (t <= 4.5d-18) then
tmp = b * c
else if (t <= 1.45d+246) then
tmp = t * (18.0d0 * (y * (x * z)))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 * (a * -4.0);
double tmp;
if (t <= -1.1e+74) {
tmp = t_1;
} else if (t <= -4.8e-194) {
tmp = b * c;
} else if (t <= 6.8e-101) {
tmp = i * (x * -4.0);
} else if (t <= 4.5e-18) {
tmp = b * c;
} else if (t <= 1.45e+246) {
tmp = t * (18.0 * (y * (x * z)));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * (a * -4.0) tmp = 0 if t <= -1.1e+74: tmp = t_1 elif t <= -4.8e-194: tmp = b * c elif t <= 6.8e-101: tmp = i * (x * -4.0) elif t <= 4.5e-18: tmp = b * c elif t <= 1.45e+246: tmp = t * (18.0 * (y * (x * z))) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(a * -4.0)) tmp = 0.0 if (t <= -1.1e+74) tmp = t_1; elseif (t <= -4.8e-194) tmp = Float64(b * c); elseif (t <= 6.8e-101) tmp = Float64(i * Float64(x * -4.0)); elseif (t <= 4.5e-18) tmp = Float64(b * c); elseif (t <= 1.45e+246) tmp = Float64(t * Float64(18.0 * Float64(y * Float64(x * z)))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * (a * -4.0);
tmp = 0.0;
if (t <= -1.1e+74)
tmp = t_1;
elseif (t <= -4.8e-194)
tmp = b * c;
elseif (t <= 6.8e-101)
tmp = i * (x * -4.0);
elseif (t <= 4.5e-18)
tmp = b * c;
elseif (t <= 1.45e+246)
tmp = t * (18.0 * (y * (x * z)));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.1e+74], t$95$1, If[LessEqual[t, -4.8e-194], N[(b * c), $MachinePrecision], If[LessEqual[t, 6.8e-101], N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e-18], N[(b * c), $MachinePrecision], If[LessEqual[t, 1.45e+246], N[(t * N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;t \leq -1.1 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4.8 \cdot 10^{-194}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-101}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right)\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-18}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+246}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.1000000000000001e74 or 1.45000000000000007e246 < t Initial program 79.2%
Simplified81.1%
Taylor expanded in a around inf 50.8%
*-commutative50.8%
*-commutative50.8%
associate-*r*50.8%
*-commutative50.8%
Simplified50.8%
if -1.1000000000000001e74 < t < -4.8e-194 or 6.79999999999999978e-101 < t < 4.49999999999999994e-18Initial program 91.5%
Simplified91.6%
Taylor expanded in b around inf 39.9%
if -4.8e-194 < t < 6.79999999999999978e-101Initial program 81.6%
Simplified81.7%
Taylor expanded in i around inf 40.7%
*-commutative40.7%
associate-*r*40.7%
Simplified40.7%
if 4.49999999999999994e-18 < t < 1.45000000000000007e246Initial program 82.9%
Simplified83.2%
Taylor expanded in y around inf 42.6%
*-commutative42.6%
associate-*r*42.6%
*-commutative42.6%
associate-*r*42.7%
*-commutative42.7%
*-commutative42.7%
associate-*r*42.6%
Simplified42.6%
Taylor expanded in x around 0 42.6%
associate-*r*42.7%
*-commutative42.7%
*-commutative42.7%
associate-*r*42.6%
*-commutative42.6%
associate-*l*45.5%
Simplified45.5%
Taylor expanded in z around 0 42.6%
*-commutative42.6%
associate-*l*44.1%
Simplified44.1%
Final simplification43.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 (* t (* a -4.0))))
(if (<= t -1.6e+77)
t_1
(if (<= t -2.6e-197)
(* b c)
(if (<= t 6.5e-101)
(* i (* x -4.0))
(if (<= t 6e-35)
(* b c)
(if (<= t 7e+249) (* t (* (* (* x 18.0) y) z)) 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 * (a * -4.0);
double tmp;
if (t <= -1.6e+77) {
tmp = t_1;
} else if (t <= -2.6e-197) {
tmp = b * c;
} else if (t <= 6.5e-101) {
tmp = i * (x * -4.0);
} else if (t <= 6e-35) {
tmp = b * c;
} else if (t <= 7e+249) {
tmp = t * (((x * 18.0) * y) * z);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = t * (a * (-4.0d0))
if (t <= (-1.6d+77)) then
tmp = t_1
else if (t <= (-2.6d-197)) then
tmp = b * c
else if (t <= 6.5d-101) then
tmp = i * (x * (-4.0d0))
else if (t <= 6d-35) then
tmp = b * c
else if (t <= 7d+249) then
tmp = t * (((x * 18.0d0) * y) * z)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 * (a * -4.0);
double tmp;
if (t <= -1.6e+77) {
tmp = t_1;
} else if (t <= -2.6e-197) {
tmp = b * c;
} else if (t <= 6.5e-101) {
tmp = i * (x * -4.0);
} else if (t <= 6e-35) {
tmp = b * c;
} else if (t <= 7e+249) {
tmp = t * (((x * 18.0) * y) * z);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * (a * -4.0) tmp = 0 if t <= -1.6e+77: tmp = t_1 elif t <= -2.6e-197: tmp = b * c elif t <= 6.5e-101: tmp = i * (x * -4.0) elif t <= 6e-35: tmp = b * c elif t <= 7e+249: tmp = t * (((x * 18.0) * y) * z) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(a * -4.0)) tmp = 0.0 if (t <= -1.6e+77) tmp = t_1; elseif (t <= -2.6e-197) tmp = Float64(b * c); elseif (t <= 6.5e-101) tmp = Float64(i * Float64(x * -4.0)); elseif (t <= 6e-35) tmp = Float64(b * c); elseif (t <= 7e+249) tmp = Float64(t * Float64(Float64(Float64(x * 18.0) * y) * z)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * (a * -4.0);
tmp = 0.0;
if (t <= -1.6e+77)
tmp = t_1;
elseif (t <= -2.6e-197)
tmp = b * c;
elseif (t <= 6.5e-101)
tmp = i * (x * -4.0);
elseif (t <= 6e-35)
tmp = b * c;
elseif (t <= 7e+249)
tmp = t * (((x * 18.0) * y) * z);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+77], t$95$1, If[LessEqual[t, -2.6e-197], N[(b * c), $MachinePrecision], If[LessEqual[t, 6.5e-101], N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e-35], N[(b * c), $MachinePrecision], If[LessEqual[t, 7e+249], N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $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(a \cdot -4\right)\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.6 \cdot 10^{-197}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{-101}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right)\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-35}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+249}:\\
\;\;\;\;t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.6000000000000001e77 or 7.00000000000000024e249 < t Initial program 79.2%
Simplified81.1%
Taylor expanded in a around inf 50.8%
*-commutative50.8%
*-commutative50.8%
associate-*r*50.8%
*-commutative50.8%
Simplified50.8%
if -1.6000000000000001e77 < t < -2.6000000000000001e-197 or 6.4999999999999996e-101 < t < 5.99999999999999978e-35Initial program 91.1%
Simplified91.2%
Taylor expanded in b around inf 40.1%
if -2.6000000000000001e-197 < t < 6.4999999999999996e-101Initial program 81.6%
Simplified81.7%
Taylor expanded in i around inf 40.7%
*-commutative40.7%
associate-*r*40.7%
Simplified40.7%
if 5.99999999999999978e-35 < t < 7.00000000000000024e249Initial program 83.7%
Simplified84.0%
Taylor expanded in y around inf 42.3%
*-commutative42.3%
associate-*r*42.3%
*-commutative42.3%
associate-*r*42.4%
*-commutative42.4%
*-commutative42.4%
associate-*r*40.9%
Simplified40.9%
Taylor expanded in x around 0 42.3%
associate-*r*42.4%
*-commutative42.4%
*-commutative42.4%
associate-*r*40.9%
*-commutative40.9%
associate-*l*45.1%
Simplified45.1%
Final simplification43.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 (* x (+ (* i -4.0) (* 18.0 (* t (* y z)))))))
(if (<= x -9.6e+50)
t_1
(if (<= x 1.15e-45)
(- (* b c) (* (* j 27.0) k))
(if (<= x 3.7e+56)
(- (* b c) (* 4.0 (* x i)))
(if (<= x 4.4e+70) (* y (* (* x 18.0) (* z t))) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((i * -4.0) + (18.0 * (t * (y * z))));
double tmp;
if (x <= -9.6e+50) {
tmp = t_1;
} else if (x <= 1.15e-45) {
tmp = (b * c) - ((j * 27.0) * k);
} else if (x <= 3.7e+56) {
tmp = (b * c) - (4.0 * (x * i));
} else if (x <= 4.4e+70) {
tmp = y * ((x * 18.0) * (z * t));
} 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 * ((i * (-4.0d0)) + (18.0d0 * (t * (y * z))))
if (x <= (-9.6d+50)) then
tmp = t_1
else if (x <= 1.15d-45) then
tmp = (b * c) - ((j * 27.0d0) * k)
else if (x <= 3.7d+56) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (x <= 4.4d+70) then
tmp = y * ((x * 18.0d0) * (z * t))
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 * ((i * -4.0) + (18.0 * (t * (y * z))));
double tmp;
if (x <= -9.6e+50) {
tmp = t_1;
} else if (x <= 1.15e-45) {
tmp = (b * c) - ((j * 27.0) * k);
} else if (x <= 3.7e+56) {
tmp = (b * c) - (4.0 * (x * i));
} else if (x <= 4.4e+70) {
tmp = y * ((x * 18.0) * (z * t));
} 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 * ((i * -4.0) + (18.0 * (t * (y * z)))) tmp = 0 if x <= -9.6e+50: tmp = t_1 elif x <= 1.15e-45: tmp = (b * c) - ((j * 27.0) * k) elif x <= 3.7e+56: tmp = (b * c) - (4.0 * (x * i)) elif x <= 4.4e+70: tmp = y * ((x * 18.0) * (z * t)) 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(i * -4.0) + Float64(18.0 * Float64(t * Float64(y * z))))) tmp = 0.0 if (x <= -9.6e+50) tmp = t_1; elseif (x <= 1.15e-45) tmp = Float64(Float64(b * c) - Float64(Float64(j * 27.0) * k)); elseif (x <= 3.7e+56) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (x <= 4.4e+70) tmp = Float64(y * Float64(Float64(x * 18.0) * Float64(z * t))); 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 * ((i * -4.0) + (18.0 * (t * (y * z))));
tmp = 0.0;
if (x <= -9.6e+50)
tmp = t_1;
elseif (x <= 1.15e-45)
tmp = (b * c) - ((j * 27.0) * k);
elseif (x <= 3.7e+56)
tmp = (b * c) - (4.0 * (x * i));
elseif (x <= 4.4e+70)
tmp = y * ((x * 18.0) * (z * t));
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[(i * -4.0), $MachinePrecision] + N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9.6e+50], t$95$1, If[LessEqual[x, 1.15e-45], N[(N[(b * c), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.7e+56], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.4e+70], N[(y * N[(N[(x * 18.0), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4 + 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;x \leq -9.6 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{-45}:\\
\;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{+56}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{+70}:\\
\;\;\;\;y \cdot \left(\left(x \cdot 18\right) \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -9.6000000000000007e50 or 4.40000000000000001e70 < x Initial program 72.8%
Simplified77.4%
Taylor expanded in x around inf 75.4%
if -9.6000000000000007e50 < x < 1.14999999999999996e-45Initial program 95.7%
Taylor expanded in x around 0 86.9%
Taylor expanded in b around inf 63.9%
if 1.14999999999999996e-45 < x < 3.69999999999999997e56Initial program 78.7%
Simplified78.6%
Taylor expanded in t around 0 66.0%
Taylor expanded in j around 0 60.6%
if 3.69999999999999997e56 < x < 4.40000000000000001e70Initial program 69.1%
Simplified69.1%
Taylor expanded in y around inf 40.1%
*-commutative40.1%
associate-*r*40.1%
*-commutative40.1%
associate-*r*40.1%
*-commutative40.1%
*-commutative40.1%
associate-*r*40.1%
Simplified40.1%
add040.1%
associate-*r*99.5%
fma-define99.5%
*-commutative99.5%
Applied egg-rr99.5%
fma-undefine99.5%
associate-*r*99.5%
*-commutative99.5%
Applied egg-rr99.5%
Final simplification68.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (or (<= x -1.2e-181) (not (<= x 8e-122)))
(- (+ (* b c) (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))) t_1)
(- (- (* b c) (* 4.0 (* t a))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if ((x <= -1.2e-181) || !(x <= 8e-122)) {
tmp = ((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - t_1;
} else {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if ((x <= (-1.2d-181)) .or. (.not. (x <= 8d-122))) then
tmp = ((b * c) + (x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i)))) - t_1
else
tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if ((x <= -1.2e-181) || !(x <= 8e-122)) {
tmp = ((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - t_1;
} else {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if (x <= -1.2e-181) or not (x <= 8e-122): tmp = ((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - t_1 else: tmp = ((b * c) - (4.0 * (t * a))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if ((x <= -1.2e-181) || !(x <= 8e-122)) tmp = Float64(Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)))) - t_1); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if ((x <= -1.2e-181) || ~((x <= 8e-122)))
tmp = ((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - t_1;
else
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[Or[LessEqual[x, -1.2e-181], N[Not[LessEqual[x, 8e-122]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;x \leq -1.2 \cdot 10^{-181} \lor \neg \left(x \leq 8 \cdot 10^{-122}\right):\\
\;\;\;\;\left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\end{array}
\end{array}
if x < -1.2000000000000001e-181 or 8.00000000000000047e-122 < x Initial program 79.7%
Taylor expanded in x around 0 86.9%
Taylor expanded in a around 0 83.0%
if -1.2000000000000001e-181 < x < 8.00000000000000047e-122Initial program 96.9%
Taylor expanded in x around 0 89.4%
Final simplification84.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 4.0 (* x i)))))
(if (<= x -7e+123)
t_1
(if (<= x 1.65e-36)
(- (* b c) (* (* j 27.0) k))
(if (or (<= x 6.5e+55) (not (<= x 1.5e+145)))
t_1
(* y (* (* x 18.0) (* z t))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (x * i));
double tmp;
if (x <= -7e+123) {
tmp = t_1;
} else if (x <= 1.65e-36) {
tmp = (b * c) - ((j * 27.0) * k);
} else if ((x <= 6.5e+55) || !(x <= 1.5e+145)) {
tmp = t_1;
} else {
tmp = y * ((x * 18.0) * (z * t));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) - (4.0d0 * (x * i))
if (x <= (-7d+123)) then
tmp = t_1
else if (x <= 1.65d-36) then
tmp = (b * c) - ((j * 27.0d0) * k)
else if ((x <= 6.5d+55) .or. (.not. (x <= 1.5d+145))) then
tmp = t_1
else
tmp = y * ((x * 18.0d0) * (z * t))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (x * i));
double tmp;
if (x <= -7e+123) {
tmp = t_1;
} else if (x <= 1.65e-36) {
tmp = (b * c) - ((j * 27.0) * k);
} else if ((x <= 6.5e+55) || !(x <= 1.5e+145)) {
tmp = t_1;
} else {
tmp = y * ((x * 18.0) * (z * t));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (4.0 * (x * i)) tmp = 0 if x <= -7e+123: tmp = t_1 elif x <= 1.65e-36: tmp = (b * c) - ((j * 27.0) * k) elif (x <= 6.5e+55) or not (x <= 1.5e+145): tmp = t_1 else: tmp = y * ((x * 18.0) * (z * t)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) tmp = 0.0 if (x <= -7e+123) tmp = t_1; elseif (x <= 1.65e-36) tmp = Float64(Float64(b * c) - Float64(Float64(j * 27.0) * k)); elseif ((x <= 6.5e+55) || !(x <= 1.5e+145)) tmp = t_1; else tmp = Float64(y * Float64(Float64(x * 18.0) * Float64(z * t))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (4.0 * (x * i));
tmp = 0.0;
if (x <= -7e+123)
tmp = t_1;
elseif (x <= 1.65e-36)
tmp = (b * c) - ((j * 27.0) * k);
elseif ((x <= 6.5e+55) || ~((x <= 1.5e+145)))
tmp = t_1;
else
tmp = y * ((x * 18.0) * (z * t));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7e+123], t$95$1, If[LessEqual[x, 1.65e-36], N[(N[(b * c), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 6.5e+55], N[Not[LessEqual[x, 1.5e+145]], $MachinePrecision]], t$95$1, N[(y * N[(N[(x * 18.0), $MachinePrecision] * N[(z * t), $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 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;x \leq -7 \cdot 10^{+123}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.65 \cdot 10^{-36}:\\
\;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{+55} \lor \neg \left(x \leq 1.5 \cdot 10^{+145}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(x \cdot 18\right) \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if x < -6.99999999999999999e123 or 1.64999999999999995e-36 < x < 6.50000000000000027e55 or 1.5000000000000001e145 < x Initial program 69.2%
Simplified73.0%
Taylor expanded in t around 0 68.4%
Taylor expanded in j around 0 64.6%
if -6.99999999999999999e123 < x < 1.64999999999999995e-36Initial program 94.8%
Taylor expanded in x around 0 87.1%
Taylor expanded in b around inf 60.6%
if 6.50000000000000027e55 < x < 1.5000000000000001e145Initial program 92.3%
Simplified92.3%
Taylor expanded in y around inf 52.8%
*-commutative52.8%
associate-*r*52.8%
*-commutative52.8%
associate-*r*52.9%
*-commutative52.9%
*-commutative52.9%
associate-*r*52.9%
Simplified52.9%
add052.9%
associate-*r*75.8%
fma-define75.8%
*-commutative75.8%
Applied egg-rr75.8%
fma-undefine75.8%
associate-*r*75.7%
*-commutative75.7%
Applied egg-rr75.7%
Final simplification62.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (or (<= t_1 -4e+102) (not (<= t_1 5e+49)))
(- (* b c) t_1)
(- (* b c) (* 4.0 (* x i))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if ((t_1 <= -4e+102) || !(t_1 <= 5e+49)) {
tmp = (b * c) - t_1;
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if ((t_1 <= (-4d+102)) .or. (.not. (t_1 <= 5d+49))) then
tmp = (b * c) - t_1
else
tmp = (b * c) - (4.0d0 * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if ((t_1 <= -4e+102) || !(t_1 <= 5e+49)) {
tmp = (b * c) - t_1;
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if (t_1 <= -4e+102) or not (t_1 <= 5e+49): tmp = (b * c) - t_1 else: tmp = (b * c) - (4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if ((t_1 <= -4e+102) || !(t_1 <= 5e+49)) tmp = Float64(Float64(b * c) - t_1); else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if ((t_1 <= -4e+102) || ~((t_1 <= 5e+49)))
tmp = (b * c) - t_1;
else
tmp = (b * c) - (4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e+102], N[Not[LessEqual[t$95$1, 5e+49]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+102} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+49}\right):\\
\;\;\;\;b \cdot c - t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -3.99999999999999991e102 or 5.0000000000000004e49 < (*.f64 (*.f64 j 27) k) Initial program 83.4%
Taylor expanded in x around 0 84.6%
Taylor expanded in b around inf 63.6%
if -3.99999999999999991e102 < (*.f64 (*.f64 j 27) k) < 5.0000000000000004e49Initial program 84.5%
Simplified86.5%
Taylor expanded in t around 0 61.0%
Taylor expanded in j around 0 56.6%
Final simplification59.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 (<= x -4.2e+78) (not (<= x 8.2e-41))) (+ (* b c) (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))) (- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -4.2e+78) || !(x <= 8.2e-41)) {
tmp = (b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)));
} else {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-4.2d+78)) .or. (.not. (x <= 8.2d-41))) then
tmp = (b * c) + (x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i)))
else
tmp = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -4.2e+78) || !(x <= 8.2e-41)) {
tmp = (b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)));
} else {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -4.2e+78) or not (x <= 8.2e-41): tmp = (b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i))) else: tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -4.2e+78) || !(x <= 8.2e-41)) tmp = Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -4.2e+78) || ~((x <= 8.2e-41)))
tmp = (b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)));
else
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -4.2e+78], N[Not[LessEqual[x, 8.2e-41]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{+78} \lor \neg \left(x \leq 8.2 \cdot 10^{-41}\right):\\
\;\;\;\;b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if x < -4.2000000000000002e78 or 8.20000000000000028e-41 < x Initial program 73.3%
Taylor expanded in x around 0 85.4%
Taylor expanded in a around 0 84.0%
Taylor expanded in j around 0 79.6%
if -4.2000000000000002e78 < x < 8.20000000000000028e-41Initial program 95.1%
Taylor expanded in x around 0 81.5%
Final simplification80.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))))
(if (<= c -1.15e-41)
(* b c)
(if (<= c -1e-231)
t_1
(if (<= c 2.5e-112)
(* j (* k -27.0))
(if (<= c 1.85e+118) 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 = i * (x * -4.0);
double tmp;
if (c <= -1.15e-41) {
tmp = b * c;
} else if (c <= -1e-231) {
tmp = t_1;
} else if (c <= 2.5e-112) {
tmp = j * (k * -27.0);
} else if (c <= 1.85e+118) {
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 = i * (x * (-4.0d0))
if (c <= (-1.15d-41)) then
tmp = b * c
else if (c <= (-1d-231)) then
tmp = t_1
else if (c <= 2.5d-112) then
tmp = j * (k * (-27.0d0))
else if (c <= 1.85d+118) 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 = i * (x * -4.0);
double tmp;
if (c <= -1.15e-41) {
tmp = b * c;
} else if (c <= -1e-231) {
tmp = t_1;
} else if (c <= 2.5e-112) {
tmp = j * (k * -27.0);
} else if (c <= 1.85e+118) {
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 = i * (x * -4.0) tmp = 0 if c <= -1.15e-41: tmp = b * c elif c <= -1e-231: tmp = t_1 elif c <= 2.5e-112: tmp = j * (k * -27.0) elif c <= 1.85e+118: 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(i * Float64(x * -4.0)) tmp = 0.0 if (c <= -1.15e-41) tmp = Float64(b * c); elseif (c <= -1e-231) tmp = t_1; elseif (c <= 2.5e-112) tmp = Float64(j * Float64(k * -27.0)); elseif (c <= 1.85e+118) 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 = i * (x * -4.0);
tmp = 0.0;
if (c <= -1.15e-41)
tmp = b * c;
elseif (c <= -1e-231)
tmp = t_1;
elseif (c <= 2.5e-112)
tmp = j * (k * -27.0);
elseif (c <= 1.85e+118)
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[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.15e-41], N[(b * c), $MachinePrecision], If[LessEqual[c, -1e-231], t$95$1, If[LessEqual[c, 2.5e-112], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.85e+118], 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 := i \cdot \left(x \cdot -4\right)\\
\mathbf{if}\;c \leq -1.15 \cdot 10^{-41}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq -1 \cdot 10^{-231}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 2.5 \cdot 10^{-112}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;c \leq 1.85 \cdot 10^{+118}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if c < -1.15000000000000005e-41 or 1.84999999999999993e118 < c Initial program 82.5%
Simplified83.6%
Taylor expanded in b around inf 42.7%
if -1.15000000000000005e-41 < c < -9.9999999999999999e-232 or 2.50000000000000022e-112 < c < 1.84999999999999993e118Initial program 85.0%
Simplified85.1%
Taylor expanded in i around inf 32.7%
*-commutative32.7%
associate-*r*32.7%
Simplified32.7%
if -9.9999999999999999e-232 < c < 2.50000000000000022e-112Initial program 85.5%
Simplified85.8%
Taylor expanded in j around inf 33.6%
metadata-eval33.6%
distribute-lft-neg-in33.6%
associate-*r*33.5%
*-commutative33.5%
associate-*r*33.6%
distribute-rgt-neg-in33.6%
*-commutative33.6%
distribute-rgt-neg-in33.6%
metadata-eval33.6%
Simplified33.6%
Final simplification36.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* i (* x -4.0))))
(if (<= c -1.1e-41)
(* b c)
(if (<= c -4.8e-231)
t_1
(if (<= c 9.5e-116)
(* k (* j -27.0))
(if (<= c 1.1e+118) 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 = i * (x * -4.0);
double tmp;
if (c <= -1.1e-41) {
tmp = b * c;
} else if (c <= -4.8e-231) {
tmp = t_1;
} else if (c <= 9.5e-116) {
tmp = k * (j * -27.0);
} else if (c <= 1.1e+118) {
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 = i * (x * (-4.0d0))
if (c <= (-1.1d-41)) then
tmp = b * c
else if (c <= (-4.8d-231)) then
tmp = t_1
else if (c <= 9.5d-116) then
tmp = k * (j * (-27.0d0))
else if (c <= 1.1d+118) 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 = i * (x * -4.0);
double tmp;
if (c <= -1.1e-41) {
tmp = b * c;
} else if (c <= -4.8e-231) {
tmp = t_1;
} else if (c <= 9.5e-116) {
tmp = k * (j * -27.0);
} else if (c <= 1.1e+118) {
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 = i * (x * -4.0) tmp = 0 if c <= -1.1e-41: tmp = b * c elif c <= -4.8e-231: tmp = t_1 elif c <= 9.5e-116: tmp = k * (j * -27.0) elif c <= 1.1e+118: 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(i * Float64(x * -4.0)) tmp = 0.0 if (c <= -1.1e-41) tmp = Float64(b * c); elseif (c <= -4.8e-231) tmp = t_1; elseif (c <= 9.5e-116) tmp = Float64(k * Float64(j * -27.0)); elseif (c <= 1.1e+118) 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 = i * (x * -4.0);
tmp = 0.0;
if (c <= -1.1e-41)
tmp = b * c;
elseif (c <= -4.8e-231)
tmp = t_1;
elseif (c <= 9.5e-116)
tmp = k * (j * -27.0);
elseif (c <= 1.1e+118)
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[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.1e-41], N[(b * c), $MachinePrecision], If[LessEqual[c, -4.8e-231], t$95$1, If[LessEqual[c, 9.5e-116], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.1e+118], 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 := i \cdot \left(x \cdot -4\right)\\
\mathbf{if}\;c \leq -1.1 \cdot 10^{-41}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq -4.8 \cdot 10^{-231}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 9.5 \cdot 10^{-116}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;c \leq 1.1 \cdot 10^{+118}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if c < -1.1e-41 or 1.09999999999999993e118 < c Initial program 82.5%
Simplified83.6%
Taylor expanded in b around inf 42.7%
if -1.1e-41 < c < -4.79999999999999983e-231 or 9.4999999999999998e-116 < c < 1.09999999999999993e118Initial program 85.1%
Simplified85.2%
Taylor expanded in i around inf 32.5%
*-commutative32.5%
associate-*r*32.5%
Simplified32.5%
if -4.79999999999999983e-231 < c < 9.4999999999999998e-116Initial program 85.3%
Taylor expanded in x around 0 87.2%
associate--l+87.2%
cancel-sign-sub-inv87.2%
associate-*r*87.3%
fma-define87.3%
metadata-eval87.3%
*-commutative87.3%
Applied egg-rr87.3%
Taylor expanded in j around inf 34.1%
*-commutative34.1%
*-commutative34.1%
associate-*r*34.1%
Simplified34.1%
Final simplification36.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* i (* x -4.0))))
(if (<= c -1.15e-41)
(* b c)
(if (<= c -1.6e-234)
t_1
(if (<= c 1.05e-115)
(* -27.0 (* j k))
(if (<= c 1.05e+118) 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 = i * (x * -4.0);
double tmp;
if (c <= -1.15e-41) {
tmp = b * c;
} else if (c <= -1.6e-234) {
tmp = t_1;
} else if (c <= 1.05e-115) {
tmp = -27.0 * (j * k);
} else if (c <= 1.05e+118) {
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 = i * (x * (-4.0d0))
if (c <= (-1.15d-41)) then
tmp = b * c
else if (c <= (-1.6d-234)) then
tmp = t_1
else if (c <= 1.05d-115) then
tmp = (-27.0d0) * (j * k)
else if (c <= 1.05d+118) 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 = i * (x * -4.0);
double tmp;
if (c <= -1.15e-41) {
tmp = b * c;
} else if (c <= -1.6e-234) {
tmp = t_1;
} else if (c <= 1.05e-115) {
tmp = -27.0 * (j * k);
} else if (c <= 1.05e+118) {
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 = i * (x * -4.0) tmp = 0 if c <= -1.15e-41: tmp = b * c elif c <= -1.6e-234: tmp = t_1 elif c <= 1.05e-115: tmp = -27.0 * (j * k) elif c <= 1.05e+118: 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(i * Float64(x * -4.0)) tmp = 0.0 if (c <= -1.15e-41) tmp = Float64(b * c); elseif (c <= -1.6e-234) tmp = t_1; elseif (c <= 1.05e-115) tmp = Float64(-27.0 * Float64(j * k)); elseif (c <= 1.05e+118) 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 = i * (x * -4.0);
tmp = 0.0;
if (c <= -1.15e-41)
tmp = b * c;
elseif (c <= -1.6e-234)
tmp = t_1;
elseif (c <= 1.05e-115)
tmp = -27.0 * (j * k);
elseif (c <= 1.05e+118)
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[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.15e-41], N[(b * c), $MachinePrecision], If[LessEqual[c, -1.6e-234], t$95$1, If[LessEqual[c, 1.05e-115], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.05e+118], 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 := i \cdot \left(x \cdot -4\right)\\
\mathbf{if}\;c \leq -1.15 \cdot 10^{-41}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq -1.6 \cdot 10^{-234}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 1.05 \cdot 10^{-115}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;c \leq 1.05 \cdot 10^{+118}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if c < -1.15000000000000005e-41 or 1.05e118 < c Initial program 82.5%
Simplified83.6%
Taylor expanded in b around inf 42.7%
if -1.15000000000000005e-41 < c < -1.5999999999999999e-234 or 1.05000000000000001e-115 < c < 1.05e118Initial program 85.1%
Simplified85.2%
Taylor expanded in i around inf 32.5%
*-commutative32.5%
associate-*r*32.5%
Simplified32.5%
if -1.5999999999999999e-234 < c < 1.05000000000000001e-115Initial program 85.3%
Simplified85.5%
Taylor expanded in j around inf 34.1%
*-commutative34.1%
Simplified34.1%
Final simplification36.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -2.5e+80) (not (<= (* b c) 7.2e+128))) (- (* b c) (* 4.0 (* x i))) (- (* j (* k -27.0)) (* x (* 4.0 i)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -2.5e+80) || !((b * c) <= 7.2e+128)) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (j * (k * -27.0)) - (x * (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-2.5d+80)) .or. (.not. ((b * c) <= 7.2d+128))) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = (j * (k * (-27.0d0))) - (x * (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -2.5e+80) || !((b * c) <= 7.2e+128)) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (j * (k * -27.0)) - (x * (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -2.5e+80) or not ((b * c) <= 7.2e+128): tmp = (b * c) - (4.0 * (x * i)) else: tmp = (j * (k * -27.0)) - (x * (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -2.5e+80) || !(Float64(b * c) <= 7.2e+128)) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(j * Float64(k * -27.0)) - Float64(x * Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -2.5e+80) || ~(((b * c) <= 7.2e+128)))
tmp = (b * c) - (4.0 * (x * i));
else
tmp = (j * (k * -27.0)) - (x * (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -2.5e+80], N[Not[LessEqual[N[(b * c), $MachinePrecision], 7.2e+128]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2.5 \cdot 10^{+80} \lor \neg \left(b \cdot c \leq 7.2 \cdot 10^{+128}\right):\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) - x \cdot \left(4 \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -2.4999999999999998e80 or 7.20000000000000054e128 < (*.f64 b c) Initial program 83.3%
Simplified81.3%
Taylor expanded in t around 0 73.2%
Taylor expanded in j around 0 69.2%
if -2.4999999999999998e80 < (*.f64 b c) < 7.20000000000000054e128Initial program 84.6%
Simplified85.9%
Taylor expanded in t around 0 60.7%
Taylor expanded in b around 0 57.2%
mul-1-neg57.2%
neg-sub057.2%
+-commutative57.2%
associate-*r*57.2%
*-commutative57.2%
*-commutative57.2%
associate--r+57.2%
neg-sub057.2%
associate-*l*57.2%
distribute-rgt-neg-in57.2%
*-commutative57.2%
distribute-rgt-neg-in57.2%
metadata-eval57.2%
*-commutative57.2%
associate-*r*57.2%
Simplified57.2%
Final simplification61.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 (or (<= x -1.5e+138) (not (<= x 1.4e+51))) (* x (+ (* i -4.0) (* 18.0 (* t (* y z))))) (- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -1.5e+138) || !(x <= 1.4e+51)) {
tmp = x * ((i * -4.0) + (18.0 * (t * (y * z))));
} else {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-1.5d+138)) .or. (.not. (x <= 1.4d+51))) then
tmp = x * ((i * (-4.0d0)) + (18.0d0 * (t * (y * z))))
else
tmp = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -1.5e+138) || !(x <= 1.4e+51)) {
tmp = x * ((i * -4.0) + (18.0 * (t * (y * z))));
} else {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -1.5e+138) or not (x <= 1.4e+51): tmp = x * ((i * -4.0) + (18.0 * (t * (y * z)))) else: tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -1.5e+138) || !(x <= 1.4e+51)) tmp = Float64(x * Float64(Float64(i * -4.0) + Float64(18.0 * Float64(t * Float64(y * z))))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -1.5e+138) || ~((x <= 1.4e+51)))
tmp = x * ((i * -4.0) + (18.0 * (t * (y * z))));
else
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -1.5e+138], N[Not[LessEqual[x, 1.4e+51]], $MachinePrecision]], N[(x * N[(N[(i * -4.0), $MachinePrecision] + N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.5 \cdot 10^{+138} \lor \neg \left(x \leq 1.4 \cdot 10^{+51}\right):\\
\;\;\;\;x \cdot \left(i \cdot -4 + 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if x < -1.50000000000000005e138 or 1.40000000000000002e51 < x Initial program 68.6%
Simplified74.2%
Taylor expanded in x around inf 80.5%
if -1.50000000000000005e138 < x < 1.40000000000000002e51Initial program 92.3%
Taylor expanded in x around 0 74.5%
Final simplification76.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 (<= k -1.9e-33) (* k (* j -27.0)) (if (<= k 8e+239) (- (* b c) (* 4.0 (* x i))) (* j (* k -27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -1.9e-33) {
tmp = k * (j * -27.0);
} else if (k <= 8e+239) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (k <= (-1.9d-33)) then
tmp = k * (j * (-27.0d0))
else if (k <= 8d+239) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = j * (k * (-27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -1.9e-33) {
tmp = k * (j * -27.0);
} else if (k <= 8e+239) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if k <= -1.9e-33: tmp = k * (j * -27.0) elif k <= 8e+239: tmp = (b * c) - (4.0 * (x * i)) else: tmp = j * (k * -27.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -1.9e-33) tmp = Float64(k * Float64(j * -27.0)); elseif (k <= 8e+239) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(j * Float64(k * -27.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (k <= -1.9e-33)
tmp = k * (j * -27.0);
elseif (k <= 8e+239)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = j * (k * -27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -1.9e-33], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 8e+239], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(k * -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}\;k \leq -1.9 \cdot 10^{-33}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;k \leq 8 \cdot 10^{+239}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if k < -1.89999999999999997e-33Initial program 82.2%
Taylor expanded in x around 0 85.0%
associate--l+85.0%
cancel-sign-sub-inv85.0%
associate-*r*85.0%
fma-define85.0%
metadata-eval85.0%
*-commutative85.0%
Applied egg-rr85.0%
Taylor expanded in j around inf 35.4%
*-commutative35.4%
*-commutative35.4%
associate-*r*35.4%
Simplified35.4%
if -1.89999999999999997e-33 < k < 7.99999999999999993e239Initial program 84.0%
Simplified84.8%
Taylor expanded in t around 0 61.0%
Taylor expanded in j around 0 50.2%
if 7.99999999999999993e239 < k Initial program 93.6%
Simplified87.8%
Taylor expanded in j around inf 56.9%
metadata-eval56.9%
distribute-lft-neg-in56.9%
associate-*r*56.9%
*-commutative56.9%
associate-*r*56.9%
distribute-rgt-neg-in56.9%
*-commutative56.9%
distribute-rgt-neg-in56.9%
metadata-eval56.9%
Simplified56.9%
Final simplification46.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= c -8.5e-42) (not (<= c 1.26e+118))) (* b c) (* i (* x -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 ((c <= -8.5e-42) || !(c <= 1.26e+118)) {
tmp = b * c;
} else {
tmp = i * (x * -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 ((c <= (-8.5d-42)) .or. (.not. (c <= 1.26d+118))) then
tmp = b * c
else
tmp = i * (x * (-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 ((c <= -8.5e-42) || !(c <= 1.26e+118)) {
tmp = b * c;
} else {
tmp = i * (x * -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 (c <= -8.5e-42) or not (c <= 1.26e+118): tmp = b * c else: tmp = i * (x * -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 ((c <= -8.5e-42) || !(c <= 1.26e+118)) tmp = Float64(b * c); else tmp = Float64(i * Float64(x * -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 ((c <= -8.5e-42) || ~((c <= 1.26e+118)))
tmp = b * c;
else
tmp = i * (x * -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[Or[LessEqual[c, -8.5e-42], N[Not[LessEqual[c, 1.26e+118]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq -8.5 \cdot 10^{-42} \lor \neg \left(c \leq 1.26 \cdot 10^{+118}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right)\\
\end{array}
\end{array}
if c < -8.4999999999999996e-42 or 1.25999999999999996e118 < c Initial program 82.5%
Simplified83.6%
Taylor expanded in b around inf 42.7%
if -8.4999999999999996e-42 < c < 1.25999999999999996e118Initial program 85.2%
Simplified85.3%
Taylor expanded in i around inf 29.0%
*-commutative29.0%
associate-*r*29.0%
Simplified29.0%
Final simplification34.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* 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 84.1%
Simplified84.6%
Taylor expanded in b around inf 24.2%
Final simplification24.2%
(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 2024034
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:herbie-target
(if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))