
(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 25 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* x 18.0) y))
(t_2 (* (* j 27.0) k))
(t_3
(-
(fma
(* (* x 18.0) t)
(* y z)
(fma t (* a -4.0) (fma b c (* -4.0 (* x i)))))
t_2))
(t_4
(-
(- (+ (- (* (* t_1 z) t) (* t (* a 4.0))) (* b c)) (* (* x 4.0) i))
t_2)))
(if (<= t_4 (- INFINITY))
t_3
(if (<= t_4 1e+283)
t_4
(if (<= t_4 INFINITY) t_3 (* t (fma t_1 z (* a -4.0))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * 18.0) * y;
double t_2 = (j * 27.0) * k;
double t_3 = fma(((x * 18.0) * t), (y * z), fma(t, (a * -4.0), fma(b, c, (-4.0 * (x * i))))) - t_2;
double t_4 = (((((t_1 * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - t_2;
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_4 <= 1e+283) {
tmp = t_4;
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = t * fma(t_1, z, (a * -4.0));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(x * 18.0) * y) t_2 = Float64(Float64(j * 27.0) * k) t_3 = Float64(fma(Float64(Float64(x * 18.0) * t), Float64(y * z), fma(t, Float64(a * -4.0), fma(b, c, Float64(-4.0 * Float64(x * i))))) - t_2) t_4 = Float64(Float64(Float64(Float64(Float64(Float64(t_1 * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - t_2) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_3; elseif (t_4 <= 1e+283) tmp = t_4; elseif (t_4 <= Inf) tmp = t_3; else tmp = Float64(t * fma(t_1, z, Float64(a * -4.0))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(x * 18.0), $MachinePrecision] * t), $MachinePrecision] * N[(y * z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision] + N[(b * c + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(N[(N[(t$95$1 * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$3, If[LessEqual[t$95$4, 1e+283], t$95$4, If[LessEqual[t$95$4, Infinity], t$95$3, N[(t * N[(t$95$1 * z + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 18\right) \cdot y\\
t_2 := \left(j \cdot 27\right) \cdot k\\
t_3 := \mathsf{fma}\left(\left(x \cdot 18\right) \cdot t, y \cdot z, \mathsf{fma}\left(t, a \cdot -4, \mathsf{fma}\left(b, c, -4 \cdot \left(x \cdot i\right)\right)\right)\right) - t\_2\\
t_4 := \left(\left(\left(\left(t\_1 \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - t\_2\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_4 \leq 10^{+283}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(t\_1, z, a \cdot -4\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < -inf.0 or 9.99999999999999955e282 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 88.5%
associate--l+N/A
sub-negN/A
associate-+l+N/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Applied egg-rr95.7%
if -inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < 9.99999999999999955e282Initial program 99.8%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Taylor expanded in t around inf
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6445.8
Simplified45.8%
+-commutativeN/A
associate-*r*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6445.7
Applied egg-rr45.7%
Final simplification91.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 (* (* x 18.0) y)) (t_2 (* (* j 27.0) k)))
(if (<=
(-
(- (+ (- (* (* t_1 z) t) (* t (* a 4.0))) (* b c)) (* (* x 4.0) i))
t_2)
INFINITY)
(-
(fma
(* (* x 18.0) t)
(* y z)
(fma t (* a -4.0) (fma b c (* -4.0 (* x i)))))
t_2)
(* t (fma t_1 z (* a -4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * 18.0) * y;
double t_2 = (j * 27.0) * k;
double tmp;
if (((((((t_1 * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - t_2) <= ((double) INFINITY)) {
tmp = fma(((x * 18.0) * t), (y * z), fma(t, (a * -4.0), fma(b, c, (-4.0 * (x * i))))) - t_2;
} else {
tmp = t * fma(t_1, z, (a * -4.0));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(x * 18.0) * y) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(t_1 * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - t_2) <= Inf) tmp = Float64(fma(Float64(Float64(x * 18.0) * t), Float64(y * z), fma(t, Float64(a * -4.0), fma(b, c, Float64(-4.0 * Float64(x * i))))) - t_2); else tmp = Float64(t * fma(t_1, z, Float64(a * -4.0))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(t$95$1 * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], Infinity], N[(N[(N[(N[(x * 18.0), $MachinePrecision] * t), $MachinePrecision] * N[(y * z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision] + N[(b * c + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], N[(t * N[(t$95$1 * z + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 18\right) \cdot y\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;\left(\left(\left(\left(t\_1 \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - t\_2 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(\left(x \cdot 18\right) \cdot t, y \cdot z, \mathsf{fma}\left(t, a \cdot -4, \mathsf{fma}\left(b, c, -4 \cdot \left(x \cdot i\right)\right)\right)\right) - t\_2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(t\_1, z, a \cdot -4\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 94.0%
associate--l+N/A
sub-negN/A
associate-+l+N/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Applied egg-rr93.9%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Taylor expanded in t around inf
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6445.8
Simplified45.8%
+-commutativeN/A
associate-*r*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6445.7
Applied egg-rr45.7%
Final simplification88.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* x 18.0) y)))
(if (<=
(-
(- (+ (- (* (* t_1 z) t) (* t (* a 4.0))) (* b c)) (* (* x 4.0) i))
(* (* j 27.0) k))
INFINITY)
(fma
(* j k)
-27.0
(fma t (fma x (* 18.0 (* y z)) (* a -4.0)) (fma b c (* -4.0 (* x i)))))
(* t (fma t_1 z (* a -4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * 18.0) * y;
double tmp;
if (((((((t_1 * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= ((double) INFINITY)) {
tmp = fma((j * k), -27.0, fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), fma(b, c, (-4.0 * (x * i)))));
} else {
tmp = t * fma(t_1, z, (a * -4.0));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(x * 18.0) * y) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(t_1 * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) <= Inf) tmp = fma(Float64(j * k), -27.0, fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0)), fma(b, c, Float64(-4.0 * Float64(x * i))))); else tmp = Float64(t * fma(t_1, z, Float64(a * -4.0))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(t$95$1 * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(j * k), $MachinePrecision] * -27.0 + N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(t$95$1 * z + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 18\right) \cdot y\\
\mathbf{if}\;\left(\left(\left(\left(t\_1 \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(j \cdot k, -27, \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, -4 \cdot \left(x \cdot i\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(t\_1, z, a \cdot -4\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 94.0%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr93.2%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Taylor expanded in t around inf
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6445.8
Simplified45.8%
+-commutativeN/A
associate-*r*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6445.7
Applied egg-rr45.7%
Final simplification87.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= t_1 -4e+14)
(- (* -4.0 (* x i)) t_1)
(if (<= t_1 -1e-310)
(fma b c (* -4.0 (* t a)))
(if (<= t_1 1e-68)
(fma -4.0 (* x i) (* b c))
(if (<= t_1 1e+94)
(* 18.0 (* y (* x (* z t))))
(fma (* j -27.0) k (* b c))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -4e+14) {
tmp = (-4.0 * (x * i)) - t_1;
} else if (t_1 <= -1e-310) {
tmp = fma(b, c, (-4.0 * (t * a)));
} else if (t_1 <= 1e-68) {
tmp = fma(-4.0, (x * i), (b * c));
} else if (t_1 <= 1e+94) {
tmp = 18.0 * (y * (x * (z * t)));
} else {
tmp = fma((j * -27.0), k, (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(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -4e+14) tmp = Float64(Float64(-4.0 * Float64(x * i)) - t_1); elseif (t_1 <= -1e-310) tmp = fma(b, c, Float64(-4.0 * Float64(t * a))); elseif (t_1 <= 1e-68) tmp = fma(-4.0, Float64(x * i), Float64(b * c)); elseif (t_1 <= 1e+94) tmp = Float64(18.0 * Float64(y * Float64(x * Float64(z * t)))); else tmp = fma(Float64(j * -27.0), k, 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[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+14], N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$1, -1e-310], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-68], N[(-4.0 * N[(x * i), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+94], N[(18.0 * N[(y * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * -27.0), $MachinePrecision] * k + 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 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+14}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right) - t\_1\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(t \cdot a\right)\right)\\
\mathbf{elif}\;t\_1 \leq 10^{-68}:\\
\;\;\;\;\mathsf{fma}\left(-4, x \cdot i, b \cdot c\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+94}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(x \cdot \left(z \cdot t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, b \cdot c\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4e14Initial program 72.1%
Taylor expanded in i around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6459.0
Simplified59.0%
if -4e14 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.999999999999969e-311Initial program 90.0%
Taylor expanded in x around 0
sub-negN/A
accelerator-lowering-fma.f64N/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6460.7
Simplified60.7%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6456.9
Simplified56.9%
if -9.999999999999969e-311 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000007e-68Initial program 85.2%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr94.1%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6467.6
Simplified67.6%
Taylor expanded in k around 0
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6464.8
Simplified64.8%
if 1.00000000000000007e-68 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1e94Initial program 94.1%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr94.0%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6449.8
Simplified49.8%
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6449.8
Applied egg-rr49.8%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6452.7
Applied egg-rr52.7%
if 1e94 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 73.3%
Taylor expanded in b around inf
*-lowering-*.f6465.2
Simplified65.2%
sub-negN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-commutativeN/A
associate-*l*N/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6467.6
Applied egg-rr67.6%
Final simplification60.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= t_1 -4e+14)
(fma (* j k) -27.0 (* -4.0 (* x i)))
(if (<= t_1 -1e-310)
(fma b c (* -4.0 (* t a)))
(if (<= t_1 1e-68)
(fma -4.0 (* x i) (* b c))
(if (<= t_1 1e+94)
(* 18.0 (* y (* x (* z t))))
(fma (* j -27.0) k (* b c))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -4e+14) {
tmp = fma((j * k), -27.0, (-4.0 * (x * i)));
} else if (t_1 <= -1e-310) {
tmp = fma(b, c, (-4.0 * (t * a)));
} else if (t_1 <= 1e-68) {
tmp = fma(-4.0, (x * i), (b * c));
} else if (t_1 <= 1e+94) {
tmp = 18.0 * (y * (x * (z * t)));
} else {
tmp = fma((j * -27.0), k, (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(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -4e+14) tmp = fma(Float64(j * k), -27.0, Float64(-4.0 * Float64(x * i))); elseif (t_1 <= -1e-310) tmp = fma(b, c, Float64(-4.0 * Float64(t * a))); elseif (t_1 <= 1e-68) tmp = fma(-4.0, Float64(x * i), Float64(b * c)); elseif (t_1 <= 1e+94) tmp = Float64(18.0 * Float64(y * Float64(x * Float64(z * t)))); else tmp = fma(Float64(j * -27.0), k, 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[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+14], N[(N[(j * k), $MachinePrecision] * -27.0 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-310], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-68], N[(-4.0 * N[(x * i), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+94], N[(18.0 * N[(y * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * -27.0), $MachinePrecision] * k + 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 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+14}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot k, -27, -4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(t \cdot a\right)\right)\\
\mathbf{elif}\;t\_1 \leq 10^{-68}:\\
\;\;\;\;\mathsf{fma}\left(-4, x \cdot i, b \cdot c\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+94}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(x \cdot \left(z \cdot t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, b \cdot c\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4e14Initial program 72.1%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr75.6%
Taylor expanded in i around inf
*-lowering-*.f64N/A
*-lowering-*.f6459.0
Simplified59.0%
if -4e14 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.999999999999969e-311Initial program 90.0%
Taylor expanded in x around 0
sub-negN/A
accelerator-lowering-fma.f64N/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6460.7
Simplified60.7%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6456.9
Simplified56.9%
if -9.999999999999969e-311 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000007e-68Initial program 85.2%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr94.1%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6467.6
Simplified67.6%
Taylor expanded in k around 0
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6464.8
Simplified64.8%
if 1.00000000000000007e-68 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1e94Initial program 94.1%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr94.0%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6449.8
Simplified49.8%
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6449.8
Applied egg-rr49.8%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6452.7
Applied egg-rr52.7%
if 1e94 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 73.3%
Taylor expanded in b around inf
*-lowering-*.f6465.2
Simplified65.2%
sub-negN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-commutativeN/A
associate-*l*N/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6467.6
Applied egg-rr67.6%
Final simplification60.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 (fma (* j -27.0) k (* b c))) (t_2 (* (* j 27.0) k)))
(if (<= t_2 -2e+230)
t_1
(if (<= t_2 -1e-310)
(fma b c (* -4.0 (* t a)))
(if (<= t_2 1e-68)
(fma -4.0 (* x i) (* b c))
(if (<= t_2 1e+94) (* 18.0 (* y (* x (* z t)))) 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 * -27.0), k, (b * c));
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -2e+230) {
tmp = t_1;
} else if (t_2 <= -1e-310) {
tmp = fma(b, c, (-4.0 * (t * a)));
} else if (t_2 <= 1e-68) {
tmp = fma(-4.0, (x * i), (b * c));
} else if (t_2 <= 1e+94) {
tmp = 18.0 * (y * (x * (z * t)));
} 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 * -27.0), k, Float64(b * c)) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -2e+230) tmp = t_1; elseif (t_2 <= -1e-310) tmp = fma(b, c, Float64(-4.0 * Float64(t * a))); elseif (t_2 <= 1e-68) tmp = fma(-4.0, Float64(x * i), Float64(b * c)); elseif (t_2 <= 1e+94) tmp = Float64(18.0 * Float64(y * Float64(x * Float64(z * t)))); 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 * -27.0), $MachinePrecision] * k + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+230], t$95$1, If[LessEqual[t$95$2, -1e-310], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e-68], N[(-4.0 * N[(x * i), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+94], N[(18.0 * N[(y * N[(x * N[(z * t), $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 -27, k, b \cdot c\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+230}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(t \cdot a\right)\right)\\
\mathbf{elif}\;t\_2 \leq 10^{-68}:\\
\;\;\;\;\mathsf{fma}\left(-4, x \cdot i, b \cdot c\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+94}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(x \cdot \left(z \cdot t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.0000000000000002e230 or 1e94 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 73.5%
Taylor expanded in b around inf
*-lowering-*.f6467.1
Simplified67.1%
sub-negN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-commutativeN/A
associate-*l*N/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6470.2
Applied egg-rr70.2%
if -2.0000000000000002e230 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.999999999999969e-311Initial program 83.0%
Taylor expanded in x around 0
sub-negN/A
accelerator-lowering-fma.f64N/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6457.2
Simplified57.2%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6448.6
Simplified48.6%
if -9.999999999999969e-311 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000007e-68Initial program 85.2%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr94.1%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6467.6
Simplified67.6%
Taylor expanded in k around 0
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6464.8
Simplified64.8%
if 1.00000000000000007e-68 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1e94Initial program 94.1%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr94.0%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6449.8
Simplified49.8%
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6449.8
Applied egg-rr49.8%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6452.7
Applied egg-rr52.7%
Final simplification58.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (fma (* j -27.0) k (* b c))) (t_2 (* (* j 27.0) k)))
(if (<= t_2 -2e+230)
t_1
(if (<= t_2 -1e-310)
(fma b c (* -4.0 (* t a)))
(if (<= t_2 2e-28)
(fma -4.0 (* x i) (* b c))
(if (<= t_2 1e+94) (* (* z (* 18.0 y)) (* x t)) 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 * -27.0), k, (b * c));
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -2e+230) {
tmp = t_1;
} else if (t_2 <= -1e-310) {
tmp = fma(b, c, (-4.0 * (t * a)));
} else if (t_2 <= 2e-28) {
tmp = fma(-4.0, (x * i), (b * c));
} else if (t_2 <= 1e+94) {
tmp = (z * (18.0 * y)) * (x * t);
} 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 * -27.0), k, Float64(b * c)) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -2e+230) tmp = t_1; elseif (t_2 <= -1e-310) tmp = fma(b, c, Float64(-4.0 * Float64(t * a))); elseif (t_2 <= 2e-28) tmp = fma(-4.0, Float64(x * i), Float64(b * c)); elseif (t_2 <= 1e+94) tmp = Float64(Float64(z * Float64(18.0 * y)) * Float64(x * t)); 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 * -27.0), $MachinePrecision] * k + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+230], t$95$1, If[LessEqual[t$95$2, -1e-310], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e-28], N[(-4.0 * N[(x * i), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+94], N[(N[(z * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] * N[(x * t), $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 -27, k, b \cdot c\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+230}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(t \cdot a\right)\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-28}:\\
\;\;\;\;\mathsf{fma}\left(-4, x \cdot i, b \cdot c\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+94}:\\
\;\;\;\;\left(z \cdot \left(18 \cdot y\right)\right) \cdot \left(x \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.0000000000000002e230 or 1e94 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 73.5%
Taylor expanded in b around inf
*-lowering-*.f6467.1
Simplified67.1%
sub-negN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-commutativeN/A
associate-*l*N/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6470.2
Applied egg-rr70.2%
if -2.0000000000000002e230 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.999999999999969e-311Initial program 83.0%
Taylor expanded in x around 0
sub-negN/A
accelerator-lowering-fma.f64N/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6457.2
Simplified57.2%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6448.6
Simplified48.6%
if -9.999999999999969e-311 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.99999999999999994e-28Initial program 87.2%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr93.6%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6464.5
Simplified64.5%
Taylor expanded in k around 0
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6462.1
Simplified62.1%
if 1.99999999999999994e-28 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1e94Initial program 91.6%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr95.6%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6453.3
Simplified53.3%
Final simplification58.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 (* j -27.0) k (* b c))) (t_2 (* (* j 27.0) k)))
(if (<= t_2 -2e+230)
t_1
(if (<= t_2 -1e-310)
(fma b c (* -4.0 (* t a)))
(if (<= t_2 1e-68)
(fma -4.0 (* x i) (* b c))
(if (<= t_2 1e+94) (* t (* (* 18.0 y) (* x z))) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = fma((j * -27.0), k, (b * c));
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -2e+230) {
tmp = t_1;
} else if (t_2 <= -1e-310) {
tmp = fma(b, c, (-4.0 * (t * a)));
} else if (t_2 <= 1e-68) {
tmp = fma(-4.0, (x * i), (b * c));
} else if (t_2 <= 1e+94) {
tmp = t * ((18.0 * y) * (x * z));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = fma(Float64(j * -27.0), k, Float64(b * c)) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -2e+230) tmp = t_1; elseif (t_2 <= -1e-310) tmp = fma(b, c, Float64(-4.0 * Float64(t * a))); elseif (t_2 <= 1e-68) tmp = fma(-4.0, Float64(x * i), Float64(b * c)); elseif (t_2 <= 1e+94) tmp = Float64(t * Float64(Float64(18.0 * y) * Float64(x * z))); 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 * -27.0), $MachinePrecision] * k + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+230], t$95$1, If[LessEqual[t$95$2, -1e-310], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e-68], N[(-4.0 * N[(x * i), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+94], N[(t * N[(N[(18.0 * y), $MachinePrecision] * N[(x * z), $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 -27, k, b \cdot c\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+230}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(t \cdot a\right)\right)\\
\mathbf{elif}\;t\_2 \leq 10^{-68}:\\
\;\;\;\;\mathsf{fma}\left(-4, x \cdot i, b \cdot c\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+94}:\\
\;\;\;\;t \cdot \left(\left(18 \cdot y\right) \cdot \left(x \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.0000000000000002e230 or 1e94 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 73.5%
Taylor expanded in b around inf
*-lowering-*.f6467.1
Simplified67.1%
sub-negN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-commutativeN/A
associate-*l*N/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6470.2
Applied egg-rr70.2%
if -2.0000000000000002e230 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.999999999999969e-311Initial program 83.0%
Taylor expanded in x around 0
sub-negN/A
accelerator-lowering-fma.f64N/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6457.2
Simplified57.2%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6448.6
Simplified48.6%
if -9.999999999999969e-311 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000007e-68Initial program 85.2%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr94.1%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6467.6
Simplified67.6%
Taylor expanded in k around 0
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6464.8
Simplified64.8%
if 1.00000000000000007e-68 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1e94Initial program 94.1%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr94.0%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6449.8
Simplified49.8%
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6449.8
Applied egg-rr49.8%
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6449.7
Applied egg-rr49.7%
Final simplification58.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 -27.0) k (* b c))) (t_2 (* (* j 27.0) k)))
(if (<= t_2 -2e+230)
t_1
(if (<= t_2 -1e-310)
(fma b c (* -4.0 (* t a)))
(if (<= t_2 2e-28)
(fma -4.0 (* x i) (* b c))
(if (<= t_2 1e+94) (* 18.0 (* t (* x (* y z)))) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = fma((j * -27.0), k, (b * c));
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -2e+230) {
tmp = t_1;
} else if (t_2 <= -1e-310) {
tmp = fma(b, c, (-4.0 * (t * a)));
} else if (t_2 <= 2e-28) {
tmp = fma(-4.0, (x * i), (b * c));
} else if (t_2 <= 1e+94) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = fma(Float64(j * -27.0), k, Float64(b * c)) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -2e+230) tmp = t_1; elseif (t_2 <= -1e-310) tmp = fma(b, c, Float64(-4.0 * Float64(t * a))); elseif (t_2 <= 2e-28) tmp = fma(-4.0, Float64(x * i), Float64(b * c)); elseif (t_2 <= 1e+94) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); 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 * -27.0), $MachinePrecision] * k + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+230], t$95$1, If[LessEqual[t$95$2, -1e-310], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e-28], N[(-4.0 * N[(x * i), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+94], N[(18.0 * N[(t * N[(x * N[(y * z), $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 -27, k, b \cdot c\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+230}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(t \cdot a\right)\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-28}:\\
\;\;\;\;\mathsf{fma}\left(-4, x \cdot i, b \cdot c\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+94}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.0000000000000002e230 or 1e94 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 73.5%
Taylor expanded in b around inf
*-lowering-*.f6467.1
Simplified67.1%
sub-negN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-commutativeN/A
associate-*l*N/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6470.2
Applied egg-rr70.2%
if -2.0000000000000002e230 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.999999999999969e-311Initial program 83.0%
Taylor expanded in x around 0
sub-negN/A
accelerator-lowering-fma.f64N/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6457.2
Simplified57.2%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6448.6
Simplified48.6%
if -9.999999999999969e-311 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.99999999999999994e-28Initial program 87.2%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr93.6%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6464.5
Simplified64.5%
Taylor expanded in k around 0
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6462.1
Simplified62.1%
if 1.99999999999999994e-28 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1e94Initial program 91.6%
Taylor expanded in y around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6449.2
Simplified49.2%
Final simplification58.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (fma (* j -27.0) k (* b c)))
(t_2 (fma b c (* -4.0 (* t a))))
(t_3 (* (* j 27.0) k)))
(if (<= t_3 -2e+230)
t_1
(if (<= t_3 -1e-310)
t_2
(if (<= t_3 2e-28)
(fma -4.0 (* x i) (* b c))
(if (<= t_3 1e+62) t_2 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 * -27.0), k, (b * c));
double t_2 = fma(b, c, (-4.0 * (t * a)));
double t_3 = (j * 27.0) * k;
double tmp;
if (t_3 <= -2e+230) {
tmp = t_1;
} else if (t_3 <= -1e-310) {
tmp = t_2;
} else if (t_3 <= 2e-28) {
tmp = fma(-4.0, (x * i), (b * c));
} else if (t_3 <= 1e+62) {
tmp = t_2;
} 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 * -27.0), k, Float64(b * c)) t_2 = fma(b, c, Float64(-4.0 * Float64(t * a))) t_3 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_3 <= -2e+230) tmp = t_1; elseif (t_3 <= -1e-310) tmp = t_2; elseif (t_3 <= 2e-28) tmp = fma(-4.0, Float64(x * i), Float64(b * c)); elseif (t_3 <= 1e+62) tmp = t_2; 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 * -27.0), $MachinePrecision] * k + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$3, -2e+230], t$95$1, If[LessEqual[t$95$3, -1e-310], t$95$2, If[LessEqual[t$95$3, 2e-28], N[(-4.0 * N[(x * i), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+62], t$95$2, 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 -27, k, b \cdot c\right)\\
t_2 := \mathsf{fma}\left(b, c, -4 \cdot \left(t \cdot a\right)\right)\\
t_3 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_3 \leq -2 \cdot 10^{+230}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-310}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{-28}:\\
\;\;\;\;\mathsf{fma}\left(-4, x \cdot i, b \cdot c\right)\\
\mathbf{elif}\;t\_3 \leq 10^{+62}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.0000000000000002e230 or 1.00000000000000004e62 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 73.3%
Taylor expanded in b around inf
*-lowering-*.f6464.4
Simplified64.4%
sub-negN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-commutativeN/A
associate-*l*N/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6467.4
Applied egg-rr67.4%
if -2.0000000000000002e230 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.999999999999969e-311 or 1.99999999999999994e-28 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000004e62Initial program 85.1%
Taylor expanded in x around 0
sub-negN/A
accelerator-lowering-fma.f64N/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6456.3
Simplified56.3%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6448.3
Simplified48.3%
if -9.999999999999969e-311 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.99999999999999994e-28Initial program 87.2%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr93.6%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6464.5
Simplified64.5%
Taylor expanded in k around 0
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6462.1
Simplified62.1%
Final simplification57.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 c b (* (* j k) -27.0)))
(t_2 (fma b c (* -4.0 (* t a))))
(t_3 (* (* j 27.0) k)))
(if (<= t_3 -2e+230)
t_1
(if (<= t_3 -1e-310)
t_2
(if (<= t_3 2e-28)
(fma -4.0 (* x i) (* b c))
(if (<= t_3 1e+62) t_2 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(c, b, ((j * k) * -27.0));
double t_2 = fma(b, c, (-4.0 * (t * a)));
double t_3 = (j * 27.0) * k;
double tmp;
if (t_3 <= -2e+230) {
tmp = t_1;
} else if (t_3 <= -1e-310) {
tmp = t_2;
} else if (t_3 <= 2e-28) {
tmp = fma(-4.0, (x * i), (b * c));
} else if (t_3 <= 1e+62) {
tmp = t_2;
} 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(c, b, Float64(Float64(j * k) * -27.0)) t_2 = fma(b, c, Float64(-4.0 * Float64(t * a))) t_3 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_3 <= -2e+230) tmp = t_1; elseif (t_3 <= -1e-310) tmp = t_2; elseif (t_3 <= 2e-28) tmp = fma(-4.0, Float64(x * i), Float64(b * c)); elseif (t_3 <= 1e+62) tmp = t_2; 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[(c * b + N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$3, -2e+230], t$95$1, If[LessEqual[t$95$3, -1e-310], t$95$2, If[LessEqual[t$95$3, 2e-28], N[(-4.0 * N[(x * i), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+62], t$95$2, 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(c, b, \left(j \cdot k\right) \cdot -27\right)\\
t_2 := \mathsf{fma}\left(b, c, -4 \cdot \left(t \cdot a\right)\right)\\
t_3 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_3 \leq -2 \cdot 10^{+230}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-310}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{-28}:\\
\;\;\;\;\mathsf{fma}\left(-4, x \cdot i, b \cdot c\right)\\
\mathbf{elif}\;t\_3 \leq 10^{+62}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.0000000000000002e230 or 1.00000000000000004e62 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 73.3%
Taylor expanded in b around inf
*-lowering-*.f6464.4
Simplified64.4%
sub-negN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6467.3
Applied egg-rr67.3%
if -2.0000000000000002e230 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.999999999999969e-311 or 1.99999999999999994e-28 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000004e62Initial program 85.1%
Taylor expanded in x around 0
sub-negN/A
accelerator-lowering-fma.f64N/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6456.3
Simplified56.3%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6448.3
Simplified48.3%
if -9.999999999999969e-311 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.99999999999999994e-28Initial program 87.2%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr93.6%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6464.5
Simplified64.5%
Taylor expanded in k around 0
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6462.1
Simplified62.1%
Final simplification57.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 (* k (* j -27.0))) (t_2 (* (* j 27.0) k)))
(if (<= t_2 -1e+201)
t_1
(if (<= t_2 2e-95) (* -4.0 (* x i)) (if (<= t_2 1e+62) (* 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 = k * (j * -27.0);
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -1e+201) {
tmp = t_1;
} else if (t_2 <= 2e-95) {
tmp = -4.0 * (x * i);
} else if (t_2 <= 1e+62) {
tmp = b * c;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = k * (j * (-27.0d0))
t_2 = (j * 27.0d0) * k
if (t_2 <= (-1d+201)) then
tmp = t_1
else if (t_2 <= 2d-95) then
tmp = (-4.0d0) * (x * i)
else if (t_2 <= 1d+62) then
tmp = b * c
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -1e+201) {
tmp = t_1;
} else if (t_2 <= 2e-95) {
tmp = -4.0 * (x * i);
} else if (t_2 <= 1e+62) {
tmp = b * c;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * -27.0) t_2 = (j * 27.0) * k tmp = 0 if t_2 <= -1e+201: tmp = t_1 elif t_2 <= 2e-95: tmp = -4.0 * (x * i) elif t_2 <= 1e+62: tmp = b * c else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -1e+201) tmp = t_1; elseif (t_2 <= 2e-95) tmp = Float64(-4.0 * Float64(x * i)); elseif (t_2 <= 1e+62) tmp = Float64(b * c); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * -27.0);
t_2 = (j * 27.0) * k;
tmp = 0.0;
if (t_2 <= -1e+201)
tmp = t_1;
elseif (t_2 <= 2e-95)
tmp = -4.0 * (x * i);
elseif (t_2 <= 1e+62)
tmp = b * c;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+201], t$95$1, If[LessEqual[t$95$2, 2e-95], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+62], N[(b * c), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+201}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-95}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+62}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.00000000000000004e201 or 1.00000000000000004e62 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 71.6%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr72.9%
Taylor expanded in k around inf
*-lowering-*.f64N/A
*-lowering-*.f6459.2
Simplified59.2%
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6459.3
Applied egg-rr59.3%
if -1.00000000000000004e201 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.99999999999999998e-95Initial program 85.1%
Taylor expanded in i around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6433.5
Simplified33.5%
if 1.99999999999999998e-95 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000004e62Initial program 94.3%
Taylor expanded in b around inf
*-lowering-*.f6427.4
Simplified27.4%
Final simplification39.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 27.0) k)))
(if (<= t_1 -1e+201)
(* j (* k -27.0))
(if (<= t_1 2e-95)
(* -4.0 (* x i))
(if (<= t_1 1e+62) (* b c) (* (* j k) -27.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -1e+201) {
tmp = j * (k * -27.0);
} else if (t_1 <= 2e-95) {
tmp = -4.0 * (x * i);
} else if (t_1 <= 1e+62) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if (t_1 <= (-1d+201)) then
tmp = j * (k * (-27.0d0))
else if (t_1 <= 2d-95) then
tmp = (-4.0d0) * (x * i)
else if (t_1 <= 1d+62) then
tmp = b * c
else
tmp = (j * k) * (-27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -1e+201) {
tmp = j * (k * -27.0);
} else if (t_1 <= 2e-95) {
tmp = -4.0 * (x * i);
} else if (t_1 <= 1e+62) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if t_1 <= -1e+201: tmp = j * (k * -27.0) elif t_1 <= 2e-95: tmp = -4.0 * (x * i) elif t_1 <= 1e+62: tmp = b * c else: tmp = (j * k) * -27.0 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -1e+201) tmp = Float64(j * Float64(k * -27.0)); elseif (t_1 <= 2e-95) tmp = Float64(-4.0 * Float64(x * i)); elseif (t_1 <= 1e+62) tmp = Float64(b * c); else tmp = Float64(Float64(j * k) * -27.0); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if (t_1 <= -1e+201)
tmp = j * (k * -27.0);
elseif (t_1 <= 2e-95)
tmp = -4.0 * (x * i);
elseif (t_1 <= 1e+62)
tmp = b * c;
else
tmp = (j * k) * -27.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+201], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e-95], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+62], N[(b * c), $MachinePrecision], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+201}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-95}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+62}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.00000000000000004e201Initial program 69.2%
Taylor expanded in j around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6462.6
Simplified62.6%
if -1.00000000000000004e201 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.99999999999999998e-95Initial program 85.1%
Taylor expanded in i around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6433.5
Simplified33.5%
if 1.99999999999999998e-95 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000004e62Initial program 94.3%
Taylor expanded in b around inf
*-lowering-*.f6427.4
Simplified27.4%
if 1.00000000000000004e62 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 73.0%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr74.9%
Taylor expanded in k around inf
*-lowering-*.f64N/A
*-lowering-*.f6457.2
Simplified57.2%
Final simplification39.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 (* (* j 27.0) k)))
(if (<= t_2 -1e+201)
t_1
(if (<= t_2 2e-95) (* -4.0 (* x i)) (if (<= t_2 1e+62) (* 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 = (j * k) * -27.0;
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -1e+201) {
tmp = t_1;
} else if (t_2 <= 2e-95) {
tmp = -4.0 * (x * i);
} else if (t_2 <= 1e+62) {
tmp = b * c;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = (j * 27.0d0) * k
if (t_2 <= (-1d+201)) then
tmp = t_1
else if (t_2 <= 2d-95) then
tmp = (-4.0d0) * (x * i)
else if (t_2 <= 1d+62) then
tmp = b * c
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = (j * 27.0) * k;
double tmp;
if (t_2 <= -1e+201) {
tmp = t_1;
} else if (t_2 <= 2e-95) {
tmp = -4.0 * (x * i);
} else if (t_2 <= 1e+62) {
tmp = b * c;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * k) * -27.0 t_2 = (j * 27.0) * k tmp = 0 if t_2 <= -1e+201: tmp = t_1 elif t_2 <= 2e-95: tmp = -4.0 * (x * i) elif t_2 <= 1e+62: tmp = b * c else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * k) * -27.0) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -1e+201) tmp = t_1; elseif (t_2 <= 2e-95) tmp = Float64(-4.0 * Float64(x * i)); elseif (t_2 <= 1e+62) tmp = Float64(b * c); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * k) * -27.0;
t_2 = (j * 27.0) * k;
tmp = 0.0;
if (t_2 <= -1e+201)
tmp = t_1;
elseif (t_2 <= 2e-95)
tmp = -4.0 * (x * i);
elseif (t_2 <= 1e+62)
tmp = b * c;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+201], t$95$1, If[LessEqual[t$95$2, 2e-95], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+62], N[(b * c), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot k\right) \cdot -27\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+201}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-95}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+62}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.00000000000000004e201 or 1.00000000000000004e62 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 71.6%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr72.9%
Taylor expanded in k around inf
*-lowering-*.f64N/A
*-lowering-*.f6459.2
Simplified59.2%
if -1.00000000000000004e201 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.99999999999999998e-95Initial program 85.1%
Taylor expanded in i around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6433.5
Simplified33.5%
if 1.99999999999999998e-95 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000004e62Initial program 94.3%
Taylor expanded in b around inf
*-lowering-*.f6427.4
Simplified27.4%
Final simplification39.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 (* (* j 27.0) k)))
(if (<= t_2 -2e+230)
t_1
(if (<= t_2 2e-307) (* -4.0 (* t a)) (if (<= t_2 1e+62) (* 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 = (j * k) * -27.0;
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -2e+230) {
tmp = t_1;
} else if (t_2 <= 2e-307) {
tmp = -4.0 * (t * a);
} else if (t_2 <= 1e+62) {
tmp = b * c;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = (j * 27.0d0) * k
if (t_2 <= (-2d+230)) then
tmp = t_1
else if (t_2 <= 2d-307) then
tmp = (-4.0d0) * (t * a)
else if (t_2 <= 1d+62) then
tmp = b * c
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = (j * 27.0) * k;
double tmp;
if (t_2 <= -2e+230) {
tmp = t_1;
} else if (t_2 <= 2e-307) {
tmp = -4.0 * (t * a);
} else if (t_2 <= 1e+62) {
tmp = b * c;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * k) * -27.0 t_2 = (j * 27.0) * k tmp = 0 if t_2 <= -2e+230: tmp = t_1 elif t_2 <= 2e-307: tmp = -4.0 * (t * a) elif t_2 <= 1e+62: tmp = b * c else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * k) * -27.0) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -2e+230) tmp = t_1; elseif (t_2 <= 2e-307) tmp = Float64(-4.0 * Float64(t * a)); elseif (t_2 <= 1e+62) tmp = Float64(b * c); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * k) * -27.0;
t_2 = (j * 27.0) * k;
tmp = 0.0;
if (t_2 <= -2e+230)
tmp = t_1;
elseif (t_2 <= 2e-307)
tmp = -4.0 * (t * a);
elseif (t_2 <= 1e+62)
tmp = b * c;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+230], t$95$1, If[LessEqual[t$95$2, 2e-307], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+62], N[(b * c), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot k\right) \cdot -27\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+230}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-307}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+62}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.0000000000000002e230 or 1.00000000000000004e62 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 73.3%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr74.6%
Taylor expanded in k around inf
*-lowering-*.f64N/A
*-lowering-*.f6461.7
Simplified61.7%
if -2.0000000000000002e230 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.99999999999999982e-307Initial program 84.4%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6430.4
Simplified30.4%
if 1.99999999999999982e-307 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000004e62Initial program 89.1%
Taylor expanded in b around inf
*-lowering-*.f6430.2
Simplified30.2%
Final simplification38.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -6.6e-81)
(fma t (fma x (* z (* 18.0 y)) (* a -4.0)) (fma -27.0 (* j k) (* b c)))
(if (<= t 8.5e-25)
(fma (* j k) -27.0 (fma b c (* -4.0 (* x i))))
(fma t (fma -4.0 a (* 18.0 (* x (* y z)))) (fma b c (* 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 tmp;
if (t <= -6.6e-81) {
tmp = fma(t, fma(x, (z * (18.0 * y)), (a * -4.0)), fma(-27.0, (j * k), (b * c)));
} else if (t <= 8.5e-25) {
tmp = fma((j * k), -27.0, fma(b, c, (-4.0 * (x * i))));
} else {
tmp = fma(t, fma(-4.0, a, (18.0 * (x * (y * z)))), fma(b, c, (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) tmp = 0.0 if (t <= -6.6e-81) tmp = fma(t, fma(x, Float64(z * Float64(18.0 * y)), Float64(a * -4.0)), fma(-27.0, Float64(j * k), Float64(b * c))); elseif (t <= 8.5e-25) tmp = fma(Float64(j * k), -27.0, fma(b, c, Float64(-4.0 * Float64(x * i)))); else tmp = fma(t, fma(-4.0, a, Float64(18.0 * Float64(x * Float64(y * z)))), fma(b, c, 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_] := If[LessEqual[t, -6.6e-81], N[(t * N[(x * N[(z * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(j * k), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.5e-25], N[(N[(j * k), $MachinePrecision] * -27.0 + N[(b * c + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(-4.0 * a + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c + 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}
\mathbf{if}\;t \leq -6.6 \cdot 10^{-81}:\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(x, z \cdot \left(18 \cdot y\right), a \cdot -4\right), \mathsf{fma}\left(-27, j \cdot k, b \cdot c\right)\right)\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-25}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot k, -27, \mathsf{fma}\left(b, c, -4 \cdot \left(x \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right), \mathsf{fma}\left(b, c, j \cdot \left(k \cdot -27\right)\right)\right)\\
\end{array}
\end{array}
if t < -6.59999999999999975e-81Initial program 84.4%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr88.2%
Taylor expanded in i around 0
associate-+r+N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6480.1
Simplified80.1%
if -6.59999999999999975e-81 < t < 8.49999999999999981e-25Initial program 81.0%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr84.7%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6486.7
Simplified86.7%
if 8.49999999999999981e-25 < t Initial program 83.1%
Taylor expanded in i around 0
associate--r+N/A
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Simplified83.5%
Final simplification83.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
(fma
t
(fma -4.0 a (* 18.0 (* x (* y z))))
(fma b c (* j (* k -27.0))))))
(if (<= t -3.5e-81)
t_1
(if (<= t 6.2e-25) (fma (* j k) -27.0 (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(t, fma(-4.0, a, (18.0 * (x * (y * z)))), fma(b, c, (j * (k * -27.0))));
double tmp;
if (t <= -3.5e-81) {
tmp = t_1;
} else if (t <= 6.2e-25) {
tmp = fma((j * k), -27.0, 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(t, fma(-4.0, a, Float64(18.0 * Float64(x * Float64(y * z)))), fma(b, c, Float64(j * Float64(k * -27.0)))) tmp = 0.0 if (t <= -3.5e-81) tmp = t_1; elseif (t <= 6.2e-25) tmp = fma(Float64(j * k), -27.0, 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[(t * N[(-4.0 * a + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.5e-81], t$95$1, If[LessEqual[t, 6.2e-25], N[(N[(j * k), $MachinePrecision] * -27.0 + N[(b * c + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t, \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right), \mathsf{fma}\left(b, c, j \cdot \left(k \cdot -27\right)\right)\right)\\
\mathbf{if}\;t \leq -3.5 \cdot 10^{-81}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{-25}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot k, -27, \mathsf{fma}\left(b, c, -4 \cdot \left(x \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.49999999999999986e-81 or 6.19999999999999989e-25 < t Initial program 83.8%
Taylor expanded in i around 0
associate--r+N/A
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Simplified81.6%
if -3.49999999999999986e-81 < t < 6.19999999999999989e-25Initial program 81.0%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr84.7%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6486.7
Simplified86.7%
Final simplification83.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))) (t_2 (* (* j 27.0) k)))
(if (<= t_2 -1e+201)
t_1
(if (<= t_2 1e+62) (fma -4.0 (* 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 = k * (j * -27.0);
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -1e+201) {
tmp = t_1;
} else if (t_2 <= 1e+62) {
tmp = fma(-4.0, (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(k * Float64(j * -27.0)) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -1e+201) tmp = t_1; elseif (t_2 <= 1e+62) tmp = fma(-4.0, 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[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+201], t$95$1, If[LessEqual[t$95$2, 1e+62], N[(-4.0 * N[(x * i), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+201}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+62}:\\
\;\;\;\;\mathsf{fma}\left(-4, x \cdot i, b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.00000000000000004e201 or 1.00000000000000004e62 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 71.6%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr72.9%
Taylor expanded in k around inf
*-lowering-*.f64N/A
*-lowering-*.f6459.2
Simplified59.2%
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6459.3
Applied egg-rr59.3%
if -1.00000000000000004e201 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000004e62Initial program 86.8%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr90.1%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6455.0
Simplified55.0%
Taylor expanded in k around 0
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6449.2
Simplified49.2%
Final simplification52.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* t a))) (t_2 (* x (fma -4.0 i (* t (* 18.0 (* y z)))))))
(if (<= x -2.5e+42)
t_2
(if (<= x -6e-257)
(- t_1 (* (* j 27.0) k))
(if (<= x 2.75e-9) (fma b c t_1) t_2)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (t * a);
double t_2 = x * fma(-4.0, i, (t * (18.0 * (y * z))));
double tmp;
if (x <= -2.5e+42) {
tmp = t_2;
} else if (x <= -6e-257) {
tmp = t_1 - ((j * 27.0) * k);
} else if (x <= 2.75e-9) {
tmp = fma(b, c, t_1);
} else {
tmp = t_2;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(t * a)) t_2 = Float64(x * fma(-4.0, i, Float64(t * Float64(18.0 * Float64(y * z))))) tmp = 0.0 if (x <= -2.5e+42) tmp = t_2; elseif (x <= -6e-257) tmp = Float64(t_1 - Float64(Float64(j * 27.0) * k)); elseif (x <= 2.75e-9) tmp = fma(b, c, 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[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(-4.0 * i + N[(t * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.5e+42], t$95$2, If[LessEqual[x, -6e-257], N[(t$95$1 - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.75e-9], N[(b * c + t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a\right)\\
t_2 := x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;x \leq -2.5 \cdot 10^{+42}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -6 \cdot 10^{-257}:\\
\;\;\;\;t\_1 - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;x \leq 2.75 \cdot 10^{-9}:\\
\;\;\;\;\mathsf{fma}\left(b, c, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -2.50000000000000003e42 or 2.7499999999999998e-9 < x Initial program 75.1%
Taylor expanded in x around inf
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6473.4
Simplified73.4%
if -2.50000000000000003e42 < x < -5.9999999999999999e-257Initial program 92.1%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6465.2
Simplified65.2%
if -5.9999999999999999e-257 < x < 2.7499999999999998e-9Initial program 89.7%
Taylor expanded in x around 0
sub-negN/A
accelerator-lowering-fma.f64N/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6482.7
Simplified82.7%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6464.5
Simplified64.5%
Final simplification69.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 (* (* j k) -27.0)) (t_2 (* (* j 27.0) k))) (if (<= t_2 -4e+14) t_1 (if (<= t_2 1e+62) (* 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 = (j * k) * -27.0;
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -4e+14) {
tmp = t_1;
} else if (t_2 <= 1e+62) {
tmp = b * c;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = (j * 27.0d0) * k
if (t_2 <= (-4d+14)) then
tmp = t_1
else if (t_2 <= 1d+62) then
tmp = b * c
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = (j * 27.0) * k;
double tmp;
if (t_2 <= -4e+14) {
tmp = t_1;
} else if (t_2 <= 1e+62) {
tmp = b * c;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * k) * -27.0 t_2 = (j * 27.0) * k tmp = 0 if t_2 <= -4e+14: tmp = t_1 elif t_2 <= 1e+62: tmp = b * c else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * k) * -27.0) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -4e+14) tmp = t_1; elseif (t_2 <= 1e+62) tmp = Float64(b * c); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * k) * -27.0;
t_2 = (j * 27.0) * k;
tmp = 0.0;
if (t_2 <= -4e+14)
tmp = t_1;
elseif (t_2 <= 1e+62)
tmp = b * c;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -4e+14], t$95$1, If[LessEqual[t$95$2, 1e+62], N[(b * c), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot k\right) \cdot -27\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -4 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+62}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4e14 or 1.00000000000000004e62 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 72.4%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr75.3%
Taylor expanded in k around inf
*-lowering-*.f64N/A
*-lowering-*.f6447.6
Simplified47.6%
if -4e14 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000004e62Initial program 89.3%
Taylor expanded in b around inf
*-lowering-*.f6424.9
Simplified24.9%
Final simplification33.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 (* x (fma -4.0 i (* t (* 18.0 (* y z)))))))
(if (<= x -1.02e+44)
t_1
(if (<= x 7e-8) (fma b c (fma -4.0 (* t a) (* j (* k -27.0)))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * fma(-4.0, i, (t * (18.0 * (y * z))));
double tmp;
if (x <= -1.02e+44) {
tmp = t_1;
} else if (x <= 7e-8) {
tmp = fma(b, c, fma(-4.0, (t * a), (j * (k * -27.0))));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * fma(-4.0, i, Float64(t * Float64(18.0 * Float64(y * z))))) tmp = 0.0 if (x <= -1.02e+44) tmp = t_1; elseif (x <= 7e-8) tmp = fma(b, c, fma(-4.0, Float64(t * a), Float64(j * Float64(k * -27.0)))); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(-4.0 * i + N[(t * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.02e+44], t$95$1, If[LessEqual[x, 7e-8], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;x \leq -1.02 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.01999999999999999e44 or 7.00000000000000048e-8 < x Initial program 74.9%
Taylor expanded in x around inf
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6473.9
Simplified73.9%
if -1.01999999999999999e44 < x < 7.00000000000000048e-8Initial program 91.0%
Taylor expanded in x around 0
sub-negN/A
accelerator-lowering-fma.f64N/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6483.9
Simplified83.9%
Final simplification78.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 (<= t -1.7e-114)
(* t (fma -4.0 a (* 18.0 (* x (* y z)))))
(if (<= t 48000.0)
(- (* -4.0 (* x i)) (* (* j 27.0) k))
(* t (fma (* (* x 18.0) y) z (* a -4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -1.7e-114) {
tmp = t * fma(-4.0, a, (18.0 * (x * (y * z))));
} else if (t <= 48000.0) {
tmp = (-4.0 * (x * i)) - ((j * 27.0) * k);
} else {
tmp = t * fma(((x * 18.0) * y), z, (a * -4.0));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -1.7e-114) tmp = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(x * Float64(y * z))))); elseif (t <= 48000.0) tmp = Float64(Float64(-4.0 * Float64(x * i)) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(t * fma(Float64(Float64(x * 18.0) * y), z, Float64(a * -4.0))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -1.7e-114], N[(t * N[(-4.0 * a + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 48000.0], N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.7 \cdot 10^{-114}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq 48000:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(\left(x \cdot 18\right) \cdot y, z, a \cdot -4\right)\\
\end{array}
\end{array}
if t < -1.69999999999999991e-114Initial program 83.7%
Taylor expanded in t around inf
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6458.1
Simplified58.1%
if -1.69999999999999991e-114 < t < 48000Initial program 81.7%
Taylor expanded in i around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6464.0
Simplified64.0%
if 48000 < t Initial program 82.7%
Taylor expanded in t around inf
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6465.2
Simplified65.2%
+-commutativeN/A
associate-*r*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6469.7
Applied egg-rr69.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 (* t (fma -4.0 a (* 18.0 (* x (* y z)))))))
(if (<= t -4e-111)
t_1
(if (<= t 3.8e-24) (- (* -4.0 (* x i)) (* (* j 27.0) k)) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * fma(-4.0, a, (18.0 * (x * (y * z))));
double tmp;
if (t <= -4e-111) {
tmp = t_1;
} else if (t <= 3.8e-24) {
tmp = (-4.0 * (x * i)) - ((j * 27.0) * k);
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(x * Float64(y * z))))) tmp = 0.0 if (t <= -4e-111) tmp = t_1; elseif (t <= 3.8e-24) tmp = Float64(Float64(-4.0 * Float64(x * i)) - Float64(Float64(j * 27.0) * k)); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(-4.0 * a + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4e-111], t$95$1, If[LessEqual[t, 3.8e-24], N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -4 \cdot 10^{-111}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-24}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.00000000000000035e-111 or 3.80000000000000026e-24 < t Initial program 83.4%
Taylor expanded in t around inf
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6461.0
Simplified61.0%
if -4.00000000000000035e-111 < t < 3.80000000000000026e-24Initial program 81.4%
Taylor expanded in i around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6465.2
Simplified65.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (fma b c (* -4.0 (* t a)))))
(if (<= t -1.15e-13)
t_1
(if (<= t 1.18e+27) (fma -4.0 (* 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(b, c, (-4.0 * (t * a)));
double tmp;
if (t <= -1.15e-13) {
tmp = t_1;
} else if (t <= 1.18e+27) {
tmp = fma(-4.0, (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(b, c, Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (t <= -1.15e-13) tmp = t_1; elseif (t <= 1.18e+27) tmp = fma(-4.0, 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[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.15e-13], t$95$1, If[LessEqual[t, 1.18e+27], N[(-4.0 * N[(x * i), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b, c, -4 \cdot \left(t \cdot a\right)\right)\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.18 \cdot 10^{+27}:\\
\;\;\;\;\mathsf{fma}\left(-4, x \cdot i, b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.1499999999999999e-13 or 1.18000000000000006e27 < t Initial program 82.5%
Taylor expanded in x around 0
sub-negN/A
accelerator-lowering-fma.f64N/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6461.3
Simplified61.3%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6448.8
Simplified48.8%
if -1.1499999999999999e-13 < t < 1.18000000000000006e27Initial program 82.7%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr86.6%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6480.5
Simplified80.5%
Taylor expanded in k around 0
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6458.7
Simplified58.7%
Final simplification53.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 (* 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 82.6%
Taylor expanded in b around inf
*-lowering-*.f6420.1
Simplified20.1%
(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 2024205
(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)))