
(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 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<=
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
t_1)
INFINITY)
(-
(fma
(* t (* x (* 18.0 y)))
z
(fma t (* a -4.0) (fma b c (* x (* i -4.0)))))
t_1)
(* t (fma -4.0 a (* 18.0 (* z (* x y))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - t_1) <= ((double) INFINITY)) {
tmp = fma((t * (x * (18.0 * y))), z, fma(t, (a * -4.0), fma(b, c, (x * (i * -4.0))))) - t_1;
} else {
tmp = t * fma(-4.0, a, (18.0 * (z * (x * y))));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - t_1) <= Inf) tmp = Float64(fma(Float64(t * Float64(x * Float64(18.0 * y))), z, fma(t, Float64(a * -4.0), fma(b, c, Float64(x * Float64(i * -4.0))))) - t_1); else tmp = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(z * Float64(x * y))))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], Infinity], N[(N[(N[(t * N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * z + N[(t * N[(a * -4.0), $MachinePrecision] + N[(b * c + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(t * N[(-4.0 * a + N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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}\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - t\_1 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(t \cdot \left(x \cdot \left(18 \cdot y\right)\right), z, \mathsf{fma}\left(t, a \cdot -4, \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 94.9%
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
lift--.f64N/A
sub-negN/A
associate-+l+N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites96.5%
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 inf
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6473.5
Applied rewrites73.5%
Final simplification94.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (<=
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
t_1)
INFINITY)
(-
(fma
y
(* (* x 18.0) (* z t))
(fma t (* a -4.0) (fma b c (* x (* i -4.0)))))
t_1)
(* t (fma -4.0 a (* 18.0 (* z (* x y))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - t_1) <= ((double) INFINITY)) {
tmp = fma(y, ((x * 18.0) * (z * t)), fma(t, (a * -4.0), fma(b, c, (x * (i * -4.0))))) - t_1;
} else {
tmp = t * fma(-4.0, a, (18.0 * (z * (x * y))));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - t_1) <= Inf) tmp = Float64(fma(y, Float64(Float64(x * 18.0) * Float64(z * t)), fma(t, Float64(a * -4.0), fma(b, c, Float64(x * Float64(i * -4.0))))) - t_1); else tmp = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(z * Float64(x * y))))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], Infinity], N[(N[(y * N[(N[(x * 18.0), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision] + N[(b * c + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(t * N[(-4.0 * a + N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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}\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - t\_1 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y, \left(x \cdot 18\right) \cdot \left(z \cdot t\right), \mathsf{fma}\left(t, a \cdot -4, \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 94.9%
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
lift--.f64N/A
sub-negN/A
associate-+l+N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites94.5%
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 inf
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6473.5
Applied rewrites73.5%
Final simplification92.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<=
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))
INFINITY)
(fma
(* j k)
-27.0
(fma x (* i -4.0) (fma t (fma x (* 18.0 (* y z)) (* a -4.0)) (* b c))))
(* t (fma -4.0 a (* 18.0 (* z (* x y)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= ((double) INFINITY)) {
tmp = fma((j * k), -27.0, fma(x, (i * -4.0), fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), (b * c))));
} else {
tmp = t * fma(-4.0, a, (18.0 * (z * (x * y))));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) <= Inf) tmp = fma(Float64(j * k), -27.0, fma(x, Float64(i * -4.0), fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0)), Float64(b * c)))); else tmp = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(z * Float64(x * y))))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(j * k), $MachinePrecision] * -27.0 + N[(x * N[(i * -4.0), $MachinePrecision] + N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(-4.0 * a + N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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}\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(j \cdot k, -27, \mathsf{fma}\left(x, i \cdot -4, \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), b \cdot c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 94.9%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-eval95.4
lift--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites94.6%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Taylor expanded in t around inf
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6473.5
Applied rewrites73.5%
Final simplification92.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (fma b c (* j (* k -27.0))))
(t_2 (fma x (fma -4.0 i (* t (* 18.0 (* y z)))) t_1)))
(if (<= x -6.1e-27)
t_2
(if (<= x 4.6e-6) (fma t (fma -4.0 a (* 18.0 (* z (* x y)))) t_1) t_2))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = fma(b, c, (j * (k * -27.0)));
double t_2 = fma(x, fma(-4.0, i, (t * (18.0 * (y * z)))), t_1);
double tmp;
if (x <= -6.1e-27) {
tmp = t_2;
} else if (x <= 4.6e-6) {
tmp = fma(t, fma(-4.0, a, (18.0 * (z * (x * y)))), t_1);
} else {
tmp = t_2;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = fma(b, c, Float64(j * Float64(k * -27.0))) t_2 = fma(x, fma(-4.0, i, Float64(t * Float64(18.0 * Float64(y * z)))), t_1) tmp = 0.0 if (x <= -6.1e-27) tmp = t_2; elseif (x <= 4.6e-6) tmp = fma(t, fma(-4.0, a, Float64(18.0 * Float64(z * Float64(x * y)))), t_1); else tmp = t_2; end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(b * c + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(-4.0 * i + N[(t * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[x, -6.1e-27], t$95$2, If[LessEqual[x, 4.6e-6], N[(t * N[(-4.0 * a + N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b, c, j \cdot \left(k \cdot -27\right)\right)\\
t_2 := \mathsf{fma}\left(x, \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right), t\_1\right)\\
\mathbf{if}\;x \leq -6.1 \cdot 10^{-27}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 4.6 \cdot 10^{-6}:\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(-4, a, 18 \cdot \left(z \cdot \left(x \cdot y\right)\right)\right), t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -6.0999999999999999e-27 or 4.6e-6 < x Initial program 76.9%
Taylor expanded in a around 0
associate--r+N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate-+r+N/A
associate--l+N/A
Applied rewrites89.3%
if -6.0999999999999999e-27 < x < 4.6e-6Initial program 93.7%
Taylor expanded in i around 0
associate--r+N/A
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-fma.f64N/A
Applied rewrites92.3%
Final simplification90.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(fma
t
(fma -4.0 a (* 18.0 (* z (* x y))))
(fma b c (* j (* k -27.0))))))
(if (<= t -1.36e+23)
t_1
(if (<= t 1.3e+128)
(fma (* j k) -27.0 (fma x (* i -4.0) (fma t (* a -4.0) (* b c))))
t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = fma(t, fma(-4.0, a, (18.0 * (z * (x * y)))), fma(b, c, (j * (k * -27.0))));
double tmp;
if (t <= -1.36e+23) {
tmp = t_1;
} else if (t <= 1.3e+128) {
tmp = fma((j * k), -27.0, fma(x, (i * -4.0), fma(t, (a * -4.0), (b * c))));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = fma(t, fma(-4.0, a, Float64(18.0 * Float64(z * Float64(x * y)))), fma(b, c, Float64(j * Float64(k * -27.0)))) tmp = 0.0 if (t <= -1.36e+23) tmp = t_1; elseif (t <= 1.3e+128) tmp = fma(Float64(j * k), -27.0, fma(x, Float64(i * -4.0), fma(t, Float64(a * -4.0), Float64(b * c)))); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(-4.0 * a + N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.36e+23], t$95$1, If[LessEqual[t, 1.3e+128], N[(N[(j * k), $MachinePrecision] * -27.0 + N[(x * N[(i * -4.0), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision] + N[(b * c), $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])\\\\
[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 := \mathsf{fma}\left(t, \mathsf{fma}\left(-4, a, 18 \cdot \left(z \cdot \left(x \cdot y\right)\right)\right), \mathsf{fma}\left(b, c, j \cdot \left(k \cdot -27\right)\right)\right)\\
\mathbf{if}\;t \leq -1.36 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+128}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot k, -27, \mathsf{fma}\left(x, i \cdot -4, \mathsf{fma}\left(t, a \cdot -4, b \cdot c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.36e23 or 1.3e128 < t Initial program 81.3%
Taylor expanded in i around 0
associate--r+N/A
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-fma.f64N/A
Applied rewrites88.2%
if -1.36e23 < t < 1.3e128Initial program 88.0%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-eval88.6
lift--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites90.5%
Taylor expanded in x around 0
lower-*.f6489.8
Applied rewrites89.8%
Final simplification89.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -8.8e+167)
(* x (fma -4.0 i (* y (* z (* 18.0 t)))))
(if (<= x 1.58e+218)
(fma (* j k) -27.0 (fma x (* i -4.0) (fma t (* a -4.0) (* b c))))
(* x (fma -4.0 i (* t (* 18.0 (* y z))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -8.8e+167) {
tmp = x * fma(-4.0, i, (y * (z * (18.0 * t))));
} else if (x <= 1.58e+218) {
tmp = fma((j * k), -27.0, fma(x, (i * -4.0), fma(t, (a * -4.0), (b * c))));
} else {
tmp = x * fma(-4.0, i, (t * (18.0 * (y * z))));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -8.8e+167) tmp = Float64(x * fma(-4.0, i, Float64(y * Float64(z * Float64(18.0 * t))))); elseif (x <= 1.58e+218) tmp = fma(Float64(j * k), -27.0, fma(x, Float64(i * -4.0), fma(t, Float64(a * -4.0), Float64(b * c)))); else tmp = Float64(x * fma(-4.0, i, Float64(t * Float64(18.0 * Float64(y * z))))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -8.8e+167], N[(x * N[(-4.0 * i + N[(y * N[(z * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.58e+218], N[(N[(j * k), $MachinePrecision] * -27.0 + N[(x * N[(i * -4.0), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(-4.0 * i + N[(t * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.8 \cdot 10^{+167}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(-4, i, y \cdot \left(z \cdot \left(18 \cdot t\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.58 \cdot 10^{+218}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot k, -27, \mathsf{fma}\left(x, i \cdot -4, \mathsf{fma}\left(t, a \cdot -4, b \cdot c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if x < -8.80000000000000013e167Initial program 57.4%
Taylor expanded in j around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f641.5
Applied rewrites1.5%
Taylor expanded in x around inf
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f64N/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6489.3
Applied rewrites89.3%
if -8.80000000000000013e167 < x < 1.58e218Initial program 90.8%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-eval91.3
lift--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites90.9%
Taylor expanded in x around 0
lower-*.f6484.2
Applied rewrites84.2%
if 1.58e218 < x Initial program 71.0%
Taylor expanded in x around inf
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6495.1
Applied rewrites95.1%
Final simplification85.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -6.2e-27)
(* x (fma -4.0 i (* y (* z (* 18.0 t)))))
(if (<= x -1.9e-252)
(* t (fma -4.0 a (* 18.0 (* z (* x y)))))
(if (<= x 6.5e+106)
(fma (* j -27.0) k (* b c))
(* x (fma -4.0 i (* t (* 18.0 (* y z)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -6.2e-27) {
tmp = x * fma(-4.0, i, (y * (z * (18.0 * t))));
} else if (x <= -1.9e-252) {
tmp = t * fma(-4.0, a, (18.0 * (z * (x * y))));
} else if (x <= 6.5e+106) {
tmp = fma((j * -27.0), k, (b * c));
} else {
tmp = x * fma(-4.0, i, (t * (18.0 * (y * z))));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -6.2e-27) tmp = Float64(x * fma(-4.0, i, Float64(y * Float64(z * Float64(18.0 * t))))); elseif (x <= -1.9e-252) tmp = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(z * Float64(x * y))))); elseif (x <= 6.5e+106) tmp = fma(Float64(j * -27.0), k, Float64(b * c)); else tmp = Float64(x * fma(-4.0, i, Float64(t * Float64(18.0 * Float64(y * z))))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -6.2e-27], N[(x * N[(-4.0 * i + N[(y * N[(z * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.9e-252], N[(t * N[(-4.0 * a + N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.5e+106], N[(N[(j * -27.0), $MachinePrecision] * k + N[(b * c), $MachinePrecision]), $MachinePrecision], N[(x * N[(-4.0 * i + N[(t * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{-27}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(-4, i, y \cdot \left(z \cdot \left(18 \cdot t\right)\right)\right)\\
\mathbf{elif}\;x \leq -1.9 \cdot 10^{-252}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{+106}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if x < -6.1999999999999997e-27Initial program 74.9%
Taylor expanded in j around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6410.6
Applied rewrites10.6%
Taylor expanded in x around inf
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f64N/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6478.4
Applied rewrites78.4%
if -6.1999999999999997e-27 < x < -1.9e-252Initial program 90.4%
Taylor expanded in t around inf
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6458.1
Applied rewrites58.1%
if -1.9e-252 < x < 6.5000000000000003e106Initial program 93.1%
Taylor expanded in b around inf
lower-*.f6470.3
Applied rewrites70.3%
lift--.f64N/A
sub-negN/A
lift-*.f64N/A
distribute-lft-neg-outN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
Applied rewrites70.3%
if 6.5000000000000003e106 < x Initial program 75.7%
Taylor expanded in x around inf
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6477.1
Applied rewrites77.1%
Final simplification70.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (fma -4.0 i (* t (* 18.0 (* y z)))))))
(if (<= x -9.2e-27)
t_1
(if (<= x -1.9e-252)
(* t (fma -4.0 a (* 18.0 (* z (* x y)))))
(if (<= x 6.5e+106) (fma (* j -27.0) k (* b c)) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * fma(-4.0, i, (t * (18.0 * (y * z))));
double tmp;
if (x <= -9.2e-27) {
tmp = t_1;
} else if (x <= -1.9e-252) {
tmp = t * fma(-4.0, a, (18.0 * (z * (x * y))));
} else if (x <= 6.5e+106) {
tmp = fma((j * -27.0), k, (b * c));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * fma(-4.0, i, Float64(t * Float64(18.0 * Float64(y * z))))) tmp = 0.0 if (x <= -9.2e-27) tmp = t_1; elseif (x <= -1.9e-252) tmp = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(z * Float64(x * y))))); elseif (x <= 6.5e+106) tmp = fma(Float64(j * -27.0), k, Float64(b * c)); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(-4.0 * i + N[(t * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9.2e-27], t$95$1, If[LessEqual[x, -1.9e-252], N[(t * N[(-4.0 * a + N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.5e+106], N[(N[(j * -27.0), $MachinePrecision] * k + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;x \leq -9.2 \cdot 10^{-27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.9 \cdot 10^{-252}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{+106}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -9.1999999999999998e-27 or 6.5000000000000003e106 < x Initial program 75.3%
Taylor expanded in x around inf
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6476.0
Applied rewrites76.0%
if -9.1999999999999998e-27 < x < -1.9e-252Initial program 90.4%
Taylor expanded in t around inf
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6458.1
Applied rewrites58.1%
if -1.9e-252 < x < 6.5000000000000003e106Initial program 93.1%
Taylor expanded in b around inf
lower-*.f6470.3
Applied rewrites70.3%
lift--.f64N/A
sub-negN/A
lift-*.f64N/A
distribute-lft-neg-outN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
Applied rewrites70.3%
Final simplification70.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -8.6e+167)
(* z (* (* 18.0 y) (* x t)))
(if (<= x -1e-26)
(fma (* j k) -27.0 (* x (* i -4.0)))
(if (<= x -1.1e-255)
(fma (* j k) -27.0 (* -4.0 (* t a)))
(if (<= x 2.1e+215) (fma (* j -27.0) k (* b c)) (* -4.0 (* x i)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -8.6e+167) {
tmp = z * ((18.0 * y) * (x * t));
} else if (x <= -1e-26) {
tmp = fma((j * k), -27.0, (x * (i * -4.0)));
} else if (x <= -1.1e-255) {
tmp = fma((j * k), -27.0, (-4.0 * (t * a)));
} else if (x <= 2.1e+215) {
tmp = fma((j * -27.0), k, (b * c));
} else {
tmp = -4.0 * (x * i);
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -8.6e+167) tmp = Float64(z * Float64(Float64(18.0 * y) * Float64(x * t))); elseif (x <= -1e-26) tmp = fma(Float64(j * k), -27.0, Float64(x * Float64(i * -4.0))); elseif (x <= -1.1e-255) tmp = fma(Float64(j * k), -27.0, Float64(-4.0 * Float64(t * a))); elseif (x <= 2.1e+215) tmp = fma(Float64(j * -27.0), k, Float64(b * c)); else tmp = Float64(-4.0 * Float64(x * i)); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -8.6e+167], N[(z * N[(N[(18.0 * y), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1e-26], N[(N[(j * k), $MachinePrecision] * -27.0 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.1e-255], N[(N[(j * k), $MachinePrecision] * -27.0 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.1e+215], N[(N[(j * -27.0), $MachinePrecision] * k + N[(b * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.6 \cdot 10^{+167}:\\
\;\;\;\;z \cdot \left(\left(18 \cdot y\right) \cdot \left(x \cdot t\right)\right)\\
\mathbf{elif}\;x \leq -1 \cdot 10^{-26}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot k, -27, x \cdot \left(i \cdot -4\right)\right)\\
\mathbf{elif}\;x \leq -1.1 \cdot 10^{-255}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot k, -27, -4 \cdot \left(t \cdot a\right)\right)\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{+215}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if x < -8.6000000000000004e167Initial program 57.4%
Taylor expanded in b around inf
lower-*.f6419.3
Applied rewrites19.3%
Taylor expanded in y around inf
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6458.1
Applied rewrites58.1%
Applied rewrites64.8%
if -8.6000000000000004e167 < x < -1e-26Initial program 93.1%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-eval93.1
lift--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites93.1%
Taylor expanded in i around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6460.3
Applied rewrites60.3%
if -1e-26 < x < -1.1e-255Initial program 90.4%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-eval90.4
lift--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites88.8%
Taylor expanded in a around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6457.9
Applied rewrites57.9%
if -1.1e-255 < x < 2.1000000000000002e215Initial program 90.3%
Taylor expanded in b around inf
lower-*.f6463.7
Applied rewrites63.7%
lift--.f64N/A
sub-negN/A
lift-*.f64N/A
distribute-lft-neg-outN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
Applied rewrites63.7%
if 2.1000000000000002e215 < x Initial program 74.2%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6470.7
Applied rewrites70.7%
Final simplification63.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -6.2e+46)
(* x (fma -4.0 i (* y (* z (* 18.0 t)))))
(if (<= x 9.2e+136)
(fma b c (fma -4.0 (* t a) (* j (* k -27.0))))
(* x (fma -4.0 i (* t (* 18.0 (* y z))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -6.2e+46) {
tmp = x * fma(-4.0, i, (y * (z * (18.0 * t))));
} else if (x <= 9.2e+136) {
tmp = fma(b, c, fma(-4.0, (t * a), (j * (k * -27.0))));
} else {
tmp = x * fma(-4.0, i, (t * (18.0 * (y * z))));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -6.2e+46) tmp = Float64(x * fma(-4.0, i, Float64(y * Float64(z * Float64(18.0 * t))))); elseif (x <= 9.2e+136) tmp = fma(b, c, fma(-4.0, Float64(t * a), Float64(j * Float64(k * -27.0)))); else tmp = Float64(x * fma(-4.0, i, Float64(t * Float64(18.0 * Float64(y * z))))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -6.2e+46], N[(x * N[(-4.0 * i + N[(y * N[(z * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.2e+136], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(-4.0 * i + N[(t * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{+46}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(-4, i, y \cdot \left(z \cdot \left(18 \cdot t\right)\right)\right)\\
\mathbf{elif}\;x \leq 9.2 \cdot 10^{+136}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if x < -6.1999999999999995e46Initial program 71.2%
Taylor expanded in j around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f647.8
Applied rewrites7.8%
Taylor expanded in x around inf
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f64N/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6483.5
Applied rewrites83.5%
if -6.1999999999999995e46 < x < 9.2e136Initial program 91.7%
Taylor expanded in x around 0
sub-negN/A
lower-fma.f64N/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6481.2
Applied rewrites81.2%
if 9.2e136 < x Initial program 76.3%
Taylor expanded in x around inf
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6480.2
Applied rewrites80.2%
Final simplification81.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (fma -4.0 a (* 18.0 (* z (* x y)))))))
(if (<= t -110000.0)
t_1
(if (<= t 1.3e+128) (fma (* j -27.0) k (* b c)) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * fma(-4.0, a, (18.0 * (z * (x * y))));
double tmp;
if (t <= -110000.0) {
tmp = t_1;
} else if (t <= 1.3e+128) {
tmp = fma((j * -27.0), k, (b * c));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(z * Float64(x * y))))) tmp = 0.0 if (t <= -110000.0) tmp = t_1; elseif (t <= 1.3e+128) tmp = fma(Float64(j * -27.0), k, Float64(b * c)); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(-4.0 * a + N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -110000.0], t$95$1, If[LessEqual[t, 1.3e+128], N[(N[(j * -27.0), $MachinePrecision] * k + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{if}\;t \leq -110000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+128}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.1e5 or 1.3e128 < t Initial program 81.7%
Taylor expanded in t around inf
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6474.8
Applied rewrites74.8%
if -1.1e5 < t < 1.3e128Initial program 87.8%
Taylor expanded in b around inf
lower-*.f6460.8
Applied rewrites60.8%
lift--.f64N/A
sub-negN/A
lift-*.f64N/A
distribute-lft-neg-outN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
Applied rewrites60.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= c -1.5e-43)
(* b c)
(if (<= c 5.9e-176)
(* (* j k) -27.0)
(if (<= c 1.22e-49)
(* -4.0 (* t a))
(if (<= c 6.8e+148) (* -4.0 (* x i)) (* b c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (c <= -1.5e-43) {
tmp = b * c;
} else if (c <= 5.9e-176) {
tmp = (j * k) * -27.0;
} else if (c <= 1.22e-49) {
tmp = -4.0 * (t * a);
} else if (c <= 6.8e+148) {
tmp = -4.0 * (x * i);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (c <= (-1.5d-43)) then
tmp = b * c
else if (c <= 5.9d-176) then
tmp = (j * k) * (-27.0d0)
else if (c <= 1.22d-49) then
tmp = (-4.0d0) * (t * a)
else if (c <= 6.8d+148) then
tmp = (-4.0d0) * (x * i)
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (c <= -1.5e-43) {
tmp = b * c;
} else if (c <= 5.9e-176) {
tmp = (j * k) * -27.0;
} else if (c <= 1.22e-49) {
tmp = -4.0 * (t * a);
} else if (c <= 6.8e+148) {
tmp = -4.0 * (x * i);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if c <= -1.5e-43: tmp = b * c elif c <= 5.9e-176: tmp = (j * k) * -27.0 elif c <= 1.22e-49: tmp = -4.0 * (t * a) elif c <= 6.8e+148: tmp = -4.0 * (x * i) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (c <= -1.5e-43) tmp = Float64(b * c); elseif (c <= 5.9e-176) tmp = Float64(Float64(j * k) * -27.0); elseif (c <= 1.22e-49) tmp = Float64(-4.0 * Float64(t * a)); elseif (c <= 6.8e+148) tmp = Float64(-4.0 * Float64(x * i)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (c <= -1.5e-43)
tmp = b * c;
elseif (c <= 5.9e-176)
tmp = (j * k) * -27.0;
elseif (c <= 1.22e-49)
tmp = -4.0 * (t * a);
elseif (c <= 6.8e+148)
tmp = -4.0 * (x * i);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[c, -1.5e-43], N[(b * c), $MachinePrecision], If[LessEqual[c, 5.9e-176], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[c, 1.22e-49], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 6.8e+148], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.5 \cdot 10^{-43}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq 5.9 \cdot 10^{-176}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;c \leq 1.22 \cdot 10^{-49}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;c \leq 6.8 \cdot 10^{+148}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if c < -1.50000000000000002e-43 or 6.8000000000000006e148 < c Initial program 89.3%
Taylor expanded in b around inf
lower-*.f6443.8
Applied rewrites43.8%
if -1.50000000000000002e-43 < c < 5.8999999999999997e-176Initial program 84.7%
Taylor expanded in j around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6437.2
Applied rewrites37.2%
Applied rewrites37.2%
if 5.8999999999999997e-176 < c < 1.2199999999999999e-49Initial program 85.1%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
if 1.2199999999999999e-49 < c < 6.8000000000000006e148Initial program 73.7%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6428.2
Applied rewrites28.2%
Final simplification39.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= c -1.5e-43)
(* b c)
(if (<= c 5.9e-176)
(* k (* j -27.0))
(if (<= c 1.22e-49)
(* -4.0 (* t a))
(if (<= c 6.8e+148) (* -4.0 (* x i)) (* b c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (c <= -1.5e-43) {
tmp = b * c;
} else if (c <= 5.9e-176) {
tmp = k * (j * -27.0);
} else if (c <= 1.22e-49) {
tmp = -4.0 * (t * a);
} else if (c <= 6.8e+148) {
tmp = -4.0 * (x * i);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (c <= (-1.5d-43)) then
tmp = b * c
else if (c <= 5.9d-176) then
tmp = k * (j * (-27.0d0))
else if (c <= 1.22d-49) then
tmp = (-4.0d0) * (t * a)
else if (c <= 6.8d+148) then
tmp = (-4.0d0) * (x * i)
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (c <= -1.5e-43) {
tmp = b * c;
} else if (c <= 5.9e-176) {
tmp = k * (j * -27.0);
} else if (c <= 1.22e-49) {
tmp = -4.0 * (t * a);
} else if (c <= 6.8e+148) {
tmp = -4.0 * (x * i);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if c <= -1.5e-43: tmp = b * c elif c <= 5.9e-176: tmp = k * (j * -27.0) elif c <= 1.22e-49: tmp = -4.0 * (t * a) elif c <= 6.8e+148: tmp = -4.0 * (x * i) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (c <= -1.5e-43) tmp = Float64(b * c); elseif (c <= 5.9e-176) tmp = Float64(k * Float64(j * -27.0)); elseif (c <= 1.22e-49) tmp = Float64(-4.0 * Float64(t * a)); elseif (c <= 6.8e+148) tmp = Float64(-4.0 * Float64(x * i)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (c <= -1.5e-43)
tmp = b * c;
elseif (c <= 5.9e-176)
tmp = k * (j * -27.0);
elseif (c <= 1.22e-49)
tmp = -4.0 * (t * a);
elseif (c <= 6.8e+148)
tmp = -4.0 * (x * i);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[c, -1.5e-43], N[(b * c), $MachinePrecision], If[LessEqual[c, 5.9e-176], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.22e-49], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 6.8e+148], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.5 \cdot 10^{-43}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq 5.9 \cdot 10^{-176}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;c \leq 1.22 \cdot 10^{-49}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;c \leq 6.8 \cdot 10^{+148}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if c < -1.50000000000000002e-43 or 6.8000000000000006e148 < c Initial program 89.3%
Taylor expanded in b around inf
lower-*.f6443.8
Applied rewrites43.8%
if -1.50000000000000002e-43 < c < 5.8999999999999997e-176Initial program 84.7%
Taylor expanded in j around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6437.2
Applied rewrites37.2%
Applied rewrites36.2%
if 5.8999999999999997e-176 < c < 1.2199999999999999e-49Initial program 85.1%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
if 1.2199999999999999e-49 < c < 6.8000000000000006e148Initial program 73.7%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6428.2
Applied rewrites28.2%
Final simplification38.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= c -1.5e-43)
(* b c)
(if (<= c 5.9e-176)
(* j (* k -27.0))
(if (<= c 1.22e-49)
(* -4.0 (* t a))
(if (<= c 6.8e+148) (* -4.0 (* x i)) (* b c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (c <= -1.5e-43) {
tmp = b * c;
} else if (c <= 5.9e-176) {
tmp = j * (k * -27.0);
} else if (c <= 1.22e-49) {
tmp = -4.0 * (t * a);
} else if (c <= 6.8e+148) {
tmp = -4.0 * (x * i);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (c <= (-1.5d-43)) then
tmp = b * c
else if (c <= 5.9d-176) then
tmp = j * (k * (-27.0d0))
else if (c <= 1.22d-49) then
tmp = (-4.0d0) * (t * a)
else if (c <= 6.8d+148) then
tmp = (-4.0d0) * (x * i)
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (c <= -1.5e-43) {
tmp = b * c;
} else if (c <= 5.9e-176) {
tmp = j * (k * -27.0);
} else if (c <= 1.22e-49) {
tmp = -4.0 * (t * a);
} else if (c <= 6.8e+148) {
tmp = -4.0 * (x * i);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if c <= -1.5e-43: tmp = b * c elif c <= 5.9e-176: tmp = j * (k * -27.0) elif c <= 1.22e-49: tmp = -4.0 * (t * a) elif c <= 6.8e+148: tmp = -4.0 * (x * i) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (c <= -1.5e-43) tmp = Float64(b * c); elseif (c <= 5.9e-176) tmp = Float64(j * Float64(k * -27.0)); elseif (c <= 1.22e-49) tmp = Float64(-4.0 * Float64(t * a)); elseif (c <= 6.8e+148) tmp = Float64(-4.0 * Float64(x * i)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (c <= -1.5e-43)
tmp = b * c;
elseif (c <= 5.9e-176)
tmp = j * (k * -27.0);
elseif (c <= 1.22e-49)
tmp = -4.0 * (t * a);
elseif (c <= 6.8e+148)
tmp = -4.0 * (x * i);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[c, -1.5e-43], N[(b * c), $MachinePrecision], If[LessEqual[c, 5.9e-176], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.22e-49], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 6.8e+148], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.5 \cdot 10^{-43}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq 5.9 \cdot 10^{-176}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;c \leq 1.22 \cdot 10^{-49}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;c \leq 6.8 \cdot 10^{+148}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if c < -1.50000000000000002e-43 or 6.8000000000000006e148 < c Initial program 89.3%
Taylor expanded in b around inf
lower-*.f6443.8
Applied rewrites43.8%
if -1.50000000000000002e-43 < c < 5.8999999999999997e-176Initial program 84.7%
Taylor expanded in j around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6437.2
Applied rewrites37.2%
if 5.8999999999999997e-176 < c < 1.2199999999999999e-49Initial program 85.1%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
if 1.2199999999999999e-49 < c < 6.8000000000000006e148Initial program 73.7%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6428.2
Applied rewrites28.2%
Final simplification39.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -8e+83)
(* z (* (* 18.0 y) (* x t)))
(if (<= x -1.1e-255)
(fma (* j k) -27.0 (* -4.0 (* t a)))
(if (<= x 2.1e+215) (fma (* j -27.0) k (* b c)) (* -4.0 (* x i))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -8e+83) {
tmp = z * ((18.0 * y) * (x * t));
} else if (x <= -1.1e-255) {
tmp = fma((j * k), -27.0, (-4.0 * (t * a)));
} else if (x <= 2.1e+215) {
tmp = fma((j * -27.0), k, (b * c));
} else {
tmp = -4.0 * (x * i);
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -8e+83) tmp = Float64(z * Float64(Float64(18.0 * y) * Float64(x * t))); elseif (x <= -1.1e-255) tmp = fma(Float64(j * k), -27.0, Float64(-4.0 * Float64(t * a))); elseif (x <= 2.1e+215) tmp = fma(Float64(j * -27.0), k, Float64(b * c)); else tmp = Float64(-4.0 * Float64(x * i)); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -8e+83], N[(z * N[(N[(18.0 * y), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.1e-255], N[(N[(j * k), $MachinePrecision] * -27.0 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.1e+215], N[(N[(j * -27.0), $MachinePrecision] * k + N[(b * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8 \cdot 10^{+83}:\\
\;\;\;\;z \cdot \left(\left(18 \cdot y\right) \cdot \left(x \cdot t\right)\right)\\
\mathbf{elif}\;x \leq -1.1 \cdot 10^{-255}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot k, -27, -4 \cdot \left(t \cdot a\right)\right)\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{+215}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if x < -8.00000000000000025e83Initial program 69.4%
Taylor expanded in b around inf
lower-*.f6417.1
Applied rewrites17.1%
Taylor expanded in y around inf
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6445.8
Applied rewrites45.8%
Applied rewrites54.1%
if -8.00000000000000025e83 < x < -1.1e-255Initial program 91.9%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-eval92.0
lift--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites90.6%
Taylor expanded in a around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6453.7
Applied rewrites53.7%
if -1.1e-255 < x < 2.1000000000000002e215Initial program 90.3%
Taylor expanded in b around inf
lower-*.f6463.7
Applied rewrites63.7%
lift--.f64N/A
sub-negN/A
lift-*.f64N/A
distribute-lft-neg-outN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
Applied rewrites63.7%
if 2.1000000000000002e215 < x Initial program 74.2%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6470.7
Applied rewrites70.7%
Final simplification60.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* x i))))
(if (<= x -6e+166)
(* z (* (* 18.0 y) (* x t)))
(if (<= x -1.5e+119)
t_1
(if (<= x 2.1e+215) (fma (* j -27.0) k (* b c)) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (x * i);
double tmp;
if (x <= -6e+166) {
tmp = z * ((18.0 * y) * (x * t));
} else if (x <= -1.5e+119) {
tmp = t_1;
} else if (x <= 2.1e+215) {
tmp = fma((j * -27.0), k, (b * c));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(x * i)) tmp = 0.0 if (x <= -6e+166) tmp = Float64(z * Float64(Float64(18.0 * y) * Float64(x * t))); elseif (x <= -1.5e+119) tmp = t_1; elseif (x <= 2.1e+215) tmp = fma(Float64(j * -27.0), k, Float64(b * c)); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6e+166], N[(z * N[(N[(18.0 * y), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.5e+119], t$95$1, If[LessEqual[x, 2.1e+215], N[(N[(j * -27.0), $MachinePrecision] * k + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;x \leq -6 \cdot 10^{+166}:\\
\;\;\;\;z \cdot \left(\left(18 \cdot y\right) \cdot \left(x \cdot t\right)\right)\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{+119}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{+215}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -5.99999999999999997e166Initial program 57.4%
Taylor expanded in b around inf
lower-*.f6419.3
Applied rewrites19.3%
Taylor expanded in y around inf
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6458.1
Applied rewrites58.1%
Applied rewrites64.8%
if -5.99999999999999997e166 < x < -1.50000000000000001e119 or 2.1000000000000002e215 < x Initial program 80.1%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6474.6
Applied rewrites74.6%
if -1.50000000000000001e119 < x < 2.1000000000000002e215Initial program 90.3%
Taylor expanded in b around inf
lower-*.f6455.1
Applied rewrites55.1%
lift--.f64N/A
sub-negN/A
lift-*.f64N/A
distribute-lft-neg-outN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
Applied rewrites55.1%
Final simplification58.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* x i))))
(if (<= x -6e+166)
(* y (* (* x 18.0) (* z t)))
(if (<= x -1.5e+119)
t_1
(if (<= x 2.1e+215) (fma (* j -27.0) k (* b c)) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (x * i);
double tmp;
if (x <= -6e+166) {
tmp = y * ((x * 18.0) * (z * t));
} else if (x <= -1.5e+119) {
tmp = t_1;
} else if (x <= 2.1e+215) {
tmp = fma((j * -27.0), k, (b * c));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(x * i)) tmp = 0.0 if (x <= -6e+166) tmp = Float64(y * Float64(Float64(x * 18.0) * Float64(z * t))); elseif (x <= -1.5e+119) tmp = t_1; elseif (x <= 2.1e+215) tmp = fma(Float64(j * -27.0), k, Float64(b * c)); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6e+166], N[(y * N[(N[(x * 18.0), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.5e+119], t$95$1, If[LessEqual[x, 2.1e+215], N[(N[(j * -27.0), $MachinePrecision] * k + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;x \leq -6 \cdot 10^{+166}:\\
\;\;\;\;y \cdot \left(\left(x \cdot 18\right) \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{+119}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{+215}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -5.99999999999999997e166Initial program 57.4%
Taylor expanded in b around inf
lower-*.f6419.3
Applied rewrites19.3%
Taylor expanded in y around inf
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6458.1
Applied rewrites58.1%
Applied rewrites61.4%
if -5.99999999999999997e166 < x < -1.50000000000000001e119 or 2.1000000000000002e215 < x Initial program 80.1%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6474.6
Applied rewrites74.6%
if -1.50000000000000001e119 < x < 2.1000000000000002e215Initial program 90.3%
Taylor expanded in b around inf
lower-*.f6455.1
Applied rewrites55.1%
lift--.f64N/A
sub-negN/A
lift-*.f64N/A
distribute-lft-neg-outN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
Applied rewrites55.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* x i))))
(if (<= x -3.55e+171)
(* t (* y (* 18.0 (* x z))))
(if (<= x -1.5e+119)
t_1
(if (<= x 2.1e+215) (fma (* j -27.0) k (* b c)) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (x * i);
double tmp;
if (x <= -3.55e+171) {
tmp = t * (y * (18.0 * (x * z)));
} else if (x <= -1.5e+119) {
tmp = t_1;
} else if (x <= 2.1e+215) {
tmp = fma((j * -27.0), k, (b * c));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(x * i)) tmp = 0.0 if (x <= -3.55e+171) tmp = Float64(t * Float64(y * Float64(18.0 * Float64(x * z)))); elseif (x <= -1.5e+119) tmp = t_1; elseif (x <= 2.1e+215) tmp = fma(Float64(j * -27.0), k, Float64(b * c)); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.55e+171], N[(t * N[(y * N[(18.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.5e+119], t$95$1, If[LessEqual[x, 2.1e+215], N[(N[(j * -27.0), $MachinePrecision] * k + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;x \leq -3.55 \cdot 10^{+171}:\\
\;\;\;\;t \cdot \left(y \cdot \left(18 \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{+119}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{+215}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.54999999999999985e171Initial program 52.3%
Taylor expanded in j around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f641.4
Applied rewrites1.4%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6464.7
Applied rewrites64.7%
if -3.54999999999999985e171 < x < -1.50000000000000001e119 or 2.1000000000000002e215 < x Initial program 81.7%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6471.4
Applied rewrites71.4%
if -1.50000000000000001e119 < x < 2.1000000000000002e215Initial program 90.3%
Taylor expanded in b around inf
lower-*.f6455.1
Applied rewrites55.1%
lift--.f64N/A
sub-negN/A
lift-*.f64N/A
distribute-lft-neg-outN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
Applied rewrites55.1%
Final simplification58.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* x i))))
(if (<= x -6e+166)
(* 18.0 (* t (* z (* x y))))
(if (<= x -1.5e+119)
t_1
(if (<= x 2.1e+215) (fma (* j -27.0) k (* b c)) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (x * i);
double tmp;
if (x <= -6e+166) {
tmp = 18.0 * (t * (z * (x * y)));
} else if (x <= -1.5e+119) {
tmp = t_1;
} else if (x <= 2.1e+215) {
tmp = fma((j * -27.0), k, (b * c));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(x * i)) tmp = 0.0 if (x <= -6e+166) tmp = Float64(18.0 * Float64(t * Float64(z * Float64(x * y)))); elseif (x <= -1.5e+119) tmp = t_1; elseif (x <= 2.1e+215) tmp = fma(Float64(j * -27.0), k, Float64(b * c)); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6e+166], N[(18.0 * N[(t * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.5e+119], t$95$1, If[LessEqual[x, 2.1e+215], N[(N[(j * -27.0), $MachinePrecision] * k + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;x \leq -6 \cdot 10^{+166}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{+119}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{+215}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -5.99999999999999997e166Initial program 57.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6458.1
Applied rewrites58.1%
if -5.99999999999999997e166 < x < -1.50000000000000001e119 or 2.1000000000000002e215 < x Initial program 80.1%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6474.6
Applied rewrites74.6%
if -1.50000000000000001e119 < x < 2.1000000000000002e215Initial program 90.3%
Taylor expanded in b around inf
lower-*.f6455.1
Applied rewrites55.1%
lift--.f64N/A
sub-negN/A
lift-*.f64N/A
distribute-lft-neg-outN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
Applied rewrites55.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= (* b c) -1.85e+148) (* b c) (if (<= (* b c) 3.2e+28) (* -4.0 (* x i)) (* b c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1.85e+148) {
tmp = b * c;
} else if ((b * c) <= 3.2e+28) {
tmp = -4.0 * (x * i);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-1.85d+148)) then
tmp = b * c
else if ((b * c) <= 3.2d+28) then
tmp = (-4.0d0) * (x * i)
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1.85e+148) {
tmp = b * c;
} else if ((b * c) <= 3.2e+28) {
tmp = -4.0 * (x * i);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -1.85e+148: tmp = b * c elif (b * c) <= 3.2e+28: tmp = -4.0 * (x * i) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -1.85e+148) tmp = Float64(b * c); elseif (Float64(b * c) <= 3.2e+28) tmp = Float64(-4.0 * Float64(x * i)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -1.85e+148)
tmp = b * c;
elseif ((b * c) <= 3.2e+28)
tmp = -4.0 * (x * i);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -1.85e+148], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.2e+28], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.85 \cdot 10^{+148}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 3.2 \cdot 10^{+28}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.8500000000000001e148 or 3.2e28 < (*.f64 b c) Initial program 85.3%
Taylor expanded in b around inf
lower-*.f6460.8
Applied rewrites60.8%
if -1.8500000000000001e148 < (*.f64 b c) < 3.2e28Initial program 85.3%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6427.3
Applied rewrites27.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= (* b c) -1.5e+156) (* b c) (if (<= (* b c) 2.8e+28) (* -4.0 (* t a)) (* b c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1.5e+156) {
tmp = b * c;
} else if ((b * c) <= 2.8e+28) {
tmp = -4.0 * (t * a);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-1.5d+156)) then
tmp = b * c
else if ((b * c) <= 2.8d+28) then
tmp = (-4.0d0) * (t * a)
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1.5e+156) {
tmp = b * c;
} else if ((b * c) <= 2.8e+28) {
tmp = -4.0 * (t * a);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -1.5e+156: tmp = b * c elif (b * c) <= 2.8e+28: tmp = -4.0 * (t * a) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -1.5e+156) tmp = Float64(b * c); elseif (Float64(b * c) <= 2.8e+28) tmp = Float64(-4.0 * Float64(t * a)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -1.5e+156)
tmp = b * c;
elseif ((b * c) <= 2.8e+28)
tmp = -4.0 * (t * a);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -1.5e+156], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.8e+28], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.5 \cdot 10^{+156}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 2.8 \cdot 10^{+28}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.5e156 or 2.8000000000000001e28 < (*.f64 b c) Initial program 85.2%
Taylor expanded in b around inf
lower-*.f6461.4
Applied rewrites61.4%
if -1.5e156 < (*.f64 b c) < 2.8000000000000001e28Initial program 85.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6422.2
Applied rewrites22.2%
Final simplification35.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* x i))))
(if (<= x -1.5e+119)
t_1
(if (<= x 2.1e+215) (fma (* j -27.0) k (* b c)) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (x * i);
double tmp;
if (x <= -1.5e+119) {
tmp = t_1;
} else if (x <= 2.1e+215) {
tmp = fma((j * -27.0), k, (b * c));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(x * i)) tmp = 0.0 if (x <= -1.5e+119) tmp = t_1; elseif (x <= 2.1e+215) tmp = fma(Float64(j * -27.0), k, Float64(b * c)); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.5e+119], t$95$1, If[LessEqual[x, 2.1e+215], N[(N[(j * -27.0), $MachinePrecision] * k + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;x \leq -1.5 \cdot 10^{+119}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{+215}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.50000000000000001e119 or 2.1000000000000002e215 < x Initial program 70.0%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6457.5
Applied rewrites57.5%
if -1.50000000000000001e119 < x < 2.1000000000000002e215Initial program 90.3%
Taylor expanded in b around inf
lower-*.f6455.1
Applied rewrites55.1%
lift--.f64N/A
sub-negN/A
lift-*.f64N/A
distribute-lft-neg-outN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
Applied rewrites55.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 85.3%
Taylor expanded in b around inf
lower-*.f6424.8
Applied rewrites24.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 2024233
(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)))