
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(fma
(* k -27.0)
j
(fma
(* x i)
-4.0
(fma (fma z (* (* 18.0 x) y) (* a -4.0)) t (* b c))))))
(if (<= t -2e+49)
t_1
(if (<= t 5e-29)
(-
(fma
y
(* (* z t) (* 18.0 x))
(fma (* a t) -4.0 (fma c b (* -4.0 (* x i)))))
(* (* 27.0 j) 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((k * -27.0), j, fma((x * i), -4.0, fma(fma(z, ((18.0 * x) * y), (a * -4.0)), t, (b * c))));
double tmp;
if (t <= -2e+49) {
tmp = t_1;
} else if (t <= 5e-29) {
tmp = fma(y, ((z * t) * (18.0 * x)), fma((a * t), -4.0, fma(c, b, (-4.0 * (x * i))))) - ((27.0 * j) * 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(Float64(k * -27.0), j, fma(Float64(x * i), -4.0, fma(fma(z, Float64(Float64(18.0 * x) * y), Float64(a * -4.0)), t, Float64(b * c)))) tmp = 0.0 if (t <= -2e+49) tmp = t_1; elseif (t <= 5e-29) tmp = Float64(fma(y, Float64(Float64(z * t) * Float64(18.0 * x)), fma(Float64(a * t), -4.0, fma(c, b, Float64(-4.0 * Float64(x * i))))) - Float64(Float64(27.0 * j) * 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[(N[(k * -27.0), $MachinePrecision] * j + N[(N[(x * i), $MachinePrecision] * -4.0 + N[(N[(z * N[(N[(18.0 * x), $MachinePrecision] * y), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] * t + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e+49], t$95$1, If[LessEqual[t, 5e-29], N[(N[(y * N[(N[(z * t), $MachinePrecision] * N[(18.0 * x), $MachinePrecision]), $MachinePrecision] + N[(N[(a * t), $MachinePrecision] * -4.0 + N[(c * b + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(27.0 * j), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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(k \cdot -27, j, \mathsf{fma}\left(x \cdot i, -4, \mathsf{fma}\left(\mathsf{fma}\left(z, \left(18 \cdot x\right) \cdot y, a \cdot -4\right), t, b \cdot c\right)\right)\right)\\
\mathbf{if}\;t \leq -2 \cdot 10^{+49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-29}:\\
\;\;\;\;\mathsf{fma}\left(y, \left(z \cdot t\right) \cdot \left(18 \cdot x\right), \mathsf{fma}\left(a \cdot t, -4, \mathsf{fma}\left(c, b, -4 \cdot \left(x \cdot i\right)\right)\right)\right) - \left(27 \cdot j\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.99999999999999989e49 or 4.99999999999999986e-29 < t Initial program 88.3%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
metadata-eval90.7
lift--.f64N/A
sub-negN/A
Applied rewrites94.7%
if -1.99999999999999989e49 < t < 4.99999999999999986e-29Initial program 81.3%
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
lift--.f64N/A
sub-negN/A
associate-+l+N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites92.3%
Final simplification93.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 (<= x -2e+80)
(fma (* k -27.0) j (fma (fma (* (* y z) t) 18.0 (* -4.0 i)) x (* b c)))
(if (<= x 0.41)
(fma
(* k -27.0)
j
(fma (* x i) -4.0 (fma (fma z (* (* 18.0 x) y) (* a -4.0)) t (* b c))))
(fma (* k -27.0) j (fma (fma (* (* y t) z) 18.0 (* -4.0 i)) x (* b c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -2e+80) {
tmp = fma((k * -27.0), j, fma(fma(((y * z) * t), 18.0, (-4.0 * i)), x, (b * c)));
} else if (x <= 0.41) {
tmp = fma((k * -27.0), j, fma((x * i), -4.0, fma(fma(z, ((18.0 * x) * y), (a * -4.0)), t, (b * c))));
} else {
tmp = fma((k * -27.0), j, fma(fma(((y * t) * z), 18.0, (-4.0 * i)), x, (b * c)));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -2e+80) tmp = fma(Float64(k * -27.0), j, fma(fma(Float64(Float64(y * z) * t), 18.0, Float64(-4.0 * i)), x, Float64(b * c))); elseif (x <= 0.41) tmp = fma(Float64(k * -27.0), j, fma(Float64(x * i), -4.0, fma(fma(z, Float64(Float64(18.0 * x) * y), Float64(a * -4.0)), t, Float64(b * c)))); else tmp = fma(Float64(k * -27.0), j, fma(fma(Float64(Float64(y * t) * z), 18.0, Float64(-4.0 * i)), x, Float64(b * c))); 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, -2e+80], N[(N[(k * -27.0), $MachinePrecision] * j + N[(N[(N[(N[(y * z), $MachinePrecision] * t), $MachinePrecision] * 18.0 + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.41], N[(N[(k * -27.0), $MachinePrecision] * j + N[(N[(x * i), $MachinePrecision] * -4.0 + N[(N[(z * N[(N[(18.0 * x), $MachinePrecision] * y), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] * t + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(k * -27.0), $MachinePrecision] * j + N[(N[(N[(N[(y * t), $MachinePrecision] * z), $MachinePrecision] * 18.0 + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+80}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(\mathsf{fma}\left(\left(y \cdot z\right) \cdot t, 18, -4 \cdot i\right), x, b \cdot c\right)\right)\\
\mathbf{elif}\;x \leq 0.41:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(x \cdot i, -4, \mathsf{fma}\left(\mathsf{fma}\left(z, \left(18 \cdot x\right) \cdot y, a \cdot -4\right), t, b \cdot c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(\mathsf{fma}\left(\left(y \cdot t\right) \cdot z, 18, -4 \cdot i\right), x, b \cdot c\right)\right)\\
\end{array}
\end{array}
if x < -2e80Initial program 77.4%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
metadata-eval79.5
lift--.f64N/A
sub-negN/A
Applied rewrites79.5%
Taylor expanded in a around 0
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt-inN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites91.6%
if -2e80 < x < 0.409999999999999976Initial program 93.4%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
metadata-eval95.5
lift--.f64N/A
sub-negN/A
Applied rewrites97.5%
if 0.409999999999999976 < x Initial program 69.4%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
metadata-eval71.0
lift--.f64N/A
sub-negN/A
Applied rewrites74.3%
Taylor expanded in a around 0
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt-inN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites85.4%
Applied rewrites87.2%
Final simplification94.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 (* j -27.0) k (* b c))))
(if (<= (* b c) -5e+24)
t_1
(if (<= (* b c) -2e-175)
(* (fma -4.0 a (* (* (* y z) x) 18.0)) t)
(if (<= (* b c) 2000000000000.0)
(- (* -4.0 (* x i)) (* (* 27.0 j) 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((j * -27.0), k, (b * c));
double tmp;
if ((b * c) <= -5e+24) {
tmp = t_1;
} else if ((b * c) <= -2e-175) {
tmp = fma(-4.0, a, (((y * z) * x) * 18.0)) * t;
} else if ((b * c) <= 2000000000000.0) {
tmp = (-4.0 * (x * i)) - ((27.0 * j) * 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(Float64(j * -27.0), k, Float64(b * c)) tmp = 0.0 if (Float64(b * c) <= -5e+24) tmp = t_1; elseif (Float64(b * c) <= -2e-175) tmp = Float64(fma(-4.0, a, Float64(Float64(Float64(y * z) * x) * 18.0)) * t); elseif (Float64(b * c) <= 2000000000000.0) tmp = Float64(Float64(-4.0 * Float64(x * i)) - Float64(Float64(27.0 * j) * 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[(N[(j * -27.0), $MachinePrecision] * k + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -5e+24], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -2e-175], N[(N[(-4.0 * a + N[(N[(N[(y * z), $MachinePrecision] * x), $MachinePrecision] * 18.0), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2000000000000.0], N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] - N[(N[(27.0 * j), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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(j \cdot -27, k, b \cdot c\right)\\
\mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{-175}:\\
\;\;\;\;\mathsf{fma}\left(-4, a, \left(\left(y \cdot z\right) \cdot x\right) \cdot 18\right) \cdot t\\
\mathbf{elif}\;b \cdot c \leq 2000000000000:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right) - \left(27 \cdot j\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 b c) < -5.00000000000000045e24 or 2e12 < (*.f64 b c) Initial program 79.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f6462.0
Applied rewrites62.0%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lift-*.f64N/A
lower-fma.f6465.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6465.7
Applied rewrites65.7%
if -5.00000000000000045e24 < (*.f64 b c) < -2e-175Initial program 92.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6470.8
Applied rewrites70.8%
if -2e-175 < (*.f64 b c) < 2e12Initial program 89.9%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
lower-*.f6456.0
Applied rewrites56.0%
Final simplification62.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 -4.0 i (* (* (* 18.0 t) z) y)) x)))
(if (<= x -1.36e+45)
t_1
(if (<= x 3e-177)
(fma (* k -27.0) j (fma (* -4.0 t) a (* b c)))
(if (<= x 1.9e+122)
(fma (* (* (* y x) t) 18.0) z (fma (* j k) -27.0 (* b c)))
t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = fma(-4.0, i, (((18.0 * t) * z) * y)) * x;
double tmp;
if (x <= -1.36e+45) {
tmp = t_1;
} else if (x <= 3e-177) {
tmp = fma((k * -27.0), j, fma((-4.0 * t), a, (b * c)));
} else if (x <= 1.9e+122) {
tmp = fma((((y * x) * t) * 18.0), z, fma((j * k), -27.0, (b * c)));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(fma(-4.0, i, Float64(Float64(Float64(18.0 * t) * z) * y)) * x) tmp = 0.0 if (x <= -1.36e+45) tmp = t_1; elseif (x <= 3e-177) tmp = fma(Float64(k * -27.0), j, fma(Float64(-4.0 * t), a, Float64(b * c))); elseif (x <= 1.9e+122) tmp = fma(Float64(Float64(Float64(y * x) * t) * 18.0), z, fma(Float64(j * k), -27.0, Float64(b * c))); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(-4.0 * i + N[(N[(N[(18.0 * t), $MachinePrecision] * z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.36e+45], t$95$1, If[LessEqual[x, 3e-177], N[(N[(k * -27.0), $MachinePrecision] * j + N[(N[(-4.0 * t), $MachinePrecision] * a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.9e+122], N[(N[(N[(N[(y * x), $MachinePrecision] * t), $MachinePrecision] * 18.0), $MachinePrecision] * z + N[(N[(j * k), $MachinePrecision] * -27.0 + N[(b * c), $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(-4, i, \left(\left(18 \cdot t\right) \cdot z\right) \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -1.36 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-177}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(-4 \cdot t, a, b \cdot c\right)\right)\\
\mathbf{elif}\;x \leq 1.9 \cdot 10^{+122}:\\
\;\;\;\;\mathsf{fma}\left(\left(\left(y \cdot x\right) \cdot t\right) \cdot 18, z, \mathsf{fma}\left(j \cdot k, -27, b \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.36e45 or 1.8999999999999999e122 < x Initial program 70.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6472.4
Applied rewrites72.4%
Applied rewrites73.5%
if -1.36e45 < x < 3.00000000000000008e-177Initial program 94.2%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
metadata-eval97.2
lift--.f64N/A
sub-negN/A
Applied rewrites98.2%
Taylor expanded in a around 0
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt-inN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites62.0%
Taylor expanded in x around 0
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6485.3
Applied rewrites85.3%
if 3.00000000000000008e-177 < x < 1.8999999999999999e122Initial program 90.9%
Taylor expanded in i around 0
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
distribute-lft-neg-inN/A
metadata-evalN/A
associate--l+N/A
+-commutativeN/A
associate--l+N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
Applied rewrites77.7%
Taylor expanded in a around 0
Applied rewrites76.0%
Final simplification78.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -7.5e+93)
(fma (* k -27.0) j (fma (fma (* (* y z) t) 18.0 (* -4.0 i)) x (* b c)))
(if (<= x 2.6e-224)
(fma (* j -27.0) k (fma (fma -4.0 a (* (* (* y z) x) 18.0)) t (* b c)))
(fma (* k -27.0) j (fma (fma (* (* y t) z) 18.0 (* -4.0 i)) x (* b c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -7.5e+93) {
tmp = fma((k * -27.0), j, fma(fma(((y * z) * t), 18.0, (-4.0 * i)), x, (b * c)));
} else if (x <= 2.6e-224) {
tmp = fma((j * -27.0), k, fma(fma(-4.0, a, (((y * z) * x) * 18.0)), t, (b * c)));
} else {
tmp = fma((k * -27.0), j, fma(fma(((y * t) * z), 18.0, (-4.0 * i)), x, (b * c)));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -7.5e+93) tmp = fma(Float64(k * -27.0), j, fma(fma(Float64(Float64(y * z) * t), 18.0, Float64(-4.0 * i)), x, Float64(b * c))); elseif (x <= 2.6e-224) tmp = fma(Float64(j * -27.0), k, fma(fma(-4.0, a, Float64(Float64(Float64(y * z) * x) * 18.0)), t, Float64(b * c))); else tmp = fma(Float64(k * -27.0), j, fma(fma(Float64(Float64(y * t) * z), 18.0, Float64(-4.0 * i)), x, Float64(b * c))); 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, -7.5e+93], N[(N[(k * -27.0), $MachinePrecision] * j + N[(N[(N[(N[(y * z), $MachinePrecision] * t), $MachinePrecision] * 18.0 + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.6e-224], N[(N[(j * -27.0), $MachinePrecision] * k + N[(N[(-4.0 * a + N[(N[(N[(y * z), $MachinePrecision] * x), $MachinePrecision] * 18.0), $MachinePrecision]), $MachinePrecision] * t + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(k * -27.0), $MachinePrecision] * j + N[(N[(N[(N[(y * t), $MachinePrecision] * z), $MachinePrecision] * 18.0 + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x + N[(b * c), $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 -7.5 \cdot 10^{+93}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(\mathsf{fma}\left(\left(y \cdot z\right) \cdot t, 18, -4 \cdot i\right), x, b \cdot c\right)\right)\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{-224}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, \mathsf{fma}\left(\mathsf{fma}\left(-4, a, \left(\left(y \cdot z\right) \cdot x\right) \cdot 18\right), t, b \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(\mathsf{fma}\left(\left(y \cdot t\right) \cdot z, 18, -4 \cdot i\right), x, b \cdot c\right)\right)\\
\end{array}
\end{array}
if x < -7.5000000000000002e93Initial program 74.2%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
metadata-eval76.7
lift--.f64N/A
sub-negN/A
Applied rewrites76.7%
Taylor expanded in a around 0
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt-inN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites90.5%
if -7.5000000000000002e93 < x < 2.6000000000000002e-224Initial program 93.5%
Taylor expanded in i around 0
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
distribute-lft-neg-inN/A
metadata-evalN/A
associate--l+N/A
+-commutativeN/A
associate--l+N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
Applied rewrites90.9%
if 2.6000000000000002e-224 < x Initial program 80.2%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
metadata-eval82.1
lift--.f64N/A
sub-negN/A
Applied rewrites83.9%
Taylor expanded in a around 0
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt-inN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites82.1%
Applied rewrites85.9%
Final simplification88.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
(* k -27.0)
j
(fma (fma (* (* y t) z) 18.0 (* -4.0 i)) x (* b c)))))
(if (<= x -5.8e+93)
t_1
(if (<= x 2.6e-224)
(fma (* j -27.0) k (fma (fma -4.0 a (* (* (* y z) x) 18.0)) t (* b c)))
t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = fma((k * -27.0), j, fma(fma(((y * t) * z), 18.0, (-4.0 * i)), x, (b * c)));
double tmp;
if (x <= -5.8e+93) {
tmp = t_1;
} else if (x <= 2.6e-224) {
tmp = fma((j * -27.0), k, fma(fma(-4.0, a, (((y * z) * x) * 18.0)), t, (b * c)));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = fma(Float64(k * -27.0), j, fma(fma(Float64(Float64(y * t) * z), 18.0, Float64(-4.0 * i)), x, Float64(b * c))) tmp = 0.0 if (x <= -5.8e+93) tmp = t_1; elseif (x <= 2.6e-224) tmp = fma(Float64(j * -27.0), k, fma(fma(-4.0, a, Float64(Float64(Float64(y * z) * x) * 18.0)), t, Float64(b * c))); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(k * -27.0), $MachinePrecision] * j + N[(N[(N[(N[(y * t), $MachinePrecision] * z), $MachinePrecision] * 18.0 + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.8e+93], t$95$1, If[LessEqual[x, 2.6e-224], N[(N[(j * -27.0), $MachinePrecision] * k + N[(N[(-4.0 * a + N[(N[(N[(y * z), $MachinePrecision] * x), $MachinePrecision] * 18.0), $MachinePrecision]), $MachinePrecision] * t + N[(b * c), $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(k \cdot -27, j, \mathsf{fma}\left(\mathsf{fma}\left(\left(y \cdot t\right) \cdot z, 18, -4 \cdot i\right), x, b \cdot c\right)\right)\\
\mathbf{if}\;x \leq -5.8 \cdot 10^{+93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{-224}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, \mathsf{fma}\left(\mathsf{fma}\left(-4, a, \left(\left(y \cdot z\right) \cdot x\right) \cdot 18\right), t, b \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -5.7999999999999997e93 or 2.6000000000000002e-224 < x Initial program 78.6%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
metadata-eval80.6
lift--.f64N/A
sub-negN/A
Applied rewrites81.9%
Taylor expanded in a around 0
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt-inN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites84.5%
Applied rewrites87.8%
if -5.7999999999999997e93 < x < 2.6000000000000002e-224Initial program 93.5%
Taylor expanded in i around 0
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
distribute-lft-neg-inN/A
metadata-evalN/A
associate--l+N/A
+-commutativeN/A
associate--l+N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
Applied rewrites90.9%
Final simplification89.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= i -1.5e+114)
(fma (* k -27.0) j (fma (* -4.0 i) x (* b c)))
(if (<= i 4.2e-16)
(fma (* j -27.0) k (fma (fma -4.0 a (* (* (* y z) x) 18.0)) t (* b c)))
(fma (fma -4.0 i (* (* (* y z) t) 18.0)) x (fma (* a t) -4.0 (* b c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (i <= -1.5e+114) {
tmp = fma((k * -27.0), j, fma((-4.0 * i), x, (b * c)));
} else if (i <= 4.2e-16) {
tmp = fma((j * -27.0), k, fma(fma(-4.0, a, (((y * z) * x) * 18.0)), t, (b * c)));
} else {
tmp = fma(fma(-4.0, i, (((y * z) * t) * 18.0)), x, fma((a * t), -4.0, (b * c)));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (i <= -1.5e+114) tmp = fma(Float64(k * -27.0), j, fma(Float64(-4.0 * i), x, Float64(b * c))); elseif (i <= 4.2e-16) tmp = fma(Float64(j * -27.0), k, fma(fma(-4.0, a, Float64(Float64(Float64(y * z) * x) * 18.0)), t, Float64(b * c))); else tmp = fma(fma(-4.0, i, Float64(Float64(Float64(y * z) * t) * 18.0)), x, fma(Float64(a * t), -4.0, Float64(b * c))); 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[i, -1.5e+114], N[(N[(k * -27.0), $MachinePrecision] * j + N[(N[(-4.0 * i), $MachinePrecision] * x + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 4.2e-16], N[(N[(j * -27.0), $MachinePrecision] * k + N[(N[(-4.0 * a + N[(N[(N[(y * z), $MachinePrecision] * x), $MachinePrecision] * 18.0), $MachinePrecision]), $MachinePrecision] * t + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * i + N[(N[(N[(y * z), $MachinePrecision] * t), $MachinePrecision] * 18.0), $MachinePrecision]), $MachinePrecision] * x + N[(N[(a * t), $MachinePrecision] * -4.0 + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;i \leq -1.5 \cdot 10^{+114}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(-4 \cdot i, x, b \cdot c\right)\right)\\
\mathbf{elif}\;i \leq 4.2 \cdot 10^{-16}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, \mathsf{fma}\left(\mathsf{fma}\left(-4, a, \left(\left(y \cdot z\right) \cdot x\right) \cdot 18\right), t, b \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-4, i, \left(\left(y \cdot z\right) \cdot t\right) \cdot 18\right), x, \mathsf{fma}\left(a \cdot t, -4, b \cdot c\right)\right)\\
\end{array}
\end{array}
if i < -1.5e114Initial program 86.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f6443.3
Applied rewrites43.3%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lower-fma.f6445.6
Applied rewrites45.6%
Taylor expanded in t around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6477.7
Applied rewrites77.7%
if -1.5e114 < i < 4.2000000000000002e-16Initial program 86.9%
Taylor expanded in i around 0
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
distribute-lft-neg-inN/A
metadata-evalN/A
associate--l+N/A
+-commutativeN/A
associate--l+N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
Applied rewrites86.8%
if 4.2000000000000002e-16 < i Initial program 77.6%
Taylor expanded in j around 0
associate--r+N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate--l+N/A
associate-+r+N/A
Applied rewrites84.4%
Final simplification84.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(fma
(* j -27.0)
k
(fma (fma -4.0 a (* (* (* y z) x) 18.0)) t (* b c)))))
(if (<= t -9.5e-76)
t_1
(if (<= t 2.25e-201)
(fma c b (fma (* j -27.0) k (* -4.0 (* x i))))
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((j * -27.0), k, fma(fma(-4.0, a, (((y * z) * x) * 18.0)), t, (b * c)));
double tmp;
if (t <= -9.5e-76) {
tmp = t_1;
} else if (t <= 2.25e-201) {
tmp = fma(c, b, fma((j * -27.0), k, (-4.0 * (x * i))));
} 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(Float64(j * -27.0), k, fma(fma(-4.0, a, Float64(Float64(Float64(y * z) * x) * 18.0)), t, Float64(b * c))) tmp = 0.0 if (t <= -9.5e-76) tmp = t_1; elseif (t <= 2.25e-201) tmp = fma(c, b, fma(Float64(j * -27.0), k, Float64(-4.0 * Float64(x * i)))); 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[(N[(j * -27.0), $MachinePrecision] * k + N[(N[(-4.0 * a + N[(N[(N[(y * z), $MachinePrecision] * x), $MachinePrecision] * 18.0), $MachinePrecision]), $MachinePrecision] * t + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.5e-76], t$95$1, If[LessEqual[t, 2.25e-201], N[(c * b + N[(N[(j * -27.0), $MachinePrecision] * k + N[(-4.0 * N[(x * i), $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(j \cdot -27, k, \mathsf{fma}\left(\mathsf{fma}\left(-4, a, \left(\left(y \cdot z\right) \cdot x\right) \cdot 18\right), t, b \cdot c\right)\right)\\
\mathbf{if}\;t \leq -9.5 \cdot 10^{-76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{-201}:\\
\;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(j \cdot -27, k, -4 \cdot \left(x \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -9.49999999999999984e-76 or 2.2500000000000001e-201 < t Initial program 87.9%
Taylor expanded in i around 0
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
distribute-lft-neg-inN/A
metadata-evalN/A
associate--l+N/A
+-commutativeN/A
associate--l+N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
Applied rewrites83.6%
if -9.49999999999999984e-76 < t < 2.2500000000000001e-201Initial program 75.9%
Taylor expanded in t around 0
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
associate-*r*N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6481.7
Applied rewrites81.7%
Final simplification83.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (fma (fma (* (* y z) x) 18.0 (* a -4.0)) t (* b c))))
(if (<= t -11800.0)
t_1
(if (<= t 1.75e-29) (fma c b (fma (* j -27.0) k (* -4.0 (* x i)))) 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(fma(((y * z) * x), 18.0, (a * -4.0)), t, (b * c));
double tmp;
if (t <= -11800.0) {
tmp = t_1;
} else if (t <= 1.75e-29) {
tmp = fma(c, b, fma((j * -27.0), k, (-4.0 * (x * i))));
} 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(fma(Float64(Float64(y * z) * x), 18.0, Float64(a * -4.0)), t, Float64(b * c)) tmp = 0.0 if (t <= -11800.0) tmp = t_1; elseif (t <= 1.75e-29) tmp = fma(c, b, fma(Float64(j * -27.0), k, Float64(-4.0 * Float64(x * i)))); 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[(N[(N[(N[(y * z), $MachinePrecision] * x), $MachinePrecision] * 18.0 + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] * t + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -11800.0], t$95$1, If[LessEqual[t, 1.75e-29], N[(c * b + N[(N[(j * -27.0), $MachinePrecision] * k + N[(-4.0 * N[(x * i), $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(\mathsf{fma}\left(\left(y \cdot z\right) \cdot x, 18, a \cdot -4\right), t, b \cdot c\right)\\
\mathbf{if}\;t \leq -11800:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{-29}:\\
\;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(j \cdot -27, k, -4 \cdot \left(x \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -11800 or 1.7499999999999999e-29 < t Initial program 89.1%
Taylor expanded in i around 0
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
distribute-lft-neg-inN/A
metadata-evalN/A
associate--l+N/A
+-commutativeN/A
associate--l+N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
Applied rewrites84.6%
Taylor expanded in j around 0
Applied rewrites74.6%
if -11800 < t < 1.7499999999999999e-29Initial program 79.7%
Taylor expanded in t around 0
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
associate-*r*N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6478.3
Applied rewrites78.3%
Final simplification76.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 (let* ((t_1 (* (* j k) -27.0)) (t_2 (* (* 27.0 j) k))) (if (<= t_2 -1e+156) t_1 (if (<= t_2 1.2e+102) (* b c) t_1))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * k) * -27.0;
double t_2 = (27.0 * j) * k;
double tmp;
if (t_2 <= -1e+156) {
tmp = t_1;
} else if (t_2 <= 1.2e+102) {
tmp = b * c;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (j * k) * (-27.0d0)
t_2 = (27.0d0 * j) * k
if (t_2 <= (-1d+156)) then
tmp = t_1
else if (t_2 <= 1.2d+102) then
tmp = b * c
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * k) * -27.0;
double t_2 = (27.0 * j) * k;
double tmp;
if (t_2 <= -1e+156) {
tmp = t_1;
} else if (t_2 <= 1.2e+102) {
tmp = b * c;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * k) * -27.0 t_2 = (27.0 * j) * k tmp = 0 if t_2 <= -1e+156: tmp = t_1 elif t_2 <= 1.2e+102: tmp = b * c else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * k) * -27.0) t_2 = Float64(Float64(27.0 * j) * k) tmp = 0.0 if (t_2 <= -1e+156) tmp = t_1; elseif (t_2 <= 1.2e+102) tmp = Float64(b * c); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * k) * -27.0;
t_2 = (27.0 * j) * k;
tmp = 0.0;
if (t_2 <= -1e+156)
tmp = t_1;
elseif (t_2 <= 1.2e+102)
tmp = b * c;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(27.0 * j), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+156], t$95$1, If[LessEqual[t$95$2, 1.2e+102], N[(b * c), $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 := \left(j \cdot k\right) \cdot -27\\
t_2 := \left(27 \cdot j\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+156}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 1.2 \cdot 10^{+102}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.9999999999999998e155 or 1.19999999999999997e102 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 82.0%
Taylor expanded in j around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6461.2
Applied rewrites61.2%
if -9.9999999999999998e155 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.19999999999999997e102Initial program 86.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f6433.9
Applied rewrites33.9%
Final simplification42.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 (* k -27.0) j (* -4.0 (* x i)))))
(if (<= x -4e+111)
t_1
(if (<= x -3.5e+61)
(* (* (* (* x t) z) y) 18.0)
(if (<= x 8e+121) (fma (* k -27.0) j (* b c)) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = fma((k * -27.0), j, (-4.0 * (x * i)));
double tmp;
if (x <= -4e+111) {
tmp = t_1;
} else if (x <= -3.5e+61) {
tmp = (((x * t) * z) * y) * 18.0;
} else if (x <= 8e+121) {
tmp = fma((k * -27.0), j, (b * c));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = fma(Float64(k * -27.0), j, Float64(-4.0 * Float64(x * i))) tmp = 0.0 if (x <= -4e+111) tmp = t_1; elseif (x <= -3.5e+61) tmp = Float64(Float64(Float64(Float64(x * t) * z) * y) * 18.0); elseif (x <= 8e+121) tmp = fma(Float64(k * -27.0), j, Float64(b * c)); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(k * -27.0), $MachinePrecision] * j + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4e+111], t$95$1, If[LessEqual[x, -3.5e+61], N[(N[(N[(N[(x * t), $MachinePrecision] * z), $MachinePrecision] * y), $MachinePrecision] * 18.0), $MachinePrecision], If[LessEqual[x, 8e+121], N[(N[(k * -27.0), $MachinePrecision] * j + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(k \cdot -27, j, -4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{if}\;x \leq -4 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{+61}:\\
\;\;\;\;\left(\left(\left(x \cdot t\right) \cdot z\right) \cdot y\right) \cdot 18\\
\mathbf{elif}\;x \leq 8 \cdot 10^{+121}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.99999999999999983e111 or 8.0000000000000003e121 < x Initial program 69.5%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
metadata-eval73.3
lift--.f64N/A
sub-negN/A
Applied rewrites74.6%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6461.5
Applied rewrites61.5%
if -3.99999999999999983e111 < x < -3.50000000000000018e61Initial program 76.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6468.7
Applied rewrites68.7%
Applied rewrites75.4%
if -3.50000000000000018e61 < x < 8.0000000000000003e121Initial program 92.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f6459.0
Applied rewrites59.0%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lower-fma.f6460.2
Applied rewrites60.2%
Final simplification61.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
(let* ((t_1 (* (fma -4.0 i (* (* (* 18.0 t) z) y)) x)))
(if (<= x -1.36e+45)
t_1
(if (<= x 8.6e+121) (fma (* k -27.0) j (fma (* -4.0 t) a (* b c))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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(-4.0, i, (((18.0 * t) * z) * y)) * x;
double tmp;
if (x <= -1.36e+45) {
tmp = t_1;
} else if (x <= 8.6e+121) {
tmp = fma((k * -27.0), j, fma((-4.0 * t), a, (b * c)));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(fma(-4.0, i, Float64(Float64(Float64(18.0 * t) * z) * y)) * x) tmp = 0.0 if (x <= -1.36e+45) tmp = t_1; elseif (x <= 8.6e+121) tmp = fma(Float64(k * -27.0), j, fma(Float64(-4.0 * t), a, Float64(b * c))); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(-4.0 * i + N[(N[(N[(18.0 * t), $MachinePrecision] * z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.36e+45], t$95$1, If[LessEqual[x, 8.6e+121], N[(N[(k * -27.0), $MachinePrecision] * j + N[(N[(-4.0 * t), $MachinePrecision] * a + N[(b * c), $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(-4, i, \left(\left(18 \cdot t\right) \cdot z\right) \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -1.36 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 8.6 \cdot 10^{+121}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(-4 \cdot t, a, b \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.36e45 or 8.5999999999999994e121 < x Initial program 70.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6472.4
Applied rewrites72.4%
Applied rewrites73.5%
if -1.36e45 < x < 8.5999999999999994e121Initial program 92.9%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
metadata-eval94.2
lift--.f64N/A
sub-negN/A
Applied rewrites95.4%
Taylor expanded in a around 0
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt-inN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites70.1%
Taylor expanded in x around 0
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6478.0
Applied rewrites78.0%
Final simplification76.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (fma -4.0 i (* (* (* 18.0 t) z) y)) x)))
(if (<= x -1.36e+45)
t_1
(if (<= x 8.6e+121) (fma c b (fma (* j -27.0) k (* (* -4.0 t) a))) 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(-4.0, i, (((18.0 * t) * z) * y)) * x;
double tmp;
if (x <= -1.36e+45) {
tmp = t_1;
} else if (x <= 8.6e+121) {
tmp = fma(c, b, fma((j * -27.0), k, ((-4.0 * t) * a)));
} 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(fma(-4.0, i, Float64(Float64(Float64(18.0 * t) * z) * y)) * x) tmp = 0.0 if (x <= -1.36e+45) tmp = t_1; elseif (x <= 8.6e+121) tmp = fma(c, b, fma(Float64(j * -27.0), k, Float64(Float64(-4.0 * t) * a))); 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[(N[(-4.0 * i + N[(N[(N[(18.0 * t), $MachinePrecision] * z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.36e+45], t$95$1, If[LessEqual[x, 8.6e+121], N[(c * b + N[(N[(j * -27.0), $MachinePrecision] * k + N[(N[(-4.0 * t), $MachinePrecision] * a), $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(-4, i, \left(\left(18 \cdot t\right) \cdot z\right) \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -1.36 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 8.6 \cdot 10^{+121}:\\
\;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(j \cdot -27, k, \left(-4 \cdot t\right) \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.36e45 or 8.5999999999999994e121 < x Initial program 70.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6472.4
Applied rewrites72.4%
Applied rewrites73.5%
if -1.36e45 < x < 8.5999999999999994e121Initial program 92.9%
Taylor expanded in x around 0
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6476.7
Applied rewrites76.7%
Final simplification75.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 (* (fma -4.0 i (* (* (* 18.0 t) z) y)) x)))
(if (<= x -8.5e+43)
t_1
(if (<= x 7.6e+121) (fma (* k -27.0) j (* b c)) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = fma(-4.0, i, (((18.0 * t) * z) * y)) * x;
double tmp;
if (x <= -8.5e+43) {
tmp = t_1;
} else if (x <= 7.6e+121) {
tmp = fma((k * -27.0), j, (b * c));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(fma(-4.0, i, Float64(Float64(Float64(18.0 * t) * z) * y)) * x) tmp = 0.0 if (x <= -8.5e+43) tmp = t_1; elseif (x <= 7.6e+121) tmp = fma(Float64(k * -27.0), j, Float64(b * c)); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(-4.0 * i + N[(N[(N[(18.0 * t), $MachinePrecision] * z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -8.5e+43], t$95$1, If[LessEqual[x, 7.6e+121], N[(N[(k * -27.0), $MachinePrecision] * j + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-4, i, \left(\left(18 \cdot t\right) \cdot z\right) \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 7.6 \cdot 10^{+121}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -8.5e43 or 7.6e121 < x Initial program 70.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6472.4
Applied rewrites72.4%
Applied rewrites73.5%
if -8.5e43 < x < 7.6e121Initial program 92.9%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f6459.1
Applied rewrites59.1%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lower-fma.f6460.3
Applied rewrites60.3%
Final simplification65.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= y -5.4e+217)
(* (* (* (* x t) z) y) 18.0)
(if (<= y 4.2e+29)
(fma (* j -27.0) k (* b c))
(* (* (* (* 18.0 x) y) t) z))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (y <= -5.4e+217) {
tmp = (((x * t) * z) * y) * 18.0;
} else if (y <= 4.2e+29) {
tmp = fma((j * -27.0), k, (b * c));
} else {
tmp = (((18.0 * x) * y) * t) * z;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (y <= -5.4e+217) tmp = Float64(Float64(Float64(Float64(x * t) * z) * y) * 18.0); elseif (y <= 4.2e+29) tmp = fma(Float64(j * -27.0), k, Float64(b * c)); else tmp = Float64(Float64(Float64(Float64(18.0 * x) * y) * t) * z); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[y, -5.4e+217], N[(N[(N[(N[(x * t), $MachinePrecision] * z), $MachinePrecision] * y), $MachinePrecision] * 18.0), $MachinePrecision], If[LessEqual[y, 4.2e+29], N[(N[(j * -27.0), $MachinePrecision] * k + N[(b * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(18.0 * x), $MachinePrecision] * y), $MachinePrecision] * t), $MachinePrecision] * z), $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}\;y \leq -5.4 \cdot 10^{+217}:\\
\;\;\;\;\left(\left(\left(x \cdot t\right) \cdot z\right) \cdot y\right) \cdot 18\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+29}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(18 \cdot x\right) \cdot y\right) \cdot t\right) \cdot z\\
\end{array}
\end{array}
if y < -5.40000000000000005e217Initial program 58.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6449.5
Applied rewrites49.5%
Applied rewrites58.7%
if -5.40000000000000005e217 < y < 4.2000000000000003e29Initial program 88.8%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f6452.7
Applied rewrites52.7%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lift-*.f64N/A
lower-fma.f6455.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6455.0
Applied rewrites55.0%
if 4.2000000000000003e29 < y Initial program 80.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6438.3
Applied rewrites38.3%
Applied rewrites46.0%
Final simplification53.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= y -5.4e+217)
(* (* (* z t) (* 18.0 x)) y)
(if (<= y 4.2e+29)
(fma (* j -27.0) k (* b c))
(* (* (* (* 18.0 x) y) t) z))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (y <= -5.4e+217) {
tmp = ((z * t) * (18.0 * x)) * y;
} else if (y <= 4.2e+29) {
tmp = fma((j * -27.0), k, (b * c));
} else {
tmp = (((18.0 * x) * y) * t) * z;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (y <= -5.4e+217) tmp = Float64(Float64(Float64(z * t) * Float64(18.0 * x)) * y); elseif (y <= 4.2e+29) tmp = fma(Float64(j * -27.0), k, Float64(b * c)); else tmp = Float64(Float64(Float64(Float64(18.0 * x) * y) * t) * z); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[y, -5.4e+217], N[(N[(N[(z * t), $MachinePrecision] * N[(18.0 * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 4.2e+29], N[(N[(j * -27.0), $MachinePrecision] * k + N[(b * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(18.0 * x), $MachinePrecision] * y), $MachinePrecision] * t), $MachinePrecision] * z), $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}\;y \leq -5.4 \cdot 10^{+217}:\\
\;\;\;\;\left(\left(z \cdot t\right) \cdot \left(18 \cdot x\right)\right) \cdot y\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+29}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(18 \cdot x\right) \cdot y\right) \cdot t\right) \cdot z\\
\end{array}
\end{array}
if y < -5.40000000000000005e217Initial program 58.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6449.5
Applied rewrites49.5%
Applied rewrites58.5%
if -5.40000000000000005e217 < y < 4.2000000000000003e29Initial program 88.8%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f6452.7
Applied rewrites52.7%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lift-*.f64N/A
lower-fma.f6455.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6455.0
Applied rewrites55.0%
if 4.2000000000000003e29 < y Initial program 80.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6438.3
Applied rewrites38.3%
Applied rewrites46.0%
Final simplification53.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* (* z t) (* 18.0 x)) y)))
(if (<= y -5.4e+217)
t_1
(if (<= y 4.2e+29) (fma (* j -27.0) k (* b c)) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((z * t) * (18.0 * x)) * y;
double tmp;
if (y <= -5.4e+217) {
tmp = t_1;
} else if (y <= 4.2e+29) {
tmp = fma((j * -27.0), k, (b * c));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(z * t) * Float64(18.0 * x)) * y) tmp = 0.0 if (y <= -5.4e+217) tmp = t_1; elseif (y <= 4.2e+29) tmp = fma(Float64(j * -27.0), k, Float64(b * c)); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(z * t), $MachinePrecision] * N[(18.0 * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -5.4e+217], t$95$1, If[LessEqual[y, 4.2e+29], N[(N[(j * -27.0), $MachinePrecision] * k + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(z \cdot t\right) \cdot \left(18 \cdot x\right)\right) \cdot y\\
\mathbf{if}\;y \leq -5.4 \cdot 10^{+217}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+29}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.40000000000000005e217 or 4.2000000000000003e29 < y Initial program 75.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6440.9
Applied rewrites40.9%
Applied rewrites48.9%
if -5.40000000000000005e217 < y < 4.2000000000000003e29Initial program 88.8%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f6452.7
Applied rewrites52.7%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lift-*.f64N/A
lower-fma.f6455.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6455.0
Applied rewrites55.0%
Final simplification53.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= x 8.5e+155) (fma (* k -27.0) j (* b c)) (* -4.0 (* x i))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= 8.5e+155) {
tmp = fma((k * -27.0), j, (b * c));
} else {
tmp = -4.0 * (x * i);
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= 8.5e+155) tmp = fma(Float64(k * -27.0), j, Float64(b * c)); else tmp = Float64(-4.0 * Float64(x * i)); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, 8.5e+155], N[(N[(k * -27.0), $MachinePrecision] * j + N[(b * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.5 \cdot 10^{+155}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if x < 8.5000000000000002e155Initial program 88.1%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f6452.5
Applied rewrites52.5%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lower-fma.f6454.8
Applied rewrites54.8%
if 8.5000000000000002e155 < x Initial program 62.5%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
lower-*.f6448.0
Applied rewrites48.0%
Final simplification53.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 8.5e+155) (fma (* j -27.0) k (* b c)) (* -4.0 (* x i))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= 8.5e+155) {
tmp = fma((j * -27.0), k, (b * c));
} else {
tmp = -4.0 * (x * i);
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= 8.5e+155) tmp = fma(Float64(j * -27.0), k, Float64(b * c)); else tmp = Float64(-4.0 * Float64(x * i)); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, 8.5e+155], N[(N[(j * -27.0), $MachinePrecision] * k + N[(b * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.5 \cdot 10^{+155}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if x < 8.5000000000000002e155Initial program 88.1%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f6452.5
Applied rewrites52.5%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lift-*.f64N/A
lower-fma.f6454.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6454.8
Applied rewrites54.8%
if 8.5000000000000002e155 < x Initial program 62.5%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
lower-*.f6448.0
Applied rewrites48.0%
Final simplification53.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 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 84.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f6428.9
Applied rewrites28.9%
Final simplification28.9%
(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 2024283
(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)))