
(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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k))
(t_2
(-
(-
(- (* b c) (- (* t (* a 4.0)) (* (* (* (* x 18.0) y) z) t)))
(* (* x 4.0) i))
t_1)))
(if (<= t_2 INFINITY)
t_2
(- (* c (+ b (* 18.0 (/ (* z (* x (* y t))) c)))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = (j * 27.0) * k;
double t_2 = (((b * c) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i)) - t_1;
double tmp;
if (t_2 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = (c * (b + (18.0 * ((z * (x * (y * t))) / c)))) - t_1;
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = (((b * c) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i)) - t_1;
double tmp;
if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = (c * (b + (18.0 * ((z * (x * (y * t))) / 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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = (((b * c) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i)) - t_1 tmp = 0 if t_2 <= math.inf: tmp = t_2 else: tmp = (c * (b + (18.0 * ((z * (x * (y * t))) / 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(Float64(Float64(Float64(b * c) - Float64(Float64(t * Float64(a * 4.0)) - Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t))) - Float64(Float64(x * 4.0) * i)) - t_1) tmp = 0.0 if (t_2 <= Inf) tmp = t_2; else tmp = Float64(Float64(c * Float64(b + Float64(18.0 * Float64(Float64(z * Float64(x * Float64(y * t))) / 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
t_2 = (((b * c) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i)) - t_1;
tmp = 0.0;
if (t_2 <= Inf)
tmp = t_2;
else
tmp = (c * (b + (18.0 * ((z * (x * (y * t))) / 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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(b * c), $MachinePrecision] - N[(N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, Infinity], t$95$2, N[(N[(c * N[(b + N[(18.0 * N[(N[(z * N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := \left(\left(b \cdot c - \left(t \cdot \left(a \cdot 4\right) - \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right)\right) - \left(x \cdot 4\right) \cdot i\right) - t\_1\\
\mathbf{if}\;t\_2 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(b + 18 \cdot \frac{z \cdot \left(x \cdot \left(y \cdot t\right)\right)}{c}\right) - t\_1\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 96.6%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Taylor expanded in c around -inf 26.9%
associate-*r*26.9%
mul-1-neg26.9%
distribute-lft-out26.9%
associate-*r*30.8%
distribute-lft-out30.8%
*-commutative30.8%
Simplified30.8%
Taylor expanded in y around inf 57.7%
associate-*r*46.2%
associate-*r*46.2%
*-commutative46.2%
associate-*r*61.5%
Simplified61.5%
Final simplification93.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 4.0 (* t a)))) (t_2 (* (* j 27.0) k)))
(if (<= t_2 -1e+20)
(+ (* 18.0 (* t (* z (* x y)))) (* j (* k -27.0)))
(if (<= t_2 -1e-75)
t_1
(if (<= t_2 -2e-228)
(* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))
(if (<= t_2 3e-123)
t_1
(if (<= t_2 2e+100)
(- (* b c) (* 4.0 (* x i)))
(+ (* 18.0 (* (* y z) (* x t))) (* k (* j -27.0))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = (b * c) - (4.0 * (t * a));
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -1e+20) {
tmp = (18.0 * (t * (z * (x * y)))) + (j * (k * -27.0));
} else if (t_2 <= -1e-75) {
tmp = t_1;
} else if (t_2 <= -2e-228) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else if (t_2 <= 3e-123) {
tmp = t_1;
} else if (t_2 <= 2e+100) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (18.0 * ((y * z) * (x * t))) + (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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) - (4.0d0 * (t * a))
t_2 = (j * 27.0d0) * k
if (t_2 <= (-1d+20)) then
tmp = (18.0d0 * (t * (z * (x * y)))) + (j * (k * (-27.0d0)))
else if (t_2 <= (-1d-75)) then
tmp = t_1
else if (t_2 <= (-2d-228)) then
tmp = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
else if (t_2 <= 3d-123) then
tmp = t_1
else if (t_2 <= 2d+100) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = (18.0d0 * ((y * z) * (x * t))) + (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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (t * a));
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -1e+20) {
tmp = (18.0 * (t * (z * (x * y)))) + (j * (k * -27.0));
} else if (t_2 <= -1e-75) {
tmp = t_1;
} else if (t_2 <= -2e-228) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else if (t_2 <= 3e-123) {
tmp = t_1;
} else if (t_2 <= 2e+100) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (18.0 * ((y * z) * (x * t))) + (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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (4.0 * (t * a)) t_2 = (j * 27.0) * k tmp = 0 if t_2 <= -1e+20: tmp = (18.0 * (t * (z * (x * y)))) + (j * (k * -27.0)) elif t_2 <= -1e-75: tmp = t_1 elif t_2 <= -2e-228: tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)) elif t_2 <= 3e-123: tmp = t_1 elif t_2 <= 2e+100: tmp = (b * c) - (4.0 * (x * i)) else: tmp = (18.0 * ((y * z) * (x * t))) + (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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -1e+20) tmp = Float64(Float64(18.0 * Float64(t * Float64(z * Float64(x * y)))) + Float64(j * Float64(k * -27.0))); elseif (t_2 <= -1e-75) tmp = t_1; elseif (t_2 <= -2e-228) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))); elseif (t_2 <= 3e-123) tmp = t_1; elseif (t_2 <= 2e+100) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))) + 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (4.0 * (t * a));
t_2 = (j * 27.0) * k;
tmp = 0.0;
if (t_2 <= -1e+20)
tmp = (18.0 * (t * (z * (x * y)))) + (j * (k * -27.0));
elseif (t_2 <= -1e-75)
tmp = t_1;
elseif (t_2 <= -2e-228)
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
elseif (t_2 <= 3e-123)
tmp = t_1;
elseif (t_2 <= 2e+100)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = (18.0 * ((y * z) * (x * t))) + (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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+20], N[(N[(18.0 * N[(t * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1e-75], t$95$1, If[LessEqual[t$95$2, -2e-228], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 3e-123], t$95$1, If[LessEqual[t$95$2, 2e+100], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(t \cdot a\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+20}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(z \cdot \left(x \cdot y\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-228}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{elif}\;t\_2 \leq 3 \cdot 10^{-123}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+100}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right) + k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1e20Initial program 86.4%
Simplified88.4%
Taylor expanded in y around inf 74.8%
associate-*r*72.7%
Simplified72.7%
Taylor expanded in t around 0 74.8%
associate-*r*76.5%
Simplified76.5%
if -1e20 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.9999999999999996e-76 or -2.00000000000000007e-228 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.99999999999999984e-123Initial program 91.0%
Taylor expanded in x around 0 63.7%
Taylor expanded in j around 0 63.6%
if -9.9999999999999996e-76 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.00000000000000007e-228Initial program 85.2%
Simplified90.2%
associate-*r*90.2%
distribute-rgt-out--85.2%
associate-+l-85.2%
associate-*l*79.8%
fma-neg79.8%
associate-*l*79.9%
*-commutative79.9%
Applied egg-rr79.9%
fma-undefine79.9%
unsub-neg79.9%
*-commutative79.9%
associate-*r*79.9%
*-commutative79.9%
*-commutative79.9%
*-commutative79.9%
associate-*l*79.9%
*-commutative79.9%
*-commutative79.9%
Simplified79.9%
Taylor expanded in x around inf 79.2%
cancel-sign-sub-inv79.2%
associate-*r*79.3%
metadata-eval79.3%
Simplified79.3%
if 2.99999999999999984e-123 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.00000000000000003e100Initial program 89.0%
Taylor expanded in t around 0 67.5%
Taylor expanded in j around 0 63.1%
if 2.00000000000000003e100 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 74.9%
Simplified85.0%
Taylor expanded in y around inf 75.4%
associate-*r*75.3%
Simplified75.3%
Taylor expanded in j around 0 75.3%
metadata-eval75.3%
distribute-lft-neg-in75.3%
associate-*r*75.3%
*-commutative75.3%
distribute-rgt-neg-in75.3%
distribute-lft-neg-in75.3%
metadata-eval75.3%
Simplified75.3%
Final simplification69.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 4.0 (* t a))))
(t_2 (* (* j 27.0) k))
(t_3 (* j (* k -27.0))))
(if (<= t_2 -1e+20)
(+ (* 18.0 (* t (* z (* x y)))) t_3)
(if (<= t_2 -1e-75)
t_1
(if (<= t_2 -2e-228)
(* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))
(if (<= t_2 3e-123)
t_1
(if (<= t_2 2e+100)
(- (* b c) (* 4.0 (* x i)))
(+ t_3 (* 18.0 (* (* y z) (* x t)))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = (b * c) - (4.0 * (t * a));
double t_2 = (j * 27.0) * k;
double t_3 = j * (k * -27.0);
double tmp;
if (t_2 <= -1e+20) {
tmp = (18.0 * (t * (z * (x * y)))) + t_3;
} else if (t_2 <= -1e-75) {
tmp = t_1;
} else if (t_2 <= -2e-228) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else if (t_2 <= 3e-123) {
tmp = t_1;
} else if (t_2 <= 2e+100) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_3 + (18.0 * ((y * z) * (x * t)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = (b * c) - (4.0d0 * (t * a))
t_2 = (j * 27.0d0) * k
t_3 = j * (k * (-27.0d0))
if (t_2 <= (-1d+20)) then
tmp = (18.0d0 * (t * (z * (x * y)))) + t_3
else if (t_2 <= (-1d-75)) then
tmp = t_1
else if (t_2 <= (-2d-228)) then
tmp = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
else if (t_2 <= 3d-123) then
tmp = t_1
else if (t_2 <= 2d+100) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = t_3 + (18.0d0 * ((y * z) * (x * t)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (t * a));
double t_2 = (j * 27.0) * k;
double t_3 = j * (k * -27.0);
double tmp;
if (t_2 <= -1e+20) {
tmp = (18.0 * (t * (z * (x * y)))) + t_3;
} else if (t_2 <= -1e-75) {
tmp = t_1;
} else if (t_2 <= -2e-228) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else if (t_2 <= 3e-123) {
tmp = t_1;
} else if (t_2 <= 2e+100) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_3 + (18.0 * ((y * z) * (x * t)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (4.0 * (t * a)) t_2 = (j * 27.0) * k t_3 = j * (k * -27.0) tmp = 0 if t_2 <= -1e+20: tmp = (18.0 * (t * (z * (x * y)))) + t_3 elif t_2 <= -1e-75: tmp = t_1 elif t_2 <= -2e-228: tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)) elif t_2 <= 3e-123: tmp = t_1 elif t_2 <= 2e+100: tmp = (b * c) - (4.0 * (x * i)) else: tmp = t_3 + (18.0 * ((y * z) * (x * t))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) t_2 = Float64(Float64(j * 27.0) * k) t_3 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (t_2 <= -1e+20) tmp = Float64(Float64(18.0 * Float64(t * Float64(z * Float64(x * y)))) + t_3); elseif (t_2 <= -1e-75) tmp = t_1; elseif (t_2 <= -2e-228) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))); elseif (t_2 <= 3e-123) tmp = t_1; elseif (t_2 <= 2e+100) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(t_3 + Float64(18.0 * Float64(Float64(y * z) * Float64(x * t)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (4.0 * (t * a));
t_2 = (j * 27.0) * k;
t_3 = j * (k * -27.0);
tmp = 0.0;
if (t_2 <= -1e+20)
tmp = (18.0 * (t * (z * (x * y)))) + t_3;
elseif (t_2 <= -1e-75)
tmp = t_1;
elseif (t_2 <= -2e-228)
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
elseif (t_2 <= 3e-123)
tmp = t_1;
elseif (t_2 <= 2e+100)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = t_3 + (18.0 * ((y * z) * (x * t)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$3 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+20], N[(N[(18.0 * N[(t * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision], If[LessEqual[t$95$2, -1e-75], t$95$1, If[LessEqual[t$95$2, -2e-228], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 3e-123], t$95$1, If[LessEqual[t$95$2, 2e+100], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$3 + N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(t \cdot a\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
t_3 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+20}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(z \cdot \left(x \cdot y\right)\right)\right) + t\_3\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-228}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{elif}\;t\_2 \leq 3 \cdot 10^{-123}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+100}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3 + 18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1e20Initial program 86.4%
Simplified88.4%
Taylor expanded in y around inf 74.8%
associate-*r*72.7%
Simplified72.7%
Taylor expanded in t around 0 74.8%
associate-*r*76.5%
Simplified76.5%
if -1e20 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.9999999999999996e-76 or -2.00000000000000007e-228 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.99999999999999984e-123Initial program 91.0%
Taylor expanded in x around 0 63.7%
Taylor expanded in j around 0 63.6%
if -9.9999999999999996e-76 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.00000000000000007e-228Initial program 85.2%
Simplified90.2%
associate-*r*90.2%
distribute-rgt-out--85.2%
associate-+l-85.2%
associate-*l*79.8%
fma-neg79.8%
associate-*l*79.9%
*-commutative79.9%
Applied egg-rr79.9%
fma-undefine79.9%
unsub-neg79.9%
*-commutative79.9%
associate-*r*79.9%
*-commutative79.9%
*-commutative79.9%
*-commutative79.9%
associate-*l*79.9%
*-commutative79.9%
*-commutative79.9%
Simplified79.9%
Taylor expanded in x around inf 79.2%
cancel-sign-sub-inv79.2%
associate-*r*79.3%
metadata-eval79.3%
Simplified79.3%
if 2.99999999999999984e-123 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.00000000000000003e100Initial program 89.0%
Taylor expanded in t around 0 67.5%
Taylor expanded in j around 0 63.1%
if 2.00000000000000003e100 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 74.9%
Simplified85.0%
Taylor expanded in y around inf 75.4%
associate-*r*75.3%
Simplified75.3%
Final simplification69.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 4.0 (* t a))))
(t_2 (* (* j 27.0) k))
(t_3 (* j (* k -27.0))))
(if (<= t_2 -1e+20)
(+ (* 18.0 (* t (* z (* x y)))) t_3)
(if (<= t_2 -1e-75)
t_1
(if (<= t_2 -2e-228)
(* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))
(if (<= t_2 3e-123)
t_1
(if (<= t_2 2e+100)
(- (* b c) (* 4.0 (* x i)))
(+ t_3 (* (* t a) -4.0)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = (b * c) - (4.0 * (t * a));
double t_2 = (j * 27.0) * k;
double t_3 = j * (k * -27.0);
double tmp;
if (t_2 <= -1e+20) {
tmp = (18.0 * (t * (z * (x * y)))) + t_3;
} else if (t_2 <= -1e-75) {
tmp = t_1;
} else if (t_2 <= -2e-228) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else if (t_2 <= 3e-123) {
tmp = t_1;
} else if (t_2 <= 2e+100) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_3 + ((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.
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 = (b * c) - (4.0d0 * (t * a))
t_2 = (j * 27.0d0) * k
t_3 = j * (k * (-27.0d0))
if (t_2 <= (-1d+20)) then
tmp = (18.0d0 * (t * (z * (x * y)))) + t_3
else if (t_2 <= (-1d-75)) then
tmp = t_1
else if (t_2 <= (-2d-228)) then
tmp = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
else if (t_2 <= 3d-123) then
tmp = t_1
else if (t_2 <= 2d+100) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = t_3 + ((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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (t * a));
double t_2 = (j * 27.0) * k;
double t_3 = j * (k * -27.0);
double tmp;
if (t_2 <= -1e+20) {
tmp = (18.0 * (t * (z * (x * y)))) + t_3;
} else if (t_2 <= -1e-75) {
tmp = t_1;
} else if (t_2 <= -2e-228) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else if (t_2 <= 3e-123) {
tmp = t_1;
} else if (t_2 <= 2e+100) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_3 + ((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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (4.0 * (t * a)) t_2 = (j * 27.0) * k t_3 = j * (k * -27.0) tmp = 0 if t_2 <= -1e+20: tmp = (18.0 * (t * (z * (x * y)))) + t_3 elif t_2 <= -1e-75: tmp = t_1 elif t_2 <= -2e-228: tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)) elif t_2 <= 3e-123: tmp = t_1 elif t_2 <= 2e+100: tmp = (b * c) - (4.0 * (x * i)) else: tmp = t_3 + ((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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) t_2 = Float64(Float64(j * 27.0) * k) t_3 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (t_2 <= -1e+20) tmp = Float64(Float64(18.0 * Float64(t * Float64(z * Float64(x * y)))) + t_3); elseif (t_2 <= -1e-75) tmp = t_1; elseif (t_2 <= -2e-228) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))); elseif (t_2 <= 3e-123) tmp = t_1; elseif (t_2 <= 2e+100) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(t_3 + Float64(Float64(t * 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (4.0 * (t * a));
t_2 = (j * 27.0) * k;
t_3 = j * (k * -27.0);
tmp = 0.0;
if (t_2 <= -1e+20)
tmp = (18.0 * (t * (z * (x * y)))) + t_3;
elseif (t_2 <= -1e-75)
tmp = t_1;
elseif (t_2 <= -2e-228)
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
elseif (t_2 <= 3e-123)
tmp = t_1;
elseif (t_2 <= 2e+100)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = t_3 + ((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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$3 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+20], N[(N[(18.0 * N[(t * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision], If[LessEqual[t$95$2, -1e-75], t$95$1, If[LessEqual[t$95$2, -2e-228], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 3e-123], t$95$1, If[LessEqual[t$95$2, 2e+100], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$3 + N[(N[(t * a), $MachinePrecision] * -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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(t \cdot a\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
t_3 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+20}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(z \cdot \left(x \cdot y\right)\right)\right) + t\_3\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-228}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{elif}\;t\_2 \leq 3 \cdot 10^{-123}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+100}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3 + \left(t \cdot a\right) \cdot -4\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1e20Initial program 86.4%
Simplified88.4%
Taylor expanded in y around inf 74.8%
associate-*r*72.7%
Simplified72.7%
Taylor expanded in t around 0 74.8%
associate-*r*76.5%
Simplified76.5%
if -1e20 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.9999999999999996e-76 or -2.00000000000000007e-228 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.99999999999999984e-123Initial program 91.0%
Taylor expanded in x around 0 63.7%
Taylor expanded in j around 0 63.6%
if -9.9999999999999996e-76 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.00000000000000007e-228Initial program 85.2%
Simplified90.2%
associate-*r*90.2%
distribute-rgt-out--85.2%
associate-+l-85.2%
associate-*l*79.8%
fma-neg79.8%
associate-*l*79.9%
*-commutative79.9%
Applied egg-rr79.9%
fma-undefine79.9%
unsub-neg79.9%
*-commutative79.9%
associate-*r*79.9%
*-commutative79.9%
*-commutative79.9%
*-commutative79.9%
associate-*l*79.9%
*-commutative79.9%
*-commutative79.9%
Simplified79.9%
Taylor expanded in x around inf 79.2%
cancel-sign-sub-inv79.2%
associate-*r*79.3%
metadata-eval79.3%
Simplified79.3%
if 2.99999999999999984e-123 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.00000000000000003e100Initial program 89.0%
Taylor expanded in t around 0 67.5%
Taylor expanded in j around 0 63.1%
if 2.00000000000000003e100 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 74.9%
Simplified85.0%
Taylor expanded in a around inf 74.9%
*-commutative74.9%
Simplified74.9%
Final simplification69.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 a) -4.0)))
(t_2 (* (* j 27.0) k))
(t_3 (- (* b c) (* 4.0 (* x i)))))
(if (<= t_2 -1e+28)
t_1
(if (<= t_2 -5e-263)
t_3
(if (<= t_2 3e-123)
(- (* b c) (* 4.0 (* t a)))
(if (<= t_2 2e+100) t_3 t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = (j * (k * -27.0)) + ((t * a) * -4.0);
double t_2 = (j * 27.0) * k;
double t_3 = (b * c) - (4.0 * (x * i));
double tmp;
if (t_2 <= -1e+28) {
tmp = t_1;
} else if (t_2 <= -5e-263) {
tmp = t_3;
} else if (t_2 <= 3e-123) {
tmp = (b * c) - (4.0 * (t * a));
} else if (t_2 <= 2e+100) {
tmp = t_3;
} 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.
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 * a) * (-4.0d0))
t_2 = (j * 27.0d0) * k
t_3 = (b * c) - (4.0d0 * (x * i))
if (t_2 <= (-1d+28)) then
tmp = t_1
else if (t_2 <= (-5d-263)) then
tmp = t_3
else if (t_2 <= 3d-123) then
tmp = (b * c) - (4.0d0 * (t * a))
else if (t_2 <= 2d+100) then
tmp = t_3
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;
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)) + ((t * a) * -4.0);
double t_2 = (j * 27.0) * k;
double t_3 = (b * c) - (4.0 * (x * i));
double tmp;
if (t_2 <= -1e+28) {
tmp = t_1;
} else if (t_2 <= -5e-263) {
tmp = t_3;
} else if (t_2 <= 3e-123) {
tmp = (b * c) - (4.0 * (t * a));
} else if (t_2 <= 2e+100) {
tmp = t_3;
} 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]) [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 * a) * -4.0) t_2 = (j * 27.0) * k t_3 = (b * c) - (4.0 * (x * i)) tmp = 0 if t_2 <= -1e+28: tmp = t_1 elif t_2 <= -5e-263: tmp = t_3 elif t_2 <= 3e-123: tmp = (b * c) - (4.0 * (t * a)) elif t_2 <= 2e+100: tmp = t_3 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * Float64(k * -27.0)) + Float64(Float64(t * a) * -4.0)) t_2 = Float64(Float64(j * 27.0) * k) t_3 = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) tmp = 0.0 if (t_2 <= -1e+28) tmp = t_1; elseif (t_2 <= -5e-263) tmp = t_3; elseif (t_2 <= 3e-123) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); elseif (t_2 <= 2e+100) tmp = t_3; 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])){:}
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 * a) * -4.0);
t_2 = (j * 27.0) * k;
t_3 = (b * c) - (4.0 * (x * i));
tmp = 0.0;
if (t_2 <= -1e+28)
tmp = t_1;
elseif (t_2 <= -5e-263)
tmp = t_3;
elseif (t_2 <= 3e-123)
tmp = (b * c) - (4.0 * (t * a));
elseif (t_2 <= 2e+100)
tmp = t_3;
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+28], t$95$1, If[LessEqual[t$95$2, -5e-263], t$95$3, If[LessEqual[t$95$2, 3e-123], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+100], t$95$3, 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])\\\\
[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) + \left(t \cdot a\right) \cdot -4\\
t_2 := \left(j \cdot 27\right) \cdot k\\
t_3 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-263}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 3 \cdot 10^{-123}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+100}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.99999999999999958e27 or 2.00000000000000003e100 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 82.3%
Simplified86.8%
Taylor expanded in a around inf 73.4%
*-commutative73.4%
Simplified73.4%
if -9.99999999999999958e27 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.00000000000000006e-263 or 2.99999999999999984e-123 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.00000000000000003e100Initial program 88.8%
Taylor expanded in t around 0 64.3%
Taylor expanded in j around 0 62.1%
if -5.00000000000000006e-263 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.99999999999999984e-123Initial program 89.7%
Taylor expanded in x around 0 63.8%
Taylor expanded in j around 0 63.8%
Final simplification66.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* j 27.0) 5e+73)
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(* -27.0 (* j k))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 ((j * 27.0) <= 5e+73) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 ((j * 27.0d0) <= 5d+73) then
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((j * 27.0) <= 5e+73) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (j * 27.0) <= 5e+73: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(j * 27.0) <= 5e+73) 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)))); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((j * 27.0) <= 5e+73)
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(j * 27.0), $MachinePrecision], 5e+73], 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], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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}\;j \cdot 27 \leq 5 \cdot 10^{+73}:\\
\;\;\;\;\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)\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 j #s(literal 27 binary64)) < 4.99999999999999976e73Initial program 88.1%
Simplified91.1%
if 4.99999999999999976e73 < (*.f64 j #s(literal 27 binary64)) Initial program 81.7%
Simplified80.1%
Taylor expanded in j around inf 52.0%
Final simplification82.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (<= i -3e+35) (not (<= i 1.75e+19)))
(- (- (* b c) (* 4.0 (+ (* t a) (* x i)))) (* (* j 27.0) k))
(-
(+ (* 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);
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 ((i <= -3e+35) || !(i <= 1.75e+19)) {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
} 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.
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 ((i <= (-3d+35)) .or. (.not. (i <= 1.75d+19))) then
tmp = ((b * c) - (4.0d0 * ((t * a) + (x * i)))) - ((j * 27.0d0) * k)
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;
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 ((i <= -3e+35) || !(i <= 1.75e+19)) {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
} 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]) [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 (i <= -3e+35) or not (i <= 1.75e+19): tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k) 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]) 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 ((i <= -3e+35) || !(i <= 1.75e+19)) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(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])){:}
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 ((i <= -3e+35) || ~((i <= 1.75e+19)))
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
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. 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[i, -3e+35], N[Not[LessEqual[i, 1.75e+19]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], 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])\\\\
[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}\;i \leq -3 \cdot 10^{+35} \lor \neg \left(i \leq 1.75 \cdot 10^{+19}\right):\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(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 i < -2.99999999999999991e35 or 1.75e19 < i Initial program 86.9%
Taylor expanded in y around 0 87.9%
distribute-lft-out87.9%
*-commutative87.9%
Simplified87.9%
if -2.99999999999999991e35 < i < 1.75e19Initial program 86.6%
Simplified89.5%
Taylor expanded in i around 0 84.2%
Final simplification85.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k))
(t_2 (* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))))
(if (<= x -8.5e-28)
t_2
(if (<= x 6.4e-189)
(- (- (* b c) (* 4.0 (* t a))) t_1)
(if (<= x 4.4e+225) (- (* x (- (/ (* b c) x) (* 4.0 i))) t_1) t_2)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = (j * 27.0) * k;
double t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
double tmp;
if (x <= -8.5e-28) {
tmp = t_2;
} else if (x <= 6.4e-189) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (x <= 4.4e+225) {
tmp = (x * (((b * c) / x) - (4.0 * i))) - t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 * 27.0d0) * k
t_2 = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
if (x <= (-8.5d-28)) then
tmp = t_2
else if (x <= 6.4d-189) then
tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
else if (x <= 4.4d+225) then
tmp = (x * (((b * c) / x) - (4.0d0 * i))) - t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
double tmp;
if (x <= -8.5e-28) {
tmp = t_2;
} else if (x <= 6.4e-189) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (x <= 4.4e+225) {
tmp = (x * (((b * c) / x) - (4.0 * i))) - t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0)) tmp = 0 if x <= -8.5e-28: tmp = t_2 elif x <= 6.4e-189: tmp = ((b * c) - (4.0 * (t * a))) - t_1 elif x <= 4.4e+225: tmp = (x * (((b * c) / x) - (4.0 * i))) - t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))) tmp = 0.0 if (x <= -8.5e-28) tmp = t_2; elseif (x <= 6.4e-189) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1); elseif (x <= 4.4e+225) tmp = Float64(Float64(x * Float64(Float64(Float64(b * c) / x) - Float64(4.0 * i))) - t_1); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
tmp = 0.0;
if (x <= -8.5e-28)
tmp = t_2;
elseif (x <= 6.4e-189)
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
elseif (x <= 4.4e+225)
tmp = (x * (((b * c) / x) - (4.0 * i))) - t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.5e-28], t$95$2, If[LessEqual[x, 6.4e-189], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[x, 4.4e+225], N[(N[(x * N[(N[(N[(b * c), $MachinePrecision] / x), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{-28}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 6.4 \cdot 10^{-189}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{+225}:\\
\;\;\;\;x \cdot \left(\frac{b \cdot c}{x} - 4 \cdot i\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -8.49999999999999925e-28 or 4.40000000000000028e225 < x Initial program 74.4%
Simplified83.2%
associate-*r*78.9%
distribute-rgt-out--74.4%
associate-+l-74.4%
associate-*l*75.5%
fma-neg75.5%
associate-*l*75.5%
*-commutative75.5%
Applied egg-rr75.5%
fma-undefine75.5%
unsub-neg75.5%
*-commutative75.5%
associate-*r*75.5%
*-commutative75.5%
*-commutative75.5%
*-commutative75.5%
associate-*l*75.5%
*-commutative75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in x around inf 74.8%
cancel-sign-sub-inv74.8%
associate-*r*74.9%
metadata-eval74.9%
Simplified74.9%
if -8.49999999999999925e-28 < x < 6.4000000000000001e-189Initial program 97.6%
Taylor expanded in x around 0 84.4%
if 6.4000000000000001e-189 < x < 4.40000000000000028e225Initial program 88.6%
Taylor expanded in t around 0 72.5%
Taylor expanded in x around inf 72.5%
Final simplification77.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k))
(t_2 (* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))))
(if (<= x -1.6e-35)
t_2
(if (<= x 2.55e-191)
(- (- (* b c) (* 4.0 (* t a))) t_1)
(if (<= x 3.8e+226) (- (- (* b c) (* 4.0 (* x i))) t_1) t_2)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = (j * 27.0) * k;
double t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
double tmp;
if (x <= -1.6e-35) {
tmp = t_2;
} else if (x <= 2.55e-191) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (x <= 3.8e+226) {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 * 27.0d0) * k
t_2 = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
if (x <= (-1.6d-35)) then
tmp = t_2
else if (x <= 2.55d-191) then
tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
else if (x <= 3.8d+226) then
tmp = ((b * c) - (4.0d0 * (x * i))) - t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
double tmp;
if (x <= -1.6e-35) {
tmp = t_2;
} else if (x <= 2.55e-191) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (x <= 3.8e+226) {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0)) tmp = 0 if x <= -1.6e-35: tmp = t_2 elif x <= 2.55e-191: tmp = ((b * c) - (4.0 * (t * a))) - t_1 elif x <= 3.8e+226: tmp = ((b * c) - (4.0 * (x * i))) - t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))) tmp = 0.0 if (x <= -1.6e-35) tmp = t_2; elseif (x <= 2.55e-191) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1); elseif (x <= 3.8e+226) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_1); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
tmp = 0.0;
if (x <= -1.6e-35)
tmp = t_2;
elseif (x <= 2.55e-191)
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
elseif (x <= 3.8e+226)
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.6e-35], t$95$2, If[LessEqual[x, 2.55e-191], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[x, 3.8e+226], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{if}\;x \leq -1.6 \cdot 10^{-35}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 2.55 \cdot 10^{-191}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{+226}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -1.5999999999999999e-35 or 3.79999999999999983e226 < x Initial program 74.4%
Simplified83.2%
associate-*r*78.9%
distribute-rgt-out--74.4%
associate-+l-74.4%
associate-*l*75.5%
fma-neg75.5%
associate-*l*75.5%
*-commutative75.5%
Applied egg-rr75.5%
fma-undefine75.5%
unsub-neg75.5%
*-commutative75.5%
associate-*r*75.5%
*-commutative75.5%
*-commutative75.5%
*-commutative75.5%
associate-*l*75.5%
*-commutative75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in x around inf 74.8%
cancel-sign-sub-inv74.8%
associate-*r*74.9%
metadata-eval74.9%
Simplified74.9%
if -1.5999999999999999e-35 < x < 2.5500000000000001e-191Initial program 97.6%
Taylor expanded in x around 0 84.4%
if 2.5500000000000001e-191 < x < 3.79999999999999983e226Initial program 88.6%
Taylor expanded in t around 0 72.5%
Final simplification77.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= z -1e-122)
(* 18.0 (* t (* x (* y z))))
(if (<= z 1.22e-117)
(* b c)
(if (<= z 2.5e-85)
(* -27.0 (* j k))
(if (<= z 9.4e+42) (* x (* i -4.0)) (* t (* 18.0 (* y (* x z)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 (z <= -1e-122) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (z <= 1.22e-117) {
tmp = b * c;
} else if (z <= 2.5e-85) {
tmp = -27.0 * (j * k);
} else if (z <= 9.4e+42) {
tmp = x * (i * -4.0);
} else {
tmp = t * (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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (z <= (-1d-122)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (z <= 1.22d-117) then
tmp = b * c
else if (z <= 2.5d-85) then
tmp = (-27.0d0) * (j * k)
else if (z <= 9.4d+42) then
tmp = x * (i * (-4.0d0))
else
tmp = t * (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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= -1e-122) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (z <= 1.22e-117) {
tmp = b * c;
} else if (z <= 2.5e-85) {
tmp = -27.0 * (j * k);
} else if (z <= 9.4e+42) {
tmp = x * (i * -4.0);
} else {
tmp = t * (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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if z <= -1e-122: tmp = 18.0 * (t * (x * (y * z))) elif z <= 1.22e-117: tmp = b * c elif z <= 2.5e-85: tmp = -27.0 * (j * k) elif z <= 9.4e+42: tmp = x * (i * -4.0) else: tmp = t * (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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (z <= -1e-122) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (z <= 1.22e-117) tmp = Float64(b * c); elseif (z <= 2.5e-85) tmp = Float64(-27.0 * Float64(j * k)); elseif (z <= 9.4e+42) tmp = Float64(x * Float64(i * -4.0)); else tmp = Float64(t * 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (z <= -1e-122)
tmp = 18.0 * (t * (x * (y * z)));
elseif (z <= 1.22e-117)
tmp = b * c;
elseif (z <= 2.5e-85)
tmp = -27.0 * (j * k);
elseif (z <= 9.4e+42)
tmp = x * (i * -4.0);
else
tmp = t * (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. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[z, -1e-122], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.22e-117], N[(b * c), $MachinePrecision], If[LessEqual[z, 2.5e-85], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.4e+42], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(18.0 * N[(y * N[(x * z), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-122}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;z \leq 1.22 \cdot 10^{-117}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-85}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;z \leq 9.4 \cdot 10^{+42}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if z < -1.00000000000000006e-122Initial program 79.8%
Taylor expanded in t around -inf 49.8%
associate-*r*49.8%
neg-mul-149.8%
cancel-sign-sub-inv49.8%
metadata-eval49.8%
*-commutative49.8%
associate-*r*49.8%
Simplified49.8%
Taylor expanded in x around inf 39.3%
if -1.00000000000000006e-122 < z < 1.21999999999999997e-117Initial program 94.5%
Simplified98.8%
Taylor expanded in b around inf 49.7%
Taylor expanded in b around inf 29.9%
*-commutative29.9%
Simplified29.9%
if 1.21999999999999997e-117 < z < 2.5000000000000001e-85Initial program 79.7%
Simplified79.4%
Taylor expanded in j around inf 100.0%
if 2.5000000000000001e-85 < z < 9.39999999999999971e42Initial program 83.3%
Simplified86.4%
Taylor expanded in i around inf 52.7%
metadata-eval52.7%
distribute-lft-neg-in52.7%
*-commutative52.7%
associate-*r*52.7%
distribute-rgt-neg-in52.7%
distribute-rgt-neg-in52.7%
metadata-eval52.7%
*-commutative52.7%
Simplified52.7%
Taylor expanded in i around inf 52.8%
Taylor expanded in i around inf 26.2%
*-commutative26.2%
*-commutative26.2%
associate-*r*26.2%
Simplified26.2%
if 9.39999999999999971e42 < z Initial program 85.7%
Taylor expanded in t around -inf 52.3%
associate-*r*52.3%
neg-mul-152.3%
cancel-sign-sub-inv52.3%
metadata-eval52.3%
*-commutative52.3%
associate-*r*52.4%
Simplified52.4%
Taylor expanded in x around inf 41.1%
*-commutative41.1%
associate-*l*41.1%
*-commutative41.1%
associate-*l*48.0%
*-commutative48.0%
Simplified48.0%
Final simplification37.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (<= y -4.6e+130)
t_1
(if (<= y -1.16e+73)
(* -27.0 (* j k))
(if (<= y -1.6e-184)
(* b c)
(if (<= y 5.2e-168) (* x (* i -4.0)) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 (y <= -4.6e+130) {
tmp = t_1;
} else if (y <= -1.16e+73) {
tmp = -27.0 * (j * k);
} else if (y <= -1.6e-184) {
tmp = b * c;
} else if (y <= 5.2e-168) {
tmp = x * (i * -4.0);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (y <= (-4.6d+130)) then
tmp = t_1
else if (y <= (-1.16d+73)) then
tmp = (-27.0d0) * (j * k)
else if (y <= (-1.6d-184)) then
tmp = b * c
else if (y <= 5.2d-168) then
tmp = x * (i * (-4.0d0))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 (y <= -4.6e+130) {
tmp = t_1;
} else if (y <= -1.16e+73) {
tmp = -27.0 * (j * k);
} else if (y <= -1.6e-184) {
tmp = b * c;
} else if (y <= 5.2e-168) {
tmp = x * (i * -4.0);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 y <= -4.6e+130: tmp = t_1 elif y <= -1.16e+73: tmp = -27.0 * (j * k) elif y <= -1.6e-184: tmp = b * c elif y <= 5.2e-168: tmp = x * (i * -4.0) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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 (y <= -4.6e+130) tmp = t_1; elseif (y <= -1.16e+73) tmp = Float64(-27.0 * Float64(j * k)); elseif (y <= -1.6e-184) tmp = Float64(b * c); elseif (y <= 5.2e-168) tmp = Float64(x * Float64(i * -4.0)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 (y <= -4.6e+130)
tmp = t_1;
elseif (y <= -1.16e+73)
tmp = -27.0 * (j * k);
elseif (y <= -1.6e-184)
tmp = b * c;
elseif (y <= 5.2e-168)
tmp = x * (i * -4.0);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[y, -4.6e+130], t$95$1, If[LessEqual[y, -1.16e+73], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.6e-184], N[(b * c), $MachinePrecision], If[LessEqual[y, 5.2e-168], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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}\;y \leq -4.6 \cdot 10^{+130}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.16 \cdot 10^{+73}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;y \leq -1.6 \cdot 10^{-184}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-168}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.60000000000000042e130 or 5.2000000000000002e-168 < y Initial program 85.0%
Taylor expanded in t around -inf 46.6%
associate-*r*46.6%
neg-mul-146.6%
cancel-sign-sub-inv46.6%
metadata-eval46.6%
*-commutative46.6%
associate-*r*46.6%
Simplified46.6%
Taylor expanded in x around inf 37.5%
if -4.60000000000000042e130 < y < -1.16000000000000007e73Initial program 93.7%
Simplified99.9%
Taylor expanded in j around inf 57.7%
if -1.16000000000000007e73 < y < -1.6e-184Initial program 85.0%
Simplified93.6%
Taylor expanded in b around inf 57.1%
Taylor expanded in b around inf 38.4%
*-commutative38.4%
Simplified38.4%
if -1.6e-184 < y < 5.2000000000000002e-168Initial program 91.4%
Simplified95.7%
Taylor expanded in i around inf 54.3%
metadata-eval54.3%
distribute-lft-neg-in54.3%
*-commutative54.3%
associate-*r*54.3%
distribute-rgt-neg-in54.3%
distribute-rgt-neg-in54.3%
metadata-eval54.3%
*-commutative54.3%
Simplified54.3%
Taylor expanded in i around inf 54.5%
Taylor expanded in i around inf 31.7%
*-commutative31.7%
*-commutative31.7%
associate-*r*31.7%
Simplified31.7%
Final simplification37.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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.25e+19)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= x 4.4e+225)
(- (- (* b c) (* 4.0 (+ (* t a) (* x i)))) (* (* j 27.0) k))
(* x (+ (* 18.0 (* z (* y t))) (* i -4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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.25e+19) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (x <= 4.4e+225) {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
} else {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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.25d+19)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (x <= 4.4d+225) then
tmp = ((b * c) - (4.0d0 * ((t * a) + (x * i)))) - ((j * 27.0d0) * k)
else
tmp = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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.25e+19) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (x <= 4.4e+225) {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
} else {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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.25e+19: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif x <= 4.4e+225: tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k) else: tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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.25e+19) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (x <= 4.4e+225) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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.25e+19)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (x <= 4.4e+225)
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
else
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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.25e+19], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.4e+225], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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.25 \cdot 10^{+19}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{+225}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\end{array}
\end{array}
if x < -2.25e19Initial program 75.9%
Simplified83.8%
Taylor expanded in x around inf 73.9%
if -2.25e19 < x < 4.40000000000000028e225Initial program 91.9%
Taylor expanded in y around 0 86.4%
distribute-lft-out86.4%
*-commutative86.4%
Simplified86.4%
if 4.40000000000000028e225 < x Initial program 74.6%
Simplified83.8%
associate-*r*74.6%
distribute-rgt-out--74.6%
associate-+l-74.6%
associate-*l*71.2%
fma-neg71.2%
associate-*l*71.2%
*-commutative71.2%
Applied egg-rr71.2%
fma-undefine71.2%
unsub-neg71.2%
*-commutative71.2%
associate-*r*71.2%
*-commutative71.2%
*-commutative71.2%
*-commutative71.2%
associate-*l*71.2%
*-commutative71.2%
*-commutative71.2%
Simplified71.2%
Taylor expanded in x around inf 87.2%
cancel-sign-sub-inv87.2%
associate-*r*87.2%
metadata-eval87.2%
Simplified87.2%
Final simplification84.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= x -5.3e-30) (not (<= x 3.1e+199))) (* x (+ (* 18.0 (* z (* y t))) (* i -4.0))) (- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -5.3e-30) || !(x <= 3.1e+199)) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-5.3d-30)) .or. (.not. (x <= 3.1d+199))) then
tmp = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
else
tmp = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -5.3e-30) || !(x <= 3.1e+199)) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -5.3e-30) or not (x <= 3.1e+199): tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)) else: tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -5.3e-30) || !(x <= 3.1e+199)) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -5.3e-30) || ~((x <= 3.1e+199)))
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
else
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -5.3e-30], N[Not[LessEqual[x, 3.1e+199]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.3 \cdot 10^{-30} \lor \neg \left(x \leq 3.1 \cdot 10^{+199}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if x < -5.29999999999999974e-30 or 3.09999999999999986e199 < x Initial program 75.0%
Simplified84.2%
associate-*r*79.2%
distribute-rgt-out--75.0%
associate-+l-75.0%
associate-*l*76.0%
fma-neg76.0%
associate-*l*76.0%
*-commutative76.0%
Applied egg-rr76.0%
fma-undefine76.0%
unsub-neg76.0%
*-commutative76.0%
associate-*r*76.0%
*-commutative76.0%
*-commutative76.0%
*-commutative76.0%
associate-*l*76.0%
*-commutative76.0%
*-commutative76.0%
Simplified76.0%
Taylor expanded in x around inf 74.4%
cancel-sign-sub-inv74.4%
associate-*r*74.5%
metadata-eval74.5%
Simplified74.5%
if -5.29999999999999974e-30 < x < 3.09999999999999986e199Initial program 93.7%
Taylor expanded in x around 0 75.1%
Final simplification74.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= j -7.2e+133)
(+ (* b c) (* j (* k -27.0)))
(if (<= j -1.08e-229)
(- (* b c) (* 4.0 (* x i)))
(if (<= j 7.8e+105) (- (* b c) (* 4.0 (* t a))) (* -27.0 (* j k))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 (j <= -7.2e+133) {
tmp = (b * c) + (j * (k * -27.0));
} else if (j <= -1.08e-229) {
tmp = (b * c) - (4.0 * (x * i));
} else if (j <= 7.8e+105) {
tmp = (b * c) - (4.0 * (t * a));
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (j <= (-7.2d+133)) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (j <= (-1.08d-229)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (j <= 7.8d+105) then
tmp = (b * c) - (4.0d0 * (t * a))
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -7.2e+133) {
tmp = (b * c) + (j * (k * -27.0));
} else if (j <= -1.08e-229) {
tmp = (b * c) - (4.0 * (x * i));
} else if (j <= 7.8e+105) {
tmp = (b * c) - (4.0 * (t * a));
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if j <= -7.2e+133: tmp = (b * c) + (j * (k * -27.0)) elif j <= -1.08e-229: tmp = (b * c) - (4.0 * (x * i)) elif j <= 7.8e+105: tmp = (b * c) - (4.0 * (t * a)) else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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 (j <= -7.2e+133) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (j <= -1.08e-229) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (j <= 7.8e+105) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (j <= -7.2e+133)
tmp = (b * c) + (j * (k * -27.0));
elseif (j <= -1.08e-229)
tmp = (b * c) - (4.0 * (x * i));
elseif (j <= 7.8e+105)
tmp = (b * c) - (4.0 * (t * a));
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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[j, -7.2e+133], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -1.08e-229], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 7.8e+105], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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}\;j \leq -7.2 \cdot 10^{+133}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;j \leq -1.08 \cdot 10^{-229}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;j \leq 7.8 \cdot 10^{+105}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if j < -7.19999999999999956e133Initial program 93.7%
Simplified93.8%
Taylor expanded in b around inf 54.4%
if -7.19999999999999956e133 < j < -1.08000000000000005e-229Initial program 83.1%
Taylor expanded in t around 0 61.4%
Taylor expanded in j around 0 45.2%
if -1.08000000000000005e-229 < j < 7.79999999999999957e105Initial program 89.6%
Taylor expanded in x around 0 54.0%
Taylor expanded in j around 0 49.7%
if 7.79999999999999957e105 < j Initial program 79.5%
Simplified79.9%
Taylor expanded in j around inf 61.4%
Final simplification51.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (<= x -8.5e-28)
t_1
(if (<= x 4.4e+199)
(+ (* b c) (* j (* k -27.0)))
(if (<= x 5.2e+238) t_1 (* x (* i -4.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = 18.0 * (t * (x * (y * z)));
double tmp;
if (x <= -8.5e-28) {
tmp = t_1;
} else if (x <= 4.4e+199) {
tmp = (b * c) + (j * (k * -27.0));
} else if (x <= 5.2e+238) {
tmp = t_1;
} else {
tmp = x * (i * -4.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (x <= (-8.5d-28)) then
tmp = t_1
else if (x <= 4.4d+199) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (x <= 5.2d+238) then
tmp = t_1
else
tmp = x * (i * (-4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 (x <= -8.5e-28) {
tmp = t_1;
} else if (x <= 4.4e+199) {
tmp = (b * c) + (j * (k * -27.0));
} else if (x <= 5.2e+238) {
tmp = t_1;
} else {
tmp = x * (i * -4.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 x <= -8.5e-28: tmp = t_1 elif x <= 4.4e+199: tmp = (b * c) + (j * (k * -27.0)) elif x <= 5.2e+238: tmp = t_1 else: tmp = x * (i * -4.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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 (x <= -8.5e-28) tmp = t_1; elseif (x <= 4.4e+199) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (x <= 5.2e+238) tmp = t_1; else tmp = Float64(x * Float64(i * -4.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 (x <= -8.5e-28)
tmp = t_1;
elseif (x <= 4.4e+199)
tmp = (b * c) + (j * (k * -27.0));
elseif (x <= 5.2e+238)
tmp = t_1;
else
tmp = x * (i * -4.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[x, -8.5e-28], t$95$1, If[LessEqual[x, 4.4e+199], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.2e+238], t$95$1, N[(x * N[(i * -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])\\\\
[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}\;x \leq -8.5 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{+199}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{+238}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\end{array}
\end{array}
if x < -8.49999999999999925e-28 or 4.4000000000000003e199 < x < 5.1999999999999999e238Initial program 75.0%
Taylor expanded in t around -inf 56.2%
associate-*r*56.2%
neg-mul-156.2%
cancel-sign-sub-inv56.2%
metadata-eval56.2%
*-commutative56.2%
associate-*r*56.2%
Simplified56.2%
Taylor expanded in x around inf 49.4%
if -8.49999999999999925e-28 < x < 4.4000000000000003e199Initial program 93.7%
Simplified92.1%
Taylor expanded in b around inf 56.5%
if 5.1999999999999999e238 < x Initial program 75.0%
Simplified83.3%
Taylor expanded in i around inf 75.6%
metadata-eval75.6%
distribute-lft-neg-in75.6%
*-commutative75.6%
associate-*r*75.6%
distribute-rgt-neg-in75.6%
distribute-rgt-neg-in75.6%
metadata-eval75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in i around inf 75.6%
Taylor expanded in i around inf 67.5%
*-commutative67.5%
*-commutative67.5%
associate-*r*67.5%
Simplified67.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= x -3.2e-32) (not (<= x 5.8e+78))) (* x (+ (* 18.0 (* z (* y t))) (* i -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);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -3.2e-32) || !(x <= 5.8e+78)) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-3.2d-32)) .or. (.not. (x <= 5.8d+78))) then
tmp = x * ((18.0d0 * (z * (y * t))) + (i * (-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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -3.2e-32) || !(x <= 5.8e+78)) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -3.2e-32) or not (x <= 5.8e+78): tmp = x * ((18.0 * (z * (y * t))) + (i * -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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -3.2e-32) || !(x <= 5.8e+78)) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -3.2e-32) || ~((x <= 5.8e+78)))
tmp = x * ((18.0 * (z * (y * t))) + (i * -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. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -3.2e-32], N[Not[LessEqual[x, 5.8e+78]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.2 \cdot 10^{-32} \lor \neg \left(x \leq 5.8 \cdot 10^{+78}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if x < -3.2000000000000002e-32 or 5.80000000000000034e78 < x Initial program 75.2%
Simplified84.5%
associate-*r*78.7%
distribute-rgt-out--75.2%
associate-+l-75.2%
associate-*l*76.0%
fma-neg76.0%
associate-*l*76.0%
*-commutative76.0%
Applied egg-rr76.0%
fma-undefine76.0%
unsub-neg76.0%
*-commutative76.0%
associate-*r*76.0%
*-commutative76.0%
*-commutative76.0%
*-commutative76.0%
associate-*l*76.0%
*-commutative76.0%
*-commutative76.0%
Simplified76.0%
Taylor expanded in x around inf 69.8%
cancel-sign-sub-inv69.8%
associate-*r*69.8%
metadata-eval69.8%
Simplified69.8%
if -3.2000000000000002e-32 < x < 5.80000000000000034e78Initial program 96.3%
Simplified92.3%
Taylor expanded in b around inf 59.2%
Final simplification64.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 -0.246)
(* -27.0 (* j k))
(if (<= k 1.05e-280)
(* x (* i -4.0))
(if (<= k 1.9e+115) (* 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);
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 <= -0.246) {
tmp = -27.0 * (j * k);
} else if (k <= 1.05e-280) {
tmp = x * (i * -4.0);
} else if (k <= 1.9e+115) {
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.
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 <= (-0.246d0)) then
tmp = (-27.0d0) * (j * k)
else if (k <= 1.05d-280) then
tmp = x * (i * (-4.0d0))
else if (k <= 1.9d+115) 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;
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 <= -0.246) {
tmp = -27.0 * (j * k);
} else if (k <= 1.05e-280) {
tmp = x * (i * -4.0);
} else if (k <= 1.9e+115) {
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]) [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 <= -0.246: tmp = -27.0 * (j * k) elif k <= 1.05e-280: tmp = x * (i * -4.0) elif k <= 1.9e+115: 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]) 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 <= -0.246) tmp = Float64(-27.0 * Float64(j * k)); elseif (k <= 1.05e-280) tmp = Float64(x * Float64(i * -4.0)); elseif (k <= 1.9e+115) 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])){:}
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 <= -0.246)
tmp = -27.0 * (j * k);
elseif (k <= 1.05e-280)
tmp = x * (i * -4.0);
elseif (k <= 1.9e+115)
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. 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, -0.246], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.05e-280], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.9e+115], 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])\\\\
[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 -0.246:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;k \leq 1.05 \cdot 10^{-280}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;k \leq 1.9 \cdot 10^{+115}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if k < -0.246Initial program 80.4%
Simplified90.3%
Taylor expanded in j around inf 40.8%
if -0.246 < k < 1.05e-280Initial program 92.1%
Simplified92.1%
Taylor expanded in i around inf 40.5%
metadata-eval40.5%
distribute-lft-neg-in40.5%
*-commutative40.5%
associate-*r*40.5%
distribute-rgt-neg-in40.5%
distribute-rgt-neg-in40.5%
metadata-eval40.5%
*-commutative40.5%
Simplified40.5%
Taylor expanded in i around inf 40.5%
Taylor expanded in i around inf 35.8%
*-commutative35.8%
*-commutative35.8%
associate-*r*35.8%
Simplified35.8%
if 1.05e-280 < k < 1.9e115Initial program 88.3%
Simplified89.6%
Taylor expanded in b around inf 36.4%
Taylor expanded in b around inf 29.0%
*-commutative29.0%
Simplified29.0%
if 1.9e115 < k Initial program 82.2%
Simplified86.6%
Taylor expanded in b around inf 68.7%
Taylor expanded in b around 0 58.0%
*-commutative58.0%
associate-*r*58.0%
*-commutative58.0%
Simplified58.0%
Final simplification38.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= j -1.35e-110) (+ (* b c) (* j (* k -27.0))) (if (<= j 1.06e+118) (- (* b c) (* 4.0 (* t a))) (* -27.0 (* j k)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 (j <= -1.35e-110) {
tmp = (b * c) + (j * (k * -27.0));
} else if (j <= 1.06e+118) {
tmp = (b * c) - (4.0 * (t * a));
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (j <= (-1.35d-110)) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (j <= 1.06d+118) then
tmp = (b * c) - (4.0d0 * (t * a))
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -1.35e-110) {
tmp = (b * c) + (j * (k * -27.0));
} else if (j <= 1.06e+118) {
tmp = (b * c) - (4.0 * (t * a));
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if j <= -1.35e-110: tmp = (b * c) + (j * (k * -27.0)) elif j <= 1.06e+118: tmp = (b * c) - (4.0 * (t * a)) else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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 (j <= -1.35e-110) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (j <= 1.06e+118) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (j <= -1.35e-110)
tmp = (b * c) + (j * (k * -27.0));
elseif (j <= 1.06e+118)
tmp = (b * c) - (4.0 * (t * a));
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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[j, -1.35e-110], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.06e+118], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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}\;j \leq -1.35 \cdot 10^{-110}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;j \leq 1.06 \cdot 10^{+118}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if j < -1.3499999999999999e-110Initial program 85.4%
Simplified92.1%
Taylor expanded in b around inf 46.6%
if -1.3499999999999999e-110 < j < 1.06e118Initial program 90.0%
Taylor expanded in x around 0 56.1%
Taylor expanded in j around 0 52.6%
if 1.06e118 < j Initial program 78.5%
Simplified78.9%
Taylor expanded in j around inf 64.2%
Final simplification52.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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 (<= j -5.8e+126) (not (<= j 3.8e-41))) (* -27.0 (* j k)) (* b c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 ((j <= -5.8e+126) || !(j <= 3.8e-41)) {
tmp = -27.0 * (j * k);
} 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.
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 ((j <= (-5.8d+126)) .or. (.not. (j <= 3.8d-41))) then
tmp = (-27.0d0) * (j * k)
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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((j <= -5.8e+126) || !(j <= 3.8e-41)) {
tmp = -27.0 * (j * k);
} 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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (j <= -5.8e+126) or not (j <= 3.8e-41): tmp = -27.0 * (j * k) 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]) 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 ((j <= -5.8e+126) || !(j <= 3.8e-41)) tmp = Float64(-27.0 * Float64(j * k)); 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((j <= -5.8e+126) || ~((j <= 3.8e-41)))
tmp = -27.0 * (j * k);
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. 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[j, -5.8e+126], N[Not[LessEqual[j, 3.8e-41]], $MachinePrecision]], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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}\;j \leq -5.8 \cdot 10^{+126} \lor \neg \left(j \leq 3.8 \cdot 10^{-41}\right):\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if j < -5.79999999999999971e126 or 3.79999999999999979e-41 < j Initial program 88.1%
Simplified88.2%
Taylor expanded in j around inf 42.8%
if -5.79999999999999971e126 < j < 3.79999999999999979e-41Initial program 85.8%
Simplified91.3%
Taylor expanded in b around inf 36.5%
Taylor expanded in b around inf 30.1%
*-commutative30.1%
Simplified30.1%
Final simplification35.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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);
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.
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;
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]) [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]) 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])){:}
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. 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])\\\\
[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 86.8%
Simplified89.9%
Taylor expanded in b around inf 44.2%
Taylor expanded in b around inf 24.0%
*-commutative24.0%
Simplified24.0%
Final simplification24.0%
(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 2024145
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:alt
(! :herbie-platform default (if (< t -8105407698770699/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))) (if (< t 8284013971902611/50000000000000) (+ (- (* (* 18 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4)) (- (* c b) (* 27 (* k j)))) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))