
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= z 1e+162)
(fma
c
b
(fma
t
(fma x (* 18.0 (* z y)) (* a -4.0))
(- (fma x (* 4.0 i) (* j (* 27.0 k))))))
(-
(fma
(* t (* x (* 18.0 y)))
z
(fma t (* a -4.0) (fma b c (* x (* -4.0 i)))))
(* k (* j 27.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= 1e+162) {
tmp = fma(c, b, fma(t, fma(x, (18.0 * (z * y)), (a * -4.0)), -fma(x, (4.0 * i), (j * (27.0 * k)))));
} else {
tmp = fma((t * (x * (18.0 * y))), z, fma(t, (a * -4.0), fma(b, c, (x * (-4.0 * i))))) - (k * (j * 27.0));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (z <= 1e+162) tmp = fma(c, b, fma(t, fma(x, Float64(18.0 * Float64(z * y)), Float64(a * -4.0)), Float64(-fma(x, Float64(4.0 * i), Float64(j * Float64(27.0 * k)))))); else tmp = Float64(fma(Float64(t * Float64(x * Float64(18.0 * y))), z, fma(t, Float64(a * -4.0), fma(b, c, Float64(x * Float64(-4.0 * i))))) - Float64(k * Float64(j * 27.0))); 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[z, 1e+162], N[(c * b + N[(t * N[(x * N[(18.0 * N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + (-N[(x * N[(4.0 * i), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]), $MachinePrecision], 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[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 10^{+162}:\\
\;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), a \cdot -4\right), -\mathsf{fma}\left(x, 4 \cdot i, j \cdot \left(27 \cdot k\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\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(-4 \cdot i\right)\right)\right)\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if z < 9.9999999999999994e161Initial program 86.0%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
Applied rewrites91.5%
if 9.9999999999999994e161 < z Initial program 83.7%
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 rewrites91.7%
Final simplification91.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
(-
(+ (* c b) (- (* t (* z (* y (* x 18.0)))) (* t (* a 4.0))))
(* i (* x 4.0)))))
(if (<= t_1 -1e+249)
(fma -4.0 (* x i) (fma t (fma -4.0 a (* 18.0 (* z (* x y)))) (* c b)))
(if (<= t_1 1e+294)
(fma c b (fma t (* a -4.0) (- (fma x (* 4.0 i) (* j (* 27.0 k))))))
(fma c b (* x (fma (* y (* t 18.0)) z (* -4.0 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 t_1 = ((c * b) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0));
double tmp;
if (t_1 <= -1e+249) {
tmp = fma(-4.0, (x * i), fma(t, fma(-4.0, a, (18.0 * (z * (x * y)))), (c * b)));
} else if (t_1 <= 1e+294) {
tmp = fma(c, b, fma(t, (a * -4.0), -fma(x, (4.0 * i), (j * (27.0 * k)))));
} else {
tmp = fma(c, b, (x * fma((y * (t * 18.0)), z, (-4.0 * i))));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(c * b) + Float64(Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))) - Float64(t * Float64(a * 4.0)))) - Float64(i * Float64(x * 4.0))) tmp = 0.0 if (t_1 <= -1e+249) tmp = fma(-4.0, Float64(x * i), fma(t, fma(-4.0, a, Float64(18.0 * Float64(z * Float64(x * y)))), Float64(c * b))); elseif (t_1 <= 1e+294) tmp = fma(c, b, fma(t, Float64(a * -4.0), Float64(-fma(x, Float64(4.0 * i), Float64(j * Float64(27.0 * k)))))); else tmp = fma(c, b, Float64(x * fma(Float64(y * Float64(t * 18.0)), z, Float64(-4.0 * 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_] := Block[{t$95$1 = N[(N[(N[(c * b), $MachinePrecision] + N[(N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+249], N[(-4.0 * N[(x * i), $MachinePrecision] + N[(t * N[(-4.0 * a + N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+294], N[(c * b + N[(t * N[(a * -4.0), $MachinePrecision] + (-N[(x * N[(4.0 * i), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[(c * b + N[(x * N[(N[(y * N[(t * 18.0), $MachinePrecision]), $MachinePrecision] * z + N[(-4.0 * i), $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(c \cdot b + \left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right)\right) - i \cdot \left(x \cdot 4\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+249}:\\
\;\;\;\;\mathsf{fma}\left(-4, x \cdot i, \mathsf{fma}\left(t, \mathsf{fma}\left(-4, a, 18 \cdot \left(z \cdot \left(x \cdot y\right)\right)\right), c \cdot b\right)\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+294}:\\
\;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(t, a \cdot -4, -\mathsf{fma}\left(x, 4 \cdot i, j \cdot \left(27 \cdot k\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(c, b, x \cdot \mathsf{fma}\left(y \cdot \left(t \cdot 18\right), z, -4 \cdot i\right)\right)\\
\end{array}
\end{array}
if (-.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)) < -9.9999999999999992e248Initial program 88.4%
Taylor expanded in j around 0
associate--r+N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
Applied rewrites84.3%
if -9.9999999999999992e248 < (-.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)) < 1.00000000000000007e294Initial program 98.9%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
Applied rewrites94.9%
Taylor expanded in x around 0
lower-*.f6488.1
Applied rewrites88.1%
if 1.00000000000000007e294 < (-.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)) Initial program 61.7%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
Applied rewrites81.0%
Taylor expanded in x around inf
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6483.5
Applied rewrites83.5%
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 (<=
(-
(+ (* c b) (- (* t (* z (* y (* x 18.0)))) (* t (* a 4.0))))
(* i (* x 4.0)))
5e+293)
(fma
(* k -27.0)
j
(fma x (* -4.0 i) (fma t (fma (* x (* 18.0 y)) z (* a -4.0)) (* c b))))
(fma c b (fma t (fma x (* 18.0 (* z y)) (* a -4.0)) (* x (* -4.0 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 ((((c * b) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) <= 5e+293) {
tmp = fma((k * -27.0), j, fma(x, (-4.0 * i), fma(t, fma((x * (18.0 * y)), z, (a * -4.0)), (c * b))));
} else {
tmp = fma(c, b, fma(t, fma(x, (18.0 * (z * y)), (a * -4.0)), (x * (-4.0 * i))));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(c * b) + Float64(Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))) - Float64(t * Float64(a * 4.0)))) - Float64(i * Float64(x * 4.0))) <= 5e+293) tmp = fma(Float64(k * -27.0), j, fma(x, Float64(-4.0 * i), fma(t, fma(Float64(x * Float64(18.0 * y)), z, Float64(a * -4.0)), Float64(c * b)))); else tmp = fma(c, b, fma(t, fma(x, Float64(18.0 * Float64(z * y)), Float64(a * -4.0)), Float64(x * Float64(-4.0 * 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[N[(N[(N[(c * b), $MachinePrecision] + N[(N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e+293], N[(N[(k * -27.0), $MachinePrecision] * j + N[(x * N[(-4.0 * i), $MachinePrecision] + N[(t * N[(N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] * z + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * b + N[(t * N[(x * N[(18.0 * N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(x * N[(-4.0 * i), $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(c \cdot b + \left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right)\right) - i \cdot \left(x \cdot 4\right) \leq 5 \cdot 10^{+293}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(x, -4 \cdot i, \mathsf{fma}\left(t, \mathsf{fma}\left(x \cdot \left(18 \cdot y\right), z, a \cdot -4\right), c \cdot b\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), a \cdot -4\right), x \cdot \left(-4 \cdot i\right)\right)\right)\\
\end{array}
\end{array}
if (-.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)) < 5.00000000000000033e293Initial program 95.1%
Applied rewrites93.0%
lift-fma.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6495.1
Applied rewrites95.1%
if 5.00000000000000033e293 < (-.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)) Initial program 62.2%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
Applied rewrites81.2%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6484.0
Applied rewrites84.0%
Final simplification91.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* z y)))
(t_2 (fma x (fma -4.0 i (* t t_1)) (fma b c (* j (* k -27.0)))))
(t_3 (* k (* j 27.0))))
(if (<= t_3 -5e+55)
t_2
(if (<= t_3 5e+22)
(fma c b (fma t (fma x t_1 (* a -4.0)) (* x (* -4.0 i))))
(if (<= t_3 4e+224)
t_2
(fma (* k -27.0) j (fma x (* -4.0 i) (* t (* a -4.0)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (z * y);
double t_2 = fma(x, fma(-4.0, i, (t * t_1)), fma(b, c, (j * (k * -27.0))));
double t_3 = k * (j * 27.0);
double tmp;
if (t_3 <= -5e+55) {
tmp = t_2;
} else if (t_3 <= 5e+22) {
tmp = fma(c, b, fma(t, fma(x, t_1, (a * -4.0)), (x * (-4.0 * i))));
} else if (t_3 <= 4e+224) {
tmp = t_2;
} else {
tmp = fma((k * -27.0), j, fma(x, (-4.0 * i), (t * (a * -4.0))));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(z * y)) t_2 = fma(x, fma(-4.0, i, Float64(t * t_1)), fma(b, c, Float64(j * Float64(k * -27.0)))) t_3 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_3 <= -5e+55) tmp = t_2; elseif (t_3 <= 5e+22) tmp = fma(c, b, fma(t, fma(x, t_1, Float64(a * -4.0)), Float64(x * Float64(-4.0 * i)))); elseif (t_3 <= 4e+224) tmp = t_2; else tmp = fma(Float64(k * -27.0), j, fma(x, Float64(-4.0 * i), Float64(t * Float64(a * -4.0)))); 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[(18.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(-4.0 * i + N[(t * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -5e+55], t$95$2, If[LessEqual[t$95$3, 5e+22], N[(c * b + N[(t * N[(x * t$95$1 + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 4e+224], t$95$2, N[(N[(k * -27.0), $MachinePrecision] * j + N[(x * N[(-4.0 * i), $MachinePrecision] + N[(t * N[(a * -4.0), $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 := 18 \cdot \left(z \cdot y\right)\\
t_2 := \mathsf{fma}\left(x, \mathsf{fma}\left(-4, i, t \cdot t\_1\right), \mathsf{fma}\left(b, c, j \cdot \left(k \cdot -27\right)\right)\right)\\
t_3 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_3 \leq -5 \cdot 10^{+55}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+22}:\\
\;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(t, \mathsf{fma}\left(x, t\_1, a \cdot -4\right), x \cdot \left(-4 \cdot i\right)\right)\right)\\
\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+224}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(x, -4 \cdot i, t \cdot \left(a \cdot -4\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.00000000000000046e55 or 4.9999999999999996e22 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 3.99999999999999988e224Initial program 90.2%
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 rewrites90.3%
if -5.00000000000000046e55 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.9999999999999996e22Initial program 84.7%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
Applied rewrites89.7%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6488.4
Applied rewrites88.4%
if 3.99999999999999988e224 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 75.0%
Applied rewrites91.7%
Taylor expanded in a around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6495.8
Applied rewrites95.8%
Final simplification89.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (fma -27.0 (* j k) (* c b))) (t_2 (* k (* j 27.0))))
(if (<= t_2 -5e+149)
t_1
(if (<= t_2 -1e-55)
(* (* x 18.0) (* t (* z y)))
(if (<= t_2 -5e-211)
(fma c b (* x (* -4.0 i)))
(if (<= t_2 5e+22) (fma c b (* t (* a -4.0))) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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(-27.0, (j * k), (c * b));
double t_2 = k * (j * 27.0);
double tmp;
if (t_2 <= -5e+149) {
tmp = t_1;
} else if (t_2 <= -1e-55) {
tmp = (x * 18.0) * (t * (z * y));
} else if (t_2 <= -5e-211) {
tmp = fma(c, b, (x * (-4.0 * i)));
} else if (t_2 <= 5e+22) {
tmp = fma(c, b, (t * (a * -4.0)));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(-27.0, Float64(j * k), Float64(c * b)) t_2 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_2 <= -5e+149) tmp = t_1; elseif (t_2 <= -1e-55) tmp = Float64(Float64(x * 18.0) * Float64(t * Float64(z * y))); elseif (t_2 <= -5e-211) tmp = fma(c, b, Float64(x * Float64(-4.0 * i))); elseif (t_2 <= 5e+22) tmp = fma(c, b, Float64(t * Float64(a * -4.0))); 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[(-27.0 * N[(j * k), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+149], t$95$1, If[LessEqual[t$95$2, -1e-55], N[(N[(x * 18.0), $MachinePrecision] * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -5e-211], N[(c * b + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+22], N[(c * b + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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(-27, j \cdot k, c \cdot b\right)\\
t_2 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-55}:\\
\;\;\;\;\left(x \cdot 18\right) \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-211}:\\
\;\;\;\;\mathsf{fma}\left(c, b, x \cdot \left(-4 \cdot i\right)\right)\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+22}:\\
\;\;\;\;\mathsf{fma}\left(c, b, t \cdot \left(a \cdot -4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.9999999999999999e149 or 4.9999999999999996e22 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 86.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-*.f6476.2
Applied rewrites76.2%
Taylor expanded in a around 0
Applied rewrites66.2%
if -4.9999999999999999e149 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.99999999999999995e-56Initial program 86.6%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6446.2
Applied rewrites46.2%
Applied rewrites53.9%
if -9.99999999999999995e-56 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.0000000000000002e-211Initial program 88.0%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
Applied rewrites91.9%
Taylor expanded in i around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6459.9
Applied rewrites59.9%
if -5.0000000000000002e-211 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.9999999999999996e22Initial program 83.8%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
Applied rewrites91.1%
Taylor expanded in a around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6458.0
Applied rewrites58.0%
Final simplification60.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (fma -27.0 (* j k) (* c b))) (t_2 (* k (* j 27.0))))
(if (<= t_2 -5e+149)
t_1
(if (<= t_2 -1e-55)
(* x (* t (* 18.0 (* z y))))
(if (<= t_2 -5e-211)
(fma c b (* x (* -4.0 i)))
(if (<= t_2 5e+22) (fma c b (* t (* a -4.0))) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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(-27.0, (j * k), (c * b));
double t_2 = k * (j * 27.0);
double tmp;
if (t_2 <= -5e+149) {
tmp = t_1;
} else if (t_2 <= -1e-55) {
tmp = x * (t * (18.0 * (z * y)));
} else if (t_2 <= -5e-211) {
tmp = fma(c, b, (x * (-4.0 * i)));
} else if (t_2 <= 5e+22) {
tmp = fma(c, b, (t * (a * -4.0)));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(-27.0, Float64(j * k), Float64(c * b)) t_2 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_2 <= -5e+149) tmp = t_1; elseif (t_2 <= -1e-55) tmp = Float64(x * Float64(t * Float64(18.0 * Float64(z * y)))); elseif (t_2 <= -5e-211) tmp = fma(c, b, Float64(x * Float64(-4.0 * i))); elseif (t_2 <= 5e+22) tmp = fma(c, b, Float64(t * Float64(a * -4.0))); 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[(-27.0 * N[(j * k), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+149], t$95$1, If[LessEqual[t$95$2, -1e-55], N[(x * N[(t * N[(18.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -5e-211], N[(c * b + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+22], N[(c * b + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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(-27, j \cdot k, c \cdot b\right)\\
t_2 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-55}:\\
\;\;\;\;x \cdot \left(t \cdot \left(18 \cdot \left(z \cdot y\right)\right)\right)\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-211}:\\
\;\;\;\;\mathsf{fma}\left(c, b, x \cdot \left(-4 \cdot i\right)\right)\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+22}:\\
\;\;\;\;\mathsf{fma}\left(c, b, t \cdot \left(a \cdot -4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.9999999999999999e149 or 4.9999999999999996e22 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 86.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-*.f6476.2
Applied rewrites76.2%
Taylor expanded in a around 0
Applied rewrites66.2%
if -4.9999999999999999e149 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.99999999999999995e-56Initial program 86.6%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6446.2
Applied rewrites46.2%
Applied rewrites53.9%
if -9.99999999999999995e-56 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.0000000000000002e-211Initial program 88.0%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
Applied rewrites91.9%
Taylor expanded in i around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6459.9
Applied rewrites59.9%
if -5.0000000000000002e-211 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.9999999999999996e22Initial program 83.8%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
Applied rewrites91.1%
Taylor expanded in a around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6458.0
Applied rewrites58.0%
Final simplification60.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (* -4.0 i)))
(t_2 (fma c b t_1))
(t_3 (* t (fma x (* 18.0 (* z y)) (* a -4.0)))))
(if (<= (* c b) -2e+108)
t_2
(if (<= (* c b) -5e-320)
t_3
(if (<= (* c b) 1e-250)
(fma (* k -27.0) j t_1)
(if (<= (* c b) 2e+99) t_3 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 = x * (-4.0 * i);
double t_2 = fma(c, b, t_1);
double t_3 = t * fma(x, (18.0 * (z * y)), (a * -4.0));
double tmp;
if ((c * b) <= -2e+108) {
tmp = t_2;
} else if ((c * b) <= -5e-320) {
tmp = t_3;
} else if ((c * b) <= 1e-250) {
tmp = fma((k * -27.0), j, t_1);
} else if ((c * b) <= 2e+99) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(-4.0 * i)) t_2 = fma(c, b, t_1) t_3 = Float64(t * fma(x, Float64(18.0 * Float64(z * y)), Float64(a * -4.0))) tmp = 0.0 if (Float64(c * b) <= -2e+108) tmp = t_2; elseif (Float64(c * b) <= -5e-320) tmp = t_3; elseif (Float64(c * b) <= 1e-250) tmp = fma(Float64(k * -27.0), j, t_1); elseif (Float64(c * b) <= 2e+99) tmp = t_3; 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[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c * b + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(x * N[(18.0 * N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * b), $MachinePrecision], -2e+108], t$95$2, If[LessEqual[N[(c * b), $MachinePrecision], -5e-320], t$95$3, If[LessEqual[N[(c * b), $MachinePrecision], 1e-250], N[(N[(k * -27.0), $MachinePrecision] * j + t$95$1), $MachinePrecision], If[LessEqual[N[(c * b), $MachinePrecision], 2e+99], t$95$3, 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 := x \cdot \left(-4 \cdot i\right)\\
t_2 := \mathsf{fma}\left(c, b, t\_1\right)\\
t_3 := t \cdot \mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), a \cdot -4\right)\\
\mathbf{if}\;c \cdot b \leq -2 \cdot 10^{+108}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \cdot b \leq -5 \cdot 10^{-320}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;c \cdot b \leq 10^{-250}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, t\_1\right)\\
\mathbf{elif}\;c \cdot b \leq 2 \cdot 10^{+99}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 b c) < -2.0000000000000001e108 or 1.9999999999999999e99 < (*.f64 b c) Initial program 78.4%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
Applied rewrites87.7%
Taylor expanded in i around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6475.4
Applied rewrites75.4%
if -2.0000000000000001e108 < (*.f64 b c) < -4.99994e-320 or 1.0000000000000001e-250 < (*.f64 b c) < 1.9999999999999999e99Initial program 88.4%
Taylor expanded in b around inf
lower-*.f644.5
Applied rewrites4.5%
Taylor expanded in t around inf
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
if -4.99994e-320 < (*.f64 b c) < 1.0000000000000001e-250Initial program 92.6%
Applied rewrites88.0%
Taylor expanded in i around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6467.3
Applied rewrites67.3%
Final simplification66.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (* -4.0 i)))
(t_2 (fma c b t_1))
(t_3 (* t (fma -4.0 a (* 18.0 (* z (* x y)))))))
(if (<= (* c b) -2e+108)
t_2
(if (<= (* c b) -5e-320)
t_3
(if (<= (* c b) 5e-192)
(fma (* k -27.0) j t_1)
(if (<= (* c b) 2e+99) t_3 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 = x * (-4.0 * i);
double t_2 = fma(c, b, t_1);
double t_3 = t * fma(-4.0, a, (18.0 * (z * (x * y))));
double tmp;
if ((c * b) <= -2e+108) {
tmp = t_2;
} else if ((c * b) <= -5e-320) {
tmp = t_3;
} else if ((c * b) <= 5e-192) {
tmp = fma((k * -27.0), j, t_1);
} else if ((c * b) <= 2e+99) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(-4.0 * i)) t_2 = fma(c, b, t_1) t_3 = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(z * Float64(x * y))))) tmp = 0.0 if (Float64(c * b) <= -2e+108) tmp = t_2; elseif (Float64(c * b) <= -5e-320) tmp = t_3; elseif (Float64(c * b) <= 5e-192) tmp = fma(Float64(k * -27.0), j, t_1); elseif (Float64(c * b) <= 2e+99) tmp = t_3; 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[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c * b + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(-4.0 * a + N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * b), $MachinePrecision], -2e+108], t$95$2, If[LessEqual[N[(c * b), $MachinePrecision], -5e-320], t$95$3, If[LessEqual[N[(c * b), $MachinePrecision], 5e-192], N[(N[(k * -27.0), $MachinePrecision] * j + t$95$1), $MachinePrecision], If[LessEqual[N[(c * b), $MachinePrecision], 2e+99], t$95$3, 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 := x \cdot \left(-4 \cdot i\right)\\
t_2 := \mathsf{fma}\left(c, b, t\_1\right)\\
t_3 := t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{if}\;c \cdot b \leq -2 \cdot 10^{+108}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \cdot b \leq -5 \cdot 10^{-320}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;c \cdot b \leq 5 \cdot 10^{-192}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, t\_1\right)\\
\mathbf{elif}\;c \cdot b \leq 2 \cdot 10^{+99}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 b c) < -2.0000000000000001e108 or 1.9999999999999999e99 < (*.f64 b c) Initial program 78.4%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
Applied rewrites87.7%
Taylor expanded in i around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6475.4
Applied rewrites75.4%
if -2.0000000000000001e108 < (*.f64 b c) < -4.99994e-320 or 5.0000000000000001e-192 < (*.f64 b c) < 1.9999999999999999e99Initial program 89.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-*.f6460.0
Applied rewrites60.0%
if -4.99994e-320 < (*.f64 b c) < 5.0000000000000001e-192Initial program 89.1%
Applied rewrites89.2%
Taylor expanded in i around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6463.1
Applied rewrites63.1%
Final simplification65.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
(fma c b (fma t (* a -4.0) (- (fma x (* 4.0 i) (* j (* 27.0 k))))))))
(if (<= (* c b) -1e+121)
t_1
(if (<= (* c b) 2e+99)
(fma
x
(fma -4.0 i (* t (* 18.0 (* z y))))
(fma -4.0 (* t a) (* j (* k -27.0))))
t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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(c, b, fma(t, (a * -4.0), -fma(x, (4.0 * i), (j * (27.0 * k)))));
double tmp;
if ((c * b) <= -1e+121) {
tmp = t_1;
} else if ((c * b) <= 2e+99) {
tmp = fma(x, fma(-4.0, i, (t * (18.0 * (z * y)))), fma(-4.0, (t * a), (j * (k * -27.0))));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(c, b, fma(t, Float64(a * -4.0), Float64(-fma(x, Float64(4.0 * i), Float64(j * Float64(27.0 * k)))))) tmp = 0.0 if (Float64(c * b) <= -1e+121) tmp = t_1; elseif (Float64(c * b) <= 2e+99) tmp = fma(x, fma(-4.0, i, Float64(t * Float64(18.0 * Float64(z * y)))), fma(-4.0, Float64(t * a), Float64(j * Float64(k * -27.0)))); 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[(c * b + N[(t * N[(a * -4.0), $MachinePrecision] + (-N[(x * N[(4.0 * i), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * b), $MachinePrecision], -1e+121], t$95$1, If[LessEqual[N[(c * b), $MachinePrecision], 2e+99], N[(x * N[(-4.0 * i + N[(t * N[(18.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision] + N[(j * N[(k * -27.0), $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(c, b, \mathsf{fma}\left(t, a \cdot -4, -\mathsf{fma}\left(x, 4 \cdot i, j \cdot \left(27 \cdot k\right)\right)\right)\right)\\
\mathbf{if}\;c \cdot b \leq -1 \cdot 10^{+121}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \cdot b \leq 2 \cdot 10^{+99}:\\
\;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(z \cdot y\right)\right)\right), \mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 b c) < -1.00000000000000004e121 or 1.9999999999999999e99 < (*.f64 b c) Initial program 77.9%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
Applied rewrites87.4%
Taylor expanded in x around 0
lower-*.f6487.4
Applied rewrites87.4%
if -1.00000000000000004e121 < (*.f64 b c) < 1.9999999999999999e99Initial program 89.6%
Taylor expanded in b around 0
associate-+r+N/A
associate--r+N/A
+-commutativeN/A
associate--r+N/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
associate-*r*N/A
distribute-rgt-out--N/A
associate--r+N/A
sub-negN/A
Applied rewrites89.0%
Final simplification88.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 b) -1e+304)
(fma b c (fma -4.0 (* t a) (* j (* k -27.0))))
(fma
(* k -27.0)
j
(fma x (* -4.0 i) (fma t (fma x (* 18.0 (* z y)) (* a -4.0)) (* c b))))))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 * b) <= -1e+304) {
tmp = fma(b, c, fma(-4.0, (t * a), (j * (k * -27.0))));
} else {
tmp = fma((k * -27.0), j, fma(x, (-4.0 * i), fma(t, fma(x, (18.0 * (z * y)), (a * -4.0)), (c * b))));
}
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(c * b) <= -1e+304) tmp = fma(b, c, fma(-4.0, Float64(t * a), Float64(j * Float64(k * -27.0)))); else tmp = fma(Float64(k * -27.0), j, fma(x, Float64(-4.0 * i), fma(t, fma(x, Float64(18.0 * Float64(z * y)), Float64(a * -4.0)), Float64(c * b)))); 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[(c * b), $MachinePrecision], -1e+304], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(k * -27.0), $MachinePrecision] * j + N[(x * N[(-4.0 * i), $MachinePrecision] + N[(t * N[(x * N[(18.0 * N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(c * b), $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}\;c \cdot b \leq -1 \cdot 10^{+304}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(x, -4 \cdot i, \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), a \cdot -4\right), c \cdot b\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -9.9999999999999994e303Initial program 58.8%
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-*.f6494.1
Applied rewrites94.1%
if -9.9999999999999994e303 < (*.f64 b c) Initial program 87.6%
Applied rewrites91.0%
Final simplification91.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 (* k (* j 27.0))))
(if (<= t_1 -1e+233)
(* j (* k -27.0))
(if (<= t_1 -5e-211)
(fma c b (* x (* -4.0 i)))
(if (<= t_1 5e+22)
(fma c b (* t (* a -4.0)))
(fma -27.0 (* j k) (* c b)))))))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 = k * (j * 27.0);
double tmp;
if (t_1 <= -1e+233) {
tmp = j * (k * -27.0);
} else if (t_1 <= -5e-211) {
tmp = fma(c, b, (x * (-4.0 * i)));
} else if (t_1 <= 5e+22) {
tmp = fma(c, b, (t * (a * -4.0)));
} else {
tmp = fma(-27.0, (j * k), (c * b));
}
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(k * Float64(j * 27.0)) tmp = 0.0 if (t_1 <= -1e+233) tmp = Float64(j * Float64(k * -27.0)); elseif (t_1 <= -5e-211) tmp = fma(c, b, Float64(x * Float64(-4.0 * i))); elseif (t_1 <= 5e+22) tmp = fma(c, b, Float64(t * Float64(a * -4.0))); else tmp = fma(-27.0, Float64(j * k), Float64(c * b)); 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[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+233], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-211], N[(c * b + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+22], N[(c * b + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision] + N[(c * b), $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 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+233}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-211}:\\
\;\;\;\;\mathsf{fma}\left(c, b, x \cdot \left(-4 \cdot i\right)\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+22}:\\
\;\;\;\;\mathsf{fma}\left(c, b, t \cdot \left(a \cdot -4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-27, j \cdot k, c \cdot b\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.99999999999999974e232Initial program 85.8%
Taylor expanded in j around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6486.5
Applied rewrites86.5%
if -9.99999999999999974e232 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.0000000000000002e-211Initial program 89.2%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
Applied rewrites87.9%
Taylor expanded in i around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6447.5
Applied rewrites47.5%
if -5.0000000000000002e-211 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.9999999999999996e22Initial program 83.8%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
Applied rewrites91.1%
Taylor expanded in a around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6458.0
Applied rewrites58.0%
if 4.9999999999999996e22 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.6%
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-*.f6475.9
Applied rewrites75.9%
Taylor expanded in a around 0
Applied rewrites63.6%
Final simplification58.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= z 6.2e+172)
(fma
c
b
(fma
t
(fma x (* 18.0 (* z y)) (* a -4.0))
(- (fma x (* 4.0 i) (* j (* 27.0 k))))))
(fma
(* k -27.0)
j
(fma x (* -4.0 i) (fma t (fma (* x (* 18.0 y)) z (* a -4.0)) (* c b))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= 6.2e+172) {
tmp = fma(c, b, fma(t, fma(x, (18.0 * (z * y)), (a * -4.0)), -fma(x, (4.0 * i), (j * (27.0 * k)))));
} else {
tmp = fma((k * -27.0), j, fma(x, (-4.0 * i), fma(t, fma((x * (18.0 * y)), z, (a * -4.0)), (c * b))));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (z <= 6.2e+172) tmp = fma(c, b, fma(t, fma(x, Float64(18.0 * Float64(z * y)), Float64(a * -4.0)), Float64(-fma(x, Float64(4.0 * i), Float64(j * Float64(27.0 * k)))))); else tmp = fma(Float64(k * -27.0), j, fma(x, Float64(-4.0 * i), fma(t, fma(Float64(x * Float64(18.0 * y)), z, Float64(a * -4.0)), Float64(c * b)))); 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[z, 6.2e+172], N[(c * b + N[(t * N[(x * N[(18.0 * N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + (-N[(x * N[(4.0 * i), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[(N[(k * -27.0), $MachinePrecision] * j + N[(x * N[(-4.0 * i), $MachinePrecision] + N[(t * N[(N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] * z + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 6.2 \cdot 10^{+172}:\\
\;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), a \cdot -4\right), -\mathsf{fma}\left(x, 4 \cdot i, j \cdot \left(27 \cdot k\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(x, -4 \cdot i, \mathsf{fma}\left(t, \mathsf{fma}\left(x \cdot \left(18 \cdot y\right), z, a \cdot -4\right), c \cdot b\right)\right)\right)\\
\end{array}
\end{array}
if z < 6.19999999999999976e172Initial program 85.9%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
Applied rewrites91.7%
if 6.19999999999999976e172 < z Initial program 84.3%
Applied rewrites84.9%
lift-fma.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6493.8
Applied rewrites93.8%
Final simplification91.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 -1350000000000.0)
(fma x (fma -4.0 i (* t (* 18.0 (* z y)))) (fma b c (* j (* k -27.0))))
(if (<= x 1.5e-34)
(fma c b (fma t (* a -4.0) (- (fma x (* 4.0 i) (* j (* 27.0 k))))))
(fma c b (* x (fma (* y (* t 18.0)) z (* -4.0 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 <= -1350000000000.0) {
tmp = fma(x, fma(-4.0, i, (t * (18.0 * (z * y)))), fma(b, c, (j * (k * -27.0))));
} else if (x <= 1.5e-34) {
tmp = fma(c, b, fma(t, (a * -4.0), -fma(x, (4.0 * i), (j * (27.0 * k)))));
} else {
tmp = fma(c, b, (x * fma((y * (t * 18.0)), z, (-4.0 * i))));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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 <= -1350000000000.0) tmp = fma(x, fma(-4.0, i, Float64(t * Float64(18.0 * Float64(z * y)))), fma(b, c, Float64(j * Float64(k * -27.0)))); elseif (x <= 1.5e-34) tmp = fma(c, b, fma(t, Float64(a * -4.0), Float64(-fma(x, Float64(4.0 * i), Float64(j * Float64(27.0 * k)))))); else tmp = fma(c, b, Float64(x * fma(Float64(y * Float64(t * 18.0)), z, Float64(-4.0 * 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, -1350000000000.0], N[(x * N[(-4.0 * i + N[(t * N[(18.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.5e-34], N[(c * b + N[(t * N[(a * -4.0), $MachinePrecision] + (-N[(x * N[(4.0 * i), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[(c * b + N[(x * N[(N[(y * N[(t * 18.0), $MachinePrecision]), $MachinePrecision] * z + N[(-4.0 * i), $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 -1350000000000:\\
\;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(z \cdot y\right)\right)\right), \mathsf{fma}\left(b, c, j \cdot \left(k \cdot -27\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{-34}:\\
\;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(t, a \cdot -4, -\mathsf{fma}\left(x, 4 \cdot i, j \cdot \left(27 \cdot k\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(c, b, x \cdot \mathsf{fma}\left(y \cdot \left(t \cdot 18\right), z, -4 \cdot i\right)\right)\\
\end{array}
\end{array}
if x < -1.35e12Initial program 75.8%
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 rewrites87.6%
if -1.35e12 < x < 1.5e-34Initial program 95.3%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
Applied rewrites94.0%
Taylor expanded in x around 0
lower-*.f6487.6
Applied rewrites87.6%
if 1.5e-34 < x Initial program 75.8%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
Applied rewrites90.6%
Taylor expanded in x around inf
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6488.9
Applied rewrites88.9%
Final simplification87.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 (fma c b (* x (fma (* y (* t 18.0)) z (* -4.0 i))))))
(if (<= x -1.35e+181)
t_1
(if (<= x 1.5e-34)
(fma c b (fma t (* a -4.0) (- (fma x (* 4.0 i) (* j (* 27.0 k))))))
t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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(c, b, (x * fma((y * (t * 18.0)), z, (-4.0 * i))));
double tmp;
if (x <= -1.35e+181) {
tmp = t_1;
} else if (x <= 1.5e-34) {
tmp = fma(c, b, fma(t, (a * -4.0), -fma(x, (4.0 * i), (j * (27.0 * k)))));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(c, b, Float64(x * fma(Float64(y * Float64(t * 18.0)), z, Float64(-4.0 * i)))) tmp = 0.0 if (x <= -1.35e+181) tmp = t_1; elseif (x <= 1.5e-34) tmp = fma(c, b, fma(t, Float64(a * -4.0), Float64(-fma(x, Float64(4.0 * i), Float64(j * Float64(27.0 * k)))))); 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[(c * b + N[(x * N[(N[(y * N[(t * 18.0), $MachinePrecision]), $MachinePrecision] * z + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.35e+181], t$95$1, If[LessEqual[x, 1.5e-34], N[(c * b + N[(t * N[(a * -4.0), $MachinePrecision] + (-N[(x * N[(4.0 * i), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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(c, b, x \cdot \mathsf{fma}\left(y \cdot \left(t \cdot 18\right), z, -4 \cdot i\right)\right)\\
\mathbf{if}\;x \leq -1.35 \cdot 10^{+181}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{-34}:\\
\;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(t, a \cdot -4, -\mathsf{fma}\left(x, 4 \cdot i, j \cdot \left(27 \cdot k\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.35000000000000004e181 or 1.5e-34 < x Initial program 74.8%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
Applied rewrites86.9%
Taylor expanded in x around inf
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6491.1
Applied rewrites91.1%
if -1.35000000000000004e181 < x < 1.5e-34Initial program 90.8%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
Applied rewrites91.5%
Taylor expanded in x around 0
lower-*.f6482.2
Applied rewrites82.2%
Final simplification85.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (fma -27.0 (* j k) (* c b)))
(t_2 (* x (fma -4.0 i (* t (* 18.0 (* z y)))))))
(if (<= x -5.6e+22)
t_2
(if (<= x -5e-106)
t_1
(if (<= x 8.2e-182)
(fma (* k -27.0) j (* t (* a -4.0)))
(if (<= x 4.4e-29) 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(-27.0, (j * k), (c * b));
double t_2 = x * fma(-4.0, i, (t * (18.0 * (z * y))));
double tmp;
if (x <= -5.6e+22) {
tmp = t_2;
} else if (x <= -5e-106) {
tmp = t_1;
} else if (x <= 8.2e-182) {
tmp = fma((k * -27.0), j, (t * (a * -4.0)));
} else if (x <= 4.4e-29) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(-27.0, Float64(j * k), Float64(c * b)) t_2 = Float64(x * fma(-4.0, i, Float64(t * Float64(18.0 * Float64(z * y))))) tmp = 0.0 if (x <= -5.6e+22) tmp = t_2; elseif (x <= -5e-106) tmp = t_1; elseif (x <= 8.2e-182) tmp = fma(Float64(k * -27.0), j, Float64(t * Float64(a * -4.0))); elseif (x <= 4.4e-29) tmp = 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[(-27.0 * N[(j * k), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(-4.0 * i + N[(t * N[(18.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.6e+22], t$95$2, If[LessEqual[x, -5e-106], t$95$1, If[LessEqual[x, 8.2e-182], N[(N[(k * -27.0), $MachinePrecision] * j + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.4e-29], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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(-27, j \cdot k, c \cdot b\right)\\
t_2 := x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(z \cdot y\right)\right)\right)\\
\mathbf{if}\;x \leq -5.6 \cdot 10^{+22}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -5 \cdot 10^{-106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{-182}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, t \cdot \left(a \cdot -4\right)\right)\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -5.6e22 or 4.39999999999999981e-29 < x Initial program 76.6%
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-*.f6470.9
Applied rewrites70.9%
if -5.6e22 < x < -4.99999999999999983e-106 or 8.2000000000000003e-182 < x < 4.39999999999999981e-29Initial program 92.4%
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-*.f6483.7
Applied rewrites83.7%
Taylor expanded in a around 0
Applied rewrites64.8%
if -4.99999999999999983e-106 < x < 8.2000000000000003e-182Initial program 95.5%
Applied rewrites94.3%
Taylor expanded in a around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6466.5
Applied rewrites66.5%
Final simplification68.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 (fma -27.0 (* j k) (* c b))) (t_2 (* k (* j 27.0))))
(if (<= t_2 -1e+100)
t_1
(if (<= t_2 5e+22) (fma c b (* t (* a -4.0))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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(-27.0, (j * k), (c * b));
double t_2 = k * (j * 27.0);
double tmp;
if (t_2 <= -1e+100) {
tmp = t_1;
} else if (t_2 <= 5e+22) {
tmp = fma(c, b, (t * (a * -4.0)));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(-27.0, Float64(j * k), Float64(c * b)) t_2 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_2 <= -1e+100) tmp = t_1; elseif (t_2 <= 5e+22) tmp = fma(c, b, Float64(t * Float64(a * -4.0))); 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[(-27.0 * N[(j * k), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+100], t$95$1, If[LessEqual[t$95$2, 5e+22], N[(c * b + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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(-27, j \cdot k, c \cdot b\right)\\
t_2 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+22}:\\
\;\;\;\;\mathsf{fma}\left(c, b, t \cdot \left(a \cdot -4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.00000000000000002e100 or 4.9999999999999996e22 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 87.4%
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-*.f6472.8
Applied rewrites72.8%
Taylor expanded in a around 0
Applied rewrites63.0%
if -1.00000000000000002e100 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.9999999999999996e22Initial program 84.4%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
Applied rewrites88.6%
Taylor expanded in a around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6452.4
Applied rewrites52.4%
Final simplification56.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 c b (* x (fma (* y (* t 18.0)) z (* -4.0 i))))))
(if (<= x -2.8e+24)
t_1
(if (<= x 1.35e-34) (fma b c (fma -4.0 (* t a) (* j (* k -27.0)))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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(c, b, (x * fma((y * (t * 18.0)), z, (-4.0 * i))));
double tmp;
if (x <= -2.8e+24) {
tmp = t_1;
} else if (x <= 1.35e-34) {
tmp = fma(b, c, fma(-4.0, (t * a), (j * (k * -27.0))));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(c, b, Float64(x * fma(Float64(y * Float64(t * 18.0)), z, Float64(-4.0 * i)))) tmp = 0.0 if (x <= -2.8e+24) tmp = t_1; elseif (x <= 1.35e-34) tmp = fma(b, c, fma(-4.0, Float64(t * a), Float64(j * Float64(k * -27.0)))); 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[(c * b + N[(x * N[(N[(y * N[(t * 18.0), $MachinePrecision]), $MachinePrecision] * z + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.8e+24], t$95$1, If[LessEqual[x, 1.35e-34], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision] + N[(j * N[(k * -27.0), $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(c, b, x \cdot \mathsf{fma}\left(y \cdot \left(t \cdot 18\right), z, -4 \cdot i\right)\right)\\
\mathbf{if}\;x \leq -2.8 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{-34}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.8000000000000002e24 or 1.35000000000000008e-34 < x Initial program 76.0%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
Applied rewrites85.6%
Taylor expanded in x around inf
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6482.2
Applied rewrites82.2%
if -2.8000000000000002e24 < x < 1.35000000000000008e-34Initial program 94.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-*.f6484.9
Applied rewrites84.9%
Final simplification83.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 b) -2.7e+114)
(* c b)
(if (<= (* c b) 3.3e-255)
(* j (* k -27.0))
(if (<= (* c b) 1.3e+177) (* -4.0 (* x i)) (* c b)))))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 * b) <= -2.7e+114) {
tmp = c * b;
} else if ((c * b) <= 3.3e-255) {
tmp = j * (k * -27.0);
} else if ((c * b) <= 1.3e+177) {
tmp = -4.0 * (x * i);
} else {
tmp = c * b;
}
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 * b) <= (-2.7d+114)) then
tmp = c * b
else if ((c * b) <= 3.3d-255) then
tmp = j * (k * (-27.0d0))
else if ((c * b) <= 1.3d+177) then
tmp = (-4.0d0) * (x * i)
else
tmp = c * b
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 * b) <= -2.7e+114) {
tmp = c * b;
} else if ((c * b) <= 3.3e-255) {
tmp = j * (k * -27.0);
} else if ((c * b) <= 1.3e+177) {
tmp = -4.0 * (x * i);
} else {
tmp = c * b;
}
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 * b) <= -2.7e+114: tmp = c * b elif (c * b) <= 3.3e-255: tmp = j * (k * -27.0) elif (c * b) <= 1.3e+177: tmp = -4.0 * (x * i) else: tmp = c * b 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(c * b) <= -2.7e+114) tmp = Float64(c * b); elseif (Float64(c * b) <= 3.3e-255) tmp = Float64(j * Float64(k * -27.0)); elseif (Float64(c * b) <= 1.3e+177) tmp = Float64(-4.0 * Float64(x * i)); else tmp = Float64(c * b); 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 * b) <= -2.7e+114)
tmp = c * b;
elseif ((c * b) <= 3.3e-255)
tmp = j * (k * -27.0);
elseif ((c * b) <= 1.3e+177)
tmp = -4.0 * (x * i);
else
tmp = c * b;
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[(c * b), $MachinePrecision], -2.7e+114], N[(c * b), $MachinePrecision], If[LessEqual[N[(c * b), $MachinePrecision], 3.3e-255], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * b), $MachinePrecision], 1.3e+177], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], N[(c * b), $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 \cdot b \leq -2.7 \cdot 10^{+114}:\\
\;\;\;\;c \cdot b\\
\mathbf{elif}\;c \cdot b \leq 3.3 \cdot 10^{-255}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;c \cdot b \leq 1.3 \cdot 10^{+177}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot b\\
\end{array}
\end{array}
if (*.f64 b c) < -2.7e114 or 1.2999999999999999e177 < (*.f64 b c) Initial program 76.8%
Taylor expanded in b around inf
lower-*.f6466.4
Applied rewrites66.4%
if -2.7e114 < (*.f64 b c) < 3.29999999999999988e-255Initial program 90.5%
Taylor expanded in j around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6434.0
Applied rewrites34.0%
if 3.29999999999999988e-255 < (*.f64 b c) < 1.2999999999999999e177Initial program 87.7%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6429.7
Applied rewrites29.7%
Final simplification42.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 b) -1.55e+77)
(* c b)
(if (<= (* c b) -2e-322)
(* -4.0 (* t a))
(if (<= (* c b) 1.3e+177) (* -4.0 (* x i)) (* c b)))))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 * b) <= -1.55e+77) {
tmp = c * b;
} else if ((c * b) <= -2e-322) {
tmp = -4.0 * (t * a);
} else if ((c * b) <= 1.3e+177) {
tmp = -4.0 * (x * i);
} else {
tmp = c * b;
}
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 * b) <= (-1.55d+77)) then
tmp = c * b
else if ((c * b) <= (-2d-322)) then
tmp = (-4.0d0) * (t * a)
else if ((c * b) <= 1.3d+177) then
tmp = (-4.0d0) * (x * i)
else
tmp = c * b
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 * b) <= -1.55e+77) {
tmp = c * b;
} else if ((c * b) <= -2e-322) {
tmp = -4.0 * (t * a);
} else if ((c * b) <= 1.3e+177) {
tmp = -4.0 * (x * i);
} else {
tmp = c * b;
}
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 * b) <= -1.55e+77: tmp = c * b elif (c * b) <= -2e-322: tmp = -4.0 * (t * a) elif (c * b) <= 1.3e+177: tmp = -4.0 * (x * i) else: tmp = c * b 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(c * b) <= -1.55e+77) tmp = Float64(c * b); elseif (Float64(c * b) <= -2e-322) tmp = Float64(-4.0 * Float64(t * a)); elseif (Float64(c * b) <= 1.3e+177) tmp = Float64(-4.0 * Float64(x * i)); else tmp = Float64(c * b); 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 * b) <= -1.55e+77)
tmp = c * b;
elseif ((c * b) <= -2e-322)
tmp = -4.0 * (t * a);
elseif ((c * b) <= 1.3e+177)
tmp = -4.0 * (x * i);
else
tmp = c * b;
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[(c * b), $MachinePrecision], -1.55e+77], N[(c * b), $MachinePrecision], If[LessEqual[N[(c * b), $MachinePrecision], -2e-322], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * b), $MachinePrecision], 1.3e+177], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], N[(c * b), $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 \cdot b \leq -1.55 \cdot 10^{+77}:\\
\;\;\;\;c \cdot b\\
\mathbf{elif}\;c \cdot b \leq -2 \cdot 10^{-322}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;c \cdot b \leq 1.3 \cdot 10^{+177}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot b\\
\end{array}
\end{array}
if (*.f64 b c) < -1.54999999999999999e77 or 1.2999999999999999e177 < (*.f64 b c) Initial program 78.2%
Taylor expanded in b around inf
lower-*.f6463.7
Applied rewrites63.7%
if -1.54999999999999999e77 < (*.f64 b c) < -1.97626e-322Initial program 89.0%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6432.5
Applied rewrites32.5%
if -1.97626e-322 < (*.f64 b c) < 1.2999999999999999e177Initial program 89.4%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6426.8
Applied rewrites26.8%
Final simplification40.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 (fma c b (* x (* -4.0 i)))))
(if (<= (* c b) -1e+92)
t_1
(if (<= (* c b) 2e+99) (fma (* k -27.0) j (* t (* a -4.0))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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(c, b, (x * (-4.0 * i)));
double tmp;
if ((c * b) <= -1e+92) {
tmp = t_1;
} else if ((c * b) <= 2e+99) {
tmp = fma((k * -27.0), j, (t * (a * -4.0)));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(c, b, Float64(x * Float64(-4.0 * i))) tmp = 0.0 if (Float64(c * b) <= -1e+92) tmp = t_1; elseif (Float64(c * b) <= 2e+99) tmp = fma(Float64(k * -27.0), j, Float64(t * Float64(a * -4.0))); 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[(c * b + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * b), $MachinePrecision], -1e+92], t$95$1, If[LessEqual[N[(c * b), $MachinePrecision], 2e+99], N[(N[(k * -27.0), $MachinePrecision] * j + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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(c, b, x \cdot \left(-4 \cdot i\right)\right)\\
\mathbf{if}\;c \cdot b \leq -1 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \cdot b \leq 2 \cdot 10^{+99}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, t \cdot \left(a \cdot -4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 b c) < -1e92 or 1.9999999999999999e99 < (*.f64 b c) Initial program 78.7%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lift-+.f64N/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
Applied rewrites87.8%
Taylor expanded in i around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6474.6
Applied rewrites74.6%
if -1e92 < (*.f64 b c) < 1.9999999999999999e99Initial program 89.4%
Applied rewrites91.8%
Taylor expanded in a around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6453.1
Applied rewrites53.1%
Final simplification60.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 (* x (fma -4.0 i (* t (* 18.0 (* z y)))))))
(if (<= x -2.7e+34)
t_1
(if (<= x 3.5e-28) (fma b c (fma -4.0 (* t a) (* j (* k -27.0)))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 * (z * y))));
double tmp;
if (x <= -2.7e+34) {
tmp = t_1;
} else if (x <= 3.5e-28) {
tmp = fma(b, c, fma(-4.0, (t * a), (j * (k * -27.0))));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(z * y))))) tmp = 0.0 if (x <= -2.7e+34) tmp = t_1; elseif (x <= 3.5e-28) tmp = fma(b, c, fma(-4.0, Float64(t * a), Float64(j * Float64(k * -27.0)))); 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[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.7e+34], t$95$1, If[LessEqual[x, 3.5e-28], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision] + N[(j * N[(k * -27.0), $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 := x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(z \cdot y\right)\right)\right)\\
\mathbf{if}\;x \leq -2.7 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-28}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.7e34 or 3.5e-28 < x Initial program 76.6%
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-*.f6470.9
Applied rewrites70.9%
if -2.7e34 < x < 3.5e-28Initial program 94.0%
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-*.f6485.0
Applied rewrites85.0%
Final simplification78.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 (<= (* c b) -1.55e+77) (* c b) (if (<= (* c b) 4.3e+109) (* -4.0 (* t a)) (* c b))))
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 * b) <= -1.55e+77) {
tmp = c * b;
} else if ((c * b) <= 4.3e+109) {
tmp = -4.0 * (t * a);
} else {
tmp = c * b;
}
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 * b) <= (-1.55d+77)) then
tmp = c * b
else if ((c * b) <= 4.3d+109) then
tmp = (-4.0d0) * (t * a)
else
tmp = c * b
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 * b) <= -1.55e+77) {
tmp = c * b;
} else if ((c * b) <= 4.3e+109) {
tmp = -4.0 * (t * a);
} else {
tmp = c * b;
}
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 * b) <= -1.55e+77: tmp = c * b elif (c * b) <= 4.3e+109: tmp = -4.0 * (t * a) else: tmp = c * b 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(c * b) <= -1.55e+77) tmp = Float64(c * b); elseif (Float64(c * b) <= 4.3e+109) tmp = Float64(-4.0 * Float64(t * a)); else tmp = Float64(c * b); 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 * b) <= -1.55e+77)
tmp = c * b;
elseif ((c * b) <= 4.3e+109)
tmp = -4.0 * (t * a);
else
tmp = c * b;
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[(c * b), $MachinePrecision], -1.55e+77], N[(c * b), $MachinePrecision], If[LessEqual[N[(c * b), $MachinePrecision], 4.3e+109], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], N[(c * b), $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 \cdot b \leq -1.55 \cdot 10^{+77}:\\
\;\;\;\;c \cdot b\\
\mathbf{elif}\;c \cdot b \leq 4.3 \cdot 10^{+109}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot b\\
\end{array}
\end{array}
if (*.f64 b c) < -1.54999999999999999e77 or 4.3000000000000001e109 < (*.f64 b c) Initial program 79.1%
Taylor expanded in b around inf
lower-*.f6461.5
Applied rewrites61.5%
if -1.54999999999999999e77 < (*.f64 b c) < 4.3000000000000001e109Initial program 89.3%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6426.1
Applied rewrites26.1%
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
(let* ((t_1 (* -4.0 (* x i))))
(if (<= x -6.2e+139)
t_1
(if (<= x 1.28e+85) (fma -27.0 (* j k) (* c b)) 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 <= -6.2e+139) {
tmp = t_1;
} else if (x <= 1.28e+85) {
tmp = fma(-27.0, (j * k), (c * b));
} 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 <= -6.2e+139) tmp = t_1; elseif (x <= 1.28e+85) tmp = fma(-27.0, Float64(j * k), Float64(c * b)); 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, -6.2e+139], t$95$1, If[LessEqual[x, 1.28e+85], N[(-27.0 * N[(j * k), $MachinePrecision] + N[(c * b), $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.2 \cdot 10^{+139}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.28 \cdot 10^{+85}:\\
\;\;\;\;\mathsf{fma}\left(-27, j \cdot k, c \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -6.2e139 or 1.28000000000000004e85 < x Initial program 72.4%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6443.0
Applied rewrites43.0%
if -6.2e139 < x < 1.28000000000000004e85Initial program 90.8%
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-*.f6475.4
Applied rewrites75.4%
Taylor expanded in a around 0
Applied rewrites54.7%
Final simplification51.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 (* c b))
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 c * b;
}
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 = c * b
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 c * b;
}
[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 c * b
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(c * b) 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 = c * b;
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[(c * b), $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])\\
\\
c \cdot b
\end{array}
Initial program 85.7%
Taylor expanded in b around inf
lower-*.f6423.8
Applied rewrites23.8%
Final simplification23.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 2024234
(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)))