
(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 20 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
(-
(-
(+ (- (* (* z (* (* x 18.0) y)) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 INFINITY) t_1 (* x (- (* 18.0 (* z (* y t))) (* 4.0 i))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((z * ((x * 18.0) * y)) * 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 * ((18.0 * (z * (y * t))) - (4.0 * i));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((z * ((x * 18.0) * y)) * 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 * ((18.0 * (z * (y * t))) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (((((z * ((x * 18.0) * y)) * 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 * ((18.0 * (z * (y * t))) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(z * Float64(Float64(x * 18.0) * y)) * 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(18.0 * Float64(z * Float64(y * t))) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (((((z * ((x * 18.0) * y)) * 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 * ((18.0 * (z * (y * t))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(z * N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision]), $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[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(z \cdot \left(\left(x \cdot 18\right) \cdot y\right)\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(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 96.9%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) Initial program 0.0%
Simplified16.1%
Taylor expanded in x around inf 68.0%
expm1-log1p-u42.2%
expm1-udef42.2%
Applied egg-rr42.2%
expm1-def42.2%
expm1-log1p68.0%
associate-*r*74.4%
Simplified74.4%
Final simplification94.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* x (* 4.0 i)) (* j (* 27.0 k)))))
(if (<= x -2.1e+99)
(* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))
(if (<= x 5e-82)
(- (+ (* b c) (- (* (* z t) (* (* x 18.0) y)) (* t (* a 4.0)))) t_1)
(- (+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* 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 * (4.0 * i)) + (j * (27.0 * k));
double tmp;
if (x <= -2.1e+99) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else if (x <= 5e-82) {
tmp = ((b * c) + (((z * t) * ((x * 18.0) * y)) - (t * (a * 4.0)))) - t_1;
} else {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (x * (4.0d0 * i)) + (j * (27.0d0 * k))
if (x <= (-2.1d+99)) then
tmp = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
else if (x <= 5d-82) then
tmp = ((b * c) + (((z * t) * ((x * 18.0d0) * y)) - (t * (a * 4.0d0)))) - t_1
else
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * (4.0 * i)) + (j * (27.0 * k));
double tmp;
if (x <= -2.1e+99) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else if (x <= 5e-82) {
tmp = ((b * c) + (((z * t) * ((x * 18.0) * y)) - (t * (a * 4.0)))) - t_1;
} else {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (x * (4.0 * i)) + (j * (27.0 * k)) tmp = 0 if x <= -2.1e+99: tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)) elif x <= 5e-82: tmp = ((b * c) + (((z * t) * ((x * 18.0) * y)) - (t * (a * 4.0)))) - t_1 else: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k))) tmp = 0.0 if (x <= -2.1e+99) tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))); elseif (x <= 5e-82) tmp = Float64(Float64(Float64(b * c) + Float64(Float64(Float64(z * t) * Float64(Float64(x * 18.0) * y)) - Float64(t * Float64(a * 4.0)))) - t_1); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (x * (4.0 * i)) + (j * (27.0 * k));
tmp = 0.0;
if (x <= -2.1e+99)
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
elseif (x <= 5e-82)
tmp = ((b * c) + (((z * t) * ((x * 18.0) * y)) - (t * (a * 4.0)))) - t_1;
else
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.1e+99], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5e-82], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(N[(z * t), $MachinePrecision] * N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $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] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\\
\mathbf{if}\;x \leq -2.1 \cdot 10^{+99}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;x \leq 5 \cdot 10^{-82}:\\
\;\;\;\;\left(b \cdot c + \left(\left(z \cdot t\right) \cdot \left(\left(x \cdot 18\right) \cdot y\right) - t \cdot \left(a \cdot 4\right)\right)\right) - t_1\\
\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) - t_1\\
\end{array}
\end{array}
if x < -2.1000000000000001e99Initial program 58.8%
Simplified63.4%
Taylor expanded in x around inf 78.9%
expm1-log1p-u49.6%
expm1-udef47.0%
Applied egg-rr47.0%
expm1-def49.6%
expm1-log1p78.9%
*-commutative78.9%
associate-*l*81.3%
*-commutative81.3%
Simplified81.3%
if -2.1000000000000001e99 < x < 4.9999999999999998e-82Initial program 92.0%
Simplified87.1%
associate-*r*93.5%
distribute-rgt-out--92.0%
associate-*l*89.0%
*-commutative89.0%
*-commutative89.0%
Applied egg-rr89.0%
if 4.9999999999999998e-82 < x Initial program 87.2%
Simplified93.5%
Final simplification89.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (+ (* b c) (* 18.0 (* (* y z) (* x t)))) (* 27.0 (* j k))))
(t_2 (* j (* k -27.0)))
(t_3 (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(t_4 (+ (* x (* i -4.0)) t_2)))
(if (<= t -400000.0)
t_3
(if (<= t -6.8e-198)
t_1
(if (<= t -7.5e-267)
t_4
(if (<= t 5.2e-251)
(+ (* b c) t_2)
(if (<= t 6e-184) t_4 (if (<= t 1e+22) t_1 t_3))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((b * c) + (18.0 * ((y * z) * (x * t)))) - (27.0 * (j * k));
double t_2 = j * (k * -27.0);
double t_3 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
double t_4 = (x * (i * -4.0)) + t_2;
double tmp;
if (t <= -400000.0) {
tmp = t_3;
} else if (t <= -6.8e-198) {
tmp = t_1;
} else if (t <= -7.5e-267) {
tmp = t_4;
} else if (t <= 5.2e-251) {
tmp = (b * c) + t_2;
} else if (t <= 6e-184) {
tmp = t_4;
} else if (t <= 1e+22) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = ((b * c) + (18.0d0 * ((y * z) * (x * t)))) - (27.0d0 * (j * k))
t_2 = j * (k * (-27.0d0))
t_3 = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
t_4 = (x * (i * (-4.0d0))) + t_2
if (t <= (-400000.0d0)) then
tmp = t_3
else if (t <= (-6.8d-198)) then
tmp = t_1
else if (t <= (-7.5d-267)) then
tmp = t_4
else if (t <= 5.2d-251) then
tmp = (b * c) + t_2
else if (t <= 6d-184) then
tmp = t_4
else if (t <= 1d+22) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((b * c) + (18.0 * ((y * z) * (x * t)))) - (27.0 * (j * k));
double t_2 = j * (k * -27.0);
double t_3 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
double t_4 = (x * (i * -4.0)) + t_2;
double tmp;
if (t <= -400000.0) {
tmp = t_3;
} else if (t <= -6.8e-198) {
tmp = t_1;
} else if (t <= -7.5e-267) {
tmp = t_4;
} else if (t <= 5.2e-251) {
tmp = (b * c) + t_2;
} else if (t <= 6e-184) {
tmp = t_4;
} else if (t <= 1e+22) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((b * c) + (18.0 * ((y * z) * (x * t)))) - (27.0 * (j * k)) t_2 = j * (k * -27.0) t_3 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) t_4 = (x * (i * -4.0)) + t_2 tmp = 0 if t <= -400000.0: tmp = t_3 elif t <= -6.8e-198: tmp = t_1 elif t <= -7.5e-267: tmp = t_4 elif t <= 5.2e-251: tmp = (b * c) + t_2 elif t <= 6e-184: tmp = t_4 elif t <= 1e+22: tmp = t_1 else: tmp = t_3 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(Float64(y * z) * Float64(x * t)))) - Float64(27.0 * Float64(j * k))) t_2 = Float64(j * Float64(k * -27.0)) t_3 = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) t_4 = Float64(Float64(x * Float64(i * -4.0)) + t_2) tmp = 0.0 if (t <= -400000.0) tmp = t_3; elseif (t <= -6.8e-198) tmp = t_1; elseif (t <= -7.5e-267) tmp = t_4; elseif (t <= 5.2e-251) tmp = Float64(Float64(b * c) + t_2); elseif (t <= 6e-184) tmp = t_4; elseif (t <= 1e+22) tmp = t_1; else tmp = t_3; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = ((b * c) + (18.0 * ((y * z) * (x * t)))) - (27.0 * (j * k));
t_2 = j * (k * -27.0);
t_3 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
t_4 = (x * (i * -4.0)) + t_2;
tmp = 0.0;
if (t <= -400000.0)
tmp = t_3;
elseif (t <= -6.8e-198)
tmp = t_1;
elseif (t <= -7.5e-267)
tmp = t_4;
elseif (t <= 5.2e-251)
tmp = (b * c) + t_2;
elseif (t <= 6e-184)
tmp = t_4;
elseif (t <= 1e+22)
tmp = t_1;
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = 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]}, Block[{t$95$4 = N[(N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[t, -400000.0], t$95$3, If[LessEqual[t, -6.8e-198], t$95$1, If[LessEqual[t, -7.5e-267], t$95$4, If[LessEqual[t, 5.2e-251], N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[t, 6e-184], t$95$4, If[LessEqual[t, 1e+22], t$95$1, t$95$3]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(b \cdot c + 18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\right) - 27 \cdot \left(j \cdot k\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
t_3 := b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
t_4 := x \cdot \left(i \cdot -4\right) + t_2\\
\mathbf{if}\;t \leq -400000:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -6.8 \cdot 10^{-198}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -7.5 \cdot 10^{-267}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-251}:\\
\;\;\;\;b \cdot c + t_2\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-184}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq 10^{+22}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if t < -4e5 or 1e22 < t Initial program 83.9%
Simplified86.4%
Taylor expanded in i around 0 88.9%
Taylor expanded in j around 0 84.3%
if -4e5 < t < -6.7999999999999996e-198 or 5.99999999999999982e-184 < t < 1e22Initial program 83.6%
Simplified84.8%
Taylor expanded in i around 0 72.6%
Taylor expanded in x around inf 67.8%
associate-*r*48.2%
Simplified67.9%
if -6.7999999999999996e-198 < t < -7.4999999999999999e-267 or 5.1999999999999998e-251 < t < 5.99999999999999982e-184Initial program 89.5%
Simplified79.7%
Taylor expanded in i around inf 93.3%
associate-*r*93.3%
*-commutative93.3%
Simplified93.3%
if -7.4999999999999999e-267 < t < 5.1999999999999998e-251Initial program 94.4%
Simplified89.0%
Taylor expanded in b around inf 73.4%
Final simplification79.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.25e+161)
(* x (- (* 18.0 (* y (* z t))) (* 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 <= -1.25e+161) {
tmp = x * ((18.0 * (y * (z * t))) - (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 <= (-1.25d+161)) then
tmp = x * ((18.0d0 * (y * (z * t))) - (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 <= -1.25e+161) {
tmp = x * ((18.0 * (y * (z * t))) - (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 <= -1.25e+161: tmp = x * ((18.0 * (y * (z * t))) - (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 <= -1.25e+161) tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - 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 <= -1.25e+161)
tmp = x * ((18.0 * (y * (z * t))) - (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[LessEqual[x, -1.25e+161], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $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 -1.25 \cdot 10^{+161}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\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 < -1.2499999999999999e161Initial program 51.8%
Simplified54.8%
Taylor expanded in x around inf 78.1%
expm1-log1p-u52.3%
expm1-udef49.1%
Applied egg-rr49.1%
expm1-def52.3%
expm1-log1p78.1%
*-commutative78.1%
associate-*l*81.2%
*-commutative81.2%
Simplified81.2%
if -1.2499999999999999e161 < x Initial program 89.8%
Simplified89.5%
Final simplification88.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (+ (* x (* i -4.0)) t_1))
(t_3 (+ (* b c) t_1)))
(if (<= t -3.9e-42)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= t 6.7e-252)
t_3
(if (<= t 2.7e-96)
t_2
(if (<= t 3e-70)
(+ (* b c) (* 18.0 (* (* y z) (* x t))))
(if (<= t 5.6e-24)
t_2
(if (<= t 180000.0)
t_3
(* t (+ (* a -4.0) (* 18.0 (* y (* x z)))))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (x * (i * -4.0)) + t_1;
double t_3 = (b * c) + t_1;
double tmp;
if (t <= -3.9e-42) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= 6.7e-252) {
tmp = t_3;
} else if (t <= 2.7e-96) {
tmp = t_2;
} else if (t <= 3e-70) {
tmp = (b * c) + (18.0 * ((y * z) * (x * t)));
} else if (t <= 5.6e-24) {
tmp = t_2;
} else if (t <= 180000.0) {
tmp = t_3;
} else {
tmp = t * ((a * -4.0) + (18.0 * (y * (x * z))));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (x * (i * (-4.0d0))) + t_1
t_3 = (b * c) + t_1
if (t <= (-3.9d-42)) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (t <= 6.7d-252) then
tmp = t_3
else if (t <= 2.7d-96) then
tmp = t_2
else if (t <= 3d-70) then
tmp = (b * c) + (18.0d0 * ((y * z) * (x * t)))
else if (t <= 5.6d-24) then
tmp = t_2
else if (t <= 180000.0d0) then
tmp = t_3
else
tmp = t * ((a * (-4.0d0)) + (18.0d0 * (y * (x * z))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (x * (i * -4.0)) + t_1;
double t_3 = (b * c) + t_1;
double tmp;
if (t <= -3.9e-42) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= 6.7e-252) {
tmp = t_3;
} else if (t <= 2.7e-96) {
tmp = t_2;
} else if (t <= 3e-70) {
tmp = (b * c) + (18.0 * ((y * z) * (x * t)));
} else if (t <= 5.6e-24) {
tmp = t_2;
} else if (t <= 180000.0) {
tmp = t_3;
} else {
tmp = t * ((a * -4.0) + (18.0 * (y * (x * z))));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (x * (i * -4.0)) + t_1 t_3 = (b * c) + t_1 tmp = 0 if t <= -3.9e-42: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif t <= 6.7e-252: tmp = t_3 elif t <= 2.7e-96: tmp = t_2 elif t <= 3e-70: tmp = (b * c) + (18.0 * ((y * z) * (x * t))) elif t <= 5.6e-24: tmp = t_2 elif t <= 180000.0: tmp = t_3 else: tmp = t * ((a * -4.0) + (18.0 * (y * (x * z)))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(x * Float64(i * -4.0)) + t_1) t_3 = Float64(Float64(b * c) + t_1) tmp = 0.0 if (t <= -3.9e-42) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (t <= 6.7e-252) tmp = t_3; elseif (t <= 2.7e-96) tmp = t_2; elseif (t <= 3e-70) tmp = Float64(Float64(b * c) + Float64(18.0 * Float64(Float64(y * z) * Float64(x * t)))); elseif (t <= 5.6e-24) tmp = t_2; elseif (t <= 180000.0) tmp = t_3; else tmp = Float64(t * Float64(Float64(a * -4.0) + Float64(18.0 * Float64(y * Float64(x * z))))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = (x * (i * -4.0)) + t_1;
t_3 = (b * c) + t_1;
tmp = 0.0;
if (t <= -3.9e-42)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (t <= 6.7e-252)
tmp = t_3;
elseif (t <= 2.7e-96)
tmp = t_2;
elseif (t <= 3e-70)
tmp = (b * c) + (18.0 * ((y * z) * (x * t)));
elseif (t <= 5.6e-24)
tmp = t_2;
elseif (t <= 180000.0)
tmp = t_3;
else
tmp = t * ((a * -4.0) + (18.0 * (y * (x * z))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t, -3.9e-42], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.7e-252], t$95$3, If[LessEqual[t, 2.7e-96], t$95$2, If[LessEqual[t, 3e-70], N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.6e-24], t$95$2, If[LessEqual[t, 180000.0], t$95$3, N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(18.0 * N[(y * N[(x * z), $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}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := x \cdot \left(i \cdot -4\right) + t_1\\
t_3 := b \cdot c + t_1\\
\mathbf{if}\;t \leq -3.9 \cdot 10^{-42}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq 6.7 \cdot 10^{-252}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{-96}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-70}:\\
\;\;\;\;b \cdot c + 18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{-24}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 180000:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot -4 + 18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if t < -3.9000000000000002e-42Initial program 87.1%
Simplified91.0%
Taylor expanded in t around inf 77.7%
if -3.9000000000000002e-42 < t < 6.69999999999999958e-252 or 5.6000000000000003e-24 < t < 1.8e5Initial program 87.6%
Simplified84.7%
Taylor expanded in b around inf 68.7%
if 6.69999999999999958e-252 < t < 2.7e-96 or 3.0000000000000001e-70 < t < 5.6000000000000003e-24Initial program 85.9%
Simplified83.6%
Taylor expanded in i around inf 74.8%
associate-*r*74.8%
*-commutative74.8%
Simplified74.8%
if 2.7e-96 < t < 3.0000000000000001e-70Initial program 81.8%
Simplified81.7%
Taylor expanded in i around 0 81.8%
Taylor expanded in j around 0 82.1%
Taylor expanded in x around inf 82.1%
associate-*r*81.9%
Simplified81.9%
if 1.8e5 < t Initial program 80.3%
Simplified80.6%
associate-*r*85.2%
distribute-rgt-out--80.3%
associate-*l*72.5%
*-commutative72.5%
*-commutative72.5%
Applied egg-rr72.5%
Taylor expanded in t around -inf 68.9%
associate-*r*68.9%
neg-mul-168.9%
cancel-sign-sub-inv68.9%
associate-*r*68.9%
metadata-eval68.9%
Simplified68.9%
Taylor expanded in t around 0 68.9%
associate-*r*68.9%
neg-mul-168.9%
*-commutative68.9%
*-commutative68.9%
*-commutative68.9%
associate-*r*68.9%
fma-udef68.9%
distribute-lft-neg-in68.9%
distribute-rgt-neg-in68.9%
fma-udef68.9%
+-commutative68.9%
distribute-neg-in68.9%
*-commutative68.9%
distribute-lft-neg-in68.9%
metadata-eval68.9%
associate-*r*68.9%
*-commutative68.9%
*-commutative68.9%
distribute-lft-neg-in68.9%
metadata-eval68.9%
*-commutative68.9%
associate-*l*74.6%
Simplified74.6%
Final simplification74.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (+ (* x (* i -4.0)) t_1))
(t_3 (+ (* b c) t_1)))
(if (<= t -3.8e-45)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= t 1.9e-248)
t_3
(if (<= t 2.8e-96)
t_2
(if (<= t 1.85e-66)
(+ (* b c) (* t (* x (* z (* 18.0 y)))))
(if (<= t 2.05e-23)
t_2
(if (<= t 132000000.0)
t_3
(* t (+ (* a -4.0) (* 18.0 (* y (* x z)))))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (x * (i * -4.0)) + t_1;
double t_3 = (b * c) + t_1;
double tmp;
if (t <= -3.8e-45) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= 1.9e-248) {
tmp = t_3;
} else if (t <= 2.8e-96) {
tmp = t_2;
} else if (t <= 1.85e-66) {
tmp = (b * c) + (t * (x * (z * (18.0 * y))));
} else if (t <= 2.05e-23) {
tmp = t_2;
} else if (t <= 132000000.0) {
tmp = t_3;
} else {
tmp = t * ((a * -4.0) + (18.0 * (y * (x * z))));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (x * (i * (-4.0d0))) + t_1
t_3 = (b * c) + t_1
if (t <= (-3.8d-45)) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (t <= 1.9d-248) then
tmp = t_3
else if (t <= 2.8d-96) then
tmp = t_2
else if (t <= 1.85d-66) then
tmp = (b * c) + (t * (x * (z * (18.0d0 * y))))
else if (t <= 2.05d-23) then
tmp = t_2
else if (t <= 132000000.0d0) then
tmp = t_3
else
tmp = t * ((a * (-4.0d0)) + (18.0d0 * (y * (x * z))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (x * (i * -4.0)) + t_1;
double t_3 = (b * c) + t_1;
double tmp;
if (t <= -3.8e-45) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= 1.9e-248) {
tmp = t_3;
} else if (t <= 2.8e-96) {
tmp = t_2;
} else if (t <= 1.85e-66) {
tmp = (b * c) + (t * (x * (z * (18.0 * y))));
} else if (t <= 2.05e-23) {
tmp = t_2;
} else if (t <= 132000000.0) {
tmp = t_3;
} else {
tmp = t * ((a * -4.0) + (18.0 * (y * (x * z))));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (x * (i * -4.0)) + t_1 t_3 = (b * c) + t_1 tmp = 0 if t <= -3.8e-45: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif t <= 1.9e-248: tmp = t_3 elif t <= 2.8e-96: tmp = t_2 elif t <= 1.85e-66: tmp = (b * c) + (t * (x * (z * (18.0 * y)))) elif t <= 2.05e-23: tmp = t_2 elif t <= 132000000.0: tmp = t_3 else: tmp = t * ((a * -4.0) + (18.0 * (y * (x * z)))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(x * Float64(i * -4.0)) + t_1) t_3 = Float64(Float64(b * c) + t_1) tmp = 0.0 if (t <= -3.8e-45) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (t <= 1.9e-248) tmp = t_3; elseif (t <= 2.8e-96) tmp = t_2; elseif (t <= 1.85e-66) tmp = Float64(Float64(b * c) + Float64(t * Float64(x * Float64(z * Float64(18.0 * y))))); elseif (t <= 2.05e-23) tmp = t_2; elseif (t <= 132000000.0) tmp = t_3; else tmp = Float64(t * Float64(Float64(a * -4.0) + Float64(18.0 * Float64(y * Float64(x * z))))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = (x * (i * -4.0)) + t_1;
t_3 = (b * c) + t_1;
tmp = 0.0;
if (t <= -3.8e-45)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (t <= 1.9e-248)
tmp = t_3;
elseif (t <= 2.8e-96)
tmp = t_2;
elseif (t <= 1.85e-66)
tmp = (b * c) + (t * (x * (z * (18.0 * y))));
elseif (t <= 2.05e-23)
tmp = t_2;
elseif (t <= 132000000.0)
tmp = t_3;
else
tmp = t * ((a * -4.0) + (18.0 * (y * (x * z))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t, -3.8e-45], 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.9e-248], t$95$3, If[LessEqual[t, 2.8e-96], t$95$2, If[LessEqual[t, 1.85e-66], N[(N[(b * c), $MachinePrecision] + N[(t * N[(x * N[(z * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.05e-23], t$95$2, If[LessEqual[t, 132000000.0], t$95$3, N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(18.0 * N[(y * N[(x * z), $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}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := x \cdot \left(i \cdot -4\right) + t_1\\
t_3 := b \cdot c + t_1\\
\mathbf{if}\;t \leq -3.8 \cdot 10^{-45}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-248}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-96}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{-66}:\\
\;\;\;\;b \cdot c + t \cdot \left(x \cdot \left(z \cdot \left(18 \cdot y\right)\right)\right)\\
\mathbf{elif}\;t \leq 2.05 \cdot 10^{-23}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 132000000:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot -4 + 18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if t < -3.79999999999999997e-45Initial program 87.1%
Simplified91.0%
Taylor expanded in t around inf 77.7%
if -3.79999999999999997e-45 < t < 1.8999999999999999e-248 or 2.05000000000000015e-23 < t < 1.32e8Initial program 87.6%
Simplified84.7%
Taylor expanded in b around inf 68.7%
if 1.8999999999999999e-248 < t < 2.80000000000000015e-96 or 1.8500000000000001e-66 < t < 2.05000000000000015e-23Initial program 85.9%
Simplified83.6%
Taylor expanded in i around inf 74.8%
associate-*r*74.8%
*-commutative74.8%
Simplified74.8%
if 2.80000000000000015e-96 < t < 1.8500000000000001e-66Initial program 81.8%
Simplified81.7%
Taylor expanded in i around 0 81.8%
Taylor expanded in j around 0 82.1%
Taylor expanded in x around inf 82.1%
*-commutative82.1%
associate-*l*82.1%
associate-*l*82.1%
associate-*r*82.1%
*-commutative82.1%
associate-*l*82.1%
Simplified82.1%
if 1.32e8 < t Initial program 80.3%
Simplified80.6%
associate-*r*85.2%
distribute-rgt-out--80.3%
associate-*l*72.5%
*-commutative72.5%
*-commutative72.5%
Applied egg-rr72.5%
Taylor expanded in t around -inf 68.9%
associate-*r*68.9%
neg-mul-168.9%
cancel-sign-sub-inv68.9%
associate-*r*68.9%
metadata-eval68.9%
Simplified68.9%
Taylor expanded in t around 0 68.9%
associate-*r*68.9%
neg-mul-168.9%
*-commutative68.9%
*-commutative68.9%
*-commutative68.9%
associate-*r*68.9%
fma-udef68.9%
distribute-lft-neg-in68.9%
distribute-rgt-neg-in68.9%
fma-udef68.9%
+-commutative68.9%
distribute-neg-in68.9%
*-commutative68.9%
distribute-lft-neg-in68.9%
metadata-eval68.9%
associate-*r*68.9%
*-commutative68.9%
*-commutative68.9%
distribute-lft-neg-in68.9%
metadata-eval68.9%
*-commutative68.9%
associate-*l*74.6%
Simplified74.6%
Final simplification74.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -2.6e+131)
(* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))
(-
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(* 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 <= -2.6e+131) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (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 <= (-2.6d+131)) then
tmp = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
else
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - (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 <= -2.6e+131) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (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 <= -2.6e+131: tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)) else: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (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 <= -2.6e+131) tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - 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 <= -2.6e+131)
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
else
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (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, -2.6e+131], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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[(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 -2.6 \cdot 10^{+131}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if x < -2.6e131Initial program 55.8%
Simplified61.1%
Taylor expanded in x around inf 78.5%
expm1-log1p-u50.8%
expm1-udef47.8%
Applied egg-rr47.8%
expm1-def50.8%
expm1-log1p78.5%
*-commutative78.5%
associate-*l*81.2%
*-commutative81.2%
Simplified81.2%
if -2.6e131 < x Initial program 90.0%
Simplified89.3%
Taylor expanded in i around 0 81.6%
Final simplification81.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* t (* x (* y z))))))
(if (<= t -5e-42)
t_1
(if (<= t -4.5e-187)
(* b c)
(if (<= t -1.05e-260)
(* (* j k) -27.0)
(if (<= t 6e-290)
(* b c)
(if (<= t 5.8e+35)
(* k (* j -27.0))
(if (<= t 1.45e+210) t_1 (* t (* a -4.0))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (t * (x * (y * z)));
double tmp;
if (t <= -5e-42) {
tmp = t_1;
} else if (t <= -4.5e-187) {
tmp = b * c;
} else if (t <= -1.05e-260) {
tmp = (j * k) * -27.0;
} else if (t <= 6e-290) {
tmp = b * c;
} else if (t <= 5.8e+35) {
tmp = k * (j * -27.0);
} else if (t <= 1.45e+210) {
tmp = t_1;
} else {
tmp = t * (a * -4.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 18.0d0 * (t * (x * (y * z)))
if (t <= (-5d-42)) then
tmp = t_1
else if (t <= (-4.5d-187)) then
tmp = b * c
else if (t <= (-1.05d-260)) then
tmp = (j * k) * (-27.0d0)
else if (t <= 6d-290) then
tmp = b * c
else if (t <= 5.8d+35) then
tmp = k * (j * (-27.0d0))
else if (t <= 1.45d+210) then
tmp = t_1
else
tmp = t * (a * (-4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (t * (x * (y * z)));
double tmp;
if (t <= -5e-42) {
tmp = t_1;
} else if (t <= -4.5e-187) {
tmp = b * c;
} else if (t <= -1.05e-260) {
tmp = (j * k) * -27.0;
} else if (t <= 6e-290) {
tmp = b * c;
} else if (t <= 5.8e+35) {
tmp = k * (j * -27.0);
} else if (t <= 1.45e+210) {
tmp = t_1;
} else {
tmp = t * (a * -4.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (t * (x * (y * z))) tmp = 0 if t <= -5e-42: tmp = t_1 elif t <= -4.5e-187: tmp = b * c elif t <= -1.05e-260: tmp = (j * k) * -27.0 elif t <= 6e-290: tmp = b * c elif t <= 5.8e+35: tmp = k * (j * -27.0) elif t <= 1.45e+210: tmp = t_1 else: tmp = t * (a * -4.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) tmp = 0.0 if (t <= -5e-42) tmp = t_1; elseif (t <= -4.5e-187) tmp = Float64(b * c); elseif (t <= -1.05e-260) tmp = Float64(Float64(j * k) * -27.0); elseif (t <= 6e-290) tmp = Float64(b * c); elseif (t <= 5.8e+35) tmp = Float64(k * Float64(j * -27.0)); elseif (t <= 1.45e+210) tmp = t_1; else tmp = Float64(t * Float64(a * -4.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (t * (x * (y * z)));
tmp = 0.0;
if (t <= -5e-42)
tmp = t_1;
elseif (t <= -4.5e-187)
tmp = b * c;
elseif (t <= -1.05e-260)
tmp = (j * k) * -27.0;
elseif (t <= 6e-290)
tmp = b * c;
elseif (t <= 5.8e+35)
tmp = k * (j * -27.0);
elseif (t <= 1.45e+210)
tmp = t_1;
else
tmp = t * (a * -4.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e-42], t$95$1, If[LessEqual[t, -4.5e-187], N[(b * c), $MachinePrecision], If[LessEqual[t, -1.05e-260], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[t, 6e-290], N[(b * c), $MachinePrecision], If[LessEqual[t, 5.8e+35], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e+210], t$95$1, N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -5 \cdot 10^{-42}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-187}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{-260}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-290}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+35}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+210}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\end{array}
\end{array}
if t < -5.00000000000000003e-42 or 5.79999999999999989e35 < t < 1.44999999999999996e210Initial program 87.2%
Simplified89.1%
Taylor expanded in x around inf 57.2%
expm1-log1p-u27.7%
expm1-udef27.6%
Applied egg-rr27.6%
expm1-def27.7%
expm1-log1p57.2%
associate-*r*55.8%
Simplified55.8%
Taylor expanded in t around inf 48.0%
if -5.00000000000000003e-42 < t < -4.4999999999999998e-187 or -1.05000000000000002e-260 < t < 5.99999999999999985e-290Initial program 92.3%
Simplified90.0%
associate-*r*92.4%
distribute-rgt-out--92.3%
associate-*l*92.3%
*-commutative92.3%
*-commutative92.3%
Applied egg-rr92.3%
Taylor expanded in b around inf 46.8%
if -4.4999999999999998e-187 < t < -1.05000000000000002e-260Initial program 74.8%
Simplified63.2%
Taylor expanded in j around inf 63.4%
if 5.99999999999999985e-290 < t < 5.79999999999999989e35Initial program 84.9%
Simplified84.9%
Taylor expanded in i around 0 72.0%
Taylor expanded in j around inf 40.2%
*-commutative40.2%
*-commutative40.2%
associate-*l*40.2%
Simplified40.2%
if 1.44999999999999996e210 < t Initial program 68.4%
Simplified73.7%
associate-*r*84.2%
distribute-rgt-out--68.4%
associate-*l*52.9%
*-commutative52.9%
*-commutative52.9%
Applied egg-rr52.9%
Taylor expanded in a around inf 59.2%
*-commutative59.2%
*-commutative59.2%
associate-*r*59.2%
Simplified59.2%
Final simplification47.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 (* y z))))
(if (<= t -1.2e-42)
(* t_1 (* 18.0 t))
(if (<= t -5.4e-195)
(* b c)
(if (<= t -1e-259)
(* (* j k) -27.0)
(if (<= t 3.4e-290)
(* b c)
(if (<= t 4e+37)
(* k (* j -27.0))
(if (<= t 7e+214) (* 18.0 (* t t_1)) (* t (* a -4.0))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (y * z);
double tmp;
if (t <= -1.2e-42) {
tmp = t_1 * (18.0 * t);
} else if (t <= -5.4e-195) {
tmp = b * c;
} else if (t <= -1e-259) {
tmp = (j * k) * -27.0;
} else if (t <= 3.4e-290) {
tmp = b * c;
} else if (t <= 4e+37) {
tmp = k * (j * -27.0);
} else if (t <= 7e+214) {
tmp = 18.0 * (t * t_1);
} else {
tmp = t * (a * -4.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * (y * z)
if (t <= (-1.2d-42)) then
tmp = t_1 * (18.0d0 * t)
else if (t <= (-5.4d-195)) then
tmp = b * c
else if (t <= (-1d-259)) then
tmp = (j * k) * (-27.0d0)
else if (t <= 3.4d-290) then
tmp = b * c
else if (t <= 4d+37) then
tmp = k * (j * (-27.0d0))
else if (t <= 7d+214) then
tmp = 18.0d0 * (t * t_1)
else
tmp = t * (a * (-4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (y * z);
double tmp;
if (t <= -1.2e-42) {
tmp = t_1 * (18.0 * t);
} else if (t <= -5.4e-195) {
tmp = b * c;
} else if (t <= -1e-259) {
tmp = (j * k) * -27.0;
} else if (t <= 3.4e-290) {
tmp = b * c;
} else if (t <= 4e+37) {
tmp = k * (j * -27.0);
} else if (t <= 7e+214) {
tmp = 18.0 * (t * t_1);
} else {
tmp = t * (a * -4.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (y * z) tmp = 0 if t <= -1.2e-42: tmp = t_1 * (18.0 * t) elif t <= -5.4e-195: tmp = b * c elif t <= -1e-259: tmp = (j * k) * -27.0 elif t <= 3.4e-290: tmp = b * c elif t <= 4e+37: tmp = k * (j * -27.0) elif t <= 7e+214: tmp = 18.0 * (t * t_1) else: tmp = t * (a * -4.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(y * z)) tmp = 0.0 if (t <= -1.2e-42) tmp = Float64(t_1 * Float64(18.0 * t)); elseif (t <= -5.4e-195) tmp = Float64(b * c); elseif (t <= -1e-259) tmp = Float64(Float64(j * k) * -27.0); elseif (t <= 3.4e-290) tmp = Float64(b * c); elseif (t <= 4e+37) tmp = Float64(k * Float64(j * -27.0)); elseif (t <= 7e+214) tmp = Float64(18.0 * Float64(t * t_1)); else tmp = Float64(t * Float64(a * -4.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * (y * z);
tmp = 0.0;
if (t <= -1.2e-42)
tmp = t_1 * (18.0 * t);
elseif (t <= -5.4e-195)
tmp = b * c;
elseif (t <= -1e-259)
tmp = (j * k) * -27.0;
elseif (t <= 3.4e-290)
tmp = b * c;
elseif (t <= 4e+37)
tmp = k * (j * -27.0);
elseif (t <= 7e+214)
tmp = 18.0 * (t * t_1);
else
tmp = t * (a * -4.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.2e-42], N[(t$95$1 * N[(18.0 * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.4e-195], N[(b * c), $MachinePrecision], If[LessEqual[t, -1e-259], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[t, 3.4e-290], N[(b * c), $MachinePrecision], If[LessEqual[t, 4e+37], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e+214], N[(18.0 * N[(t * t$95$1), $MachinePrecision]), $MachinePrecision], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;t \leq -1.2 \cdot 10^{-42}:\\
\;\;\;\;t_1 \cdot \left(18 \cdot t\right)\\
\mathbf{elif}\;t \leq -5.4 \cdot 10^{-195}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;t \leq -1 \cdot 10^{-259}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-290}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+37}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+214}:\\
\;\;\;\;18 \cdot \left(t \cdot t_1\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\end{array}
\end{array}
if t < -1.20000000000000001e-42Initial program 87.1%
Simplified91.0%
Taylor expanded in x around inf 61.4%
expm1-log1p-u32.5%
expm1-udef32.4%
Applied egg-rr32.4%
expm1-def32.5%
expm1-log1p61.4%
associate-*r*60.0%
Simplified60.0%
Taylor expanded in t around inf 49.8%
associate-*r*49.9%
*-commutative49.9%
Simplified49.9%
if -1.20000000000000001e-42 < t < -5.4e-195 or -1.0000000000000001e-259 < t < 3.39999999999999984e-290Initial program 92.3%
Simplified90.0%
associate-*r*92.4%
distribute-rgt-out--92.3%
associate-*l*92.3%
*-commutative92.3%
*-commutative92.3%
Applied egg-rr92.3%
Taylor expanded in b around inf 46.8%
if -5.4e-195 < t < -1.0000000000000001e-259Initial program 74.8%
Simplified63.2%
Taylor expanded in j around inf 63.4%
if 3.39999999999999984e-290 < t < 3.99999999999999982e37Initial program 84.9%
Simplified84.9%
Taylor expanded in i around 0 72.0%
Taylor expanded in j around inf 40.2%
*-commutative40.2%
*-commutative40.2%
associate-*l*40.2%
Simplified40.2%
if 3.99999999999999982e37 < t < 6.9999999999999999e214Initial program 87.4%
Simplified84.6%
Taylor expanded in x around inf 47.3%
expm1-log1p-u16.1%
expm1-udef16.1%
Applied egg-rr16.1%
expm1-def16.1%
expm1-log1p47.3%
associate-*r*45.6%
Simplified45.6%
Taylor expanded in t around inf 43.6%
if 6.9999999999999999e214 < t Initial program 68.4%
Simplified73.7%
associate-*r*84.2%
distribute-rgt-out--68.4%
associate-*l*52.9%
*-commutative52.9%
*-commutative52.9%
Applied egg-rr52.9%
Taylor expanded in a around inf 59.2%
*-commutative59.2%
*-commutative59.2%
associate-*r*59.2%
Simplified59.2%
Final simplification47.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 (* z (* (* x y) (* 18.0 t)))))
(if (<= t -1.02e-46)
t_1
(if (<= t -5.8e-187)
(* b c)
(if (<= t -1.25e-260)
(* (* j k) -27.0)
(if (<= t 1.25e-289)
(* b c)
(if (<= t 425000000.0)
(* k (* j -27.0))
(if (<= t 1.05e+173) t_1 (* t (* a -4.0))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = z * ((x * y) * (18.0 * t));
double tmp;
if (t <= -1.02e-46) {
tmp = t_1;
} else if (t <= -5.8e-187) {
tmp = b * c;
} else if (t <= -1.25e-260) {
tmp = (j * k) * -27.0;
} else if (t <= 1.25e-289) {
tmp = b * c;
} else if (t <= 425000000.0) {
tmp = k * (j * -27.0);
} else if (t <= 1.05e+173) {
tmp = t_1;
} else {
tmp = t * (a * -4.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = z * ((x * y) * (18.0d0 * t))
if (t <= (-1.02d-46)) then
tmp = t_1
else if (t <= (-5.8d-187)) then
tmp = b * c
else if (t <= (-1.25d-260)) then
tmp = (j * k) * (-27.0d0)
else if (t <= 1.25d-289) then
tmp = b * c
else if (t <= 425000000.0d0) then
tmp = k * (j * (-27.0d0))
else if (t <= 1.05d+173) then
tmp = t_1
else
tmp = t * (a * (-4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = z * ((x * y) * (18.0 * t));
double tmp;
if (t <= -1.02e-46) {
tmp = t_1;
} else if (t <= -5.8e-187) {
tmp = b * c;
} else if (t <= -1.25e-260) {
tmp = (j * k) * -27.0;
} else if (t <= 1.25e-289) {
tmp = b * c;
} else if (t <= 425000000.0) {
tmp = k * (j * -27.0);
} else if (t <= 1.05e+173) {
tmp = t_1;
} else {
tmp = t * (a * -4.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = z * ((x * y) * (18.0 * t)) tmp = 0 if t <= -1.02e-46: tmp = t_1 elif t <= -5.8e-187: tmp = b * c elif t <= -1.25e-260: tmp = (j * k) * -27.0 elif t <= 1.25e-289: tmp = b * c elif t <= 425000000.0: tmp = k * (j * -27.0) elif t <= 1.05e+173: tmp = t_1 else: tmp = t * (a * -4.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(z * Float64(Float64(x * y) * Float64(18.0 * t))) tmp = 0.0 if (t <= -1.02e-46) tmp = t_1; elseif (t <= -5.8e-187) tmp = Float64(b * c); elseif (t <= -1.25e-260) tmp = Float64(Float64(j * k) * -27.0); elseif (t <= 1.25e-289) tmp = Float64(b * c); elseif (t <= 425000000.0) tmp = Float64(k * Float64(j * -27.0)); elseif (t <= 1.05e+173) tmp = t_1; else tmp = Float64(t * Float64(a * -4.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = z * ((x * y) * (18.0 * t));
tmp = 0.0;
if (t <= -1.02e-46)
tmp = t_1;
elseif (t <= -5.8e-187)
tmp = b * c;
elseif (t <= -1.25e-260)
tmp = (j * k) * -27.0;
elseif (t <= 1.25e-289)
tmp = b * c;
elseif (t <= 425000000.0)
tmp = k * (j * -27.0);
elseif (t <= 1.05e+173)
tmp = t_1;
else
tmp = t * (a * -4.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(z * N[(N[(x * y), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.02e-46], t$95$1, If[LessEqual[t, -5.8e-187], N[(b * c), $MachinePrecision], If[LessEqual[t, -1.25e-260], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[t, 1.25e-289], N[(b * c), $MachinePrecision], If[LessEqual[t, 425000000.0], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e+173], t$95$1, N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := z \cdot \left(\left(x \cdot y\right) \cdot \left(18 \cdot t\right)\right)\\
\mathbf{if}\;t \leq -1.02 \cdot 10^{-46}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -5.8 \cdot 10^{-187}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;t \leq -1.25 \cdot 10^{-260}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-289}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;t \leq 425000000:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+173}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\end{array}
\end{array}
if t < -1.02e-46 or 4.25e8 < t < 1.05e173Initial program 86.0%
Simplified87.9%
Taylor expanded in x around inf 58.2%
expm1-log1p-u27.4%
expm1-udef27.3%
Applied egg-rr27.3%
expm1-def27.4%
expm1-log1p58.2%
associate-*r*56.9%
Simplified56.9%
Taylor expanded in t around inf 47.3%
associate-*r*47.3%
associate-*r*48.1%
associate-*r*48.9%
*-commutative48.9%
*-commutative48.9%
Simplified48.9%
if -1.02e-46 < t < -5.79999999999999977e-187 or -1.2500000000000001e-260 < t < 1.25000000000000007e-289Initial program 92.3%
Simplified90.0%
associate-*r*92.4%
distribute-rgt-out--92.3%
associate-*l*92.3%
*-commutative92.3%
*-commutative92.3%
Applied egg-rr92.3%
Taylor expanded in b around inf 46.8%
if -5.79999999999999977e-187 < t < -1.2500000000000001e-260Initial program 74.8%
Simplified63.2%
Taylor expanded in j around inf 63.4%
if 1.25000000000000007e-289 < t < 4.25e8Initial program 85.7%
Simplified85.6%
Taylor expanded in i around 0 71.5%
Taylor expanded in j around inf 41.5%
*-commutative41.5%
*-commutative41.5%
associate-*l*41.6%
Simplified41.6%
if 1.05e173 < t Initial program 75.0%
Simplified79.2%
associate-*r*87.5%
distribute-rgt-out--75.0%
associate-*l*62.7%
*-commutative62.7%
*-commutative62.7%
Applied egg-rr62.7%
Taylor expanded in a around inf 51.5%
*-commutative51.5%
*-commutative51.5%
associate-*r*51.5%
Simplified51.5%
Final simplification48.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (+ (* b c) t_1))
(t_3 (* t (+ (* a -4.0) (* 18.0 (* y (* x z)))))))
(if (<= t -1.55e-43)
t_3
(if (<= t 1.9e-250)
t_2
(if (<= t 9.5e-185)
(+ (* x (* i -4.0)) t_1)
(if (<= t 6800000000.0) t_2 t_3))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) + t_1;
double t_3 = t * ((a * -4.0) + (18.0 * (y * (x * z))));
double tmp;
if (t <= -1.55e-43) {
tmp = t_3;
} else if (t <= 1.9e-250) {
tmp = t_2;
} else if (t <= 9.5e-185) {
tmp = (x * (i * -4.0)) + t_1;
} else if (t <= 6800000000.0) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (b * c) + t_1
t_3 = t * ((a * (-4.0d0)) + (18.0d0 * (y * (x * z))))
if (t <= (-1.55d-43)) then
tmp = t_3
else if (t <= 1.9d-250) then
tmp = t_2
else if (t <= 9.5d-185) then
tmp = (x * (i * (-4.0d0))) + t_1
else if (t <= 6800000000.0d0) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) + t_1;
double t_3 = t * ((a * -4.0) + (18.0 * (y * (x * z))));
double tmp;
if (t <= -1.55e-43) {
tmp = t_3;
} else if (t <= 1.9e-250) {
tmp = t_2;
} else if (t <= 9.5e-185) {
tmp = (x * (i * -4.0)) + t_1;
} else if (t <= 6800000000.0) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (b * c) + t_1 t_3 = t * ((a * -4.0) + (18.0 * (y * (x * z)))) tmp = 0 if t <= -1.55e-43: tmp = t_3 elif t <= 1.9e-250: tmp = t_2 elif t <= 9.5e-185: tmp = (x * (i * -4.0)) + t_1 elif t <= 6800000000.0: tmp = t_2 else: tmp = t_3 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(b * c) + t_1) t_3 = Float64(t * Float64(Float64(a * -4.0) + Float64(18.0 * Float64(y * Float64(x * z))))) tmp = 0.0 if (t <= -1.55e-43) tmp = t_3; elseif (t <= 1.9e-250) tmp = t_2; elseif (t <= 9.5e-185) tmp = Float64(Float64(x * Float64(i * -4.0)) + t_1); elseif (t <= 6800000000.0) tmp = t_2; else tmp = t_3; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = (b * c) + t_1;
t_3 = t * ((a * -4.0) + (18.0 * (y * (x * z))));
tmp = 0.0;
if (t <= -1.55e-43)
tmp = t_3;
elseif (t <= 1.9e-250)
tmp = t_2;
elseif (t <= 9.5e-185)
tmp = (x * (i * -4.0)) + t_1;
elseif (t <= 6800000000.0)
tmp = t_2;
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.55e-43], t$95$3, If[LessEqual[t, 1.9e-250], t$95$2, If[LessEqual[t, 9.5e-185], N[(N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 6800000000.0], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c + t_1\\
t_3 := t \cdot \left(a \cdot -4 + 18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -1.55 \cdot 10^{-43}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-250}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-185}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right) + t_1\\
\mathbf{elif}\;t \leq 6800000000:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if t < -1.55e-43 or 6.8e9 < t Initial program 84.1%
Simplified86.4%
associate-*r*88.4%
distribute-rgt-out--84.1%
associate-*l*79.2%
*-commutative79.2%
*-commutative79.2%
Applied egg-rr79.2%
Taylor expanded in t around -inf 73.8%
associate-*r*73.8%
neg-mul-173.8%
cancel-sign-sub-inv73.8%
associate-*r*73.8%
metadata-eval73.8%
Simplified73.8%
Taylor expanded in t around 0 73.8%
associate-*r*73.8%
neg-mul-173.8%
*-commutative73.8%
*-commutative73.8%
*-commutative73.8%
associate-*r*73.8%
fma-udef73.8%
distribute-lft-neg-in73.8%
distribute-rgt-neg-in73.8%
fma-udef73.8%
+-commutative73.8%
distribute-neg-in73.8%
*-commutative73.8%
distribute-lft-neg-in73.8%
metadata-eval73.8%
associate-*r*73.8%
*-commutative73.8%
*-commutative73.8%
distribute-lft-neg-in73.8%
metadata-eval73.8%
*-commutative73.8%
associate-*l*76.2%
Simplified76.2%
if -1.55e-43 < t < 1.89999999999999985e-250 or 9.50000000000000042e-185 < t < 6.8e9Initial program 85.6%
Simplified82.9%
Taylor expanded in b around inf 64.4%
if 1.89999999999999985e-250 < t < 9.50000000000000042e-185Initial program 92.9%
Simplified92.7%
Taylor expanded in i around inf 99.9%
associate-*r*99.9%
*-commutative99.9%
Simplified99.9%
Final simplification72.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ (* b c) t_1)))
(if (<= t -4.2e-43)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= t 1.75e-249)
t_2
(if (<= t 1.5e-185)
(+ (* x (* i -4.0)) t_1)
(if (<= t 6500000000.0)
t_2
(* t (+ (* a -4.0) (* 18.0 (* y (* x z)))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) + t_1;
double tmp;
if (t <= -4.2e-43) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= 1.75e-249) {
tmp = t_2;
} else if (t <= 1.5e-185) {
tmp = (x * (i * -4.0)) + t_1;
} else if (t <= 6500000000.0) {
tmp = t_2;
} else {
tmp = t * ((a * -4.0) + (18.0 * (y * (x * z))));
}
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 = j * (k * (-27.0d0))
t_2 = (b * c) + t_1
if (t <= (-4.2d-43)) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (t <= 1.75d-249) then
tmp = t_2
else if (t <= 1.5d-185) then
tmp = (x * (i * (-4.0d0))) + t_1
else if (t <= 6500000000.0d0) then
tmp = t_2
else
tmp = t * ((a * (-4.0d0)) + (18.0d0 * (y * (x * z))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) + t_1;
double tmp;
if (t <= -4.2e-43) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= 1.75e-249) {
tmp = t_2;
} else if (t <= 1.5e-185) {
tmp = (x * (i * -4.0)) + t_1;
} else if (t <= 6500000000.0) {
tmp = t_2;
} else {
tmp = t * ((a * -4.0) + (18.0 * (y * (x * z))));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (b * c) + t_1 tmp = 0 if t <= -4.2e-43: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif t <= 1.75e-249: tmp = t_2 elif t <= 1.5e-185: tmp = (x * (i * -4.0)) + t_1 elif t <= 6500000000.0: tmp = t_2 else: tmp = t * ((a * -4.0) + (18.0 * (y * (x * z)))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(b * c) + t_1) tmp = 0.0 if (t <= -4.2e-43) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (t <= 1.75e-249) tmp = t_2; elseif (t <= 1.5e-185) tmp = Float64(Float64(x * Float64(i * -4.0)) + t_1); elseif (t <= 6500000000.0) tmp = t_2; else tmp = Float64(t * Float64(Float64(a * -4.0) + Float64(18.0 * Float64(y * Float64(x * z))))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = (b * c) + t_1;
tmp = 0.0;
if (t <= -4.2e-43)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (t <= 1.75e-249)
tmp = t_2;
elseif (t <= 1.5e-185)
tmp = (x * (i * -4.0)) + t_1;
elseif (t <= 6500000000.0)
tmp = t_2;
else
tmp = t * ((a * -4.0) + (18.0 * (y * (x * z))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t, -4.2e-43], 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-249], t$95$2, If[LessEqual[t, 1.5e-185], N[(N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 6500000000.0], t$95$2, N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(18.0 * N[(y * N[(x * z), $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}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c + t_1\\
\mathbf{if}\;t \leq -4.2 \cdot 10^{-43}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{-249}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{-185}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right) + t_1\\
\mathbf{elif}\;t \leq 6500000000:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot -4 + 18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if t < -4.2000000000000001e-43Initial program 87.1%
Simplified91.0%
Taylor expanded in t around inf 77.7%
if -4.2000000000000001e-43 < t < 1.75000000000000006e-249 or 1.50000000000000015e-185 < t < 6.5e9Initial program 85.6%
Simplified82.9%
Taylor expanded in b around inf 64.4%
if 1.75000000000000006e-249 < t < 1.50000000000000015e-185Initial program 92.9%
Simplified92.7%
Taylor expanded in i around inf 99.9%
associate-*r*99.9%
*-commutative99.9%
Simplified99.9%
if 6.5e9 < t Initial program 80.3%
Simplified80.6%
associate-*r*85.2%
distribute-rgt-out--80.3%
associate-*l*72.5%
*-commutative72.5%
*-commutative72.5%
Applied egg-rr72.5%
Taylor expanded in t around -inf 68.9%
associate-*r*68.9%
neg-mul-168.9%
cancel-sign-sub-inv68.9%
associate-*r*68.9%
metadata-eval68.9%
Simplified68.9%
Taylor expanded in t around 0 68.9%
associate-*r*68.9%
neg-mul-168.9%
*-commutative68.9%
*-commutative68.9%
*-commutative68.9%
associate-*r*68.9%
fma-udef68.9%
distribute-lft-neg-in68.9%
distribute-rgt-neg-in68.9%
fma-udef68.9%
+-commutative68.9%
distribute-neg-in68.9%
*-commutative68.9%
distribute-lft-neg-in68.9%
metadata-eval68.9%
associate-*r*68.9%
*-commutative68.9%
*-commutative68.9%
distribute-lft-neg-in68.9%
metadata-eval68.9%
*-commutative68.9%
associate-*l*74.6%
Simplified74.6%
Final simplification72.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -3.3e-47) (not (<= t 6.5e-91))) (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) (+ (* 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 ((t <= -3.3e-47) || !(t <= 6.5e-91)) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-3.3d-47)) .or. (.not. (t <= 6.5d-91))) then
tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
else
tmp = (b * c) + (j * (k * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -3.3e-47) || !(t <= 6.5e-91)) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -3.3e-47) or not (t <= 6.5e-91): tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) else: tmp = (b * c) + (j * (k * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -3.3e-47) || !(t <= 6.5e-91)) tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))); else tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -3.3e-47) || ~((t <= 6.5e-91)))
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
else
tmp = (b * c) + (j * (k * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -3.3e-47], N[Not[LessEqual[t, 6.5e-91]], $MachinePrecision]], 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[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.3 \cdot 10^{-47} \lor \neg \left(t \leq 6.5 \cdot 10^{-91}\right):\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if t < -3.30000000000000004e-47 or 6.5000000000000001e-91 < t Initial program 85.0%
Simplified87.5%
Taylor expanded in i around 0 85.5%
Taylor expanded in j around 0 78.2%
if -3.30000000000000004e-47 < t < 6.5000000000000001e-91Initial program 85.6%
Simplified81.6%
Taylor expanded in b around inf 67.9%
Final simplification74.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (* a -4.0))))
(if (<= t -0.125)
t_1
(if (<= t -5.2e-187)
(* b c)
(if (<= t -1e-260)
(* (* j k) -27.0)
(if (<= t 2.1e-290)
(* b c)
(if (<= t 1.8e+30) (* k (* j -27.0)) t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (a * -4.0);
double tmp;
if (t <= -0.125) {
tmp = t_1;
} else if (t <= -5.2e-187) {
tmp = b * c;
} else if (t <= -1e-260) {
tmp = (j * k) * -27.0;
} else if (t <= 2.1e-290) {
tmp = b * c;
} else if (t <= 1.8e+30) {
tmp = k * (j * -27.0);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = t * (a * (-4.0d0))
if (t <= (-0.125d0)) then
tmp = t_1
else if (t <= (-5.2d-187)) then
tmp = b * c
else if (t <= (-1d-260)) then
tmp = (j * k) * (-27.0d0)
else if (t <= 2.1d-290) then
tmp = b * c
else if (t <= 1.8d+30) then
tmp = k * (j * (-27.0d0))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (a * -4.0);
double tmp;
if (t <= -0.125) {
tmp = t_1;
} else if (t <= -5.2e-187) {
tmp = b * c;
} else if (t <= -1e-260) {
tmp = (j * k) * -27.0;
} else if (t <= 2.1e-290) {
tmp = b * c;
} else if (t <= 1.8e+30) {
tmp = k * (j * -27.0);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * (a * -4.0) tmp = 0 if t <= -0.125: tmp = t_1 elif t <= -5.2e-187: tmp = b * c elif t <= -1e-260: tmp = (j * k) * -27.0 elif t <= 2.1e-290: tmp = b * c elif t <= 1.8e+30: tmp = k * (j * -27.0) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(a * -4.0)) tmp = 0.0 if (t <= -0.125) tmp = t_1; elseif (t <= -5.2e-187) tmp = Float64(b * c); elseif (t <= -1e-260) tmp = Float64(Float64(j * k) * -27.0); elseif (t <= 2.1e-290) tmp = Float64(b * c); elseif (t <= 1.8e+30) tmp = Float64(k * Float64(j * -27.0)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * (a * -4.0);
tmp = 0.0;
if (t <= -0.125)
tmp = t_1;
elseif (t <= -5.2e-187)
tmp = b * c;
elseif (t <= -1e-260)
tmp = (j * k) * -27.0;
elseif (t <= 2.1e-290)
tmp = b * c;
elseif (t <= 1.8e+30)
tmp = k * (j * -27.0);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -0.125], t$95$1, If[LessEqual[t, -5.2e-187], N[(b * c), $MachinePrecision], If[LessEqual[t, -1e-260], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[t, 2.1e-290], N[(b * c), $MachinePrecision], If[LessEqual[t, 1.8e+30], N[(k * N[(j * -27.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 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;t \leq -0.125:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{-187}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;t \leq -1 \cdot 10^{-260}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-290}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+30}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -0.125 or 1.8000000000000001e30 < t Initial program 83.7%
Simplified86.2%
associate-*r*88.5%
distribute-rgt-out--83.7%
associate-*l*77.4%
*-commutative77.4%
*-commutative77.4%
Applied egg-rr77.4%
Taylor expanded in a around inf 40.8%
*-commutative40.8%
*-commutative40.8%
associate-*r*40.8%
Simplified40.8%
if -0.125 < t < -5.1999999999999999e-187 or -9.99999999999999961e-261 < t < 2.1000000000000001e-290Initial program 91.6%
Simplified89.6%
associate-*r*91.6%
distribute-rgt-out--91.6%
associate-*l*93.4%
*-commutative93.4%
*-commutative93.4%
Applied egg-rr93.4%
Taylor expanded in b around inf 40.2%
if -5.1999999999999999e-187 < t < -9.99999999999999961e-261Initial program 74.8%
Simplified63.2%
Taylor expanded in j around inf 63.4%
if 2.1000000000000001e-290 < t < 1.8000000000000001e30Initial program 85.9%
Simplified85.9%
Taylor expanded in i around 0 71.2%
Taylor expanded in j around inf 38.5%
*-commutative38.5%
*-commutative38.5%
associate-*l*38.5%
Simplified38.5%
Final simplification41.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* z (* (* x y) (* 18.0 t)))))
(if (<= t -5.7e-42)
t_1
(if (<= t 3.2e+39)
(+ (* b c) (* j (* k -27.0)))
(if (<= t 1.7e+173) t_1 (* t (* a -4.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = z * ((x * y) * (18.0 * t));
double tmp;
if (t <= -5.7e-42) {
tmp = t_1;
} else if (t <= 3.2e+39) {
tmp = (b * c) + (j * (k * -27.0));
} else if (t <= 1.7e+173) {
tmp = t_1;
} else {
tmp = t * (a * -4.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = z * ((x * y) * (18.0d0 * t))
if (t <= (-5.7d-42)) then
tmp = t_1
else if (t <= 3.2d+39) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (t <= 1.7d+173) then
tmp = t_1
else
tmp = t * (a * (-4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = z * ((x * y) * (18.0 * t));
double tmp;
if (t <= -5.7e-42) {
tmp = t_1;
} else if (t <= 3.2e+39) {
tmp = (b * c) + (j * (k * -27.0));
} else if (t <= 1.7e+173) {
tmp = t_1;
} else {
tmp = t * (a * -4.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = z * ((x * y) * (18.0 * t)) tmp = 0 if t <= -5.7e-42: tmp = t_1 elif t <= 3.2e+39: tmp = (b * c) + (j * (k * -27.0)) elif t <= 1.7e+173: tmp = t_1 else: tmp = t * (a * -4.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(z * Float64(Float64(x * y) * Float64(18.0 * t))) tmp = 0.0 if (t <= -5.7e-42) tmp = t_1; elseif (t <= 3.2e+39) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (t <= 1.7e+173) tmp = t_1; else tmp = Float64(t * Float64(a * -4.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = z * ((x * y) * (18.0 * t));
tmp = 0.0;
if (t <= -5.7e-42)
tmp = t_1;
elseif (t <= 3.2e+39)
tmp = (b * c) + (j * (k * -27.0));
elseif (t <= 1.7e+173)
tmp = t_1;
else
tmp = t * (a * -4.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(z * N[(N[(x * y), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.7e-42], t$95$1, If[LessEqual[t, 3.2e+39], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.7e+173], t$95$1, N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := z \cdot \left(\left(x \cdot y\right) \cdot \left(18 \cdot t\right)\right)\\
\mathbf{if}\;t \leq -5.7 \cdot 10^{-42}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+39}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{+173}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\end{array}
\end{array}
if t < -5.6999999999999999e-42 or 3.19999999999999993e39 < t < 1.70000000000000011e173Initial program 86.4%
Simplified88.5%
Taylor expanded in x around inf 59.4%
expm1-log1p-u28.2%
expm1-udef28.1%
Applied egg-rr28.1%
expm1-def28.2%
expm1-log1p59.4%
associate-*r*57.9%
Simplified57.9%
Taylor expanded in t around inf 49.7%
associate-*r*49.7%
associate-*r*50.7%
associate-*r*51.5%
*-commutative51.5%
*-commutative51.5%
Simplified51.5%
if -5.6999999999999999e-42 < t < 3.19999999999999993e39Initial program 86.1%
Simplified83.9%
Taylor expanded in b around inf 62.3%
if 1.70000000000000011e173 < t Initial program 75.0%
Simplified79.2%
associate-*r*87.5%
distribute-rgt-out--75.0%
associate-*l*62.7%
*-commutative62.7%
*-commutative62.7%
Applied egg-rr62.7%
Taylor expanded in a around inf 51.5%
*-commutative51.5%
*-commutative51.5%
associate-*r*51.5%
Simplified51.5%
Final simplification56.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (or (<= a -5.4e+91) (not (<= a 1.8e+55)))
(+ t_1 (* -4.0 (* t a)))
(+ (* b c) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if ((a <= -5.4e+91) || !(a <= 1.8e+55)) {
tmp = t_1 + (-4.0 * (t * a));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if ((a <= (-5.4d+91)) .or. (.not. (a <= 1.8d+55))) then
tmp = t_1 + ((-4.0d0) * (t * a))
else
tmp = (b * c) + t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if ((a <= -5.4e+91) || !(a <= 1.8e+55)) {
tmp = t_1 + (-4.0 * (t * a));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if (a <= -5.4e+91) or not (a <= 1.8e+55): tmp = t_1 + (-4.0 * (t * a)) else: tmp = (b * c) + t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if ((a <= -5.4e+91) || !(a <= 1.8e+55)) tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a))); else tmp = Float64(Float64(b * c) + t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
tmp = 0.0;
if ((a <= -5.4e+91) || ~((a <= 1.8e+55)))
tmp = t_1 + (-4.0 * (t * a));
else
tmp = (b * c) + t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[a, -5.4e+91], N[Not[LessEqual[a, 1.8e+55]], $MachinePrecision]], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;a \leq -5.4 \cdot 10^{+91} \lor \neg \left(a \leq 1.8 \cdot 10^{+55}\right):\\
\;\;\;\;t_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t_1\\
\end{array}
\end{array}
if a < -5.4e91 or 1.79999999999999994e55 < a Initial program 80.9%
Simplified82.2%
Taylor expanded in a around inf 67.7%
*-commutative67.7%
Simplified67.7%
if -5.4e91 < a < 1.79999999999999994e55Initial program 87.7%
Simplified87.1%
Taylor expanded in b around inf 51.0%
Final simplification57.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= k -4.6e-91) (not (<= k 2.3e+135))) (* (* j k) -27.0) (* b c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((k <= -4.6e-91) || !(k <= 2.3e+135)) {
tmp = (j * k) * -27.0;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((k <= (-4.6d-91)) .or. (.not. (k <= 2.3d+135))) then
tmp = (j * k) * (-27.0d0)
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((k <= -4.6e-91) || !(k <= 2.3e+135)) {
tmp = (j * k) * -27.0;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (k <= -4.6e-91) or not (k <= 2.3e+135): tmp = (j * k) * -27.0 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((k <= -4.6e-91) || !(k <= 2.3e+135)) tmp = Float64(Float64(j * k) * -27.0); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((k <= -4.6e-91) || ~((k <= 2.3e+135)))
tmp = (j * k) * -27.0;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[k, -4.6e-91], N[Not[LessEqual[k, 2.3e+135]], $MachinePrecision]], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], N[(b * c), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -4.6 \cdot 10^{-91} \lor \neg \left(k \leq 2.3 \cdot 10^{+135}\right):\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if k < -4.59999999999999991e-91 or 2.3000000000000001e135 < k Initial program 82.6%
Simplified81.1%
Taylor expanded in j around inf 40.4%
if -4.59999999999999991e-91 < k < 2.3000000000000001e135Initial program 87.5%
Simplified89.0%
associate-*r*89.7%
distribute-rgt-out--87.5%
associate-*l*85.4%
*-commutative85.4%
*-commutative85.4%
Applied egg-rr85.4%
Taylor expanded in b around inf 26.1%
Final simplification32.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= k -5.2e-91) (* (* j k) -27.0) (if (<= k 2e+135) (* 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 (k <= -5.2e-91) {
tmp = (j * k) * -27.0;
} else if (k <= 2e+135) {
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 (k <= (-5.2d-91)) then
tmp = (j * k) * (-27.0d0)
else if (k <= 2d+135) 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 (k <= -5.2e-91) {
tmp = (j * k) * -27.0;
} else if (k <= 2e+135) {
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 k <= -5.2e-91: tmp = (j * k) * -27.0 elif k <= 2e+135: 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 (k <= -5.2e-91) tmp = Float64(Float64(j * k) * -27.0); elseif (k <= 2e+135) tmp = Float64(b * c); else tmp = Float64(j * Float64(k * -27.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (k <= -5.2e-91)
tmp = (j * k) * -27.0;
elseif (k <= 2e+135)
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[LessEqual[k, -5.2e-91], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[k, 2e+135], N[(b * c), $MachinePrecision], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -5.2 \cdot 10^{-91}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;k \leq 2 \cdot 10^{+135}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if k < -5.20000000000000028e-91Initial program 82.7%
Simplified81.6%
Taylor expanded in j around inf 34.7%
if -5.20000000000000028e-91 < k < 1.99999999999999992e135Initial program 87.5%
Simplified89.0%
associate-*r*89.7%
distribute-rgt-out--87.5%
associate-*l*85.4%
*-commutative85.4%
*-commutative85.4%
Applied egg-rr85.4%
Taylor expanded in b around inf 26.1%
if 1.99999999999999992e135 < k Initial program 82.4%
Simplified80.0%
Taylor expanded in j around inf 52.2%
*-commutative52.2%
associate-*r*52.3%
*-commutative52.3%
Simplified52.3%
Final simplification32.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 (<= k -5.2e-91) (* (* j k) -27.0) (if (<= k 2.1e+135) (* b c) (* k (* j -27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -5.2e-91) {
tmp = (j * k) * -27.0;
} else if (k <= 2.1e+135) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (k <= (-5.2d-91)) then
tmp = (j * k) * (-27.0d0)
else if (k <= 2.1d+135) then
tmp = b * c
else
tmp = k * (j * (-27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -5.2e-91) {
tmp = (j * k) * -27.0;
} else if (k <= 2.1e+135) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if k <= -5.2e-91: tmp = (j * k) * -27.0 elif k <= 2.1e+135: tmp = b * c else: tmp = k * (j * -27.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -5.2e-91) tmp = Float64(Float64(j * k) * -27.0); elseif (k <= 2.1e+135) tmp = Float64(b * c); else tmp = Float64(k * Float64(j * -27.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (k <= -5.2e-91)
tmp = (j * k) * -27.0;
elseif (k <= 2.1e+135)
tmp = b * c;
else
tmp = k * (j * -27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -5.2e-91], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[k, 2.1e+135], N[(b * c), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -5.2 \cdot 10^{-91}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;k \leq 2.1 \cdot 10^{+135}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if k < -5.20000000000000028e-91Initial program 82.7%
Simplified81.6%
Taylor expanded in j around inf 34.7%
if -5.20000000000000028e-91 < k < 2.1000000000000001e135Initial program 87.5%
Simplified89.0%
associate-*r*89.7%
distribute-rgt-out--87.5%
associate-*l*85.4%
*-commutative85.4%
*-commutative85.4%
Applied egg-rr85.4%
Taylor expanded in b around inf 26.1%
if 2.1000000000000001e135 < k Initial program 82.4%
Simplified80.1%
Taylor expanded in i around 0 74.8%
Taylor expanded in j around inf 52.2%
*-commutative52.2%
*-commutative52.2%
associate-*l*52.4%
Simplified52.4%
Final simplification32.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 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 85.2%
Simplified85.3%
associate-*r*87.5%
distribute-rgt-out--85.2%
associate-*l*82.9%
*-commutative82.9%
*-commutative82.9%
Applied egg-rr82.9%
Taylor expanded in b around inf 22.2%
Final simplification22.2%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
(t_2
(-
(- (* (* 18.0 t) (* (* x y) z)) t_1)
(- (* (* k j) 27.0) (* c b)))))
(if (< t -1.6210815397541398e-69)
t_2
(if (< t 165.68027943805222)
(+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((a * t) + (i * x)) * 4.0d0
t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
if (t < (-1.6210815397541398d-69)) then
tmp = t_2
else if (t < 165.68027943805222d0) then
tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((a * t) + (i * x)) * 4.0 t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)) tmp = 0 if t < -1.6210815397541398e-69: tmp = t_2 elif t < 165.68027943805222: tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0) t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b))) tmp = 0.0 if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((a * t) + (i * x)) * 4.0; t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)); tmp = 0.0; if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
herbie shell --seed 2023331
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:herbie-target
(if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))