
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* (* x 18.0) y) z)))
(if (<=
(-
(- (+ (- (* t_1 t) (* t (* a 4.0))) (* b c)) (* (* x 4.0) i))
(* (* j 27.0) k))
INFINITY)
(+
(* t (+ t_1 (* a -4.0)))
(+ (* -27.0 (* j k)) (+ (* b c) (* x (* i -4.0)))))
(* x (+ (* i -4.0) (/ (+ (* b c) (* k (* j -27.0))) x))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((x * 18.0) * y) * z;
double tmp;
if ((((((t_1 * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= ((double) INFINITY)) {
tmp = (t * (t_1 + (a * -4.0))) + ((-27.0 * (j * k)) + ((b * c) + (x * (i * -4.0))));
} else {
tmp = x * ((i * -4.0) + (((b * c) + (k * (j * -27.0))) / x));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((x * 18.0) * y) * z;
double tmp;
if ((((((t_1 * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= Double.POSITIVE_INFINITY) {
tmp = (t * (t_1 + (a * -4.0))) + ((-27.0 * (j * k)) + ((b * c) + (x * (i * -4.0))));
} else {
tmp = x * ((i * -4.0) + (((b * c) + (k * (j * -27.0))) / x));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((x * 18.0) * y) * z tmp = 0 if (((((t_1 * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= math.inf: tmp = (t * (t_1 + (a * -4.0))) + ((-27.0 * (j * k)) + ((b * c) + (x * (i * -4.0)))) else: tmp = x * ((i * -4.0) + (((b * c) + (k * (j * -27.0))) / x)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(x * 18.0) * y) * z) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(t_1 * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) <= Inf) tmp = Float64(Float64(t * Float64(t_1 + Float64(a * -4.0))) + Float64(Float64(-27.0 * Float64(j * k)) + Float64(Float64(b * c) + Float64(x * Float64(i * -4.0))))); else tmp = Float64(x * Float64(Float64(i * -4.0) + Float64(Float64(Float64(b * c) + Float64(k * Float64(j * -27.0))) / x))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = ((x * 18.0) * y) * z;
tmp = 0.0;
if ((((((t_1 * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= Inf)
tmp = (t * (t_1 + (a * -4.0))) + ((-27.0 * (j * k)) + ((b * c) + (x * (i * -4.0))));
else
tmp = x * ((i * -4.0) + (((b * c) + (k * (j * -27.0))) / x));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(t$95$1 * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(t * N[(t$95$1 + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(i * -4.0), $MachinePrecision] + N[(N[(N[(b * c), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(x \cdot 18\right) \cdot y\right) \cdot z\\
\mathbf{if}\;\left(\left(\left(t\_1 \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \leq \infty:\\
\;\;\;\;t \cdot \left(t\_1 + a \cdot -4\right) + \left(-27 \cdot \left(j \cdot k\right) + \left(b \cdot c + x \cdot \left(i \cdot -4\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(i \cdot -4 + \frac{b \cdot c + k \cdot \left(j \cdot -27\right)}{x}\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 96.1%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified96.1%
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 t around 0
*-lowering-*.f6451.6%
Simplified51.6%
Taylor expanded in x around inf
associate--r+N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-lowering-*.f64N/A
associate--l+N/A
associate-*r/N/A
div-subN/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified61.3%
Final simplification91.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -27.0 (* j k))) (t_2 (* (* j 27.0) k)))
(if (<= t_2 -5e+294)
t_1
(if (<= t_2 1e+301)
(+
(+ t_1 (+ (* b c) (* x (* i -4.0))))
(* t (+ (* a -4.0) (* y (* (* x 18.0) z)))))
t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -5e+294) {
tmp = t_1;
} else if (t_2 <= 1e+301) {
tmp = (t_1 + ((b * c) + (x * (i * -4.0)))) + (t * ((a * -4.0) + (y * ((x * 18.0) * z))));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-27.0d0) * (j * k)
t_2 = (j * 27.0d0) * k
if (t_2 <= (-5d+294)) then
tmp = t_1
else if (t_2 <= 1d+301) then
tmp = (t_1 + ((b * c) + (x * (i * (-4.0d0))))) + (t * ((a * (-4.0d0)) + (y * ((x * 18.0d0) * z))))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -5e+294) {
tmp = t_1;
} else if (t_2 <= 1e+301) {
tmp = (t_1 + ((b * c) + (x * (i * -4.0)))) + (t * ((a * -4.0) + (y * ((x * 18.0) * z))));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -27.0 * (j * k) t_2 = (j * 27.0) * k tmp = 0 if t_2 <= -5e+294: tmp = t_1 elif t_2 <= 1e+301: tmp = (t_1 + ((b * c) + (x * (i * -4.0)))) + (t * ((a * -4.0) + (y * ((x * 18.0) * z)))) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-27.0 * Float64(j * k)) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -5e+294) tmp = t_1; elseif (t_2 <= 1e+301) tmp = Float64(Float64(t_1 + Float64(Float64(b * c) + Float64(x * Float64(i * -4.0)))) + Float64(t * Float64(Float64(a * -4.0) + Float64(y * Float64(Float64(x * 18.0) * z))))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -27.0 * (j * k);
t_2 = (j * 27.0) * k;
tmp = 0.0;
if (t_2 <= -5e+294)
tmp = t_1;
elseif (t_2 <= 1e+301)
tmp = (t_1 + ((b * c) + (x * (i * -4.0)))) + (t * ((a * -4.0) + (y * ((x * 18.0) * z))));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+294], t$95$1, If[LessEqual[t$95$2, 1e+301], N[(N[(t$95$1 + N[(N[(b * c), $MachinePrecision] + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(y * N[(N[(x * 18.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -27 \cdot \left(j \cdot k\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+294}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+301}:\\
\;\;\;\;\left(t\_1 + \left(b \cdot c + x \cdot \left(i \cdot -4\right)\right)\right) + t \cdot \left(a \cdot -4 + y \cdot \left(\left(x \cdot 18\right) \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.9999999999999999e294 or 1.00000000000000005e301 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 67.4%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified67.4%
Taylor expanded in j around inf
*-lowering-*.f64N/A
*-lowering-*.f6488.6%
Simplified88.6%
if -4.9999999999999999e294 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000005e301Initial program 87.9%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified89.3%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6488.9%
Applied egg-rr88.9%
Final simplification88.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -5.7e+194)
(+ (* b c) (* t (+ (* (* (* x 18.0) y) z) (* a -4.0))))
(if (<= (* b c) 1.9e+36)
(-
(* t (+ (* a -4.0) (* x (* 18.0 (* y z)))))
(+ (* (* x 4.0) i) (* j (* 27.0 k))))
(- (+ (* b c) (* -4.0 (* t a))) (* (* j 27.0) k)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -5.7e+194) {
tmp = (b * c) + (t * ((((x * 18.0) * y) * z) + (a * -4.0)));
} else if ((b * c) <= 1.9e+36) {
tmp = (t * ((a * -4.0) + (x * (18.0 * (y * z))))) - (((x * 4.0) * i) + (j * (27.0 * k)));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - ((j * 27.0) * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-5.7d+194)) then
tmp = (b * c) + (t * ((((x * 18.0d0) * y) * z) + (a * (-4.0d0))))
else if ((b * c) <= 1.9d+36) then
tmp = (t * ((a * (-4.0d0)) + (x * (18.0d0 * (y * z))))) - (((x * 4.0d0) * i) + (j * (27.0d0 * k)))
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((j * 27.0d0) * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -5.7e+194) {
tmp = (b * c) + (t * ((((x * 18.0) * y) * z) + (a * -4.0)));
} else if ((b * c) <= 1.9e+36) {
tmp = (t * ((a * -4.0) + (x * (18.0 * (y * z))))) - (((x * 4.0) * i) + (j * (27.0 * k)));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - ((j * 27.0) * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -5.7e+194: tmp = (b * c) + (t * ((((x * 18.0) * y) * z) + (a * -4.0))) elif (b * c) <= 1.9e+36: tmp = (t * ((a * -4.0) + (x * (18.0 * (y * z))))) - (((x * 4.0) * i) + (j * (27.0 * k))) else: tmp = ((b * c) + (-4.0 * (t * a))) - ((j * 27.0) * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -5.7e+194) tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(Float64(x * 18.0) * y) * z) + Float64(a * -4.0)))); elseif (Float64(b * c) <= 1.9e+36) tmp = Float64(Float64(t * Float64(Float64(a * -4.0) + Float64(x * Float64(18.0 * Float64(y * z))))) - Float64(Float64(Float64(x * 4.0) * i) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -5.7e+194)
tmp = (b * c) + (t * ((((x * 18.0) * y) * z) + (a * -4.0)));
elseif ((b * c) <= 1.9e+36)
tmp = (t * ((a * -4.0) + (x * (18.0 * (y * z))))) - (((x * 4.0) * i) + (j * (27.0 * k)));
else
tmp = ((b * c) + (-4.0 * (t * a))) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -5.7e+194], N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.9e+36], N[(N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -5.7 \cdot 10^{+194}:\\
\;\;\;\;b \cdot c + t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 1.9 \cdot 10^{+36}:\\
\;\;\;\;t \cdot \left(a \cdot -4 + x \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right) - \left(\left(x \cdot 4\right) \cdot i + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if (*.f64 b c) < -5.69999999999999983e194Initial program 82.6%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified82.6%
Taylor expanded in b around inf
*-lowering-*.f6483.0%
Simplified83.0%
if -5.69999999999999983e194 < (*.f64 b c) < 1.90000000000000012e36Initial program 86.1%
Taylor expanded in b around 0
associate--r+N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate--l+N/A
Simplified85.6%
if 1.90000000000000012e36 < (*.f64 b c) Initial program 80.0%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6478.7%
Simplified78.7%
Final simplification83.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* x (* t (* y z))))))
(if (<= (* b c) -3.9e+192)
(* b c)
(if (<= (* b c) -4.2e-195)
t_1
(if (<= (* b c) 4.8e-269)
(* -27.0 (* j k))
(if (<= (* b c) 1.8e+128) t_1 (* b c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (t * (y * z)));
double tmp;
if ((b * c) <= -3.9e+192) {
tmp = b * c;
} else if ((b * c) <= -4.2e-195) {
tmp = t_1;
} else if ((b * c) <= 4.8e-269) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 1.8e+128) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 18.0d0 * (x * (t * (y * z)))
if ((b * c) <= (-3.9d+192)) then
tmp = b * c
else if ((b * c) <= (-4.2d-195)) then
tmp = t_1
else if ((b * c) <= 4.8d-269) then
tmp = (-27.0d0) * (j * k)
else if ((b * c) <= 1.8d+128) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (t * (y * z)));
double tmp;
if ((b * c) <= -3.9e+192) {
tmp = b * c;
} else if ((b * c) <= -4.2e-195) {
tmp = t_1;
} else if ((b * c) <= 4.8e-269) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 1.8e+128) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (x * (t * (y * z))) tmp = 0 if (b * c) <= -3.9e+192: tmp = b * c elif (b * c) <= -4.2e-195: tmp = t_1 elif (b * c) <= 4.8e-269: tmp = -27.0 * (j * k) elif (b * c) <= 1.8e+128: tmp = t_1 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(x * Float64(t * Float64(y * z)))) tmp = 0.0 if (Float64(b * c) <= -3.9e+192) tmp = Float64(b * c); elseif (Float64(b * c) <= -4.2e-195) tmp = t_1; elseif (Float64(b * c) <= 4.8e-269) tmp = Float64(-27.0 * Float64(j * k)); elseif (Float64(b * c) <= 1.8e+128) tmp = t_1; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (x * (t * (y * z)));
tmp = 0.0;
if ((b * c) <= -3.9e+192)
tmp = b * c;
elseif ((b * c) <= -4.2e-195)
tmp = t_1;
elseif ((b * c) <= 4.8e-269)
tmp = -27.0 * (j * k);
elseif ((b * c) <= 1.8e+128)
tmp = t_1;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(x * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -3.9e+192], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -4.2e-195], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 4.8e-269], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.8e+128], t$95$1, N[(b * c), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(x \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;b \cdot c \leq -3.9 \cdot 10^{+192}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -4.2 \cdot 10^{-195}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 4.8 \cdot 10^{-269}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq 1.8 \cdot 10^{+128}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -3.8999999999999998e192 or 1.80000000000000014e128 < (*.f64 b c) Initial program 83.1%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified83.1%
Taylor expanded in b around inf
*-lowering-*.f6466.3%
Simplified66.3%
if -3.8999999999999998e192 < (*.f64 b c) < -4.2e-195 or 4.8000000000000002e-269 < (*.f64 b c) < 1.80000000000000014e128Initial program 82.7%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified84.2%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6437.2%
Simplified37.2%
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6439.3%
Applied egg-rr39.3%
if -4.2e-195 < (*.f64 b c) < 4.8000000000000002e-269Initial program 89.8%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified91.5%
Taylor expanded in j around inf
*-lowering-*.f64N/A
*-lowering-*.f6437.1%
Simplified37.1%
Final simplification45.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -2.05e+197)
(* b c)
(if (<= (* b c) -2.2e-88)
(* -4.0 (* t a))
(if (<= (* b c) -5.6e-291)
(* -4.0 (* x i))
(if (<= (* b c) 5.6e+110) (* -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);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -2.05e+197) {
tmp = b * c;
} else if ((b * c) <= -2.2e-88) {
tmp = -4.0 * (t * a);
} else if ((b * c) <= -5.6e-291) {
tmp = -4.0 * (x * i);
} else if ((b * c) <= 5.6e+110) {
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.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-2.05d+197)) then
tmp = b * c
else if ((b * c) <= (-2.2d-88)) then
tmp = (-4.0d0) * (t * a)
else if ((b * c) <= (-5.6d-291)) then
tmp = (-4.0d0) * (x * i)
else if ((b * c) <= 5.6d+110) 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;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -2.05e+197) {
tmp = b * c;
} else if ((b * c) <= -2.2e-88) {
tmp = -4.0 * (t * a);
} else if ((b * c) <= -5.6e-291) {
tmp = -4.0 * (x * i);
} else if ((b * c) <= 5.6e+110) {
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]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -2.05e+197: tmp = b * c elif (b * c) <= -2.2e-88: tmp = -4.0 * (t * a) elif (b * c) <= -5.6e-291: tmp = -4.0 * (x * i) elif (b * c) <= 5.6e+110: 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]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -2.05e+197) tmp = Float64(b * c); elseif (Float64(b * c) <= -2.2e-88) tmp = Float64(-4.0 * Float64(t * a)); elseif (Float64(b * c) <= -5.6e-291) tmp = Float64(-4.0 * Float64(x * i)); elseif (Float64(b * c) <= 5.6e+110) 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -2.05e+197)
tmp = b * c;
elseif ((b * c) <= -2.2e-88)
tmp = -4.0 * (t * a);
elseif ((b * c) <= -5.6e-291)
tmp = -4.0 * (x * i);
elseif ((b * c) <= 5.6e+110)
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. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -2.05e+197], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2.2e-88], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5.6e-291], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5.6e+110], 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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2.05 \cdot 10^{+197}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -2.2 \cdot 10^{-88}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;b \cdot c \leq -5.6 \cdot 10^{-291}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq 5.6 \cdot 10^{+110}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -2.05000000000000015e197 or 5.59999999999999973e110 < (*.f64 b c) Initial program 83.1%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified83.1%
Taylor expanded in b around inf
*-lowering-*.f6466.3%
Simplified66.3%
if -2.05000000000000015e197 < (*.f64 b c) < -2.20000000000000005e-88Initial program 87.7%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified87.7%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6432.0%
Simplified32.0%
if -2.20000000000000005e-88 < (*.f64 b c) < -5.5999999999999999e-291Initial program 80.7%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified86.3%
Taylor expanded in i around inf
*-lowering-*.f64N/A
*-lowering-*.f6440.0%
Simplified40.0%
if -5.5999999999999999e-291 < (*.f64 b c) < 5.59999999999999973e110Initial program 85.1%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified86.0%
Taylor expanded in j around inf
*-lowering-*.f64N/A
*-lowering-*.f6435.1%
Simplified35.1%
Final simplification43.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (+ (* i -4.0) (* 18.0 (* z (* y t)))))))
(if (<= x -3.4e+87)
t_1
(if (<= x -1.6e-81)
(* x (+ (* i -4.0) (/ (+ (* b c) (* k (* j -27.0))) x)))
(if (<= x 1.6e+16)
(- (+ (* b c) (* -4.0 (* t a))) (* (* j 27.0) k))
t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((i * -4.0) + (18.0 * (z * (y * t))));
double tmp;
if (x <= -3.4e+87) {
tmp = t_1;
} else if (x <= -1.6e-81) {
tmp = x * ((i * -4.0) + (((b * c) + (k * (j * -27.0))) / x));
} else if (x <= 1.6e+16) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((j * 27.0) * k);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((i * (-4.0d0)) + (18.0d0 * (z * (y * t))))
if (x <= (-3.4d+87)) then
tmp = t_1
else if (x <= (-1.6d-81)) then
tmp = x * ((i * (-4.0d0)) + (((b * c) + (k * (j * (-27.0d0)))) / x))
else if (x <= 1.6d+16) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((j * 27.0d0) * k)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((i * -4.0) + (18.0 * (z * (y * t))));
double tmp;
if (x <= -3.4e+87) {
tmp = t_1;
} else if (x <= -1.6e-81) {
tmp = x * ((i * -4.0) + (((b * c) + (k * (j * -27.0))) / x));
} else if (x <= 1.6e+16) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((j * 27.0) * k);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((i * -4.0) + (18.0 * (z * (y * t)))) tmp = 0 if x <= -3.4e+87: tmp = t_1 elif x <= -1.6e-81: tmp = x * ((i * -4.0) + (((b * c) + (k * (j * -27.0))) / x)) elif x <= 1.6e+16: tmp = ((b * c) + (-4.0 * (t * a))) - ((j * 27.0) * k) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(i * -4.0) + Float64(18.0 * Float64(z * Float64(y * t))))) tmp = 0.0 if (x <= -3.4e+87) tmp = t_1; elseif (x <= -1.6e-81) tmp = Float64(x * Float64(Float64(i * -4.0) + Float64(Float64(Float64(b * c) + Float64(k * Float64(j * -27.0))) / x))); elseif (x <= 1.6e+16) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * ((i * -4.0) + (18.0 * (z * (y * t))));
tmp = 0.0;
if (x <= -3.4e+87)
tmp = t_1;
elseif (x <= -1.6e-81)
tmp = x * ((i * -4.0) + (((b * c) + (k * (j * -27.0))) / x));
elseif (x <= 1.6e+16)
tmp = ((b * c) + (-4.0 * (t * a))) - ((j * 27.0) * k);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(i * -4.0), $MachinePrecision] + N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.4e+87], t$95$1, If[LessEqual[x, -1.6e-81], N[(x * N[(N[(i * -4.0), $MachinePrecision] + N[(N[(N[(b * c), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.6e+16], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4 + 18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{if}\;x \leq -3.4 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.6 \cdot 10^{-81}:\\
\;\;\;\;x \cdot \left(i \cdot -4 + \frac{b \cdot c + k \cdot \left(j \cdot -27\right)}{x}\right)\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+16}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.4000000000000002e87 or 1.6e16 < x Initial program 77.2%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified78.9%
Taylor expanded in x around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6469.5%
Simplified69.5%
if -3.4000000000000002e87 < x < -1.6e-81Initial program 85.1%
Taylor expanded in t around 0
*-lowering-*.f6477.0%
Simplified77.0%
Taylor expanded in x around inf
associate--r+N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-lowering-*.f64N/A
associate--l+N/A
associate-*r/N/A
div-subN/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified79.8%
if -1.6e-81 < x < 1.6e16Initial program 92.3%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6480.6%
Simplified80.6%
Final simplification75.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k))
(t_2 (* x (+ (* i -4.0) (* 18.0 (* z (* y t)))))))
(if (<= x -3.45e+87)
t_2
(if (<= x -1.8e-80)
(- (- (* b c) (* (* x 4.0) i)) t_1)
(if (<= x 4.5e+16) (- (+ (* b c) (* -4.0 (* t a))) t_1) t_2)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = x * ((i * -4.0) + (18.0 * (z * (y * t))));
double tmp;
if (x <= -3.45e+87) {
tmp = t_2;
} else if (x <= -1.8e-80) {
tmp = ((b * c) - ((x * 4.0) * i)) - t_1;
} else if (x <= 4.5e+16) {
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (j * 27.0d0) * k
t_2 = x * ((i * (-4.0d0)) + (18.0d0 * (z * (y * t))))
if (x <= (-3.45d+87)) then
tmp = t_2
else if (x <= (-1.8d-80)) then
tmp = ((b * c) - ((x * 4.0d0) * i)) - t_1
else if (x <= 4.5d+16) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = x * ((i * -4.0) + (18.0 * (z * (y * t))));
double tmp;
if (x <= -3.45e+87) {
tmp = t_2;
} else if (x <= -1.8e-80) {
tmp = ((b * c) - ((x * 4.0) * i)) - t_1;
} else if (x <= 4.5e+16) {
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = x * ((i * -4.0) + (18.0 * (z * (y * t)))) tmp = 0 if x <= -3.45e+87: tmp = t_2 elif x <= -1.8e-80: tmp = ((b * c) - ((x * 4.0) * i)) - t_1 elif x <= 4.5e+16: tmp = ((b * c) + (-4.0 * (t * a))) - t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(x * Float64(Float64(i * -4.0) + Float64(18.0 * Float64(z * Float64(y * t))))) tmp = 0.0 if (x <= -3.45e+87) tmp = t_2; elseif (x <= -1.8e-80) tmp = Float64(Float64(Float64(b * c) - Float64(Float64(x * 4.0) * i)) - t_1); elseif (x <= 4.5e+16) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - t_1); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
t_2 = x * ((i * -4.0) + (18.0 * (z * (y * t))));
tmp = 0.0;
if (x <= -3.45e+87)
tmp = t_2;
elseif (x <= -1.8e-80)
tmp = ((b * c) - ((x * 4.0) * i)) - t_1;
elseif (x <= 4.5e+16)
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(i * -4.0), $MachinePrecision] + N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.45e+87], t$95$2, If[LessEqual[x, -1.8e-80], N[(N[(N[(b * c), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[x, 4.5e+16], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $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])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := x \cdot \left(i \cdot -4 + 18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{if}\;x \leq -3.45 \cdot 10^{+87}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -1.8 \cdot 10^{-80}:\\
\;\;\;\;\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - t\_1\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+16}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -3.44999999999999982e87 or 4.5e16 < x Initial program 77.2%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified78.9%
Taylor expanded in x around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6469.5%
Simplified69.5%
if -3.44999999999999982e87 < x < -1.8e-80Initial program 84.7%
Taylor expanded in t around 0
*-lowering-*.f6479.2%
Simplified79.2%
if -1.8e-80 < x < 4.5e16Initial program 92.4%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6479.9%
Simplified79.9%
Final simplification75.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (+ (* (* (* x 18.0) y) z) (* a -4.0)))))
(if (<= t -1.75e-30)
(+ (* b c) t_1)
(if (<= t 4.2e-60)
(- (- (* b c) (* (* x 4.0) i)) (* (* j 27.0) k))
(+ t_1 (* -27.0 (* j k)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((((x * 18.0) * y) * z) + (a * -4.0));
double tmp;
if (t <= -1.75e-30) {
tmp = (b * c) + t_1;
} else if (t <= 4.2e-60) {
tmp = ((b * c) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = t_1 + (-27.0 * (j * k));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = t * ((((x * 18.0d0) * y) * z) + (a * (-4.0d0)))
if (t <= (-1.75d-30)) then
tmp = (b * c) + t_1
else if (t <= 4.2d-60) then
tmp = ((b * c) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
else
tmp = t_1 + ((-27.0d0) * (j * k))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((((x * 18.0) * y) * z) + (a * -4.0));
double tmp;
if (t <= -1.75e-30) {
tmp = (b * c) + t_1;
} else if (t <= 4.2e-60) {
tmp = ((b * c) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = t_1 + (-27.0 * (j * k));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((((x * 18.0) * y) * z) + (a * -4.0)) tmp = 0 if t <= -1.75e-30: tmp = (b * c) + t_1 elif t <= 4.2e-60: tmp = ((b * c) - ((x * 4.0) * i)) - ((j * 27.0) * k) else: tmp = t_1 + (-27.0 * (j * k)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(Float64(Float64(x * 18.0) * y) * z) + Float64(a * -4.0))) tmp = 0.0 if (t <= -1.75e-30) tmp = Float64(Float64(b * c) + t_1); elseif (t <= 4.2e-60) tmp = Float64(Float64(Float64(b * c) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(t_1 + Float64(-27.0 * Float64(j * k))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * ((((x * 18.0) * y) * z) + (a * -4.0));
tmp = 0.0;
if (t <= -1.75e-30)
tmp = (b * c) + t_1;
elseif (t <= 4.2e-60)
tmp = ((b * c) - ((x * 4.0) * i)) - ((j * 27.0) * k);
else
tmp = t_1 + (-27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.75e-30], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 4.2e-60], N[(N[(N[(b * c), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + a \cdot -4\right)\\
\mathbf{if}\;t \leq -1.75 \cdot 10^{-30}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-60}:\\
\;\;\;\;\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;t\_1 + -27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if t < -1.7500000000000001e-30Initial program 88.3%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified88.3%
Taylor expanded in b around inf
*-lowering-*.f6472.3%
Simplified72.3%
if -1.7500000000000001e-30 < t < 4.19999999999999982e-60Initial program 85.5%
Taylor expanded in t around 0
*-lowering-*.f6480.5%
Simplified80.5%
if 4.19999999999999982e-60 < t Initial program 80.5%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified84.0%
Taylor expanded in j around inf
*-lowering-*.f64N/A
*-lowering-*.f6476.4%
Simplified76.4%
Final simplification77.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)) (t_2 (- (* -4.0 (* t a)) t_1)))
(if (<= t_1 -4e+118)
t_2
(if (<= t_1 5e+90) (+ (* b c) (* i (* x -4.0))) t_2))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = (-4.0 * (t * a)) - t_1;
double tmp;
if (t_1 <= -4e+118) {
tmp = t_2;
} else if (t_1 <= 5e+90) {
tmp = (b * c) + (i * (x * -4.0));
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (j * 27.0d0) * k
t_2 = ((-4.0d0) * (t * a)) - t_1
if (t_1 <= (-4d+118)) then
tmp = t_2
else if (t_1 <= 5d+90) then
tmp = (b * c) + (i * (x * (-4.0d0)))
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = (-4.0 * (t * a)) - t_1;
double tmp;
if (t_1 <= -4e+118) {
tmp = t_2;
} else if (t_1 <= 5e+90) {
tmp = (b * c) + (i * (x * -4.0));
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = (-4.0 * (t * a)) - t_1 tmp = 0 if t_1 <= -4e+118: tmp = t_2 elif t_1 <= 5e+90: tmp = (b * c) + (i * (x * -4.0)) else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(Float64(-4.0 * Float64(t * a)) - t_1) tmp = 0.0 if (t_1 <= -4e+118) tmp = t_2; elseif (t_1 <= 5e+90) tmp = Float64(Float64(b * c) + Float64(i * Float64(x * -4.0))); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
t_2 = (-4.0 * (t * a)) - t_1;
tmp = 0.0;
if (t_1 <= -4e+118)
tmp = t_2;
elseif (t_1 <= 5e+90)
tmp = (b * c) + (i * (x * -4.0));
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+118], t$95$2, If[LessEqual[t$95$1, 5e+90], N[(N[(b * c), $MachinePrecision] + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := -4 \cdot \left(t \cdot a\right) - t\_1\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+118}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+90}:\\
\;\;\;\;b \cdot c + i \cdot \left(x \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -3.99999999999999987e118 or 5.0000000000000004e90 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 79.4%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6466.5%
Simplified66.5%
if -3.99999999999999987e118 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 5.0000000000000004e90Initial program 87.5%
Taylor expanded in t around 0
*-lowering-*.f6456.7%
Simplified56.7%
Taylor expanded in j around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6453.6%
Simplified53.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k))
(t_2 (* x (+ (* i -4.0) (* 18.0 (* z (* y t)))))))
(if (<= x -1.6e-81)
t_2
(if (<= x 1.1e-237)
(- (* -4.0 (* t a)) t_1)
(if (<= x 1.1e+16) (- (* b c) t_1) t_2)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = x * ((i * -4.0) + (18.0 * (z * (y * t))));
double tmp;
if (x <= -1.6e-81) {
tmp = t_2;
} else if (x <= 1.1e-237) {
tmp = (-4.0 * (t * a)) - t_1;
} else if (x <= 1.1e+16) {
tmp = (b * c) - t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (j * 27.0d0) * k
t_2 = x * ((i * (-4.0d0)) + (18.0d0 * (z * (y * t))))
if (x <= (-1.6d-81)) then
tmp = t_2
else if (x <= 1.1d-237) then
tmp = ((-4.0d0) * (t * a)) - t_1
else if (x <= 1.1d+16) then
tmp = (b * c) - t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = x * ((i * -4.0) + (18.0 * (z * (y * t))));
double tmp;
if (x <= -1.6e-81) {
tmp = t_2;
} else if (x <= 1.1e-237) {
tmp = (-4.0 * (t * a)) - t_1;
} else if (x <= 1.1e+16) {
tmp = (b * c) - t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = x * ((i * -4.0) + (18.0 * (z * (y * t)))) tmp = 0 if x <= -1.6e-81: tmp = t_2 elif x <= 1.1e-237: tmp = (-4.0 * (t * a)) - t_1 elif x <= 1.1e+16: tmp = (b * c) - t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(x * Float64(Float64(i * -4.0) + Float64(18.0 * Float64(z * Float64(y * t))))) tmp = 0.0 if (x <= -1.6e-81) tmp = t_2; elseif (x <= 1.1e-237) tmp = Float64(Float64(-4.0 * Float64(t * a)) - t_1); elseif (x <= 1.1e+16) tmp = Float64(Float64(b * c) - t_1); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
t_2 = x * ((i * -4.0) + (18.0 * (z * (y * t))));
tmp = 0.0;
if (x <= -1.6e-81)
tmp = t_2;
elseif (x <= 1.1e-237)
tmp = (-4.0 * (t * a)) - t_1;
elseif (x <= 1.1e+16)
tmp = (b * c) - t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(i * -4.0), $MachinePrecision] + N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.6e-81], t$95$2, If[LessEqual[x, 1.1e-237], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[x, 1.1e+16], N[(N[(b * c), $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])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := x \cdot \left(i \cdot -4 + 18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{if}\;x \leq -1.6 \cdot 10^{-81}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{-237}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) - t\_1\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{+16}:\\
\;\;\;\;b \cdot c - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -1.6e-81 or 1.1e16 < x Initial program 79.0%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified80.3%
Taylor expanded in x around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6465.3%
Simplified65.3%
if -1.6e-81 < x < 1.09999999999999999e-237Initial program 90.2%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6468.9%
Simplified68.9%
if 1.09999999999999999e-237 < x < 1.1e16Initial program 95.3%
Taylor expanded in b around inf
*-lowering-*.f6470.8%
Simplified70.8%
Final simplification67.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -1.35e+59)
(* t (+ (* a -4.0) (* x (* 18.0 (* y z)))))
(if (<= t -9.8e-110)
(- (* -4.0 (* t a)) (* (* j 27.0) k))
(if (<= t 1.72e-68)
(+ (* b c) (* i (* x -4.0)))
(* t (+ (* (* (* x 18.0) y) z) (* a -4.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -1.35e+59) {
tmp = t * ((a * -4.0) + (x * (18.0 * (y * z))));
} else if (t <= -9.8e-110) {
tmp = (-4.0 * (t * a)) - ((j * 27.0) * k);
} else if (t <= 1.72e-68) {
tmp = (b * c) + (i * (x * -4.0));
} else {
tmp = t * ((((x * 18.0) * y) * z) + (a * -4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (t <= (-1.35d+59)) then
tmp = t * ((a * (-4.0d0)) + (x * (18.0d0 * (y * z))))
else if (t <= (-9.8d-110)) then
tmp = ((-4.0d0) * (t * a)) - ((j * 27.0d0) * k)
else if (t <= 1.72d-68) then
tmp = (b * c) + (i * (x * (-4.0d0)))
else
tmp = t * ((((x * 18.0d0) * y) * z) + (a * (-4.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -1.35e+59) {
tmp = t * ((a * -4.0) + (x * (18.0 * (y * z))));
} else if (t <= -9.8e-110) {
tmp = (-4.0 * (t * a)) - ((j * 27.0) * k);
} else if (t <= 1.72e-68) {
tmp = (b * c) + (i * (x * -4.0));
} else {
tmp = t * ((((x * 18.0) * y) * z) + (a * -4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -1.35e+59: tmp = t * ((a * -4.0) + (x * (18.0 * (y * z)))) elif t <= -9.8e-110: tmp = (-4.0 * (t * a)) - ((j * 27.0) * k) elif t <= 1.72e-68: tmp = (b * c) + (i * (x * -4.0)) else: tmp = t * ((((x * 18.0) * y) * z) + (a * -4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -1.35e+59) tmp = Float64(t * Float64(Float64(a * -4.0) + Float64(x * Float64(18.0 * Float64(y * z))))); elseif (t <= -9.8e-110) tmp = Float64(Float64(-4.0 * Float64(t * a)) - Float64(Float64(j * 27.0) * k)); elseif (t <= 1.72e-68) tmp = Float64(Float64(b * c) + Float64(i * Float64(x * -4.0))); else tmp = Float64(t * Float64(Float64(Float64(Float64(x * 18.0) * y) * z) + Float64(a * -4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= -1.35e+59)
tmp = t * ((a * -4.0) + (x * (18.0 * (y * z))));
elseif (t <= -9.8e-110)
tmp = (-4.0 * (t * a)) - ((j * 27.0) * k);
elseif (t <= 1.72e-68)
tmp = (b * c) + (i * (x * -4.0));
else
tmp = t * ((((x * 18.0) * y) * z) + (a * -4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -1.35e+59], N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9.8e-110], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.72e-68], N[(N[(b * c), $MachinePrecision] + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{+59}:\\
\;\;\;\;t \cdot \left(a \cdot -4 + x \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq -9.8 \cdot 10^{-110}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;t \leq 1.72 \cdot 10^{-68}:\\
\;\;\;\;b \cdot c + i \cdot \left(x \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + a \cdot -4\right)\\
\end{array}
\end{array}
if t < -1.3500000000000001e59Initial program 88.9%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified88.9%
Taylor expanded in t around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6461.1%
Simplified61.1%
if -1.3500000000000001e59 < t < -9.7999999999999995e-110Initial program 93.4%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6461.4%
Simplified61.4%
if -9.7999999999999995e-110 < t < 1.72e-68Initial program 83.9%
Taylor expanded in t around 0
*-lowering-*.f6482.1%
Simplified82.1%
Taylor expanded in j around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6460.9%
Simplified60.9%
if 1.72e-68 < t Initial program 79.6%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified83.0%
Taylor expanded in t around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6463.5%
Simplified63.5%
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6465.6%
Applied egg-rr65.6%
Final simplification62.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (+ (* a -4.0) (* x (* 18.0 (* y z)))))))
(if (<= t -2.75e+59)
t_1
(if (<= t -1.3e-110)
(- (* -4.0 (* t a)) (* (* j 27.0) k))
(if (<= t 1.72e-68) (+ (* b c) (* i (* x -4.0))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((a * -4.0) + (x * (18.0 * (y * z))));
double tmp;
if (t <= -2.75e+59) {
tmp = t_1;
} else if (t <= -1.3e-110) {
tmp = (-4.0 * (t * a)) - ((j * 27.0) * k);
} else if (t <= 1.72e-68) {
tmp = (b * c) + (i * (x * -4.0));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = t * ((a * (-4.0d0)) + (x * (18.0d0 * (y * z))))
if (t <= (-2.75d+59)) then
tmp = t_1
else if (t <= (-1.3d-110)) then
tmp = ((-4.0d0) * (t * a)) - ((j * 27.0d0) * k)
else if (t <= 1.72d-68) then
tmp = (b * c) + (i * (x * (-4.0d0)))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((a * -4.0) + (x * (18.0 * (y * z))));
double tmp;
if (t <= -2.75e+59) {
tmp = t_1;
} else if (t <= -1.3e-110) {
tmp = (-4.0 * (t * a)) - ((j * 27.0) * k);
} else if (t <= 1.72e-68) {
tmp = (b * c) + (i * (x * -4.0));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((a * -4.0) + (x * (18.0 * (y * z)))) tmp = 0 if t <= -2.75e+59: tmp = t_1 elif t <= -1.3e-110: tmp = (-4.0 * (t * a)) - ((j * 27.0) * k) elif t <= 1.72e-68: tmp = (b * c) + (i * (x * -4.0)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(a * -4.0) + Float64(x * Float64(18.0 * Float64(y * z))))) tmp = 0.0 if (t <= -2.75e+59) tmp = t_1; elseif (t <= -1.3e-110) tmp = Float64(Float64(-4.0 * Float64(t * a)) - Float64(Float64(j * 27.0) * k)); elseif (t <= 1.72e-68) tmp = Float64(Float64(b * c) + Float64(i * Float64(x * -4.0))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * ((a * -4.0) + (x * (18.0 * (y * z))));
tmp = 0.0;
if (t <= -2.75e+59)
tmp = t_1;
elseif (t <= -1.3e-110)
tmp = (-4.0 * (t * a)) - ((j * 27.0) * k);
elseif (t <= 1.72e-68)
tmp = (b * c) + (i * (x * -4.0));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.75e+59], t$95$1, If[LessEqual[t, -1.3e-110], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.72e-68], N[(N[(b * c), $MachinePrecision] + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4 + x \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -2.75 \cdot 10^{+59}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.3 \cdot 10^{-110}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;t \leq 1.72 \cdot 10^{-68}:\\
\;\;\;\;b \cdot c + i \cdot \left(x \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.74999999999999995e59 or 1.72e-68 < t Initial program 82.7%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified85.0%
Taylor expanded in t around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6462.7%
Simplified62.7%
if -2.74999999999999995e59 < t < -1.29999999999999995e-110Initial program 93.4%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6461.4%
Simplified61.4%
if -1.29999999999999995e-110 < t < 1.72e-68Initial program 83.9%
Taylor expanded in t around 0
*-lowering-*.f6482.1%
Simplified82.1%
Taylor expanded in j around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6460.9%
Simplified60.9%
Final simplification61.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* t (+ (* (* (* x 18.0) y) z) (* a -4.0))))))
(if (<= t -5.2e-30)
t_1
(if (<= t 1.65e-68)
(- (- (* b c) (* (* x 4.0) i)) (* (* j 27.0) k))
t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (t * ((((x * 18.0) * y) * z) + (a * -4.0)));
double tmp;
if (t <= -5.2e-30) {
tmp = t_1;
} else if (t <= 1.65e-68) {
tmp = ((b * c) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) + (t * ((((x * 18.0d0) * y) * z) + (a * (-4.0d0))))
if (t <= (-5.2d-30)) then
tmp = t_1
else if (t <= 1.65d-68) then
tmp = ((b * c) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (t * ((((x * 18.0) * y) * z) + (a * -4.0)));
double tmp;
if (t <= -5.2e-30) {
tmp = t_1;
} else if (t <= 1.65e-68) {
tmp = ((b * c) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (t * ((((x * 18.0) * y) * z) + (a * -4.0))) tmp = 0 if t <= -5.2e-30: tmp = t_1 elif t <= 1.65e-68: tmp = ((b * c) - ((x * 4.0) * i)) - ((j * 27.0) * k) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(Float64(x * 18.0) * y) * z) + Float64(a * -4.0)))) tmp = 0.0 if (t <= -5.2e-30) tmp = t_1; elseif (t <= 1.65e-68) tmp = Float64(Float64(Float64(b * c) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (t * ((((x * 18.0) * y) * z) + (a * -4.0)));
tmp = 0.0;
if (t <= -5.2e-30)
tmp = t_1;
elseif (t <= 1.65e-68)
tmp = ((b * c) - ((x * 4.0) * i)) - ((j * 27.0) * k);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.2e-30], t$95$1, If[LessEqual[t, 1.65e-68], N[(N[(N[(b * c), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + a \cdot -4\right)\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{-30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{-68}:\\
\;\;\;\;\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.19999999999999973e-30 or 1.6499999999999999e-68 < t Initial program 83.1%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified85.2%
Taylor expanded in b around inf
*-lowering-*.f6472.3%
Simplified72.3%
if -5.19999999999999973e-30 < t < 1.6499999999999999e-68Initial program 86.3%
Taylor expanded in t around 0
*-lowering-*.f6481.2%
Simplified81.2%
Final simplification76.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= t_1 -5e+75)
(- (* b c) t_1)
(if (<= t_1 5e+231) (+ (* b c) (* i (* x -4.0))) (* j (* k -27.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -5e+75) {
tmp = (b * c) - t_1;
} else if (t_1 <= 5e+231) {
tmp = (b * c) + (i * (x * -4.0));
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if (t_1 <= (-5d+75)) then
tmp = (b * c) - t_1
else if (t_1 <= 5d+231) then
tmp = (b * c) + (i * (x * (-4.0d0)))
else
tmp = j * (k * (-27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -5e+75) {
tmp = (b * c) - t_1;
} else if (t_1 <= 5e+231) {
tmp = (b * c) + (i * (x * -4.0));
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if t_1 <= -5e+75: tmp = (b * c) - t_1 elif t_1 <= 5e+231: tmp = (b * c) + (i * (x * -4.0)) else: tmp = j * (k * -27.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -5e+75) tmp = Float64(Float64(b * c) - t_1); elseif (t_1 <= 5e+231) tmp = Float64(Float64(b * c) + Float64(i * Float64(x * -4.0))); else tmp = Float64(j * Float64(k * -27.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if (t_1 <= -5e+75)
tmp = (b * c) - t_1;
elseif (t_1 <= 5e+231)
tmp = (b * c) + (i * (x * -4.0));
else
tmp = j * (k * -27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+75], N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$1, 5e+231], N[(N[(b * c), $MachinePrecision] + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+75}:\\
\;\;\;\;b \cdot c - t\_1\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+231}:\\
\;\;\;\;b \cdot c + i \cdot \left(x \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.0000000000000002e75Initial program 83.9%
Taylor expanded in b around inf
*-lowering-*.f6461.9%
Simplified61.9%
if -5.0000000000000002e75 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 5.00000000000000028e231Initial program 87.3%
Taylor expanded in t around 0
*-lowering-*.f6456.9%
Simplified56.9%
Taylor expanded in j around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6451.8%
Simplified51.8%
if 5.00000000000000028e231 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 68.9%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified68.9%
Taylor expanded in j around inf
*-lowering-*.f64N/A
*-lowering-*.f6479.5%
Simplified79.5%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6479.5%
Applied egg-rr79.5%
Final simplification57.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -5.2e+192)
(* b c)
(if (<= (* b c) -1.05e-193)
(* (* y z) (* (* x 18.0) t))
(if (<= (* b c) 1.15e+115) (* -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);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -5.2e+192) {
tmp = b * c;
} else if ((b * c) <= -1.05e-193) {
tmp = (y * z) * ((x * 18.0) * t);
} else if ((b * c) <= 1.15e+115) {
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.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-5.2d+192)) then
tmp = b * c
else if ((b * c) <= (-1.05d-193)) then
tmp = (y * z) * ((x * 18.0d0) * t)
else if ((b * c) <= 1.15d+115) 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;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -5.2e+192) {
tmp = b * c;
} else if ((b * c) <= -1.05e-193) {
tmp = (y * z) * ((x * 18.0) * t);
} else if ((b * c) <= 1.15e+115) {
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]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -5.2e+192: tmp = b * c elif (b * c) <= -1.05e-193: tmp = (y * z) * ((x * 18.0) * t) elif (b * c) <= 1.15e+115: 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]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -5.2e+192) tmp = Float64(b * c); elseif (Float64(b * c) <= -1.05e-193) tmp = Float64(Float64(y * z) * Float64(Float64(x * 18.0) * t)); elseif (Float64(b * c) <= 1.15e+115) 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -5.2e+192)
tmp = b * c;
elseif ((b * c) <= -1.05e-193)
tmp = (y * z) * ((x * 18.0) * t);
elseif ((b * c) <= 1.15e+115)
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. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -5.2e+192], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.05e-193], N[(N[(y * z), $MachinePrecision] * N[(N[(x * 18.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.15e+115], 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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -5.2 \cdot 10^{+192}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1.05 \cdot 10^{-193}:\\
\;\;\;\;\left(y \cdot z\right) \cdot \left(\left(x \cdot 18\right) \cdot t\right)\\
\mathbf{elif}\;b \cdot c \leq 1.15 \cdot 10^{+115}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -5.20000000000000006e192 or 1.15000000000000002e115 < (*.f64 b c) Initial program 83.3%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified83.3%
Taylor expanded in b around inf
*-lowering-*.f6465.4%
Simplified65.4%
if -5.20000000000000006e192 < (*.f64 b c) < -1.05e-193Initial program 83.8%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified86.8%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6438.8%
Simplified38.8%
if -1.05e-193 < (*.f64 b c) < 1.15000000000000002e115Initial program 85.4%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified86.2%
Taylor expanded in j around inf
*-lowering-*.f64N/A
*-lowering-*.f6434.0%
Simplified34.0%
Final simplification43.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -9e+193)
(* b c)
(if (<= (* b c) -9.8e-291)
(* -4.0 (* x i))
(if (<= (* b c) 1.9e+115) (* -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);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -9e+193) {
tmp = b * c;
} else if ((b * c) <= -9.8e-291) {
tmp = -4.0 * (x * i);
} else if ((b * c) <= 1.9e+115) {
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.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-9d+193)) then
tmp = b * c
else if ((b * c) <= (-9.8d-291)) then
tmp = (-4.0d0) * (x * i)
else if ((b * c) <= 1.9d+115) 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;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -9e+193) {
tmp = b * c;
} else if ((b * c) <= -9.8e-291) {
tmp = -4.0 * (x * i);
} else if ((b * c) <= 1.9e+115) {
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]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -9e+193: tmp = b * c elif (b * c) <= -9.8e-291: tmp = -4.0 * (x * i) elif (b * c) <= 1.9e+115: 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]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -9e+193) tmp = Float64(b * c); elseif (Float64(b * c) <= -9.8e-291) tmp = Float64(-4.0 * Float64(x * i)); elseif (Float64(b * c) <= 1.9e+115) 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -9e+193)
tmp = b * c;
elseif ((b * c) <= -9.8e-291)
tmp = -4.0 * (x * i);
elseif ((b * c) <= 1.9e+115)
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. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -9e+193], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -9.8e-291], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.9e+115], 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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -9 \cdot 10^{+193}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -9.8 \cdot 10^{-291}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq 1.9 \cdot 10^{+115}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -8.99999999999999999e193 or 1.9e115 < (*.f64 b c) Initial program 83.3%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified83.3%
Taylor expanded in b around inf
*-lowering-*.f6465.4%
Simplified65.4%
if -8.99999999999999999e193 < (*.f64 b c) < -9.79999999999999988e-291Initial program 84.5%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified87.0%
Taylor expanded in i around inf
*-lowering-*.f64N/A
*-lowering-*.f6430.7%
Simplified30.7%
if -9.79999999999999988e-291 < (*.f64 b c) < 1.9e115Initial program 85.1%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified86.0%
Taylor expanded in j around inf
*-lowering-*.f64N/A
*-lowering-*.f6435.1%
Simplified35.1%
Final simplification41.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (+ (* i -4.0) (* 18.0 (* z (* y t)))))))
(if (<= x -6.8e-68)
t_1
(if (<= x 2.7e+16)
(- (+ (* b c) (* -4.0 (* t a))) (* (* j 27.0) k))
t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((i * -4.0) + (18.0 * (z * (y * t))));
double tmp;
if (x <= -6.8e-68) {
tmp = t_1;
} else if (x <= 2.7e+16) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((j * 27.0) * k);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((i * (-4.0d0)) + (18.0d0 * (z * (y * t))))
if (x <= (-6.8d-68)) then
tmp = t_1
else if (x <= 2.7d+16) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((j * 27.0d0) * k)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((i * -4.0) + (18.0 * (z * (y * t))));
double tmp;
if (x <= -6.8e-68) {
tmp = t_1;
} else if (x <= 2.7e+16) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((j * 27.0) * k);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((i * -4.0) + (18.0 * (z * (y * t)))) tmp = 0 if x <= -6.8e-68: tmp = t_1 elif x <= 2.7e+16: tmp = ((b * c) + (-4.0 * (t * a))) - ((j * 27.0) * k) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(i * -4.0) + Float64(18.0 * Float64(z * Float64(y * t))))) tmp = 0.0 if (x <= -6.8e-68) tmp = t_1; elseif (x <= 2.7e+16) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * ((i * -4.0) + (18.0 * (z * (y * t))));
tmp = 0.0;
if (x <= -6.8e-68)
tmp = t_1;
elseif (x <= 2.7e+16)
tmp = ((b * c) + (-4.0 * (t * a))) - ((j * 27.0) * k);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(i * -4.0), $MachinePrecision] + N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.8e-68], t$95$1, If[LessEqual[x, 2.7e+16], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4 + 18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{if}\;x \leq -6.8 \cdot 10^{-68}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{+16}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -6.80000000000000037e-68 or 2.7e16 < x Initial program 78.4%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified79.8%
Taylor expanded in x around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6465.7%
Simplified65.7%
if -6.80000000000000037e-68 < x < 2.7e16Initial program 92.6%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6479.6%
Simplified79.6%
Final simplification71.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= j -2.1e+169) (* -27.0 (* j k)) (if (<= j 3300000000000.0) (+ (* b c) (* i (* x -4.0))) (* k (* j -27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -2.1e+169) {
tmp = -27.0 * (j * k);
} else if (j <= 3300000000000.0) {
tmp = (b * c) + (i * (x * -4.0));
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (j <= (-2.1d+169)) then
tmp = (-27.0d0) * (j * k)
else if (j <= 3300000000000.0d0) then
tmp = (b * c) + (i * (x * (-4.0d0)))
else
tmp = k * (j * (-27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -2.1e+169) {
tmp = -27.0 * (j * k);
} else if (j <= 3300000000000.0) {
tmp = (b * c) + (i * (x * -4.0));
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if j <= -2.1e+169: tmp = -27.0 * (j * k) elif j <= 3300000000000.0: tmp = (b * c) + (i * (x * -4.0)) else: tmp = k * (j * -27.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (j <= -2.1e+169) tmp = Float64(-27.0 * Float64(j * k)); elseif (j <= 3300000000000.0) tmp = Float64(Float64(b * c) + Float64(i * Float64(x * -4.0))); else tmp = Float64(k * Float64(j * -27.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (j <= -2.1e+169)
tmp = -27.0 * (j * k);
elseif (j <= 3300000000000.0)
tmp = (b * c) + (i * (x * -4.0));
else
tmp = k * (j * -27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[j, -2.1e+169], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3300000000000.0], N[(N[(b * c), $MachinePrecision] + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;j \leq -2.1 \cdot 10^{+169}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;j \leq 3300000000000:\\
\;\;\;\;b \cdot c + i \cdot \left(x \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if j < -2.1000000000000001e169Initial program 85.1%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified85.1%
Taylor expanded in j around inf
*-lowering-*.f64N/A
*-lowering-*.f6463.7%
Simplified63.7%
if -2.1000000000000001e169 < j < 3.3e12Initial program 88.9%
Taylor expanded in t around 0
*-lowering-*.f6460.4%
Simplified60.4%
Taylor expanded in j around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6451.4%
Simplified51.4%
if 3.3e12 < j Initial program 73.5%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified74.9%
Taylor expanded in j around inf
*-lowering-*.f64N/A
*-lowering-*.f6440.3%
Simplified40.3%
associate-*r*N/A
metadata-evalN/A
distribute-lft-neg-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f6440.3%
Applied egg-rr40.3%
Final simplification49.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= (* b c) -2.4e+124) (* b c) (if (<= (* b c) 1.25e+115) (* -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);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -2.4e+124) {
tmp = b * c;
} else if ((b * c) <= 1.25e+115) {
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.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-2.4d+124)) then
tmp = b * c
else if ((b * c) <= 1.25d+115) 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;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -2.4e+124) {
tmp = b * c;
} else if ((b * c) <= 1.25e+115) {
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]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -2.4e+124: tmp = b * c elif (b * c) <= 1.25e+115: 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]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -2.4e+124) tmp = Float64(b * c); elseif (Float64(b * c) <= 1.25e+115) 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -2.4e+124)
tmp = b * c;
elseif ((b * c) <= 1.25e+115)
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. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -2.4e+124], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.25e+115], 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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2.4 \cdot 10^{+124}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 1.25 \cdot 10^{+115}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -2.40000000000000006e124 or 1.25000000000000002e115 < (*.f64 b c) Initial program 83.9%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified83.9%
Taylor expanded in b around inf
*-lowering-*.f6460.1%
Simplified60.1%
if -2.40000000000000006e124 < (*.f64 b c) < 1.25000000000000002e115Initial program 84.7%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified86.3%
Taylor expanded in j around inf
*-lowering-*.f64N/A
*-lowering-*.f6430.2%
Simplified30.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 84.5%
associate--l+N/A
associate--l+N/A
+-lowering-+.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Simplified85.6%
Taylor expanded in b around inf
*-lowering-*.f6420.8%
Simplified20.8%
(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 2024155
(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)))