
(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 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 INFINITY) t_1 (* x (- (* 4.0 (- i)) (* (* z (* y t)) -18.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * ((4.0 * -i) - ((z * (y * t)) * -18.0));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x * ((4.0 * -i) - ((z * (y * t)) * -18.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x * ((4.0 * -i) - ((z * (y * t)) * -18.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x * Float64(Float64(4.0 * Float64(-i)) - Float64(Float64(z * Float64(y * t)) * -18.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = x * ((4.0 * -i) - ((z * (y * t)) * -18.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x * N[(N[(4.0 * (-i)), $MachinePrecision] - N[(N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision] * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(4 \cdot \left(-i\right) - \left(z \cdot \left(y \cdot t\right)\right) \cdot -18\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 94.2%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Simplified11.1%
associate-*r*8.3%
distribute-rgt-out--0.0%
associate-+l-0.0%
associate-*l*2.8%
fmm-def8.3%
associate-*l*8.3%
*-commutative8.3%
Applied egg-rr8.3%
fmm-undef2.8%
*-commutative2.8%
associate-*r*2.8%
*-commutative2.8%
*-commutative2.8%
*-commutative2.8%
associate-*l*2.8%
*-commutative2.8%
*-commutative2.8%
Simplified2.8%
Taylor expanded in x around -inf 69.7%
associate-*r*69.7%
neg-mul-169.7%
cancel-sign-sub-inv69.7%
metadata-eval69.7%
*-commutative69.7%
*-commutative69.7%
associate-*r*67.0%
Simplified67.0%
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) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(* 4.0 (* x i))))
(t_2 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
(if (<= x -1.28e+126)
t_2
(if (<= x -8e-175)
t_1
(if (<= x 1.7e+99)
(- (- (* b c) (* 4.0 (+ (* t a) (* x i)))) (* (* j 27.0) k))
(if (<= x 2.75e+252) 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) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -1.28e+126) {
tmp = t_2;
} else if (x <= -8e-175) {
tmp = t_1;
} else if (x <= 1.7e+99) {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
} else if (x <= 2.75e+252) {
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) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - (4.0d0 * (x * i))
t_2 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
if (x <= (-1.28d+126)) then
tmp = t_2
else if (x <= (-8d-175)) then
tmp = t_1
else if (x <= 1.7d+99) then
tmp = ((b * c) - (4.0d0 * ((t * a) + (x * i)))) - ((j * 27.0d0) * k)
else if (x <= 2.75d+252) 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) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -1.28e+126) {
tmp = t_2;
} else if (x <= -8e-175) {
tmp = t_1;
} else if (x <= 1.7e+99) {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
} else if (x <= 2.75e+252) {
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) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i)) t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) tmp = 0 if x <= -1.28e+126: tmp = t_2 elif x <= -8e-175: tmp = t_1 elif x <= 1.7e+99: tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k) elif x <= 2.75e+252: 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(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - Float64(4.0 * Float64(x * i))) t_2 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) tmp = 0.0 if (x <= -1.28e+126) tmp = t_2; elseif (x <= -8e-175) tmp = t_1; elseif (x <= 1.7e+99) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))) - Float64(Float64(j * 27.0) * k)); elseif (x <= 2.75e+252) 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) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
tmp = 0.0;
if (x <= -1.28e+126)
tmp = t_2;
elseif (x <= -8e-175)
tmp = t_1;
elseif (x <= 1.7e+99)
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
elseif (x <= 2.75e+252)
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[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.28e+126], t$95$2, If[LessEqual[x, -8e-175], t$95$1, If[LessEqual[x, 1.7e+99], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.75e+252], 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 + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\
t_2 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -1.28 \cdot 10^{+126}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -8 \cdot 10^{-175}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{+99}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;x \leq 2.75 \cdot 10^{+252}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -1.27999999999999993e126 or 2.75000000000000007e252 < x Initial program 56.2%
Simplified59.7%
Taylor expanded in x around inf 80.2%
if -1.27999999999999993e126 < x < -8e-175 or 1.69999999999999992e99 < x < 2.75000000000000007e252Initial program 81.5%
Simplified85.6%
Taylor expanded in j around 0 83.6%
if -8e-175 < x < 1.69999999999999992e99Initial program 93.2%
Taylor expanded in y around 0 91.9%
distribute-lft-out91.9%
*-commutative91.9%
Simplified91.9%
Final simplification86.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= x -8.2e+87) (not (<= x 3.3e+248)))
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -8.2e+87) || !(x <= 3.3e+248)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-8.2d+87)) .or. (.not. (x <= 3.3d+248))) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -8.2e+87) || !(x <= 3.3e+248)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -8.2e+87) or not (x <= 3.3e+248): tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) else: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -8.2e+87) || !(x <= 3.3e+248)) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -8.2e+87) || ~((x <= 3.3e+248)))
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
else
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -8.2e+87], N[Not[LessEqual[x, 3.3e+248]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.2 \cdot 10^{+87} \lor \neg \left(x \leq 3.3 \cdot 10^{+248}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\end{array}
\end{array}
if x < -8.1999999999999998e87 or 3.3000000000000001e248 < x Initial program 57.0%
Simplified60.0%
Taylor expanded in x around inf 79.7%
if -8.1999999999999998e87 < x < 3.3000000000000001e248Initial program 88.7%
Simplified90.2%
Final simplification87.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -1.5e+122)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= x -2.3e-21)
(- (+ (* b c) (* 18.0 (* t (* x (* y z))))) (* 4.0 (* x i)))
(if (<= x 120000.0)
(- (+ (* b c) (* (* t a) -4.0)) (* 27.0 (* j k)))
(if (<= x 1.02e+102)
(* i (+ (* -27.0 (/ (* j k) i)) (* x -4.0)))
(* x (- (* 4.0 (- i)) (* (* z (* y t)) -18.0))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -1.5e+122) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (x <= -2.3e-21) {
tmp = ((b * c) + (18.0 * (t * (x * (y * z))))) - (4.0 * (x * i));
} else if (x <= 120000.0) {
tmp = ((b * c) + ((t * a) * -4.0)) - (27.0 * (j * k));
} else if (x <= 1.02e+102) {
tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0));
} else {
tmp = x * ((4.0 * -i) - ((z * (y * t)) * -18.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-1.5d+122)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (x <= (-2.3d-21)) then
tmp = ((b * c) + (18.0d0 * (t * (x * (y * z))))) - (4.0d0 * (x * i))
else if (x <= 120000.0d0) then
tmp = ((b * c) + ((t * a) * (-4.0d0))) - (27.0d0 * (j * k))
else if (x <= 1.02d+102) then
tmp = i * (((-27.0d0) * ((j * k) / i)) + (x * (-4.0d0)))
else
tmp = x * ((4.0d0 * -i) - ((z * (y * t)) * (-18.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -1.5e+122) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (x <= -2.3e-21) {
tmp = ((b * c) + (18.0 * (t * (x * (y * z))))) - (4.0 * (x * i));
} else if (x <= 120000.0) {
tmp = ((b * c) + ((t * a) * -4.0)) - (27.0 * (j * k));
} else if (x <= 1.02e+102) {
tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0));
} else {
tmp = x * ((4.0 * -i) - ((z * (y * t)) * -18.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -1.5e+122: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif x <= -2.3e-21: tmp = ((b * c) + (18.0 * (t * (x * (y * z))))) - (4.0 * (x * i)) elif x <= 120000.0: tmp = ((b * c) + ((t * a) * -4.0)) - (27.0 * (j * k)) elif x <= 1.02e+102: tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0)) else: tmp = x * ((4.0 * -i) - ((z * (y * t)) * -18.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -1.5e+122) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (x <= -2.3e-21) tmp = Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(t * Float64(x * Float64(y * z))))) - Float64(4.0 * Float64(x * i))); elseif (x <= 120000.0) tmp = Float64(Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)) - Float64(27.0 * Float64(j * k))); elseif (x <= 1.02e+102) tmp = Float64(i * Float64(Float64(-27.0 * Float64(Float64(j * k) / i)) + Float64(x * -4.0))); else tmp = Float64(x * Float64(Float64(4.0 * Float64(-i)) - Float64(Float64(z * Float64(y * t)) * -18.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -1.5e+122)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (x <= -2.3e-21)
tmp = ((b * c) + (18.0 * (t * (x * (y * z))))) - (4.0 * (x * i));
elseif (x <= 120000.0)
tmp = ((b * c) + ((t * a) * -4.0)) - (27.0 * (j * k));
elseif (x <= 1.02e+102)
tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0));
else
tmp = x * ((4.0 * -i) - ((z * (y * t)) * -18.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -1.5e+122], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.3e-21], N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 120000.0], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.02e+102], N[(i * N[(N[(-27.0 * N[(N[(j * k), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision] + N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(4.0 * (-i)), $MachinePrecision] - N[(N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision] * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.5 \cdot 10^{+122}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;x \leq -2.3 \cdot 10^{-21}:\\
\;\;\;\;\left(b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;x \leq 120000:\\
\;\;\;\;\left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 1.02 \cdot 10^{+102}:\\
\;\;\;\;i \cdot \left(-27 \cdot \frac{j \cdot k}{i} + x \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(4 \cdot \left(-i\right) - \left(z \cdot \left(y \cdot t\right)\right) \cdot -18\right)\\
\end{array}
\end{array}
if x < -1.49999999999999993e122Initial program 59.2%
Simplified63.9%
Taylor expanded in x around inf 78.6%
if -1.49999999999999993e122 < x < -2.29999999999999999e-21Initial program 77.4%
Simplified80.9%
Taylor expanded in j around 0 84.8%
Taylor expanded in a around 0 81.4%
if -2.29999999999999999e-21 < x < 1.2e5Initial program 93.3%
Simplified91.9%
Taylor expanded in x around 0 83.7%
if 1.2e5 < x < 1.01999999999999999e102Initial program 83.6%
Simplified94.4%
Taylor expanded in i around inf 83.6%
metadata-eval83.6%
distribute-lft-neg-in83.6%
*-commutative83.6%
associate-*r*83.6%
distribute-rgt-neg-in83.6%
distribute-rgt-neg-in83.6%
metadata-eval83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in i around inf 94.2%
if 1.01999999999999999e102 < x Initial program 69.5%
Simplified75.5%
associate-*r*71.5%
distribute-rgt-out--69.5%
associate-+l-69.5%
associate-*l*69.4%
fmm-def69.4%
associate-*l*69.4%
*-commutative69.4%
Applied egg-rr69.4%
fmm-undef69.4%
*-commutative69.4%
associate-*r*69.4%
*-commutative69.4%
*-commutative69.4%
*-commutative69.4%
associate-*l*69.4%
*-commutative69.4%
*-commutative69.4%
Simplified69.4%
Taylor expanded in x around -inf 68.4%
associate-*r*68.4%
neg-mul-168.4%
cancel-sign-sub-inv68.4%
metadata-eval68.4%
*-commutative68.4%
*-commutative68.4%
associate-*r*66.5%
Simplified66.5%
Final simplification80.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 (<= x -8.2e-66)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= x -9e-276)
(+ (* b c) t_1)
(if (<= x 7.5e-31)
(- t_1 (* 27.0 (* j k)))
(if (<= x 5.5e+99)
(* i (+ (* -27.0 (/ (* j k) i)) (* x -4.0)))
(* x (- (* 4.0 (- i)) (* (* z (* y t)) -18.0)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (t * a) * -4.0;
double tmp;
if (x <= -8.2e-66) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (x <= -9e-276) {
tmp = (b * c) + t_1;
} else if (x <= 7.5e-31) {
tmp = t_1 - (27.0 * (j * k));
} else if (x <= 5.5e+99) {
tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0));
} else {
tmp = x * ((4.0 * -i) - ((z * (y * t)) * -18.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (t * a) * (-4.0d0)
if (x <= (-8.2d-66)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (x <= (-9d-276)) then
tmp = (b * c) + t_1
else if (x <= 7.5d-31) then
tmp = t_1 - (27.0d0 * (j * k))
else if (x <= 5.5d+99) then
tmp = i * (((-27.0d0) * ((j * k) / i)) + (x * (-4.0d0)))
else
tmp = x * ((4.0d0 * -i) - ((z * (y * t)) * (-18.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (t * a) * -4.0;
double tmp;
if (x <= -8.2e-66) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (x <= -9e-276) {
tmp = (b * c) + t_1;
} else if (x <= 7.5e-31) {
tmp = t_1 - (27.0 * (j * k));
} else if (x <= 5.5e+99) {
tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0));
} else {
tmp = x * ((4.0 * -i) - ((z * (y * t)) * -18.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (t * a) * -4.0 tmp = 0 if x <= -8.2e-66: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif x <= -9e-276: tmp = (b * c) + t_1 elif x <= 7.5e-31: tmp = t_1 - (27.0 * (j * k)) elif x <= 5.5e+99: tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0)) else: tmp = x * ((4.0 * -i) - ((z * (y * t)) * -18.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(t * a) * -4.0) tmp = 0.0 if (x <= -8.2e-66) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (x <= -9e-276) tmp = Float64(Float64(b * c) + t_1); elseif (x <= 7.5e-31) tmp = Float64(t_1 - Float64(27.0 * Float64(j * k))); elseif (x <= 5.5e+99) tmp = Float64(i * Float64(Float64(-27.0 * Float64(Float64(j * k) / i)) + Float64(x * -4.0))); else tmp = Float64(x * Float64(Float64(4.0 * Float64(-i)) - Float64(Float64(z * Float64(y * t)) * -18.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (t * a) * -4.0;
tmp = 0.0;
if (x <= -8.2e-66)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (x <= -9e-276)
tmp = (b * c) + t_1;
elseif (x <= 7.5e-31)
tmp = t_1 - (27.0 * (j * k));
elseif (x <= 5.5e+99)
tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0));
else
tmp = x * ((4.0 * -i) - ((z * (y * t)) * -18.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]}, If[LessEqual[x, -8.2e-66], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -9e-276], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 7.5e-31], N[(t$95$1 - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.5e+99], N[(i * N[(N[(-27.0 * N[(N[(j * k), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision] + N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(4.0 * (-i)), $MachinePrecision] - N[(N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision] * -18.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(t \cdot a\right) \cdot -4\\
\mathbf{if}\;x \leq -8.2 \cdot 10^{-66}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;x \leq -9 \cdot 10^{-276}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{-31}:\\
\;\;\;\;t\_1 - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 5.5 \cdot 10^{+99}:\\
\;\;\;\;i \cdot \left(-27 \cdot \frac{j \cdot k}{i} + x \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(4 \cdot \left(-i\right) - \left(z \cdot \left(y \cdot t\right)\right) \cdot -18\right)\\
\end{array}
\end{array}
if x < -8.19999999999999996e-66Initial program 69.8%
Simplified73.4%
Taylor expanded in x around inf 67.6%
if -8.19999999999999996e-66 < x < -8.99999999999999925e-276Initial program 88.0%
Simplified86.0%
Taylor expanded in x around 0 87.2%
Taylor expanded in j around 0 80.2%
if -8.99999999999999925e-276 < x < 7.49999999999999975e-31Initial program 96.4%
Simplified94.8%
Taylor expanded in x around 0 89.6%
Taylor expanded in b around 0 67.5%
if 7.49999999999999975e-31 < x < 5.5000000000000002e99Initial program 89.5%
Simplified96.4%
Taylor expanded in i around inf 68.8%
metadata-eval68.8%
distribute-lft-neg-in68.8%
*-commutative68.8%
associate-*r*68.8%
distribute-rgt-neg-in68.8%
distribute-rgt-neg-in68.8%
metadata-eval68.8%
*-commutative68.8%
Simplified68.8%
Taylor expanded in i around inf 78.9%
if 5.5000000000000002e99 < x Initial program 69.5%
Simplified75.5%
associate-*r*71.5%
distribute-rgt-out--69.5%
associate-+l-69.5%
associate-*l*69.4%
fmm-def69.4%
associate-*l*69.4%
*-commutative69.4%
Applied egg-rr69.4%
fmm-undef69.4%
*-commutative69.4%
associate-*r*69.4%
*-commutative69.4%
*-commutative69.4%
*-commutative69.4%
associate-*l*69.4%
*-commutative69.4%
*-commutative69.4%
Simplified69.4%
Taylor expanded in x around -inf 68.4%
associate-*r*68.4%
neg-mul-168.4%
cancel-sign-sub-inv68.4%
metadata-eval68.4%
*-commutative68.4%
*-commutative68.4%
associate-*r*66.5%
Simplified66.5%
Final simplification70.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* t a) -4.0))
(t_2 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
(if (<= x -7.5e-66)
t_2
(if (<= x -4.2e-275)
(+ (* b c) t_1)
(if (<= x 8e-30)
(- t_1 (* 27.0 (* j k)))
(if (<= x 4.4e+98)
(* i (+ (* -27.0 (/ (* j k) i)) (* x -4.0)))
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 = (t * a) * -4.0;
double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -7.5e-66) {
tmp = t_2;
} else if (x <= -4.2e-275) {
tmp = (b * c) + t_1;
} else if (x <= 8e-30) {
tmp = t_1 - (27.0 * (j * k));
} else if (x <= 4.4e+98) {
tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0));
} 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 = (t * a) * (-4.0d0)
t_2 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
if (x <= (-7.5d-66)) then
tmp = t_2
else if (x <= (-4.2d-275)) then
tmp = (b * c) + t_1
else if (x <= 8d-30) then
tmp = t_1 - (27.0d0 * (j * k))
else if (x <= 4.4d+98) then
tmp = i * (((-27.0d0) * ((j * k) / i)) + (x * (-4.0d0)))
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 = (t * a) * -4.0;
double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -7.5e-66) {
tmp = t_2;
} else if (x <= -4.2e-275) {
tmp = (b * c) + t_1;
} else if (x <= 8e-30) {
tmp = t_1 - (27.0 * (j * k));
} else if (x <= 4.4e+98) {
tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0));
} 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 = (t * a) * -4.0 t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) tmp = 0 if x <= -7.5e-66: tmp = t_2 elif x <= -4.2e-275: tmp = (b * c) + t_1 elif x <= 8e-30: tmp = t_1 - (27.0 * (j * k)) elif x <= 4.4e+98: tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0)) 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(t * a) * -4.0) t_2 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) tmp = 0.0 if (x <= -7.5e-66) tmp = t_2; elseif (x <= -4.2e-275) tmp = Float64(Float64(b * c) + t_1); elseif (x <= 8e-30) tmp = Float64(t_1 - Float64(27.0 * Float64(j * k))); elseif (x <= 4.4e+98) tmp = Float64(i * Float64(Float64(-27.0 * Float64(Float64(j * k) / i)) + Float64(x * -4.0))); 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 = (t * a) * -4.0;
t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
tmp = 0.0;
if (x <= -7.5e-66)
tmp = t_2;
elseif (x <= -4.2e-275)
tmp = (b * c) + t_1;
elseif (x <= 8e-30)
tmp = t_1 - (27.0 * (j * k));
elseif (x <= 4.4e+98)
tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0));
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[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.5e-66], t$95$2, If[LessEqual[x, -4.2e-275], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 8e-30], N[(t$95$1 - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.4e+98], N[(i * N[(N[(-27.0 * N[(N[(j * k), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision] + N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(t \cdot a\right) \cdot -4\\
t_2 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -7.5 \cdot 10^{-66}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -4.2 \cdot 10^{-275}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;x \leq 8 \cdot 10^{-30}:\\
\;\;\;\;t\_1 - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{+98}:\\
\;\;\;\;i \cdot \left(-27 \cdot \frac{j \cdot k}{i} + x \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -7.49999999999999995e-66 or 4.40000000000000017e98 < x Initial program 69.6%
Simplified74.2%
Taylor expanded in x around inf 67.9%
if -7.49999999999999995e-66 < x < -4.19999999999999976e-275Initial program 88.0%
Simplified86.0%
Taylor expanded in x around 0 87.2%
Taylor expanded in j around 0 80.2%
if -4.19999999999999976e-275 < x < 8.000000000000001e-30Initial program 96.4%
Simplified94.8%
Taylor expanded in x around 0 89.6%
Taylor expanded in b around 0 67.5%
if 8.000000000000001e-30 < x < 4.40000000000000017e98Initial program 89.5%
Simplified96.4%
Taylor expanded in i around inf 68.8%
metadata-eval68.8%
distribute-lft-neg-in68.8%
*-commutative68.8%
associate-*r*68.8%
distribute-rgt-neg-in68.8%
distribute-rgt-neg-in68.8%
metadata-eval68.8%
*-commutative68.8%
Simplified68.8%
Taylor expanded in i around inf 78.9%
Final simplification71.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 4.0 (+ (* t a) (* x i)))) (t_2 (* (* j 27.0) k)))
(if (<= z -1.02e-31)
(- (- (* 18.0 (* (* y z) (* x t))) t_1) t_2)
(if (<= z 1.38e+70)
(- (- (* b c) t_1) t_2)
(-
(+ (* b c) (* t (- (* 18.0 (* z (* x y))) (* a 4.0))))
(* 4.0 (* x i)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * ((t * a) + (x * i));
double t_2 = (j * 27.0) * k;
double tmp;
if (z <= -1.02e-31) {
tmp = ((18.0 * ((y * z) * (x * t))) - t_1) - t_2;
} else if (z <= 1.38e+70) {
tmp = ((b * c) - t_1) - t_2;
} else {
tmp = ((b * c) + (t * ((18.0 * (z * (x * y))) - (a * 4.0)))) - (4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 4.0d0 * ((t * a) + (x * i))
t_2 = (j * 27.0d0) * k
if (z <= (-1.02d-31)) then
tmp = ((18.0d0 * ((y * z) * (x * t))) - t_1) - t_2
else if (z <= 1.38d+70) then
tmp = ((b * c) - t_1) - t_2
else
tmp = ((b * c) + (t * ((18.0d0 * (z * (x * y))) - (a * 4.0d0)))) - (4.0d0 * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * ((t * a) + (x * i));
double t_2 = (j * 27.0) * k;
double tmp;
if (z <= -1.02e-31) {
tmp = ((18.0 * ((y * z) * (x * t))) - t_1) - t_2;
} else if (z <= 1.38e+70) {
tmp = ((b * c) - t_1) - t_2;
} else {
tmp = ((b * c) + (t * ((18.0 * (z * (x * y))) - (a * 4.0)))) - (4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * ((t * a) + (x * i)) t_2 = (j * 27.0) * k tmp = 0 if z <= -1.02e-31: tmp = ((18.0 * ((y * z) * (x * t))) - t_1) - t_2 elif z <= 1.38e+70: tmp = ((b * c) - t_1) - t_2 else: tmp = ((b * c) + (t * ((18.0 * (z * (x * y))) - (a * 4.0)))) - (4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(Float64(t * a) + Float64(x * i))) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (z <= -1.02e-31) tmp = Float64(Float64(Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))) - t_1) - t_2); elseif (z <= 1.38e+70) tmp = Float64(Float64(Float64(b * c) - t_1) - t_2); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) - Float64(a * 4.0)))) - Float64(4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 4.0 * ((t * a) + (x * i));
t_2 = (j * 27.0) * k;
tmp = 0.0;
if (z <= -1.02e-31)
tmp = ((18.0 * ((y * z) * (x * t))) - t_1) - t_2;
elseif (z <= 1.38e+70)
tmp = ((b * c) - t_1) - t_2;
else
tmp = ((b * c) + (t * ((18.0 * (z * (x * y))) - (a * 4.0)))) - (4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[z, -1.02e-31], N[(N[(N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[z, 1.38e+70], N[(N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(t \cdot a + x \cdot i\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;z \leq -1.02 \cdot 10^{-31}:\\
\;\;\;\;\left(18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right) - t\_1\right) - t\_2\\
\mathbf{elif}\;z \leq 1.38 \cdot 10^{+70}:\\
\;\;\;\;\left(b \cdot c - t\_1\right) - t\_2\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if z < -1.01999999999999999e-31Initial program 81.3%
Taylor expanded in b around 0 71.1%
associate-*r*72.3%
distribute-lft-out72.3%
*-commutative72.3%
Simplified72.3%
if -1.01999999999999999e-31 < z < 1.38e70Initial program 83.1%
Taylor expanded in y around 0 88.1%
distribute-lft-out88.1%
*-commutative88.1%
Simplified88.1%
if 1.38e70 < z Initial program 73.5%
Simplified68.8%
Taylor expanded in j around 0 69.0%
pow169.0%
associate-*r*69.0%
Applied egg-rr69.0%
unpow169.0%
associate-*r*69.0%
associate-*r*76.0%
Simplified76.0%
Final simplification81.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -1e+103)
(* b (+ c (* -4.0 (* i (/ x b)))))
(if (<= (* b c) -1e-315)
(* i (+ (* -27.0 (/ (* j k) i)) (* x -4.0)))
(if (<= (* b c) 2e+153)
(* (+ (* t a) (* x i)) -4.0)
(* c (+ b (* -27.0 (* j (/ k c)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1e+103) {
tmp = b * (c + (-4.0 * (i * (x / b))));
} else if ((b * c) <= -1e-315) {
tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0));
} else if ((b * c) <= 2e+153) {
tmp = ((t * a) + (x * i)) * -4.0;
} else {
tmp = c * (b + (-27.0 * (j * (k / c))));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-1d+103)) then
tmp = b * (c + ((-4.0d0) * (i * (x / b))))
else if ((b * c) <= (-1d-315)) then
tmp = i * (((-27.0d0) * ((j * k) / i)) + (x * (-4.0d0)))
else if ((b * c) <= 2d+153) then
tmp = ((t * a) + (x * i)) * (-4.0d0)
else
tmp = c * (b + ((-27.0d0) * (j * (k / c))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1e+103) {
tmp = b * (c + (-4.0 * (i * (x / b))));
} else if ((b * c) <= -1e-315) {
tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0));
} else if ((b * c) <= 2e+153) {
tmp = ((t * a) + (x * i)) * -4.0;
} else {
tmp = c * (b + (-27.0 * (j * (k / c))));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -1e+103: tmp = b * (c + (-4.0 * (i * (x / b)))) elif (b * c) <= -1e-315: tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0)) elif (b * c) <= 2e+153: tmp = ((t * a) + (x * i)) * -4.0 else: tmp = c * (b + (-27.0 * (j * (k / c)))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -1e+103) tmp = Float64(b * Float64(c + Float64(-4.0 * Float64(i * Float64(x / b))))); elseif (Float64(b * c) <= -1e-315) tmp = Float64(i * Float64(Float64(-27.0 * Float64(Float64(j * k) / i)) + Float64(x * -4.0))); elseif (Float64(b * c) <= 2e+153) tmp = Float64(Float64(Float64(t * a) + Float64(x * i)) * -4.0); else tmp = Float64(c * Float64(b + Float64(-27.0 * Float64(j * Float64(k / c))))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -1e+103)
tmp = b * (c + (-4.0 * (i * (x / b))));
elseif ((b * c) <= -1e-315)
tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0));
elseif ((b * c) <= 2e+153)
tmp = ((t * a) + (x * i)) * -4.0;
else
tmp = c * (b + (-27.0 * (j * (k / c))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -1e+103], N[(b * N[(c + N[(-4.0 * N[(i * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1e-315], N[(i * N[(N[(-27.0 * N[(N[(j * k), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision] + N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e+153], N[(N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision], N[(c * N[(b + N[(-27.0 * N[(j * N[(k / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1 \cdot 10^{+103}:\\
\;\;\;\;b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\
\mathbf{elif}\;b \cdot c \leq -1 \cdot 10^{-315}:\\
\;\;\;\;i \cdot \left(-27 \cdot \frac{j \cdot k}{i} + x \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+153}:\\
\;\;\;\;\left(t \cdot a + x \cdot i\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(b + -27 \cdot \left(j \cdot \frac{k}{c}\right)\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1e103Initial program 81.1%
Simplified82.9%
Taylor expanded in j around 0 79.5%
Taylor expanded in t around 0 64.4%
Taylor expanded in b around inf 67.9%
associate-/l*67.9%
Simplified67.9%
if -1e103 < (*.f64 b c) < -9.999999985e-316Initial program 86.0%
Simplified87.5%
Taylor expanded in i around inf 60.7%
metadata-eval60.7%
distribute-lft-neg-in60.7%
*-commutative60.7%
associate-*r*60.7%
distribute-rgt-neg-in60.7%
distribute-rgt-neg-in60.7%
metadata-eval60.7%
*-commutative60.7%
Simplified60.7%
Taylor expanded in i around inf 65.0%
if -9.999999985e-316 < (*.f64 b c) < 2e153Initial program 80.9%
Simplified83.7%
Taylor expanded in j around 0 71.9%
Taylor expanded in y around 0 63.7%
Taylor expanded in b around 0 57.9%
*-commutative57.9%
cancel-sign-sub-inv57.9%
metadata-eval57.9%
distribute-lft-out57.9%
*-commutative57.9%
Simplified57.9%
if 2e153 < (*.f64 b c) Initial program 70.9%
Simplified70.9%
Taylor expanded in x around 0 64.9%
Taylor expanded in a around 0 65.1%
Taylor expanded in c around inf 65.1%
associate-/l*68.3%
Simplified68.3%
Final simplification63.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 (<= x -1.15e+26)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (or (<= x -5.8e-191) (not (<= x 2e-209)))
(- (+ (* b c) (* (* t a) -4.0)) (* 4.0 (* x i)))
(- (* b c) (* 27.0 (* j k))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -1.15e+26) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if ((x <= -5.8e-191) || !(x <= 2e-209)) {
tmp = ((b * c) + ((t * a) * -4.0)) - (4.0 * (x * i));
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-1.15d+26)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if ((x <= (-5.8d-191)) .or. (.not. (x <= 2d-209))) then
tmp = ((b * c) + ((t * a) * (-4.0d0))) - (4.0d0 * (x * i))
else
tmp = (b * c) - (27.0d0 * (j * k))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -1.15e+26) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if ((x <= -5.8e-191) || !(x <= 2e-209)) {
tmp = ((b * c) + ((t * a) * -4.0)) - (4.0 * (x * i));
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -1.15e+26: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif (x <= -5.8e-191) or not (x <= 2e-209): tmp = ((b * c) + ((t * a) * -4.0)) - (4.0 * (x * i)) else: tmp = (b * c) - (27.0 * (j * k)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -1.15e+26) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif ((x <= -5.8e-191) || !(x <= 2e-209)) tmp = Float64(Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -1.15e+26)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif ((x <= -5.8e-191) || ~((x <= 2e-209)))
tmp = ((b * c) + ((t * a) * -4.0)) - (4.0 * (x * i));
else
tmp = (b * c) - (27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -1.15e+26], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -5.8e-191], N[Not[LessEqual[x, 2e-209]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.15 \cdot 10^{+26}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;x \leq -5.8 \cdot 10^{-191} \lor \neg \left(x \leq 2 \cdot 10^{-209}\right):\\
\;\;\;\;\left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if x < -1.15e26Initial program 65.0%
Simplified68.1%
Taylor expanded in x around inf 73.4%
if -1.15e26 < x < -5.7999999999999999e-191 or 2.0000000000000001e-209 < x Initial program 84.9%
Simplified87.5%
Taylor expanded in j around 0 78.9%
Taylor expanded in y around 0 69.0%
if -5.7999999999999999e-191 < x < 2.0000000000000001e-209Initial program 90.2%
Simplified88.2%
Taylor expanded in x around 0 94.1%
Taylor expanded in a around 0 79.9%
Final simplification71.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= x -1.25e+101) (not (<= x 1.6e+246))) (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))) (- (- (* b c) (* 4.0 (+ (* t a) (* x i)))) (* (* j 27.0) k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -1.25e+101) || !(x <= 1.6e+246)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-1.25d+101)) .or. (.not. (x <= 1.6d+246))) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else
tmp = ((b * c) - (4.0d0 * ((t * a) + (x * i)))) - ((j * 27.0d0) * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -1.25e+101) || !(x <= 1.6e+246)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -1.25e+101) or not (x <= 1.6e+246): tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) else: tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -1.25e+101) || !(x <= 1.6e+246)) tmp = 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(Float64(t * a) + Float64(x * i)))) - Float64(Float64(j * 27.0) * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -1.25e+101) || ~((x <= 1.6e+246)))
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
else
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -1.25e+101], N[Not[LessEqual[x, 1.6e+246]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 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.25 \cdot 10^{+101} \lor \neg \left(x \leq 1.6 \cdot 10^{+246}\right):\\
\;\;\;\;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 + x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if x < -1.24999999999999997e101 or 1.60000000000000007e246 < x Initial program 57.2%
Simplified60.4%
Taylor expanded in x around inf 80.6%
if -1.24999999999999997e101 < x < 1.60000000000000007e246Initial program 88.3%
Taylor expanded in y around 0 82.4%
distribute-lft-out82.4%
*-commutative82.4%
Simplified82.4%
Final simplification82.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -4.9e-22)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= x 230000.0)
(- (+ (* b c) (* (* t a) -4.0)) (* 27.0 (* j k)))
(if (<= x 1.25e+99)
(* i (+ (* -27.0 (/ (* j k) i)) (* x -4.0)))
(* x (- (* 4.0 (- i)) (* (* z (* y t)) -18.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -4.9e-22) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (x <= 230000.0) {
tmp = ((b * c) + ((t * a) * -4.0)) - (27.0 * (j * k));
} else if (x <= 1.25e+99) {
tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0));
} else {
tmp = x * ((4.0 * -i) - ((z * (y * t)) * -18.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-4.9d-22)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (x <= 230000.0d0) then
tmp = ((b * c) + ((t * a) * (-4.0d0))) - (27.0d0 * (j * k))
else if (x <= 1.25d+99) then
tmp = i * (((-27.0d0) * ((j * k) / i)) + (x * (-4.0d0)))
else
tmp = x * ((4.0d0 * -i) - ((z * (y * t)) * (-18.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -4.9e-22) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (x <= 230000.0) {
tmp = ((b * c) + ((t * a) * -4.0)) - (27.0 * (j * k));
} else if (x <= 1.25e+99) {
tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0));
} else {
tmp = x * ((4.0 * -i) - ((z * (y * t)) * -18.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -4.9e-22: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif x <= 230000.0: tmp = ((b * c) + ((t * a) * -4.0)) - (27.0 * (j * k)) elif x <= 1.25e+99: tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0)) else: tmp = x * ((4.0 * -i) - ((z * (y * t)) * -18.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -4.9e-22) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (x <= 230000.0) tmp = Float64(Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)) - Float64(27.0 * Float64(j * k))); elseif (x <= 1.25e+99) tmp = Float64(i * Float64(Float64(-27.0 * Float64(Float64(j * k) / i)) + Float64(x * -4.0))); else tmp = Float64(x * Float64(Float64(4.0 * Float64(-i)) - Float64(Float64(z * Float64(y * t)) * -18.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -4.9e-22)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (x <= 230000.0)
tmp = ((b * c) + ((t * a) * -4.0)) - (27.0 * (j * k));
elseif (x <= 1.25e+99)
tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0));
else
tmp = x * ((4.0 * -i) - ((z * (y * t)) * -18.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -4.9e-22], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 230000.0], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.25e+99], N[(i * N[(N[(-27.0 * N[(N[(j * k), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision] + N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(4.0 * (-i)), $MachinePrecision] - N[(N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision] * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.9 \cdot 10^{-22}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;x \leq 230000:\\
\;\;\;\;\left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{+99}:\\
\;\;\;\;i \cdot \left(-27 \cdot \frac{j \cdot k}{i} + x \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(4 \cdot \left(-i\right) - \left(z \cdot \left(y \cdot t\right)\right) \cdot -18\right)\\
\end{array}
\end{array}
if x < -4.8999999999999998e-22Initial program 66.3%
Simplified70.5%
Taylor expanded in x around inf 72.4%
if -4.8999999999999998e-22 < x < 2.3e5Initial program 93.3%
Simplified91.9%
Taylor expanded in x around 0 83.7%
if 2.3e5 < x < 1.25000000000000002e99Initial program 83.6%
Simplified94.4%
Taylor expanded in i around inf 83.6%
metadata-eval83.6%
distribute-lft-neg-in83.6%
*-commutative83.6%
associate-*r*83.6%
distribute-rgt-neg-in83.6%
distribute-rgt-neg-in83.6%
metadata-eval83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in i around inf 94.2%
if 1.25000000000000002e99 < x Initial program 69.5%
Simplified75.5%
associate-*r*71.5%
distribute-rgt-out--69.5%
associate-+l-69.5%
associate-*l*69.4%
fmm-def69.4%
associate-*l*69.4%
*-commutative69.4%
Applied egg-rr69.4%
fmm-undef69.4%
*-commutative69.4%
associate-*r*69.4%
*-commutative69.4%
*-commutative69.4%
*-commutative69.4%
associate-*l*69.4%
*-commutative69.4%
*-commutative69.4%
Simplified69.4%
Taylor expanded in x around -inf 68.4%
associate-*r*68.4%
neg-mul-168.4%
cancel-sign-sub-inv68.4%
metadata-eval68.4%
*-commutative68.4%
*-commutative68.4%
associate-*r*66.5%
Simplified66.5%
Final simplification78.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (- (* 18.0 (* z (* x y))) (* a 4.0)))))
(if (<= t -1.05e+68)
t_1
(if (<= t -1.2e-55)
(- (* b c) (* 27.0 (* j k)))
(if (<= t 1700000000.0) (- (* b c) (* 4.0 (* x i))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (z * (x * y))) - (a * 4.0));
double tmp;
if (t <= -1.05e+68) {
tmp = t_1;
} else if (t <= -1.2e-55) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t <= 1700000000.0) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 * ((18.0d0 * (z * (x * y))) - (a * 4.0d0))
if (t <= (-1.05d+68)) then
tmp = t_1
else if (t <= (-1.2d-55)) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (t <= 1700000000.0d0) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (z * (x * y))) - (a * 4.0));
double tmp;
if (t <= -1.05e+68) {
tmp = t_1;
} else if (t <= -1.2e-55) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t <= 1700000000.0) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (z * (x * y))) - (a * 4.0)) tmp = 0 if t <= -1.05e+68: tmp = t_1 elif t <= -1.2e-55: tmp = (b * c) - (27.0 * (j * k)) elif t <= 1700000000.0: tmp = (b * c) - (4.0 * (x * i)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -1.05e+68) tmp = t_1; elseif (t <= -1.2e-55) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (t <= 1700000000.0) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * ((18.0 * (z * (x * y))) - (a * 4.0));
tmp = 0.0;
if (t <= -1.05e+68)
tmp = t_1;
elseif (t <= -1.2e-55)
tmp = (b * c) - (27.0 * (j * k));
elseif (t <= 1700000000.0)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.05e+68], t$95$1, If[LessEqual[t, -1.2e-55], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1700000000.0], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1.05 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.2 \cdot 10^{-55}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq 1700000000:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.05e68 or 1.7e9 < t Initial program 78.1%
Simplified80.7%
Taylor expanded in t around inf 67.1%
pow178.5%
associate-*r*78.5%
Applied egg-rr67.1%
unpow178.5%
associate-*r*78.5%
associate-*r*78.4%
Simplified67.2%
if -1.05e68 < t < -1.19999999999999996e-55Initial program 99.7%
Simplified99.8%
Taylor expanded in x around 0 69.5%
Taylor expanded in a around 0 65.8%
if -1.19999999999999996e-55 < t < 1.7e9Initial program 79.3%
Simplified81.0%
Taylor expanded in j around 0 65.9%
Taylor expanded in t around 0 60.3%
Final simplification64.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -1.75e+70)
t_1
(if (<= t -8.2e-54)
(- (* b c) (* 27.0 (* j k)))
(if (<= t 150000000000.0) (- (* b c) (* 4.0 (* x i))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -1.75e+70) {
tmp = t_1;
} else if (t <= -8.2e-54) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t <= 150000000000.0) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-1.75d+70)) then
tmp = t_1
else if (t <= (-8.2d-54)) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (t <= 150000000000.0d0) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -1.75e+70) {
tmp = t_1;
} else if (t <= -8.2e-54) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t <= 150000000000.0) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -1.75e+70: tmp = t_1 elif t <= -8.2e-54: tmp = (b * c) - (27.0 * (j * k)) elif t <= 150000000000.0: tmp = (b * c) - (4.0 * (x * i)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -1.75e+70) tmp = t_1; elseif (t <= -8.2e-54) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (t <= 150000000000.0) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -1.75e+70)
tmp = t_1;
elseif (t <= -8.2e-54)
tmp = (b * c) - (27.0 * (j * k));
elseif (t <= 150000000000.0)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.75e+70], t$95$1, If[LessEqual[t, -8.2e-54], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 150000000000.0], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1.75 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -8.2 \cdot 10^{-54}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq 150000000000:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.75000000000000001e70 or 1.5e11 < t Initial program 78.1%
Simplified80.7%
Taylor expanded in t around inf 67.1%
if -1.75000000000000001e70 < t < -8.2000000000000001e-54Initial program 99.7%
Simplified99.8%
Taylor expanded in x around 0 69.5%
Taylor expanded in a around 0 65.8%
if -8.2000000000000001e-54 < t < 1.5e11Initial program 79.3%
Simplified81.0%
Taylor expanded in j around 0 65.9%
Taylor expanded in t around 0 60.3%
Final simplification63.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= z 1.6e+70) (- (- (* b c) (* 4.0 (+ (* t a) (* x i)))) (* (* j 27.0) k)) (- (+ (* b c) (* t (- (* 18.0 (* z (* x y))) (* a 4.0)))) (* 4.0 (* x i)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= 1.6e+70) {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
} else {
tmp = ((b * c) + (t * ((18.0 * (z * (x * y))) - (a * 4.0)))) - (4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (z <= 1.6d+70) then
tmp = ((b * c) - (4.0d0 * ((t * a) + (x * i)))) - ((j * 27.0d0) * k)
else
tmp = ((b * c) + (t * ((18.0d0 * (z * (x * y))) - (a * 4.0d0)))) - (4.0d0 * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= 1.6e+70) {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
} else {
tmp = ((b * c) + (t * ((18.0 * (z * (x * y))) - (a * 4.0)))) - (4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if z <= 1.6e+70: tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k) else: tmp = ((b * c) + (t * ((18.0 * (z * (x * y))) - (a * 4.0)))) - (4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (z <= 1.6e+70) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) - Float64(a * 4.0)))) - Float64(4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (z <= 1.6e+70)
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
else
tmp = ((b * c) + (t * ((18.0 * (z * (x * y))) - (a * 4.0)))) - (4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[z, 1.6e+70], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.6 \cdot 10^{+70}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if z < 1.6000000000000001e70Initial program 82.4%
Taylor expanded in y around 0 80.9%
distribute-lft-out80.9%
*-commutative80.9%
Simplified80.9%
if 1.6000000000000001e70 < z Initial program 73.5%
Simplified68.8%
Taylor expanded in j around 0 69.0%
pow169.0%
associate-*r*69.0%
Applied egg-rr69.0%
unpow169.0%
associate-*r*69.0%
associate-*r*76.0%
Simplified76.0%
Final simplification80.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* x i) -4.0)))
(if (<= x -5e+56)
t_1
(if (<= x -1.55e-274)
(* b c)
(if (<= x 2.05e-209)
(* (* j k) -27.0)
(if (<= x 2.2e-31) (* t (* a -4.0)) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * i) * -4.0;
double tmp;
if (x <= -5e+56) {
tmp = t_1;
} else if (x <= -1.55e-274) {
tmp = b * c;
} else if (x <= 2.05e-209) {
tmp = (j * k) * -27.0;
} else if (x <= 2.2e-31) {
tmp = t * (a * -4.0);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (x * i) * (-4.0d0)
if (x <= (-5d+56)) then
tmp = t_1
else if (x <= (-1.55d-274)) then
tmp = b * c
else if (x <= 2.05d-209) then
tmp = (j * k) * (-27.0d0)
else if (x <= 2.2d-31) then
tmp = t * (a * (-4.0d0))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * i) * -4.0;
double tmp;
if (x <= -5e+56) {
tmp = t_1;
} else if (x <= -1.55e-274) {
tmp = b * c;
} else if (x <= 2.05e-209) {
tmp = (j * k) * -27.0;
} else if (x <= 2.2e-31) {
tmp = t * (a * -4.0);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (x * i) * -4.0 tmp = 0 if x <= -5e+56: tmp = t_1 elif x <= -1.55e-274: tmp = b * c elif x <= 2.05e-209: tmp = (j * k) * -27.0 elif x <= 2.2e-31: tmp = t * (a * -4.0) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(x * i) * -4.0) tmp = 0.0 if (x <= -5e+56) tmp = t_1; elseif (x <= -1.55e-274) tmp = Float64(b * c); elseif (x <= 2.05e-209) tmp = Float64(Float64(j * k) * -27.0); elseif (x <= 2.2e-31) tmp = Float64(t * Float64(a * -4.0)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (x * i) * -4.0;
tmp = 0.0;
if (x <= -5e+56)
tmp = t_1;
elseif (x <= -1.55e-274)
tmp = b * c;
elseif (x <= 2.05e-209)
tmp = (j * k) * -27.0;
elseif (x <= 2.2e-31)
tmp = t * (a * -4.0);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision]}, If[LessEqual[x, -5e+56], t$95$1, If[LessEqual[x, -1.55e-274], N[(b * c), $MachinePrecision], If[LessEqual[x, 2.05e-209], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[x, 2.2e-31], N[(t * N[(a * -4.0), $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 := \left(x \cdot i\right) \cdot -4\\
\mathbf{if}\;x \leq -5 \cdot 10^{+56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.55 \cdot 10^{-274}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;x \leq 2.05 \cdot 10^{-209}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-31}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -5.00000000000000024e56 or 2.2000000000000001e-31 < x Initial program 71.4%
Simplified75.7%
Taylor expanded in j around 0 71.1%
Taylor expanded in t around 0 53.5%
Taylor expanded in b around 0 43.8%
*-commutative43.8%
Simplified43.8%
if -5.00000000000000024e56 < x < -1.54999999999999989e-274Initial program 87.2%
Simplified87.3%
associate-*r*88.8%
distribute-rgt-out--87.2%
associate-+l-87.2%
associate-*l*79.3%
fmm-def80.9%
associate-*l*80.9%
*-commutative80.9%
Applied egg-rr80.9%
fmm-undef79.3%
*-commutative79.3%
associate-*r*79.3%
*-commutative79.3%
*-commutative79.3%
*-commutative79.3%
associate-*l*79.3%
*-commutative79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in b around inf 43.8%
if -1.54999999999999989e-274 < x < 2.04999999999999989e-209Initial program 92.5%
Simplified92.5%
Taylor expanded in j around inf 54.6%
if 2.04999999999999989e-209 < x < 2.2000000000000001e-31Initial program 99.9%
Simplified96.8%
associate-*r*99.9%
distribute-rgt-out--99.9%
associate-+l-99.9%
associate-*l*93.4%
fmm-def93.4%
associate-*l*93.4%
*-commutative93.4%
Applied egg-rr93.4%
fmm-undef93.4%
*-commutative93.4%
associate-*r*93.4%
*-commutative93.4%
*-commutative93.4%
*-commutative93.4%
associate-*l*93.4%
*-commutative93.4%
*-commutative93.4%
Simplified93.4%
Taylor expanded in a around inf 43.4%
associate-*r*43.4%
Simplified43.4%
Final simplification45.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -2.2e-41)
(* b (+ c (* -4.0 (* i (/ x b)))))
(if (<= x -2.15e-193)
(+ (* b c) (* (* t a) -4.0))
(if (<= x 7.8e-122)
(- (* b c) (* 27.0 (* j k)))
(* (+ (* t a) (* x i)) -4.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -2.2e-41) {
tmp = b * (c + (-4.0 * (i * (x / b))));
} else if (x <= -2.15e-193) {
tmp = (b * c) + ((t * a) * -4.0);
} else if (x <= 7.8e-122) {
tmp = (b * c) - (27.0 * (j * k));
} else {
tmp = ((t * a) + (x * i)) * -4.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-2.2d-41)) then
tmp = b * (c + ((-4.0d0) * (i * (x / b))))
else if (x <= (-2.15d-193)) then
tmp = (b * c) + ((t * a) * (-4.0d0))
else if (x <= 7.8d-122) then
tmp = (b * c) - (27.0d0 * (j * k))
else
tmp = ((t * a) + (x * i)) * (-4.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -2.2e-41) {
tmp = b * (c + (-4.0 * (i * (x / b))));
} else if (x <= -2.15e-193) {
tmp = (b * c) + ((t * a) * -4.0);
} else if (x <= 7.8e-122) {
tmp = (b * c) - (27.0 * (j * k));
} else {
tmp = ((t * a) + (x * i)) * -4.0;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -2.2e-41: tmp = b * (c + (-4.0 * (i * (x / b)))) elif x <= -2.15e-193: tmp = (b * c) + ((t * a) * -4.0) elif x <= 7.8e-122: tmp = (b * c) - (27.0 * (j * k)) else: tmp = ((t * a) + (x * i)) * -4.0 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -2.2e-41) tmp = Float64(b * Float64(c + Float64(-4.0 * Float64(i * Float64(x / b))))); elseif (x <= -2.15e-193) tmp = Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)); elseif (x <= 7.8e-122) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); else tmp = Float64(Float64(Float64(t * a) + Float64(x * i)) * -4.0); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -2.2e-41)
tmp = b * (c + (-4.0 * (i * (x / b))));
elseif (x <= -2.15e-193)
tmp = (b * c) + ((t * a) * -4.0);
elseif (x <= 7.8e-122)
tmp = (b * c) - (27.0 * (j * k));
else
tmp = ((t * a) + (x * i)) * -4.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -2.2e-41], N[(b * N[(c + N[(-4.0 * N[(i * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.15e-193], N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.8e-122], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{-41}:\\
\;\;\;\;b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\
\mathbf{elif}\;x \leq -2.15 \cdot 10^{-193}:\\
\;\;\;\;b \cdot c + \left(t \cdot a\right) \cdot -4\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{-122}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot a + x \cdot i\right) \cdot -4\\
\end{array}
\end{array}
if x < -2.2e-41Initial program 68.6%
Simplified73.6%
Taylor expanded in j around 0 68.6%
Taylor expanded in t around 0 49.1%
Taylor expanded in b around inf 46.6%
associate-/l*47.8%
Simplified47.8%
if -2.2e-41 < x < -2.1500000000000001e-193Initial program 90.3%
Simplified87.1%
Taylor expanded in x around 0 77.4%
Taylor expanded in j around 0 74.1%
if -2.1500000000000001e-193 < x < 7.79999999999999979e-122Initial program 92.5%
Simplified89.4%
Taylor expanded in x around 0 93.8%
Taylor expanded in a around 0 74.2%
if 7.79999999999999979e-122 < x Initial program 80.9%
Simplified85.1%
Taylor expanded in j around 0 77.4%
Taylor expanded in y around 0 68.7%
Taylor expanded in b around 0 59.4%
*-commutative59.4%
cancel-sign-sub-inv59.4%
metadata-eval59.4%
distribute-lft-out59.4%
*-commutative59.4%
Simplified59.4%
Final simplification61.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -5.8e+63)
(- (* b c) (* 4.0 (* x i)))
(if (<= x -2.25e-191)
(+ (* b c) (* (* t a) -4.0))
(if (<= x 1.95e-116)
(- (* b c) (* 27.0 (* j k)))
(* (+ (* t a) (* x i)) -4.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -5.8e+63) {
tmp = (b * c) - (4.0 * (x * i));
} else if (x <= -2.25e-191) {
tmp = (b * c) + ((t * a) * -4.0);
} else if (x <= 1.95e-116) {
tmp = (b * c) - (27.0 * (j * k));
} else {
tmp = ((t * a) + (x * i)) * -4.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-5.8d+63)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (x <= (-2.25d-191)) then
tmp = (b * c) + ((t * a) * (-4.0d0))
else if (x <= 1.95d-116) then
tmp = (b * c) - (27.0d0 * (j * k))
else
tmp = ((t * a) + (x * i)) * (-4.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -5.8e+63) {
tmp = (b * c) - (4.0 * (x * i));
} else if (x <= -2.25e-191) {
tmp = (b * c) + ((t * a) * -4.0);
} else if (x <= 1.95e-116) {
tmp = (b * c) - (27.0 * (j * k));
} else {
tmp = ((t * a) + (x * i)) * -4.0;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -5.8e+63: tmp = (b * c) - (4.0 * (x * i)) elif x <= -2.25e-191: tmp = (b * c) + ((t * a) * -4.0) elif x <= 1.95e-116: tmp = (b * c) - (27.0 * (j * k)) else: tmp = ((t * a) + (x * i)) * -4.0 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -5.8e+63) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (x <= -2.25e-191) tmp = Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)); elseif (x <= 1.95e-116) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); else tmp = Float64(Float64(Float64(t * a) + Float64(x * i)) * -4.0); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -5.8e+63)
tmp = (b * c) - (4.0 * (x * i));
elseif (x <= -2.25e-191)
tmp = (b * c) + ((t * a) * -4.0);
elseif (x <= 1.95e-116)
tmp = (b * c) - (27.0 * (j * k));
else
tmp = ((t * a) + (x * i)) * -4.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -5.8e+63], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.25e-191], N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.95e-116], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.8 \cdot 10^{+63}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;x \leq -2.25 \cdot 10^{-191}:\\
\;\;\;\;b \cdot c + \left(t \cdot a\right) \cdot -4\\
\mathbf{elif}\;x \leq 1.95 \cdot 10^{-116}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot a + x \cdot i\right) \cdot -4\\
\end{array}
\end{array}
if x < -5.7999999999999999e63Initial program 62.4%
Simplified65.9%
Taylor expanded in j around 0 64.3%
Taylor expanded in t around 0 55.2%
if -5.7999999999999999e63 < x < -2.25000000000000004e-191Initial program 88.4%
Simplified90.3%
Taylor expanded in x around 0 69.0%
Taylor expanded in j around 0 59.2%
if -2.25000000000000004e-191 < x < 1.95e-116Initial program 92.5%
Simplified89.4%
Taylor expanded in x around 0 93.8%
Taylor expanded in a around 0 74.2%
if 1.95e-116 < x Initial program 80.9%
Simplified85.1%
Taylor expanded in j around 0 77.4%
Taylor expanded in y around 0 68.7%
Taylor expanded in b around 0 59.4%
*-commutative59.4%
cancel-sign-sub-inv59.4%
metadata-eval59.4%
distribute-lft-out59.4%
*-commutative59.4%
Simplified59.4%
Final simplification61.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -3.5e+63)
(- (* b c) (* 4.0 (* x i)))
(if (<= x -4.8e-193)
(+ (* b c) (* (* t a) -4.0))
(if (<= x 1.62e-121)
(+ (* b c) (* j (* k -27.0)))
(* (+ (* t a) (* x i)) -4.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -3.5e+63) {
tmp = (b * c) - (4.0 * (x * i));
} else if (x <= -4.8e-193) {
tmp = (b * c) + ((t * a) * -4.0);
} else if (x <= 1.62e-121) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = ((t * a) + (x * i)) * -4.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-3.5d+63)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (x <= (-4.8d-193)) then
tmp = (b * c) + ((t * a) * (-4.0d0))
else if (x <= 1.62d-121) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else
tmp = ((t * a) + (x * i)) * (-4.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -3.5e+63) {
tmp = (b * c) - (4.0 * (x * i));
} else if (x <= -4.8e-193) {
tmp = (b * c) + ((t * a) * -4.0);
} else if (x <= 1.62e-121) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = ((t * a) + (x * i)) * -4.0;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -3.5e+63: tmp = (b * c) - (4.0 * (x * i)) elif x <= -4.8e-193: tmp = (b * c) + ((t * a) * -4.0) elif x <= 1.62e-121: tmp = (b * c) + (j * (k * -27.0)) else: tmp = ((t * a) + (x * i)) * -4.0 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -3.5e+63) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (x <= -4.8e-193) tmp = Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)); elseif (x <= 1.62e-121) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); else tmp = Float64(Float64(Float64(t * a) + Float64(x * i)) * -4.0); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -3.5e+63)
tmp = (b * c) - (4.0 * (x * i));
elseif (x <= -4.8e-193)
tmp = (b * c) + ((t * a) * -4.0);
elseif (x <= 1.62e-121)
tmp = (b * c) + (j * (k * -27.0));
else
tmp = ((t * a) + (x * i)) * -4.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -3.5e+63], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.8e-193], N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.62e-121], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.5 \cdot 10^{+63}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;x \leq -4.8 \cdot 10^{-193}:\\
\;\;\;\;b \cdot c + \left(t \cdot a\right) \cdot -4\\
\mathbf{elif}\;x \leq 1.62 \cdot 10^{-121}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot a + x \cdot i\right) \cdot -4\\
\end{array}
\end{array}
if x < -3.50000000000000029e63Initial program 62.4%
Simplified65.9%
Taylor expanded in j around 0 64.3%
Taylor expanded in t around 0 55.2%
if -3.50000000000000029e63 < x < -4.8e-193Initial program 88.4%
Simplified90.3%
Taylor expanded in x around 0 69.0%
Taylor expanded in j around 0 59.2%
if -4.8e-193 < x < 1.6199999999999999e-121Initial program 92.5%
Simplified89.4%
Taylor expanded in b around inf 74.1%
if 1.6199999999999999e-121 < x Initial program 80.9%
Simplified85.1%
Taylor expanded in j around 0 77.4%
Taylor expanded in y around 0 68.7%
Taylor expanded in b around 0 59.4%
*-commutative59.4%
cancel-sign-sub-inv59.4%
metadata-eval59.4%
distribute-lft-out59.4%
*-commutative59.4%
Simplified59.4%
Final simplification61.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -4.4e+25)
(* (* z (* x y)) (* 18.0 t))
(if (<= x -5.6e-194)
(+ (* b c) (* (* t a) -4.0))
(if (<= x 5.4e-117)
(+ (* b c) (* j (* k -27.0)))
(* (+ (* t a) (* x i)) -4.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -4.4e+25) {
tmp = (z * (x * y)) * (18.0 * t);
} else if (x <= -5.6e-194) {
tmp = (b * c) + ((t * a) * -4.0);
} else if (x <= 5.4e-117) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = ((t * a) + (x * i)) * -4.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-4.4d+25)) then
tmp = (z * (x * y)) * (18.0d0 * t)
else if (x <= (-5.6d-194)) then
tmp = (b * c) + ((t * a) * (-4.0d0))
else if (x <= 5.4d-117) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else
tmp = ((t * a) + (x * i)) * (-4.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -4.4e+25) {
tmp = (z * (x * y)) * (18.0 * t);
} else if (x <= -5.6e-194) {
tmp = (b * c) + ((t * a) * -4.0);
} else if (x <= 5.4e-117) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = ((t * a) + (x * i)) * -4.0;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -4.4e+25: tmp = (z * (x * y)) * (18.0 * t) elif x <= -5.6e-194: tmp = (b * c) + ((t * a) * -4.0) elif x <= 5.4e-117: tmp = (b * c) + (j * (k * -27.0)) else: tmp = ((t * a) + (x * i)) * -4.0 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -4.4e+25) tmp = Float64(Float64(z * Float64(x * y)) * Float64(18.0 * t)); elseif (x <= -5.6e-194) tmp = Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)); elseif (x <= 5.4e-117) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); else tmp = Float64(Float64(Float64(t * a) + Float64(x * i)) * -4.0); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -4.4e+25)
tmp = (z * (x * y)) * (18.0 * t);
elseif (x <= -5.6e-194)
tmp = (b * c) + ((t * a) * -4.0);
elseif (x <= 5.4e-117)
tmp = (b * c) + (j * (k * -27.0));
else
tmp = ((t * a) + (x * i)) * -4.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -4.4e+25], N[(N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.6e-194], N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.4e-117], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.4 \cdot 10^{+25}:\\
\;\;\;\;\left(z \cdot \left(x \cdot y\right)\right) \cdot \left(18 \cdot t\right)\\
\mathbf{elif}\;x \leq -5.6 \cdot 10^{-194}:\\
\;\;\;\;b \cdot c + \left(t \cdot a\right) \cdot -4\\
\mathbf{elif}\;x \leq 5.4 \cdot 10^{-117}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot a + x \cdot i\right) \cdot -4\\
\end{array}
\end{array}
if x < -4.4000000000000001e25Initial program 65.0%
Simplified68.1%
Taylor expanded in t around inf 44.7%
Taylor expanded in y around inf 44.8%
Taylor expanded in y around inf 43.4%
associate-*r*43.4%
*-commutative43.4%
associate-*r*43.4%
*-commutative43.4%
*-commutative43.4%
Simplified43.4%
if -4.4000000000000001e25 < x < -5.60000000000000022e-194Initial program 88.8%
Simplified91.0%
Taylor expanded in x around 0 72.9%
Taylor expanded in j around 0 66.0%
if -5.60000000000000022e-194 < x < 5.40000000000000005e-117Initial program 92.5%
Simplified89.4%
Taylor expanded in b around inf 74.1%
if 5.40000000000000005e-117 < x Initial program 80.9%
Simplified85.1%
Taylor expanded in j around 0 77.4%
Taylor expanded in y around 0 68.7%
Taylor expanded in b around 0 59.4%
*-commutative59.4%
cancel-sign-sub-inv59.4%
metadata-eval59.4%
distribute-lft-out59.4%
*-commutative59.4%
Simplified59.4%
Final simplification59.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -4.7e+85) (not (<= (* b c) 6.8e+175))) (* b c) (* (+ (* t a) (* x i)) -4.0)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -4.7e+85) || !((b * c) <= 6.8e+175)) {
tmp = b * c;
} else {
tmp = ((t * a) + (x * i)) * -4.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-4.7d+85)) .or. (.not. ((b * c) <= 6.8d+175))) then
tmp = b * c
else
tmp = ((t * a) + (x * i)) * (-4.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -4.7e+85) || !((b * c) <= 6.8e+175)) {
tmp = b * c;
} else {
tmp = ((t * a) + (x * i)) * -4.0;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -4.7e+85) or not ((b * c) <= 6.8e+175): tmp = b * c else: tmp = ((t * a) + (x * i)) * -4.0 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -4.7e+85) || !(Float64(b * c) <= 6.8e+175)) tmp = Float64(b * c); else tmp = Float64(Float64(Float64(t * a) + Float64(x * i)) * -4.0); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -4.7e+85) || ~(((b * c) <= 6.8e+175)))
tmp = b * c;
else
tmp = ((t * a) + (x * i)) * -4.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -4.7e+85], N[Not[LessEqual[N[(b * c), $MachinePrecision], 6.8e+175]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -4.7 \cdot 10^{+85} \lor \neg \left(b \cdot c \leq 6.8 \cdot 10^{+175}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot a + x \cdot i\right) \cdot -4\\
\end{array}
\end{array}
if (*.f64 b c) < -4.7000000000000002e85 or 6.80000000000000056e175 < (*.f64 b c) Initial program 77.0%
Simplified78.2%
associate-*r*78.2%
distribute-rgt-out--77.0%
associate-+l-77.0%
associate-*l*72.5%
fmm-def73.7%
associate-*l*73.7%
*-commutative73.7%
Applied egg-rr73.7%
fmm-undef72.5%
*-commutative72.5%
associate-*r*72.5%
*-commutative72.5%
*-commutative72.5%
*-commutative72.5%
associate-*l*72.5%
*-commutative72.5%
*-commutative72.5%
Simplified72.5%
Taylor expanded in b around inf 54.2%
if -4.7000000000000002e85 < (*.f64 b c) < 6.80000000000000056e175Initial program 83.0%
Simplified85.3%
Taylor expanded in j around 0 68.5%
Taylor expanded in y around 0 58.8%
Taylor expanded in b around 0 53.0%
*-commutative53.0%
cancel-sign-sub-inv53.0%
metadata-eval53.0%
distribute-lft-out53.0%
*-commutative53.0%
Simplified53.0%
Final simplification53.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 (* (* x i) -4.0)))
(if (<= x -5.8e+56)
t_1
(if (<= x -1.58e-273)
(* b c)
(if (<= x 1.7e-66) (* (* j k) -27.0) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * i) * -4.0;
double tmp;
if (x <= -5.8e+56) {
tmp = t_1;
} else if (x <= -1.58e-273) {
tmp = b * c;
} else if (x <= 1.7e-66) {
tmp = (j * k) * -27.0;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (x * i) * (-4.0d0)
if (x <= (-5.8d+56)) then
tmp = t_1
else if (x <= (-1.58d-273)) then
tmp = b * c
else if (x <= 1.7d-66) then
tmp = (j * k) * (-27.0d0)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * i) * -4.0;
double tmp;
if (x <= -5.8e+56) {
tmp = t_1;
} else if (x <= -1.58e-273) {
tmp = b * c;
} else if (x <= 1.7e-66) {
tmp = (j * k) * -27.0;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (x * i) * -4.0 tmp = 0 if x <= -5.8e+56: tmp = t_1 elif x <= -1.58e-273: tmp = b * c elif x <= 1.7e-66: tmp = (j * k) * -27.0 else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(x * i) * -4.0) tmp = 0.0 if (x <= -5.8e+56) tmp = t_1; elseif (x <= -1.58e-273) tmp = Float64(b * c); elseif (x <= 1.7e-66) tmp = Float64(Float64(j * k) * -27.0); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (x * i) * -4.0;
tmp = 0.0;
if (x <= -5.8e+56)
tmp = t_1;
elseif (x <= -1.58e-273)
tmp = b * c;
elseif (x <= 1.7e-66)
tmp = (j * k) * -27.0;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision]}, If[LessEqual[x, -5.8e+56], t$95$1, If[LessEqual[x, -1.58e-273], N[(b * c), $MachinePrecision], If[LessEqual[x, 1.7e-66], N[(N[(j * k), $MachinePrecision] * -27.0), $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 := \left(x \cdot i\right) \cdot -4\\
\mathbf{if}\;x \leq -5.8 \cdot 10^{+56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.58 \cdot 10^{-273}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{-66}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -5.80000000000000014e56 or 1.69999999999999999e-66 < x Initial program 72.4%
Simplified76.6%
Taylor expanded in j around 0 72.2%
Taylor expanded in t around 0 53.8%
Taylor expanded in b around 0 43.0%
*-commutative43.0%
Simplified43.0%
if -5.80000000000000014e56 < x < -1.57999999999999994e-273Initial program 87.2%
Simplified87.3%
associate-*r*88.8%
distribute-rgt-out--87.2%
associate-+l-87.2%
associate-*l*79.3%
fmm-def80.9%
associate-*l*80.9%
*-commutative80.9%
Applied egg-rr80.9%
fmm-undef79.3%
*-commutative79.3%
associate-*r*79.3%
*-commutative79.3%
*-commutative79.3%
*-commutative79.3%
associate-*l*79.3%
*-commutative79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in b around inf 43.8%
if -1.57999999999999994e-273 < x < 1.69999999999999999e-66Initial program 96.1%
Simplified94.3%
Taylor expanded in j around inf 39.6%
Final simplification42.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -1.36e+89) (not (<= (* b c) 2.25e-8))) (* b c) (* (* j k) -27.0)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.36e+89) || !((b * c) <= 2.25e-8)) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-1.36d+89)) .or. (.not. ((b * c) <= 2.25d-8))) then
tmp = b * c
else
tmp = (j * k) * (-27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.36e+89) || !((b * c) <= 2.25e-8)) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -1.36e+89) or not ((b * c) <= 2.25e-8): tmp = b * c else: tmp = (j * k) * -27.0 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -1.36e+89) || !(Float64(b * c) <= 2.25e-8)) tmp = Float64(b * c); else tmp = Float64(Float64(j * k) * -27.0); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -1.36e+89) || ~(((b * c) <= 2.25e-8)))
tmp = b * c;
else
tmp = (j * k) * -27.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -1.36e+89], N[Not[LessEqual[N[(b * c), $MachinePrecision], 2.25e-8]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.36 \cdot 10^{+89} \lor \neg \left(b \cdot c \leq 2.25 \cdot 10^{-8}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\end{array}
\end{array}
if (*.f64 b c) < -1.36000000000000002e89 or 2.24999999999999996e-8 < (*.f64 b c) Initial program 80.3%
Simplified80.4%
associate-*r*81.2%
distribute-rgt-out--80.3%
associate-+l-80.3%
associate-*l*77.0%
fmm-def77.8%
associate-*l*77.9%
*-commutative77.9%
Applied egg-rr77.9%
fmm-undef77.0%
*-commutative77.0%
associate-*r*77.0%
*-commutative77.0%
*-commutative77.0%
*-commutative77.0%
associate-*l*77.0%
*-commutative77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in b around inf 46.6%
if -1.36000000000000002e89 < (*.f64 b c) < 2.24999999999999996e-8Initial program 81.6%
Simplified85.7%
Taylor expanded in j around inf 31.7%
Final simplification38.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -8.6e+22)
(* (* z (* x y)) (* 18.0 t))
(if (<= x 135.0)
(+ (* b c) (* (* t a) -4.0))
(* (+ (* t a) (* x i)) -4.0))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -8.6e+22) {
tmp = (z * (x * y)) * (18.0 * t);
} else if (x <= 135.0) {
tmp = (b * c) + ((t * a) * -4.0);
} else {
tmp = ((t * a) + (x * i)) * -4.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-8.6d+22)) then
tmp = (z * (x * y)) * (18.0d0 * t)
else if (x <= 135.0d0) then
tmp = (b * c) + ((t * a) * (-4.0d0))
else
tmp = ((t * a) + (x * i)) * (-4.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -8.6e+22) {
tmp = (z * (x * y)) * (18.0 * t);
} else if (x <= 135.0) {
tmp = (b * c) + ((t * a) * -4.0);
} else {
tmp = ((t * a) + (x * i)) * -4.0;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -8.6e+22: tmp = (z * (x * y)) * (18.0 * t) elif x <= 135.0: tmp = (b * c) + ((t * a) * -4.0) else: tmp = ((t * a) + (x * i)) * -4.0 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -8.6e+22) tmp = Float64(Float64(z * Float64(x * y)) * Float64(18.0 * t)); elseif (x <= 135.0) tmp = Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)); else tmp = Float64(Float64(Float64(t * a) + Float64(x * i)) * -4.0); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -8.6e+22)
tmp = (z * (x * y)) * (18.0 * t);
elseif (x <= 135.0)
tmp = (b * c) + ((t * a) * -4.0);
else
tmp = ((t * a) + (x * i)) * -4.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -8.6e+22], N[(N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 135.0], N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.6 \cdot 10^{+22}:\\
\;\;\;\;\left(z \cdot \left(x \cdot y\right)\right) \cdot \left(18 \cdot t\right)\\
\mathbf{elif}\;x \leq 135:\\
\;\;\;\;b \cdot c + \left(t \cdot a\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot a + x \cdot i\right) \cdot -4\\
\end{array}
\end{array}
if x < -8.6000000000000004e22Initial program 65.0%
Simplified68.1%
Taylor expanded in t around inf 44.7%
Taylor expanded in y around inf 44.8%
Taylor expanded in y around inf 43.4%
associate-*r*43.4%
*-commutative43.4%
associate-*r*43.4%
*-commutative43.4%
*-commutative43.4%
Simplified43.4%
if -8.6000000000000004e22 < x < 135Initial program 92.9%
Simplified92.2%
Taylor expanded in x around 0 82.0%
Taylor expanded in j around 0 60.6%
if 135 < x Initial program 73.3%
Simplified79.1%
Taylor expanded in j around 0 75.1%
Taylor expanded in y around 0 66.3%
Taylor expanded in b around 0 61.9%
*-commutative61.9%
cancel-sign-sub-inv61.9%
metadata-eval61.9%
distribute-lft-out61.9%
*-commutative61.9%
Simplified61.9%
Final simplification56.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 81.0%
Simplified82.9%
associate-*r*82.2%
distribute-rgt-out--81.0%
associate-+l-81.0%
associate-*l*78.2%
fmm-def79.0%
associate-*l*79.0%
*-commutative79.0%
Applied egg-rr79.0%
fmm-undef78.2%
*-commutative78.2%
associate-*r*78.2%
*-commutative78.2%
*-commutative78.2%
*-commutative78.2%
associate-*l*78.2%
*-commutative78.2%
*-commutative78.2%
Simplified78.2%
Taylor expanded in b around inf 23.6%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
(t_2
(-
(- (* (* 18.0 t) (* (* x y) z)) t_1)
(- (* (* k j) 27.0) (* c b)))))
(if (< t -1.6210815397541398e-69)
t_2
(if (< t 165.68027943805222)
(+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((a * t) + (i * x)) * 4.0d0
t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
if (t < (-1.6210815397541398d-69)) then
tmp = t_2
else if (t < 165.68027943805222d0) then
tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((a * t) + (i * x)) * 4.0 t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)) tmp = 0 if t < -1.6210815397541398e-69: tmp = t_2 elif t < 165.68027943805222: tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0) t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b))) tmp = 0.0 if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((a * t) + (i * x)) * 4.0; t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)); tmp = 0.0; if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t\_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t\_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024181
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:alt
(! :herbie-platform default (if (< t -8105407698770699/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))) (if (< t 8284013971902611/50000000000000) (+ (- (* (* 18 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4)) (- (* c b) (* 27 (* k j)))) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))