
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(fma
(* j k)
-27.0
(fma
x
(* i -4.0)
(fma t (fma x (* 18.0 (* z y)) (* a -4.0)) (* b c))))))
(if (<= t -1.5e-17)
t_1
(if (<= t 3.3e+86)
(fma
-4.0
(fma i x (* t a))
(fma b c (fma (* x (* z (* 18.0 t))) y (* k (* j -27.0)))))
t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = fma((j * k), -27.0, fma(x, (i * -4.0), fma(t, fma(x, (18.0 * (z * y)), (a * -4.0)), (b * c))));
double tmp;
if (t <= -1.5e-17) {
tmp = t_1;
} else if (t <= 3.3e+86) {
tmp = fma(-4.0, fma(i, x, (t * a)), fma(b, c, fma((x * (z * (18.0 * t))), y, (k * (j * -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]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = fma(Float64(j * k), -27.0, fma(x, Float64(i * -4.0), fma(t, fma(x, Float64(18.0 * Float64(z * y)), Float64(a * -4.0)), Float64(b * c)))) tmp = 0.0 if (t <= -1.5e-17) tmp = t_1; elseif (t <= 3.3e+86) tmp = fma(-4.0, fma(i, x, Float64(t * a)), fma(b, c, fma(Float64(x * Float64(z * Float64(18.0 * t))), y, Float64(k * Float64(j * -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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * k), $MachinePrecision] * -27.0 + N[(x * N[(i * -4.0), $MachinePrecision] + N[(t * N[(x * N[(18.0 * N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.5e-17], t$95$1, If[LessEqual[t, 3.3e+86], N[(-4.0 * N[(i * x + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(N[(x * N[(z * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(j \cdot k, -27, \mathsf{fma}\left(x, i \cdot -4, \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), a \cdot -4\right), b \cdot c\right)\right)\right)\\
\mathbf{if}\;t \leq -1.5 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{+86}:\\
\;\;\;\;\mathsf{fma}\left(-4, \mathsf{fma}\left(i, x, t \cdot a\right), \mathsf{fma}\left(b, c, \mathsf{fma}\left(x \cdot \left(z \cdot \left(18 \cdot t\right)\right), y, k \cdot \left(j \cdot -27\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.50000000000000003e-17 or 3.2999999999999999e86 < t Initial program 88.4%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-eval88.4
lift--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites93.4%
if -1.50000000000000003e-17 < t < 3.2999999999999999e86Initial program 86.3%
Taylor expanded in b around inf
lower-*.f6419.7
Applied rewrites19.7%
Taylor expanded in x around 0
Applied rewrites97.7%
Final simplification95.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(+ (* b c) (- (* t (* z (* y (* x 18.0)))) (* t (* a 4.0))))
(* i (* x 4.0)))))
(if (<= t_1 -1e+280)
(fma b c (* -4.0 (fma i x (* t a))))
(if (<= t_1 2e+299)
(fma b c (fma -4.0 (* t a) (* j (* k -27.0))))
(* x (fma (* z (* 18.0 t)) y (* i -4.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0));
double tmp;
if (t_1 <= -1e+280) {
tmp = fma(b, c, (-4.0 * fma(i, x, (t * a))));
} else if (t_1 <= 2e+299) {
tmp = fma(b, c, fma(-4.0, (t * a), (j * (k * -27.0))));
} else {
tmp = x * fma((z * (18.0 * t)), y, (i * -4.0));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(b * c) + 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+280) tmp = fma(b, c, Float64(-4.0 * fma(i, x, Float64(t * a)))); elseif (t_1 <= 2e+299) tmp = fma(b, c, fma(-4.0, Float64(t * a), Float64(j * Float64(k * -27.0)))); else tmp = Float64(x * fma(Float64(z * Float64(18.0 * t)), y, Float64(i * -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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(b * c), $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+280], N[(b * c + N[(-4.0 * N[(i * x + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+299], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(z * N[(18.0 * t), $MachinePrecision]), $MachinePrecision] * y + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(b \cdot c + \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^{+280}:\\
\;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \mathsf{fma}\left(i, x, t \cdot a\right)\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+299}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(z \cdot \left(18 \cdot t\right), y, i \cdot -4\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)) < -1e280Initial program 82.2%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
associate-+r+N/A
distribute-neg-inN/A
distribute-lft-outN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6471.7
Applied rewrites71.7%
Taylor expanded in j around 0
Applied rewrites68.6%
if -1e280 < (-.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)) < 2.0000000000000001e299Initial program 99.9%
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-*.f6479.5
Applied rewrites79.5%
if 2.0000000000000001e299 < (-.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 71.0%
Taylor expanded in b around inf
lower-*.f6415.4
Applied rewrites15.4%
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
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6476.8
Applied rewrites76.8%
Final simplification76.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j 27.0))))
(if (<= t_1 -1e+185)
(fma (* k -27.0) j (* t (* a -4.0)))
(if (<= t_1 2e+58)
(fma b c (* -4.0 (fma i x (* t a))))
(if (<= t_1 2e+244)
(- (* -4.0 (* x i)) t_1)
(fma (* k -27.0) j (* b c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (t_1 <= -1e+185) {
tmp = fma((k * -27.0), j, (t * (a * -4.0)));
} else if (t_1 <= 2e+58) {
tmp = fma(b, c, (-4.0 * fma(i, x, (t * a))));
} else if (t_1 <= 2e+244) {
tmp = (-4.0 * (x * i)) - t_1;
} else {
tmp = fma((k * -27.0), j, (b * c));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_1 <= -1e+185) tmp = fma(Float64(k * -27.0), j, Float64(t * Float64(a * -4.0))); elseif (t_1 <= 2e+58) tmp = fma(b, c, Float64(-4.0 * fma(i, x, Float64(t * a)))); elseif (t_1 <= 2e+244) tmp = Float64(Float64(-4.0 * Float64(x * i)) - t_1); else tmp = fma(Float64(k * -27.0), j, 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.
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+185], N[(N[(k * -27.0), $MachinePrecision] * j + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+58], N[(b * c + N[(-4.0 * N[(i * x + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+244], N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(k * -27.0), $MachinePrecision] * j + N[(b * c), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+185}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, t \cdot \left(a \cdot -4\right)\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+58}:\\
\;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \mathsf{fma}\left(i, x, t \cdot a\right)\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+244}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, b \cdot c\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.9999999999999998e184Initial program 83.9%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6473.3
Applied rewrites73.3%
lift--.f64N/A
sub-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
Applied rewrites75.7%
if -9.9999999999999998e184 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.99999999999999989e58Initial program 88.5%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
associate-+r+N/A
distribute-neg-inN/A
distribute-lft-outN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6481.8
Applied rewrites81.8%
Taylor expanded in j around 0
Applied rewrites79.1%
if 1.99999999999999989e58 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.00000000000000015e244Initial program 88.3%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6464.8
Applied rewrites64.8%
if 2.00000000000000015e244 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.2%
Taylor expanded in b around inf
lower-*.f6484.2
Applied rewrites84.2%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6488.1
Applied rewrites88.1%
Final simplification77.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j 27.0))))
(if (<= t_1 -1e+185)
(fma (* k -27.0) j (* t (* a -4.0)))
(if (<= t_1 2e+58)
(fma b c (* -4.0 (fma i x (* t a))))
(if (<= t_1 2e+244)
(fma (* j k) -27.0 (* -4.0 (* x i)))
(fma (* k -27.0) j (* b c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (t_1 <= -1e+185) {
tmp = fma((k * -27.0), j, (t * (a * -4.0)));
} else if (t_1 <= 2e+58) {
tmp = fma(b, c, (-4.0 * fma(i, x, (t * a))));
} else if (t_1 <= 2e+244) {
tmp = fma((j * k), -27.0, (-4.0 * (x * i)));
} else {
tmp = fma((k * -27.0), j, (b * c));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_1 <= -1e+185) tmp = fma(Float64(k * -27.0), j, Float64(t * Float64(a * -4.0))); elseif (t_1 <= 2e+58) tmp = fma(b, c, Float64(-4.0 * fma(i, x, Float64(t * a)))); elseif (t_1 <= 2e+244) tmp = fma(Float64(j * k), -27.0, Float64(-4.0 * Float64(x * i))); else tmp = fma(Float64(k * -27.0), j, 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.
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+185], N[(N[(k * -27.0), $MachinePrecision] * j + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+58], N[(b * c + N[(-4.0 * N[(i * x + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+244], N[(N[(j * k), $MachinePrecision] * -27.0 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(k * -27.0), $MachinePrecision] * j + N[(b * c), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+185}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, t \cdot \left(a \cdot -4\right)\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+58}:\\
\;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \mathsf{fma}\left(i, x, t \cdot a\right)\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+244}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot k, -27, -4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, b \cdot c\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.9999999999999998e184Initial program 83.9%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6473.3
Applied rewrites73.3%
lift--.f64N/A
sub-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
Applied rewrites75.7%
if -9.9999999999999998e184 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.99999999999999989e58Initial program 88.5%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
associate-+r+N/A
distribute-neg-inN/A
distribute-lft-outN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6481.8
Applied rewrites81.8%
Taylor expanded in j around 0
Applied rewrites79.1%
if 1.99999999999999989e58 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.00000000000000015e244Initial program 88.3%
Taylor expanded in b around inf
lower-*.f6433.7
Applied rewrites33.7%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6433.5
Applied rewrites33.5%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6464.7
Applied rewrites64.7%
if 2.00000000000000015e244 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.2%
Taylor expanded in b around inf
lower-*.f6484.2
Applied rewrites84.2%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6488.1
Applied rewrites88.1%
Final simplification77.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* x i))) (t_2 (* k (* j 27.0))))
(if (<= t_2 -4e+165)
(fma (* k -27.0) j (* t (* a -4.0)))
(if (<= t_2 1e+53)
(fma b c t_1)
(if (<= t_2 2e+244)
(fma (* j k) -27.0 t_1)
(fma (* k -27.0) j (* b c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (x * i);
double t_2 = k * (j * 27.0);
double tmp;
if (t_2 <= -4e+165) {
tmp = fma((k * -27.0), j, (t * (a * -4.0)));
} else if (t_2 <= 1e+53) {
tmp = fma(b, c, t_1);
} else if (t_2 <= 2e+244) {
tmp = fma((j * k), -27.0, t_1);
} else {
tmp = fma((k * -27.0), j, (b * c));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(x * i)) t_2 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_2 <= -4e+165) tmp = fma(Float64(k * -27.0), j, Float64(t * Float64(a * -4.0))); elseif (t_2 <= 1e+53) tmp = fma(b, c, t_1); elseif (t_2 <= 2e+244) tmp = fma(Float64(j * k), -27.0, t_1); else tmp = fma(Float64(k * -27.0), j, 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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -4e+165], N[(N[(k * -27.0), $MachinePrecision] * j + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+53], N[(b * c + t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 2e+244], N[(N[(j * k), $MachinePrecision] * -27.0 + t$95$1), $MachinePrecision], N[(N[(k * -27.0), $MachinePrecision] * j + N[(b * c), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i\right)\\
t_2 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_2 \leq -4 \cdot 10^{+165}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, t \cdot \left(a \cdot -4\right)\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+53}:\\
\;\;\;\;\mathsf{fma}\left(b, c, t\_1\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+244}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot k, -27, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, b \cdot c\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -3.9999999999999996e165Initial program 84.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6473.9
Applied rewrites73.9%
lift--.f64N/A
sub-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
Applied rewrites76.2%
if -3.9999999999999996e165 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.9999999999999999e52Initial program 88.3%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
associate-+r+N/A
distribute-neg-inN/A
distribute-lft-outN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6481.5
Applied rewrites81.5%
Taylor expanded in x around inf
Applied rewrites58.7%
if 9.9999999999999999e52 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.00000000000000015e244Initial program 88.9%
Taylor expanded in b around inf
lower-*.f6431.9
Applied rewrites31.9%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6431.7
Applied rewrites31.7%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6461.2
Applied rewrites61.2%
if 2.00000000000000015e244 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.2%
Taylor expanded in b around inf
lower-*.f6484.2
Applied rewrites84.2%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6488.1
Applied rewrites88.1%
Final simplification64.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (fma (* k -27.0) j (* b c)))
(t_2 (* k (* j 27.0)))
(t_3 (* -4.0 (* x i))))
(if (<= t_2 -5e+151)
t_1
(if (<= t_2 1e+53)
(fma b c t_3)
(if (<= t_2 2e+244) (fma (* j k) -27.0 t_3) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = fma((k * -27.0), j, (b * c));
double t_2 = k * (j * 27.0);
double t_3 = -4.0 * (x * i);
double tmp;
if (t_2 <= -5e+151) {
tmp = t_1;
} else if (t_2 <= 1e+53) {
tmp = fma(b, c, t_3);
} else if (t_2 <= 2e+244) {
tmp = fma((j * k), -27.0, t_3);
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = fma(Float64(k * -27.0), j, Float64(b * c)) t_2 = Float64(k * Float64(j * 27.0)) t_3 = Float64(-4.0 * Float64(x * i)) tmp = 0.0 if (t_2 <= -5e+151) tmp = t_1; elseif (t_2 <= 1e+53) tmp = fma(b, c, t_3); elseif (t_2 <= 2e+244) tmp = fma(Float64(j * k), -27.0, t_3); 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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(k * -27.0), $MachinePrecision] * j + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+151], t$95$1, If[LessEqual[t$95$2, 1e+53], N[(b * c + t$95$3), $MachinePrecision], If[LessEqual[t$95$2, 2e+244], N[(N[(j * k), $MachinePrecision] * -27.0 + t$95$3), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(k \cdot -27, j, b \cdot c\right)\\
t_2 := k \cdot \left(j \cdot 27\right)\\
t_3 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+151}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+53}:\\
\;\;\;\;\mathsf{fma}\left(b, c, t\_3\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+244}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot k, -27, t\_3\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.0000000000000002e151 or 2.00000000000000015e244 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.7%
Taylor expanded in b around inf
lower-*.f6474.4
Applied rewrites74.4%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6475.8
Applied rewrites75.8%
if -5.0000000000000002e151 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.9999999999999999e52Initial program 88.1%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
associate-+r+N/A
distribute-neg-inN/A
distribute-lft-outN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6481.8
Applied rewrites81.8%
Taylor expanded in x around inf
Applied rewrites59.0%
if 9.9999999999999999e52 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.00000000000000015e244Initial program 88.9%
Taylor expanded in b around inf
lower-*.f6431.9
Applied rewrites31.9%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6431.7
Applied rewrites31.7%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6461.2
Applied rewrites61.2%
Final simplification64.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= z 4e+30)
(fma
-4.0
(fma i x (* t a))
(fma b c (fma (* x (* z (* 18.0 t))) y (* k (* j -27.0)))))
(-
(fma
(* t (* x (* 18.0 y)))
z
(fma t (* a -4.0) (fma b c (* x (* i -4.0)))))
(* k (* j 27.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= 4e+30) {
tmp = fma(-4.0, fma(i, x, (t * a)), fma(b, c, fma((x * (z * (18.0 * t))), y, (k * (j * -27.0)))));
} else {
tmp = fma((t * (x * (18.0 * y))), z, fma(t, (a * -4.0), fma(b, c, (x * (i * -4.0))))) - (k * (j * 27.0));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (z <= 4e+30) tmp = fma(-4.0, fma(i, x, Float64(t * a)), fma(b, c, fma(Float64(x * Float64(z * Float64(18.0 * t))), y, Float64(k * Float64(j * -27.0))))); 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(i * -4.0))))) - 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. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[z, 4e+30], N[(-4.0 * N[(i * x + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(N[(x * N[(z * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y + N[(k * N[(j * -27.0), $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[(i * -4.0), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 4 \cdot 10^{+30}:\\
\;\;\;\;\mathsf{fma}\left(-4, \mathsf{fma}\left(i, x, t \cdot a\right), \mathsf{fma}\left(b, c, \mathsf{fma}\left(x \cdot \left(z \cdot \left(18 \cdot t\right)\right), y, k \cdot \left(j \cdot -27\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(i \cdot -4\right)\right)\right)\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if z < 4.0000000000000001e30Initial program 89.7%
Taylor expanded in b around inf
lower-*.f6421.2
Applied rewrites21.2%
Taylor expanded in x around 0
Applied rewrites92.4%
if 4.0000000000000001e30 < z Initial program 79.9%
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
lift--.f64N/A
sub-negN/A
associate-+l+N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites93.5%
Final simplification92.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j -27.0)))
(t_2 (fma t (fma x (* 18.0 (* z y)) (* a -4.0)) (fma b c t_1))))
(if (<= t -5.9e+93)
t_2
(if (<= t 2.5e+166)
(fma
-4.0
(fma i x (* t a))
(fma b c (fma (* x (* z (* 18.0 t))) y t_1)))
t_2))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * -27.0);
double t_2 = fma(t, fma(x, (18.0 * (z * y)), (a * -4.0)), fma(b, c, t_1));
double tmp;
if (t <= -5.9e+93) {
tmp = t_2;
} else if (t <= 2.5e+166) {
tmp = fma(-4.0, fma(i, x, (t * a)), fma(b, c, fma((x * (z * (18.0 * t))), y, t_1)));
} else {
tmp = t_2;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) t_2 = fma(t, fma(x, Float64(18.0 * Float64(z * y)), Float64(a * -4.0)), fma(b, c, t_1)) tmp = 0.0 if (t <= -5.9e+93) tmp = t_2; elseif (t <= 2.5e+166) tmp = fma(-4.0, fma(i, x, Float64(t * a)), fma(b, c, fma(Float64(x * Float64(z * Float64(18.0 * t))), y, t_1))); else tmp = t_2; end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(x * N[(18.0 * N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.9e+93], t$95$2, If[LessEqual[t, 2.5e+166], N[(-4.0 * N[(i * x + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(N[(x * N[(z * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
t_2 := \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), a \cdot -4\right), \mathsf{fma}\left(b, c, t\_1\right)\right)\\
\mathbf{if}\;t \leq -5.9 \cdot 10^{+93}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+166}:\\
\;\;\;\;\mathsf{fma}\left(-4, \mathsf{fma}\left(i, x, t \cdot a\right), \mathsf{fma}\left(b, c, \mathsf{fma}\left(x \cdot \left(z \cdot \left(18 \cdot t\right)\right), y, t\_1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -5.90000000000000008e93 or 2.5000000000000001e166 < t Initial program 88.2%
Taylor expanded in b around inf
lower-*.f6419.2
Applied rewrites19.2%
Taylor expanded in i around 0
associate--l+N/A
associate--r+N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate--l+N/A
associate-+r+N/A
+-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-fma.f64N/A
Applied rewrites89.6%
if -5.90000000000000008e93 < t < 2.5000000000000001e166Initial program 86.9%
Taylor expanded in b around inf
lower-*.f6423.0
Applied rewrites23.0%
Taylor expanded in x around 0
Applied rewrites95.1%
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.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j 27.0))))
(if (<= t_1 -5e+151)
(fma j (* k -27.0) (fma a (* t -4.0) (* b c)))
(if (<= t_1 2e+58)
(fma b c (* -4.0 (fma i x (* t a))))
(fma b c (fma -4.0 (* x i) (* j (* k -27.0))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (t_1 <= -5e+151) {
tmp = fma(j, (k * -27.0), fma(a, (t * -4.0), (b * c)));
} else if (t_1 <= 2e+58) {
tmp = fma(b, c, (-4.0 * fma(i, x, (t * a))));
} else {
tmp = fma(b, c, fma(-4.0, (x * i), (j * (k * -27.0))));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_1 <= -5e+151) tmp = fma(j, Float64(k * -27.0), fma(a, Float64(t * -4.0), Float64(b * c))); elseif (t_1 <= 2e+58) tmp = fma(b, c, Float64(-4.0 * fma(i, x, Float64(t * a)))); else tmp = fma(b, c, fma(-4.0, Float64(x * i), Float64(j * Float64(k * -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.
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, -5e+151], N[(j * N[(k * -27.0), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+58], N[(b * c + N[(-4.0 * N[(i * x + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c + N[(-4.0 * N[(x * i), $MachinePrecision] + N[(j * N[(k * -27.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])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+151}:\\
\;\;\;\;\mathsf{fma}\left(j, k \cdot -27, \mathsf{fma}\left(a, t \cdot -4, b \cdot c\right)\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+58}:\\
\;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \mathsf{fma}\left(i, x, t \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, x \cdot i, j \cdot \left(k \cdot -27\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.0000000000000002e151Initial program 84.9%
Taylor expanded in b around inf
lower-*.f6414.3
Applied rewrites14.3%
Taylor expanded in x around 0
Applied rewrites89.2%
Taylor expanded in x around 0
associate--r+N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6476.0
Applied rewrites76.0%
if -5.0000000000000002e151 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.99999999999999989e58Initial program 88.3%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
associate-+r+N/A
distribute-neg-inN/A
distribute-lft-outN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6482.1
Applied rewrites82.1%
Taylor expanded in j around 0
Applied rewrites79.6%
if 1.99999999999999989e58 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 86.5%
Taylor expanded in t 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
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6474.1
Applied rewrites74.1%
Final simplification77.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j 27.0))))
(if (<= t_1 -1e+185)
(fma (* k -27.0) j (* t (* a -4.0)))
(if (<= t_1 2e+58)
(fma b c (* -4.0 (fma i x (* t a))))
(fma b c (fma -4.0 (* x i) (* j (* k -27.0))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (t_1 <= -1e+185) {
tmp = fma((k * -27.0), j, (t * (a * -4.0)));
} else if (t_1 <= 2e+58) {
tmp = fma(b, c, (-4.0 * fma(i, x, (t * a))));
} else {
tmp = fma(b, c, fma(-4.0, (x * i), (j * (k * -27.0))));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_1 <= -1e+185) tmp = fma(Float64(k * -27.0), j, Float64(t * Float64(a * -4.0))); elseif (t_1 <= 2e+58) tmp = fma(b, c, Float64(-4.0 * fma(i, x, Float64(t * a)))); else tmp = fma(b, c, fma(-4.0, Float64(x * i), Float64(j * Float64(k * -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.
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+185], N[(N[(k * -27.0), $MachinePrecision] * j + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+58], N[(b * c + N[(-4.0 * N[(i * x + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c + N[(-4.0 * N[(x * i), $MachinePrecision] + N[(j * N[(k * -27.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])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+185}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, t \cdot \left(a \cdot -4\right)\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+58}:\\
\;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \mathsf{fma}\left(i, x, t \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, x \cdot i, j \cdot \left(k \cdot -27\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.9999999999999998e184Initial program 83.9%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6473.3
Applied rewrites73.3%
lift--.f64N/A
sub-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
Applied rewrites75.7%
if -9.9999999999999998e184 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.99999999999999989e58Initial program 88.5%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
associate-+r+N/A
distribute-neg-inN/A
distribute-lft-outN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6481.8
Applied rewrites81.8%
Taylor expanded in j around 0
Applied rewrites79.1%
if 1.99999999999999989e58 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 86.5%
Taylor expanded in t 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
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6474.1
Applied rewrites74.1%
Final simplification77.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j 27.0))))
(if (<= t_1 -2e+226)
(* j (* k -27.0))
(if (<= t_1 1e-37)
(fma b c (* -4.0 (* t a)))
(if (<= t_1 2e+244) (* -4.0 (* x i)) (* k (* j -27.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (t_1 <= -2e+226) {
tmp = j * (k * -27.0);
} else if (t_1 <= 1e-37) {
tmp = fma(b, c, (-4.0 * (t * a)));
} else if (t_1 <= 2e+244) {
tmp = -4.0 * (x * i);
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_1 <= -2e+226) tmp = Float64(j * Float64(k * -27.0)); elseif (t_1 <= 1e-37) tmp = fma(b, c, Float64(-4.0 * Float64(t * a))); elseif (t_1 <= 2e+244) tmp = Float64(-4.0 * Float64(x * i)); else tmp = 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.
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, -2e+226], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-37], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+244], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+226}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t\_1 \leq 10^{-37}:\\
\;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(t \cdot a\right)\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+244}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.99999999999999992e226Initial program 81.3%
Taylor expanded in j around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6474.3
Applied rewrites74.3%
if -1.99999999999999992e226 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000007e-37Initial program 89.4%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
associate-+r+N/A
distribute-neg-inN/A
distribute-lft-outN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6481.2
Applied rewrites81.2%
Taylor expanded in a around inf
Applied rewrites51.3%
if 1.00000000000000007e-37 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.00000000000000015e244Initial program 86.8%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6442.5
Applied rewrites42.5%
if 2.00000000000000015e244 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.2%
Taylor expanded in b around inf
lower-*.f6414.7
Applied rewrites14.7%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6475.7
Applied rewrites75.7%
Final simplification55.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(fma
t
(fma x (* 18.0 (* z y)) (* a -4.0))
(fma b c (* k (* j -27.0))))))
(if (<= t -8.6e+118)
t_1
(if (<= t 1.5e-36)
(fma (* k -27.0) j (fma -4.0 (fma t a (* x i)) (* b c)))
t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = fma(t, fma(x, (18.0 * (z * y)), (a * -4.0)), fma(b, c, (k * (j * -27.0))));
double tmp;
if (t <= -8.6e+118) {
tmp = t_1;
} else if (t <= 1.5e-36) {
tmp = fma((k * -27.0), j, fma(-4.0, fma(t, a, (x * i)), (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]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = fma(t, fma(x, Float64(18.0 * Float64(z * y)), Float64(a * -4.0)), fma(b, c, Float64(k * Float64(j * -27.0)))) tmp = 0.0 if (t <= -8.6e+118) tmp = t_1; elseif (t <= 1.5e-36) tmp = fma(Float64(k * -27.0), j, fma(-4.0, fma(t, a, Float64(x * i)), 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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(x * N[(18.0 * N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.6e+118], t$95$1, If[LessEqual[t, 1.5e-36], N[(N[(k * -27.0), $MachinePrecision] * j + N[(-4.0 * N[(t * a + N[(x * i), $MachinePrecision]), $MachinePrecision] + 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])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), a \cdot -4\right), \mathsf{fma}\left(b, c, k \cdot \left(j \cdot -27\right)\right)\right)\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{+118}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{-36}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(-4, \mathsf{fma}\left(t, a, x \cdot i\right), b \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.6000000000000006e118 or 1.5000000000000001e-36 < t Initial program 90.5%
Taylor expanded in b around inf
lower-*.f6421.7
Applied rewrites21.7%
Taylor expanded in i around 0
associate--l+N/A
associate--r+N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate--l+N/A
associate-+r+N/A
+-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-fma.f64N/A
Applied rewrites89.9%
if -8.6000000000000006e118 < t < 1.5000000000000001e-36Initial program 84.6%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
associate-+r+N/A
distribute-neg-inN/A
distribute-lft-outN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6489.3
Applied rewrites89.3%
Applied rewrites90.0%
Final simplification90.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= y -7e+165)
(* x (fma (* z (* 18.0 t)) y (* i -4.0)))
(if (<= y 7.4e+39)
(fma (* k -27.0) j (fma -4.0 (fma t a (* x i)) (* b c)))
(- (fma (* t (* x (* 18.0 y))) z (* b c)) (* k (* j 27.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (y <= -7e+165) {
tmp = x * fma((z * (18.0 * t)), y, (i * -4.0));
} else if (y <= 7.4e+39) {
tmp = fma((k * -27.0), j, fma(-4.0, fma(t, a, (x * i)), (b * c)));
} else {
tmp = fma((t * (x * (18.0 * y))), z, (b * c)) - (k * (j * 27.0));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (y <= -7e+165) tmp = Float64(x * fma(Float64(z * Float64(18.0 * t)), y, Float64(i * -4.0))); elseif (y <= 7.4e+39) tmp = fma(Float64(k * -27.0), j, fma(-4.0, fma(t, a, Float64(x * i)), Float64(b * c))); else tmp = Float64(fma(Float64(t * Float64(x * Float64(18.0 * y))), z, Float64(b * c)) - 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. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[y, -7e+165], N[(x * N[(N[(z * N[(18.0 * t), $MachinePrecision]), $MachinePrecision] * y + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.4e+39], N[(N[(k * -27.0), $MachinePrecision] * j + N[(-4.0 * N[(t * a + N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * z + N[(b * c), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+165}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(z \cdot \left(18 \cdot t\right), y, i \cdot -4\right)\\
\mathbf{elif}\;y \leq 7.4 \cdot 10^{+39}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(-4, \mathsf{fma}\left(t, a, x \cdot i\right), b \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot \left(x \cdot \left(18 \cdot y\right)\right), z, b \cdot c\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if y < -6.99999999999999991e165Initial program 80.3%
Taylor expanded in b around inf
lower-*.f6414.5
Applied rewrites14.5%
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
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6469.0
Applied rewrites69.0%
if -6.99999999999999991e165 < y < 7.40000000000000025e39Initial program 91.7%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
associate-+r+N/A
distribute-neg-inN/A
distribute-lft-outN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6487.6
Applied rewrites87.6%
Applied rewrites88.2%
if 7.40000000000000025e39 < y Initial program 78.6%
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 rewrites78.6%
Taylor expanded in b around inf
lower-*.f6468.5
Applied rewrites68.5%
Final simplification81.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (fma (* k -27.0) j (* b c))) (t_2 (* k (* j 27.0))))
(if (<= t_2 -5e+151)
t_1
(if (<= t_2 5e+249) (fma b c (* -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);
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, (b * c));
double t_2 = k * (j * 27.0);
double tmp;
if (t_2 <= -5e+151) {
tmp = t_1;
} else if (t_2 <= 5e+249) {
tmp = fma(b, c, (-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]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = fma(Float64(k * -27.0), j, Float64(b * c)) t_2 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_2 <= -5e+151) tmp = t_1; elseif (t_2 <= 5e+249) tmp = fma(b, c, 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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(k * -27.0), $MachinePrecision] * j + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+151], t$95$1, If[LessEqual[t$95$2, 5e+249], N[(b * c + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(k \cdot -27, j, b \cdot c\right)\\
t_2 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+151}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+249}:\\
\;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.0000000000000002e151 or 4.9999999999999996e249 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.2%
Taylor expanded in b around inf
lower-*.f6475.2
Applied rewrites75.2%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6476.6
Applied rewrites76.6%
if -5.0000000000000002e151 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.9999999999999996e249Initial program 88.4%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
associate-+r+N/A
distribute-neg-inN/A
distribute-lft-outN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6481.0
Applied rewrites81.0%
Taylor expanded in x around inf
Applied rewrites55.7%
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.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (fma (* j k) -27.0 (* b c))) (t_2 (* k (* j 27.0))))
(if (<= t_2 -5e+151)
t_1
(if (<= t_2 5e+249) (fma b c (* -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);
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 * k), -27.0, (b * c));
double t_2 = k * (j * 27.0);
double tmp;
if (t_2 <= -5e+151) {
tmp = t_1;
} else if (t_2 <= 5e+249) {
tmp = fma(b, c, (-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]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = fma(Float64(j * k), -27.0, Float64(b * c)) t_2 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_2 <= -5e+151) tmp = t_1; elseif (t_2 <= 5e+249) tmp = fma(b, c, 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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * k), $MachinePrecision] * -27.0 + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+151], t$95$1, If[LessEqual[t$95$2, 5e+249], N[(b * c + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(j \cdot k, -27, b \cdot c\right)\\
t_2 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+151}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+249}:\\
\;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.0000000000000002e151 or 4.9999999999999996e249 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.2%
Taylor expanded in b around inf
lower-*.f6475.2
Applied rewrites75.2%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6475.1
Applied rewrites75.1%
if -5.0000000000000002e151 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.9999999999999996e249Initial program 88.4%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
associate-+r+N/A
distribute-neg-inN/A
distribute-lft-outN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6481.0
Applied rewrites81.0%
Taylor expanded in x around inf
Applied rewrites55.7%
Final simplification60.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j 27.0))))
(if (<= t_1 -1e+185)
(* j (* k -27.0))
(if (<= t_1 5e+249) (fma b c (* -4.0 (* x i))) (* k (* j -27.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (t_1 <= -1e+185) {
tmp = j * (k * -27.0);
} else if (t_1 <= 5e+249) {
tmp = fma(b, c, (-4.0 * (x * i)));
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_1 <= -1e+185) tmp = Float64(j * Float64(k * -27.0)); elseif (t_1 <= 5e+249) tmp = fma(b, c, Float64(-4.0 * Float64(x * i))); else tmp = 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.
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+185], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+249], N[(b * c + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+185}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+249}:\\
\;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.9999999999999998e184Initial program 83.9%
Taylor expanded in j around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6468.2
Applied rewrites68.2%
if -9.9999999999999998e184 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.9999999999999996e249Initial program 88.6%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
associate-+r+N/A
distribute-neg-inN/A
distribute-lft-outN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6480.8
Applied rewrites80.8%
Taylor expanded in x around inf
Applied rewrites55.2%
if 4.9999999999999996e249 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 82.8%
Taylor expanded in b around inf
lower-*.f6411.4
Applied rewrites11.4%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6481.9
Applied rewrites81.9%
Final simplification59.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (fma (* z (* 18.0 t)) y (* i -4.0)))))
(if (<= y -7e+165)
t_1
(if (<= y 2.8e+52)
(fma (* k -27.0) j (fma -4.0 (fma t a (* x i)) (* b c)))
t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * fma((z * (18.0 * t)), y, (i * -4.0));
double tmp;
if (y <= -7e+165) {
tmp = t_1;
} else if (y <= 2.8e+52) {
tmp = fma((k * -27.0), j, fma(-4.0, fma(t, a, (x * i)), (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]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * fma(Float64(z * Float64(18.0 * t)), y, Float64(i * -4.0))) tmp = 0.0 if (y <= -7e+165) tmp = t_1; elseif (y <= 2.8e+52) tmp = fma(Float64(k * -27.0), j, fma(-4.0, fma(t, a, Float64(x * i)), 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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(z * N[(18.0 * t), $MachinePrecision]), $MachinePrecision] * y + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7e+165], t$95$1, If[LessEqual[y, 2.8e+52], N[(N[(k * -27.0), $MachinePrecision] * j + N[(-4.0 * N[(t * a + N[(x * i), $MachinePrecision]), $MachinePrecision] + 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])\\
\\
\begin{array}{l}
t_1 := x \cdot \mathsf{fma}\left(z \cdot \left(18 \cdot t\right), y, i \cdot -4\right)\\
\mathbf{if}\;y \leq -7 \cdot 10^{+165}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+52}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(-4, \mathsf{fma}\left(t, a, x \cdot i\right), b \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.99999999999999991e165 or 2.8e52 < y Initial program 80.2%
Taylor expanded in b around inf
lower-*.f6412.5
Applied rewrites12.5%
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
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6464.3
Applied rewrites64.3%
if -6.99999999999999991e165 < y < 2.8e52Initial program 90.8%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
associate-+r+N/A
distribute-neg-inN/A
distribute-lft-outN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6487.8
Applied rewrites87.8%
Applied rewrites88.4%
Final simplification80.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (fma (* z (* 18.0 t)) y (* i -4.0)))))
(if (<= y -7e+165)
t_1
(if (<= y 2.8e+52)
(fma b c (fma -4.0 (fma a t (* x i)) (* 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);
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((z * (18.0 * t)), y, (i * -4.0));
double tmp;
if (y <= -7e+165) {
tmp = t_1;
} else if (y <= 2.8e+52) {
tmp = fma(b, c, fma(-4.0, fma(a, t, (x * i)), (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]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * fma(Float64(z * Float64(18.0 * t)), y, Float64(i * -4.0))) tmp = 0.0 if (y <= -7e+165) tmp = t_1; elseif (y <= 2.8e+52) tmp = fma(b, c, fma(-4.0, fma(a, t, Float64(x * i)), 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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(z * N[(18.0 * t), $MachinePrecision]), $MachinePrecision] * y + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7e+165], t$95$1, If[LessEqual[y, 2.8e+52], N[(b * c + N[(-4.0 * N[(a * t + N[(x * i), $MachinePrecision]), $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])\\
\\
\begin{array}{l}
t_1 := x \cdot \mathsf{fma}\left(z \cdot \left(18 \cdot t\right), y, i \cdot -4\right)\\
\mathbf{if}\;y \leq -7 \cdot 10^{+165}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+52}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, \mathsf{fma}\left(a, t, x \cdot i\right), j \cdot \left(k \cdot -27\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.99999999999999991e165 or 2.8e52 < y Initial program 80.2%
Taylor expanded in b around inf
lower-*.f6412.5
Applied rewrites12.5%
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
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6464.3
Applied rewrites64.3%
if -6.99999999999999991e165 < y < 2.8e52Initial program 90.8%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
associate-+r+N/A
distribute-neg-inN/A
distribute-lft-outN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6487.8
Applied rewrites87.8%
Final simplification80.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j 27.0))))
(if (<= t_1 -4e+165)
(* j (* k -27.0))
(if (<= t_1 2e+244) (* -4.0 (* x i)) (* k (* j -27.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (t_1 <= -4e+165) {
tmp = j * (k * -27.0);
} else if (t_1 <= 2e+244) {
tmp = -4.0 * (x * i);
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = k * (j * 27.0d0)
if (t_1 <= (-4d+165)) then
tmp = j * (k * (-27.0d0))
else if (t_1 <= 2d+244) then
tmp = (-4.0d0) * (x * i)
else
tmp = k * (j * (-27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (t_1 <= -4e+165) {
tmp = j * (k * -27.0);
} else if (t_1 <= 2e+244) {
tmp = -4.0 * (x * i);
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * 27.0) tmp = 0 if t_1 <= -4e+165: tmp = j * (k * -27.0) elif t_1 <= 2e+244: tmp = -4.0 * (x * i) else: tmp = k * (j * -27.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_1 <= -4e+165) tmp = Float64(j * Float64(k * -27.0)); elseif (t_1 <= 2e+244) tmp = Float64(-4.0 * Float64(x * i)); else tmp = Float64(k * Float64(j * -27.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * 27.0);
tmp = 0.0;
if (t_1 <= -4e+165)
tmp = j * (k * -27.0);
elseif (t_1 <= 2e+244)
tmp = -4.0 * (x * i);
else
tmp = k * (j * -27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+165], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+244], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+165}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+244}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -3.9999999999999996e165Initial program 84.2%
Taylor expanded in j around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6466.8
Applied rewrites66.8%
if -3.9999999999999996e165 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.00000000000000015e244Initial program 88.4%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6433.9
Applied rewrites33.9%
if 2.00000000000000015e244 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.2%
Taylor expanded in b around inf
lower-*.f6414.7
Applied rewrites14.7%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6475.7
Applied rewrites75.7%
Final simplification43.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (let* ((t_1 (* j (* k -27.0))) (t_2 (* k (* j 27.0)))) (if (<= t_2 -4e+165) t_1 (if (<= t_2 2e+244) (* -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);
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 = k * (j * 27.0);
double tmp;
if (t_2 <= -4e+165) {
tmp = t_1;
} else if (t_2 <= 2e+244) {
tmp = -4.0 * (x * i);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = k * (j * 27.0d0)
if (t_2 <= (-4d+165)) then
tmp = t_1
else if (t_2 <= 2d+244) then
tmp = (-4.0d0) * (x * i)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = k * (j * 27.0);
double tmp;
if (t_2 <= -4e+165) {
tmp = t_1;
} else if (t_2 <= 2e+244) {
tmp = -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]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = k * (j * 27.0) tmp = 0 if t_2 <= -4e+165: tmp = t_1 elif t_2 <= 2e+244: tmp = -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]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_2 <= -4e+165) tmp = t_1; elseif (t_2 <= 2e+244) tmp = Float64(-4.0 * Float64(x * i)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = k * (j * 27.0);
tmp = 0.0;
if (t_2 <= -4e+165)
tmp = t_1;
elseif (t_2 <= 2e+244)
tmp = -4.0 * (x * i);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -4e+165], t$95$1, If[LessEqual[t$95$2, 2e+244], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_2 \leq -4 \cdot 10^{+165}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+244}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -3.9999999999999996e165 or 2.00000000000000015e244 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.2%
Taylor expanded in j around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6470.0
Applied rewrites70.0%
if -3.9999999999999996e165 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.00000000000000015e244Initial program 88.4%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6433.9
Applied rewrites33.9%
Final simplification43.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= (* b c) -5e+62) (* b c) (if (<= (* b c) 4e+225) (* -4.0 (* t a)) (* b c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -5e+62) {
tmp = b * c;
} else if ((b * c) <= 4e+225) {
tmp = -4.0 * (t * a);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-5d+62)) then
tmp = b * c
else if ((b * c) <= 4d+225) then
tmp = (-4.0d0) * (t * a)
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -5e+62) {
tmp = b * c;
} else if ((b * c) <= 4e+225) {
tmp = -4.0 * (t * a);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -5e+62: tmp = b * c elif (b * c) <= 4e+225: tmp = -4.0 * (t * a) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -5e+62) tmp = Float64(b * c); elseif (Float64(b * c) <= 4e+225) tmp = Float64(-4.0 * Float64(t * a)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -5e+62)
tmp = b * c;
elseif ((b * c) <= 4e+225)
tmp = -4.0 * (t * a);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -5e+62], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4e+225], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+62}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 4 \cdot 10^{+225}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -5.00000000000000029e62 or 3.99999999999999971e225 < (*.f64 b c) Initial program 88.5%
Taylor expanded in b around inf
lower-*.f6454.8
Applied rewrites54.8%
if -5.00000000000000029e62 < (*.f64 b c) < 3.99999999999999971e225Initial program 86.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6425.6
Applied rewrites25.6%
Final simplification34.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* x i))))
(if (<= i -6.5e+108)
t_1
(if (<= i -8.2e-268) (* b c) (if (<= i 1050.0) (* -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);
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 (i <= -6.5e+108) {
tmp = t_1;
} else if (i <= -8.2e-268) {
tmp = b * c;
} else if (i <= 1050.0) {
tmp = -4.0 * (t * a);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (x * i)
if (i <= (-6.5d+108)) then
tmp = t_1
else if (i <= (-8.2d-268)) then
tmp = b * c
else if (i <= 1050.0d0) then
tmp = (-4.0d0) * (t * a)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (x * i);
double tmp;
if (i <= -6.5e+108) {
tmp = t_1;
} else if (i <= -8.2e-268) {
tmp = b * c;
} else if (i <= 1050.0) {
tmp = -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]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * (x * i) tmp = 0 if i <= -6.5e+108: tmp = t_1 elif i <= -8.2e-268: tmp = b * c elif i <= 1050.0: tmp = -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]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(x * i)) tmp = 0.0 if (i <= -6.5e+108) tmp = t_1; elseif (i <= -8.2e-268) tmp = Float64(b * c); elseif (i <= 1050.0) tmp = Float64(-4.0 * Float64(t * a)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * (x * i);
tmp = 0.0;
if (i <= -6.5e+108)
tmp = t_1;
elseif (i <= -8.2e-268)
tmp = b * c;
elseif (i <= 1050.0)
tmp = -4.0 * (t * a);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -6.5e+108], t$95$1, If[LessEqual[i, -8.2e-268], N[(b * c), $MachinePrecision], If[LessEqual[i, 1050.0], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;i \leq -6.5 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq -8.2 \cdot 10^{-268}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;i \leq 1050:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -6.4999999999999996e108 or 1050 < i Initial program 87.4%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6452.8
Applied rewrites52.8%
if -6.4999999999999996e108 < i < -8.1999999999999998e-268Initial program 82.5%
Taylor expanded in b around inf
lower-*.f6436.2
Applied rewrites36.2%
if -8.1999999999999998e-268 < i < 1050Initial program 90.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6429.6
Applied rewrites29.6%
Final simplification40.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 87.3%
Taylor expanded in b around inf
lower-*.f6421.9
Applied rewrites21.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 2024219
(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)))