
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
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
code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
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
code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= (* y 9.0) -5e+36) (fma y (fma 27.0 (/ (* a b) y) (* z (* -9.0 t))) (* 2.0 x)) (+ (- (* 2.0 x) (* z (* 9.0 (* y t)))) (* b (* 27.0 a)))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y * 9.0) <= -5e+36) {
tmp = fma(y, fma(27.0, ((a * b) / y), (z * (-9.0 * t))), (2.0 * x));
} else {
tmp = ((2.0 * x) - (z * (9.0 * (y * t)))) + (b * (27.0 * a));
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(y * 9.0) <= -5e+36) tmp = fma(y, fma(27.0, Float64(Float64(a * b) / y), Float64(z * Float64(-9.0 * t))), Float64(2.0 * x)); else tmp = Float64(Float64(Float64(2.0 * x) - Float64(z * Float64(9.0 * Float64(y * t)))) + Float64(b * Float64(27.0 * a))); end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(y * 9.0), $MachinePrecision], -5e+36], N[(y * N[(27.0 * N[(N[(a * b), $MachinePrecision] / y), $MachinePrecision] + N[(z * N[(-9.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 * x), $MachinePrecision] - N[(z * N[(9.0 * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(27.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;y \cdot 9 \leq -5 \cdot 10^{+36}:\\
\;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(27, \frac{a \cdot b}{y}, z \cdot \left(-9 \cdot t\right)\right), 2 \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot x - z \cdot \left(9 \cdot \left(y \cdot t\right)\right)\right) + b \cdot \left(27 \cdot a\right)\\
\end{array}
\end{array}
if (*.f64 y #s(literal 9 binary64)) < -4.99999999999999977e36Initial program 86.8%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6488.7
Simplified88.7%
Taylor expanded in y around inf
+-commutativeN/A
metadata-evalN/A
cancel-sign-sub-invN/A
associate--l+N/A
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r/N/A
associate-*l/N/A
associate-/l*N/A
*-inversesN/A
*-inversesN/A
associate-/l*N/A
associate-*l/N/A
associate-*r/N/A
lower-fma.f64N/A
Simplified97.8%
if -4.99999999999999977e36 < (*.f64 y #s(literal 9 binary64)) Initial program 96.6%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6496.2
Simplified96.2%
Taylor expanded in y around 0
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6496.6
Simplified96.6%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6497.1
Simplified97.1%
Final simplification97.2%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (* y z))) (t_2 (* t (* (* y 9.0) z))))
(if (<= t_2 -5e+21)
(fma -9.0 t_1 (* a (* 27.0 b)))
(if (<= t_2 2e-24)
(fma 27.0 (* a b) (* 2.0 x))
(if (<= t_2 4e+250)
(fma -9.0 t_1 (* 27.0 (* a b)))
(fma y (* -9.0 (* z t)) (* 2.0 x)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (y * z);
double t_2 = t * ((y * 9.0) * z);
double tmp;
if (t_2 <= -5e+21) {
tmp = fma(-9.0, t_1, (a * (27.0 * b)));
} else if (t_2 <= 2e-24) {
tmp = fma(27.0, (a * b), (2.0 * x));
} else if (t_2 <= 4e+250) {
tmp = fma(-9.0, t_1, (27.0 * (a * b)));
} else {
tmp = fma(y, (-9.0 * (z * t)), (2.0 * x));
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(y * z)) t_2 = Float64(t * Float64(Float64(y * 9.0) * z)) tmp = 0.0 if (t_2 <= -5e+21) tmp = fma(-9.0, t_1, Float64(a * Float64(27.0 * b))); elseif (t_2 <= 2e-24) tmp = fma(27.0, Float64(a * b), Float64(2.0 * x)); elseif (t_2 <= 4e+250) tmp = fma(-9.0, t_1, Float64(27.0 * Float64(a * b))); else tmp = fma(y, Float64(-9.0 * Float64(z * t)), Float64(2.0 * x)); end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+21], N[(-9.0 * t$95$1 + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e-24], N[(27.0 * N[(a * b), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e+250], N[(-9.0 * t$95$1 + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(y \cdot z\right)\\
t_2 := t \cdot \left(\left(y \cdot 9\right) \cdot z\right)\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(-9, t\_1, a \cdot \left(27 \cdot b\right)\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-24}:\\
\;\;\;\;\mathsf{fma}\left(27, a \cdot b, 2 \cdot x\right)\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+250}:\\
\;\;\;\;\mathsf{fma}\left(-9, t\_1, 27 \cdot \left(a \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, -9 \cdot \left(z \cdot t\right), 2 \cdot x\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -5e21Initial program 88.0%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6488.1
Simplified88.1%
Taylor expanded in x around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6479.6
Simplified79.6%
if -5e21 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 1.99999999999999985e-24Initial program 98.5%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6495.7
Simplified95.7%
if 1.99999999999999985e-24 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 3.9999999999999997e250Initial program 99.6%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6499.7
Simplified99.7%
Taylor expanded in x around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6482.0
Simplified82.0%
Taylor expanded in a around 0
lower-*.f64N/A
lower-*.f6482.0
Simplified82.0%
if 3.9999999999999997e250 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) Initial program 85.3%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6491.3
Simplified91.3%
Taylor expanded in y around 0
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6494.1
Simplified94.1%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6494.1
Simplified94.1%
Taylor expanded in a around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6488.5
Simplified88.5%
Final simplification89.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma -9.0 (* t (* y z)) (* 27.0 (* a b))))
(t_2 (* t (* (* y 9.0) z))))
(if (<= t_2 -5e+21)
t_1
(if (<= t_2 2e-24)
(fma 27.0 (* a b) (* 2.0 x))
(if (<= t_2 4e+250) t_1 (fma y (* -9.0 (* z t)) (* 2.0 x)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(-9.0, (t * (y * z)), (27.0 * (a * b)));
double t_2 = t * ((y * 9.0) * z);
double tmp;
if (t_2 <= -5e+21) {
tmp = t_1;
} else if (t_2 <= 2e-24) {
tmp = fma(27.0, (a * b), (2.0 * x));
} else if (t_2 <= 4e+250) {
tmp = t_1;
} else {
tmp = fma(y, (-9.0 * (z * t)), (2.0 * x));
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = fma(-9.0, Float64(t * Float64(y * z)), Float64(27.0 * Float64(a * b))) t_2 = Float64(t * Float64(Float64(y * 9.0) * z)) tmp = 0.0 if (t_2 <= -5e+21) tmp = t_1; elseif (t_2 <= 2e-24) tmp = fma(27.0, Float64(a * b), Float64(2.0 * x)); elseif (t_2 <= 4e+250) tmp = t_1; else tmp = fma(y, Float64(-9.0 * Float64(z * t)), Float64(2.0 * x)); end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+21], t$95$1, If[LessEqual[t$95$2, 2e-24], N[(27.0 * N[(a * b), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e+250], t$95$1, N[(y * N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-9, t \cdot \left(y \cdot z\right), 27 \cdot \left(a \cdot b\right)\right)\\
t_2 := t \cdot \left(\left(y \cdot 9\right) \cdot z\right)\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-24}:\\
\;\;\;\;\mathsf{fma}\left(27, a \cdot b, 2 \cdot x\right)\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+250}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, -9 \cdot \left(z \cdot t\right), 2 \cdot x\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -5e21 or 1.99999999999999985e-24 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 3.9999999999999997e250Initial program 92.2%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6492.3
Simplified92.3%
Taylor expanded in x around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6480.5
Simplified80.5%
Taylor expanded in a around 0
lower-*.f64N/A
lower-*.f6480.4
Simplified80.4%
if -5e21 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 1.99999999999999985e-24Initial program 98.5%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6495.7
Simplified95.7%
if 3.9999999999999997e250 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) Initial program 85.3%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6491.3
Simplified91.3%
Taylor expanded in y around 0
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6494.1
Simplified94.1%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6494.1
Simplified94.1%
Taylor expanded in a around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6488.5
Simplified88.5%
Final simplification89.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (* (* y 9.0) z))))
(if (<= t_1 -5e+21)
(* t (* -9.0 (* y z)))
(if (<= t_1 -1e-268)
(* 2.0 x)
(if (<= t_1 2e-24) (* a (* 27.0 b)) (* y (* -9.0 (* z t))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * ((y * 9.0) * z);
double tmp;
if (t_1 <= -5e+21) {
tmp = t * (-9.0 * (y * z));
} else if (t_1 <= -1e-268) {
tmp = 2.0 * x;
} else if (t_1 <= 2e-24) {
tmp = a * (27.0 * b);
} else {
tmp = y * (-9.0 * (z * t));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = t * ((y * 9.0d0) * z)
if (t_1 <= (-5d+21)) then
tmp = t * ((-9.0d0) * (y * z))
else if (t_1 <= (-1d-268)) then
tmp = 2.0d0 * x
else if (t_1 <= 2d-24) then
tmp = a * (27.0d0 * b)
else
tmp = y * ((-9.0d0) * (z * t))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * ((y * 9.0) * z);
double tmp;
if (t_1 <= -5e+21) {
tmp = t * (-9.0 * (y * z));
} else if (t_1 <= -1e-268) {
tmp = 2.0 * x;
} else if (t_1 <= 2e-24) {
tmp = a * (27.0 * b);
} else {
tmp = y * (-9.0 * (z * t));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = t * ((y * 9.0) * z) tmp = 0 if t_1 <= -5e+21: tmp = t * (-9.0 * (y * z)) elif t_1 <= -1e-268: tmp = 2.0 * x elif t_1 <= 2e-24: tmp = a * (27.0 * b) else: tmp = y * (-9.0 * (z * t)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(Float64(y * 9.0) * z)) tmp = 0.0 if (t_1 <= -5e+21) tmp = Float64(t * Float64(-9.0 * Float64(y * z))); elseif (t_1 <= -1e-268) tmp = Float64(2.0 * x); elseif (t_1 <= 2e-24) tmp = Float64(a * Float64(27.0 * b)); else tmp = Float64(y * Float64(-9.0 * Float64(z * t))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = t * ((y * 9.0) * z);
tmp = 0.0;
if (t_1 <= -5e+21)
tmp = t * (-9.0 * (y * z));
elseif (t_1 <= -1e-268)
tmp = 2.0 * x;
elseif (t_1 <= 2e-24)
tmp = a * (27.0 * b);
else
tmp = y * (-9.0 * (z * t));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+21], N[(t * N[(-9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-268], N[(2.0 * x), $MachinePrecision], If[LessEqual[t$95$1, 2e-24], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], N[(y * N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(\left(y \cdot 9\right) \cdot z\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+21}:\\
\;\;\;\;t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-268}:\\
\;\;\;\;2 \cdot x\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-24}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -5e21Initial program 88.0%
Taylor expanded in y around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6462.7
Simplified62.7%
if -5e21 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -9.99999999999999958e-269Initial program 100.0%
Taylor expanded in x around inf
lower-*.f6474.2
Simplified74.2%
if -9.99999999999999958e-269 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 1.99999999999999985e-24Initial program 98.0%
Taylor expanded in a around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6457.3
Simplified57.3%
if 1.99999999999999985e-24 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) Initial program 92.3%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6494.1
Simplified94.1%
Taylor expanded in y around 0
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6488.2
Simplified88.2%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6488.1
Simplified88.1%
Taylor expanded in z around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6470.8
Simplified70.8%
Final simplification64.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (* (* y 9.0) z))))
(if (<= t_1 -5e+21)
(* t (* -9.0 (* y z)))
(if (<= t_1 -1e-268)
(* 2.0 x)
(if (<= t_1 2e-24) (* a (* 27.0 b)) (* t (* z (* y -9.0))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * ((y * 9.0) * z);
double tmp;
if (t_1 <= -5e+21) {
tmp = t * (-9.0 * (y * z));
} else if (t_1 <= -1e-268) {
tmp = 2.0 * x;
} else if (t_1 <= 2e-24) {
tmp = a * (27.0 * b);
} else {
tmp = t * (z * (y * -9.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = t * ((y * 9.0d0) * z)
if (t_1 <= (-5d+21)) then
tmp = t * ((-9.0d0) * (y * z))
else if (t_1 <= (-1d-268)) then
tmp = 2.0d0 * x
else if (t_1 <= 2d-24) then
tmp = a * (27.0d0 * b)
else
tmp = t * (z * (y * (-9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * ((y * 9.0) * z);
double tmp;
if (t_1 <= -5e+21) {
tmp = t * (-9.0 * (y * z));
} else if (t_1 <= -1e-268) {
tmp = 2.0 * x;
} else if (t_1 <= 2e-24) {
tmp = a * (27.0 * b);
} else {
tmp = t * (z * (y * -9.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = t * ((y * 9.0) * z) tmp = 0 if t_1 <= -5e+21: tmp = t * (-9.0 * (y * z)) elif t_1 <= -1e-268: tmp = 2.0 * x elif t_1 <= 2e-24: tmp = a * (27.0 * b) else: tmp = t * (z * (y * -9.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(Float64(y * 9.0) * z)) tmp = 0.0 if (t_1 <= -5e+21) tmp = Float64(t * Float64(-9.0 * Float64(y * z))); elseif (t_1 <= -1e-268) tmp = Float64(2.0 * x); elseif (t_1 <= 2e-24) tmp = Float64(a * Float64(27.0 * b)); else tmp = Float64(t * Float64(z * Float64(y * -9.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = t * ((y * 9.0) * z);
tmp = 0.0;
if (t_1 <= -5e+21)
tmp = t * (-9.0 * (y * z));
elseif (t_1 <= -1e-268)
tmp = 2.0 * x;
elseif (t_1 <= 2e-24)
tmp = a * (27.0 * b);
else
tmp = t * (z * (y * -9.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+21], N[(t * N[(-9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-268], N[(2.0 * x), $MachinePrecision], If[LessEqual[t$95$1, 2e-24], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(\left(y \cdot 9\right) \cdot z\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+21}:\\
\;\;\;\;t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-268}:\\
\;\;\;\;2 \cdot x\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-24}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -5e21Initial program 88.0%
Taylor expanded in y around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6462.7
Simplified62.7%
if -5e21 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -9.99999999999999958e-269Initial program 100.0%
Taylor expanded in x around inf
lower-*.f6474.2
Simplified74.2%
if -9.99999999999999958e-269 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 1.99999999999999985e-24Initial program 98.0%
Taylor expanded in a around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6457.3
Simplified57.3%
if 1.99999999999999985e-24 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) Initial program 92.3%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6492.4
Simplified92.4%
Taylor expanded in t around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6470.6
Simplified70.6%
Final simplification64.0%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (* z (* y -9.0)))) (t_2 (* t (* (* y 9.0) z))))
(if (<= t_2 -5e+21)
t_1
(if (<= t_2 -1e-268)
(* 2.0 x)
(if (<= t_2 2e-24) (* a (* 27.0 b)) t_1)))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (z * (y * -9.0));
double t_2 = t * ((y * 9.0) * z);
double tmp;
if (t_2 <= -5e+21) {
tmp = t_1;
} else if (t_2 <= -1e-268) {
tmp = 2.0 * x;
} else if (t_2 <= 2e-24) {
tmp = a * (27.0 * b);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * (z * (y * (-9.0d0)))
t_2 = t * ((y * 9.0d0) * z)
if (t_2 <= (-5d+21)) then
tmp = t_1
else if (t_2 <= (-1d-268)) then
tmp = 2.0d0 * x
else if (t_2 <= 2d-24) then
tmp = a * (27.0d0 * b)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (z * (y * -9.0));
double t_2 = t * ((y * 9.0) * z);
double tmp;
if (t_2 <= -5e+21) {
tmp = t_1;
} else if (t_2 <= -1e-268) {
tmp = 2.0 * x;
} else if (t_2 <= 2e-24) {
tmp = a * (27.0 * b);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = t * (z * (y * -9.0)) t_2 = t * ((y * 9.0) * z) tmp = 0 if t_2 <= -5e+21: tmp = t_1 elif t_2 <= -1e-268: tmp = 2.0 * x elif t_2 <= 2e-24: tmp = a * (27.0 * b) else: tmp = t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(z * Float64(y * -9.0))) t_2 = Float64(t * Float64(Float64(y * 9.0) * z)) tmp = 0.0 if (t_2 <= -5e+21) tmp = t_1; elseif (t_2 <= -1e-268) tmp = Float64(2.0 * x); elseif (t_2 <= 2e-24) tmp = Float64(a * Float64(27.0 * b)); else tmp = t_1; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = t * (z * (y * -9.0));
t_2 = t * ((y * 9.0) * z);
tmp = 0.0;
if (t_2 <= -5e+21)
tmp = t_1;
elseif (t_2 <= -1e-268)
tmp = 2.0 * x;
elseif (t_2 <= 2e-24)
tmp = a * (27.0 * b);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+21], t$95$1, If[LessEqual[t$95$2, -1e-268], N[(2.0 * x), $MachinePrecision], If[LessEqual[t$95$2, 2e-24], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
t_2 := t \cdot \left(\left(y \cdot 9\right) \cdot z\right)\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-268}:\\
\;\;\;\;2 \cdot x\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-24}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -5e21 or 1.99999999999999985e-24 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) Initial program 90.3%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6490.4
Simplified90.4%
Taylor expanded in t around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6466.9
Simplified66.9%
if -5e21 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -9.99999999999999958e-269Initial program 100.0%
Taylor expanded in x around inf
lower-*.f6474.2
Simplified74.2%
if -9.99999999999999958e-269 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 1.99999999999999985e-24Initial program 98.0%
Taylor expanded in a around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6457.3
Simplified57.3%
Final simplification64.0%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (* (* y 9.0) z))))
(if (<= t_1 -5e+21)
(fma t (* -9.0 (* y z)) (* a (* 27.0 b)))
(if (<= t_1 2e-24)
(fma 27.0 (* a b) (* 2.0 x))
(fma (* y (* -9.0 (* z t))) 1.0 (* 27.0 (* a b)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * ((y * 9.0) * z);
double tmp;
if (t_1 <= -5e+21) {
tmp = fma(t, (-9.0 * (y * z)), (a * (27.0 * b)));
} else if (t_1 <= 2e-24) {
tmp = fma(27.0, (a * b), (2.0 * x));
} else {
tmp = fma((y * (-9.0 * (z * t))), 1.0, (27.0 * (a * b)));
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(Float64(y * 9.0) * z)) tmp = 0.0 if (t_1 <= -5e+21) tmp = fma(t, Float64(-9.0 * Float64(y * z)), Float64(a * Float64(27.0 * b))); elseif (t_1 <= 2e-24) tmp = fma(27.0, Float64(a * b), Float64(2.0 * x)); else tmp = fma(Float64(y * Float64(-9.0 * Float64(z * t))), 1.0, Float64(27.0 * Float64(a * b))); end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+21], N[(t * N[(-9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e-24], N[(27.0 * N[(a * b), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0 + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(\left(y \cdot 9\right) \cdot z\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(t, -9 \cdot \left(y \cdot z\right), a \cdot \left(27 \cdot b\right)\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-24}:\\
\;\;\;\;\mathsf{fma}\left(27, a \cdot b, 2 \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot \left(-9 \cdot \left(z \cdot t\right)\right), 1, 27 \cdot \left(a \cdot b\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -5e21Initial program 88.0%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6479.7
Simplified79.7%
if -5e21 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 1.99999999999999985e-24Initial program 98.5%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6495.7
Simplified95.7%
if 1.99999999999999985e-24 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) Initial program 92.3%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6492.4
Simplified92.4%
Taylor expanded in x around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6482.3
Simplified82.3%
Taylor expanded in t around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6485.3
Simplified85.3%
Taylor expanded in a around inf
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r/N/A
associate-*l/N/A
associate-/l*N/A
*-inversesN/A
metadata-evalN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower-*.f64N/A
lower-*.f6485.3
Simplified85.3%
Final simplification89.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* 27.0 b))) (t_2 (* t (* (* y 9.0) z))))
(if (<= t_2 -5e+21)
(fma t (* -9.0 (* y z)) t_1)
(if (<= t_2 2e-24)
(fma 27.0 (* a b) (* 2.0 x))
(fma -9.0 (* y (* z t)) t_1)))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (27.0 * b);
double t_2 = t * ((y * 9.0) * z);
double tmp;
if (t_2 <= -5e+21) {
tmp = fma(t, (-9.0 * (y * z)), t_1);
} else if (t_2 <= 2e-24) {
tmp = fma(27.0, (a * b), (2.0 * x));
} else {
tmp = fma(-9.0, (y * (z * t)), t_1);
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(27.0 * b)) t_2 = Float64(t * Float64(Float64(y * 9.0) * z)) tmp = 0.0 if (t_2 <= -5e+21) tmp = fma(t, Float64(-9.0 * Float64(y * z)), t_1); elseif (t_2 <= 2e-24) tmp = fma(27.0, Float64(a * b), Float64(2.0 * x)); else tmp = fma(-9.0, Float64(y * Float64(z * t)), t_1); end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+21], N[(t * N[(-9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 2e-24], N[(27.0 * N[(a * b), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right)\\
t_2 := t \cdot \left(\left(y \cdot 9\right) \cdot z\right)\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(t, -9 \cdot \left(y \cdot z\right), t\_1\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-24}:\\
\;\;\;\;\mathsf{fma}\left(27, a \cdot b, 2 \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-9, y \cdot \left(z \cdot t\right), t\_1\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -5e21Initial program 88.0%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6479.7
Simplified79.7%
if -5e21 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 1.99999999999999985e-24Initial program 98.5%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6495.7
Simplified95.7%
if 1.99999999999999985e-24 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) Initial program 92.3%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6492.4
Simplified92.4%
Taylor expanded in x around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6482.3
Simplified82.3%
Taylor expanded in t around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6485.3
Simplified85.3%
Final simplification89.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* 27.0 b))) (t_2 (* t (* (* y 9.0) z))))
(if (<= t_2 -5e+21)
(fma -9.0 (* t (* y z)) t_1)
(if (<= t_2 2e-24)
(fma 27.0 (* a b) (* 2.0 x))
(fma -9.0 (* y (* z t)) t_1)))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (27.0 * b);
double t_2 = t * ((y * 9.0) * z);
double tmp;
if (t_2 <= -5e+21) {
tmp = fma(-9.0, (t * (y * z)), t_1);
} else if (t_2 <= 2e-24) {
tmp = fma(27.0, (a * b), (2.0 * x));
} else {
tmp = fma(-9.0, (y * (z * t)), t_1);
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(27.0 * b)) t_2 = Float64(t * Float64(Float64(y * 9.0) * z)) tmp = 0.0 if (t_2 <= -5e+21) tmp = fma(-9.0, Float64(t * Float64(y * z)), t_1); elseif (t_2 <= 2e-24) tmp = fma(27.0, Float64(a * b), Float64(2.0 * x)); else tmp = fma(-9.0, Float64(y * Float64(z * t)), t_1); end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+21], N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 2e-24], N[(27.0 * N[(a * b), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right)\\
t_2 := t \cdot \left(\left(y \cdot 9\right) \cdot z\right)\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(-9, t \cdot \left(y \cdot z\right), t\_1\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-24}:\\
\;\;\;\;\mathsf{fma}\left(27, a \cdot b, 2 \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-9, y \cdot \left(z \cdot t\right), t\_1\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -5e21Initial program 88.0%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6488.1
Simplified88.1%
Taylor expanded in x around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6479.6
Simplified79.6%
if -5e21 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 1.99999999999999985e-24Initial program 98.5%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6495.7
Simplified95.7%
if 1.99999999999999985e-24 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) Initial program 92.3%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6492.4
Simplified92.4%
Taylor expanded in x around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6482.3
Simplified82.3%
Taylor expanded in t around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6485.3
Simplified85.3%
Final simplification89.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (* (* y 9.0) z))))
(if (<= t_1 -1e+34)
(fma t (* -9.0 (* y z)) (* 2.0 x))
(if (<= t_1 1e-26)
(fma 27.0 (* a b) (* 2.0 x))
(fma y (* -9.0 (* z t)) (* 2.0 x))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * ((y * 9.0) * z);
double tmp;
if (t_1 <= -1e+34) {
tmp = fma(t, (-9.0 * (y * z)), (2.0 * x));
} else if (t_1 <= 1e-26) {
tmp = fma(27.0, (a * b), (2.0 * x));
} else {
tmp = fma(y, (-9.0 * (z * t)), (2.0 * x));
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(Float64(y * 9.0) * z)) tmp = 0.0 if (t_1 <= -1e+34) tmp = fma(t, Float64(-9.0 * Float64(y * z)), Float64(2.0 * x)); elseif (t_1 <= 1e-26) tmp = fma(27.0, Float64(a * b), Float64(2.0 * x)); else tmp = fma(y, Float64(-9.0 * Float64(z * t)), Float64(2.0 * x)); end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+34], N[(t * N[(-9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-26], N[(27.0 * N[(a * b), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], N[(y * N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(\left(y \cdot 9\right) \cdot z\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+34}:\\
\;\;\;\;\mathsf{fma}\left(t, -9 \cdot \left(y \cdot z\right), 2 \cdot x\right)\\
\mathbf{elif}\;t\_1 \leq 10^{-26}:\\
\;\;\;\;\mathsf{fma}\left(27, a \cdot b, 2 \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, -9 \cdot \left(z \cdot t\right), 2 \cdot x\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -9.99999999999999946e33Initial program 87.1%
Taylor expanded in a around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6474.3
Simplified74.3%
if -9.99999999999999946e33 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 1e-26Initial program 98.5%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6495.1
Simplified95.1%
if 1e-26 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) Initial program 92.4%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6494.1
Simplified94.1%
Taylor expanded in y around 0
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6488.3
Simplified88.3%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6488.3
Simplified88.3%
Taylor expanded in a around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6479.1
Simplified79.1%
Final simplification86.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (* (* y 9.0) z))))
(if (<= t_1 -1e+34)
(fma t (* -9.0 (* y z)) (* 2.0 x))
(if (<= t_1 1e-26)
(fma 27.0 (* a b) (* 2.0 x))
(fma t (* z (* y -9.0)) (* 2.0 x))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * ((y * 9.0) * z);
double tmp;
if (t_1 <= -1e+34) {
tmp = fma(t, (-9.0 * (y * z)), (2.0 * x));
} else if (t_1 <= 1e-26) {
tmp = fma(27.0, (a * b), (2.0 * x));
} else {
tmp = fma(t, (z * (y * -9.0)), (2.0 * x));
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(Float64(y * 9.0) * z)) tmp = 0.0 if (t_1 <= -1e+34) tmp = fma(t, Float64(-9.0 * Float64(y * z)), Float64(2.0 * x)); elseif (t_1 <= 1e-26) tmp = fma(27.0, Float64(a * b), Float64(2.0 * x)); else tmp = fma(t, Float64(z * Float64(y * -9.0)), Float64(2.0 * x)); end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+34], N[(t * N[(-9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-26], N[(27.0 * N[(a * b), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(\left(y \cdot 9\right) \cdot z\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+34}:\\
\;\;\;\;\mathsf{fma}\left(t, -9 \cdot \left(y \cdot z\right), 2 \cdot x\right)\\
\mathbf{elif}\;t\_1 \leq 10^{-26}:\\
\;\;\;\;\mathsf{fma}\left(27, a \cdot b, 2 \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, z \cdot \left(y \cdot -9\right), 2 \cdot x\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -9.99999999999999946e33Initial program 87.1%
Taylor expanded in a around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6474.3
Simplified74.3%
if -9.99999999999999946e33 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 1e-26Initial program 98.5%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6495.1
Simplified95.1%
if 1e-26 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) Initial program 92.4%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6492.5
Simplified92.5%
Taylor expanded in a around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6480.3
Simplified80.3%
Final simplification87.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma t (* z (* y -9.0)) (* 2.0 x))) (t_2 (* t (* (* y 9.0) z))))
(if (<= t_2 -1e+34)
t_1
(if (<= t_2 1e-26) (fma 27.0 (* a b) (* 2.0 x)) t_1))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(t, (z * (y * -9.0)), (2.0 * x));
double t_2 = t * ((y * 9.0) * z);
double tmp;
if (t_2 <= -1e+34) {
tmp = t_1;
} else if (t_2 <= 1e-26) {
tmp = fma(27.0, (a * b), (2.0 * x));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = fma(t, Float64(z * Float64(y * -9.0)), Float64(2.0 * x)) t_2 = Float64(t * Float64(Float64(y * 9.0) * z)) tmp = 0.0 if (t_2 <= -1e+34) tmp = t_1; elseif (t_2 <= 1e-26) tmp = fma(27.0, Float64(a * b), Float64(2.0 * x)); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+34], t$95$1, If[LessEqual[t$95$2, 1e-26], N[(27.0 * N[(a * b), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t, z \cdot \left(y \cdot -9\right), 2 \cdot x\right)\\
t_2 := t \cdot \left(\left(y \cdot 9\right) \cdot z\right)\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{-26}:\\
\;\;\;\;\mathsf{fma}\left(27, a \cdot b, 2 \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -9.99999999999999946e33 or 1e-26 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) Initial program 90.1%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6490.2
Simplified90.2%
Taylor expanded in a around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6477.6
Simplified77.6%
if -9.99999999999999946e33 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 1e-26Initial program 98.5%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6495.1
Simplified95.1%
Final simplification87.0%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (* (* y 9.0) z))))
(if (<= t_1 -1e+125)
(* t (* z (* y -9.0)))
(if (<= t_1 5e+210)
(fma 27.0 (* a b) (* 2.0 x))
(* y (* -9.0 (* z t)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * ((y * 9.0) * z);
double tmp;
if (t_1 <= -1e+125) {
tmp = t * (z * (y * -9.0));
} else if (t_1 <= 5e+210) {
tmp = fma(27.0, (a * b), (2.0 * x));
} else {
tmp = y * (-9.0 * (z * t));
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(Float64(y * 9.0) * z)) tmp = 0.0 if (t_1 <= -1e+125) tmp = Float64(t * Float64(z * Float64(y * -9.0))); elseif (t_1 <= 5e+210) tmp = fma(27.0, Float64(a * b), Float64(2.0 * x)); else tmp = Float64(y * Float64(-9.0 * Float64(z * t))); end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+125], N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+210], N[(27.0 * N[(a * b), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], N[(y * N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(\left(y \cdot 9\right) \cdot z\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+125}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+210}:\\
\;\;\;\;\mathsf{fma}\left(27, a \cdot b, 2 \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -9.9999999999999992e124Initial program 83.4%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6483.5
Simplified83.5%
Taylor expanded in t around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6469.6
Simplified69.6%
if -9.9999999999999992e124 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 4.9999999999999998e210Initial program 98.8%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6485.8
Simplified85.8%
if 4.9999999999999998e210 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) Initial program 87.1%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6492.4
Simplified92.4%
Taylor expanded in y around 0
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6489.9
Simplified89.9%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6489.9
Simplified89.9%
Taylor expanded in z around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6487.5
Simplified87.5%
Final simplification83.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= (* (* y 9.0) z) 1.1e+262) (fma t (* -9.0 (* y z)) (fma 27.0 (* a b) (* 2.0 x))) (fma y (* -9.0 (* z t)) (* 2.0 x))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((y * 9.0) * z) <= 1.1e+262) {
tmp = fma(t, (-9.0 * (y * z)), fma(27.0, (a * b), (2.0 * x)));
} else {
tmp = fma(y, (-9.0 * (z * t)), (2.0 * x));
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(y * 9.0) * z) <= 1.1e+262) tmp = fma(t, Float64(-9.0 * Float64(y * z)), fma(27.0, Float64(a * b), Float64(2.0 * x))); else tmp = fma(y, Float64(-9.0 * Float64(z * t)), Float64(2.0 * x)); end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision], 1.1e+262], N[(t * N[(-9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(y \cdot 9\right) \cdot z \leq 1.1 \cdot 10^{+262}:\\
\;\;\;\;\mathsf{fma}\left(t, -9 \cdot \left(y \cdot z\right), \mathsf{fma}\left(27, a \cdot b, 2 \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, -9 \cdot \left(z \cdot t\right), 2 \cdot x\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 y #s(literal 9 binary64)) z) < 1.10000000000000005e262Initial program 95.4%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6495.9
Simplified95.9%
if 1.10000000000000005e262 < (*.f64 (*.f64 y #s(literal 9 binary64)) z) Initial program 83.2%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6499.6
Simplified99.6%
Taylor expanded in y around 0
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6499.7
Simplified99.7%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6499.8
Simplified99.8%
Taylor expanded in a around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6499.6
Simplified99.6%
Final simplification96.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (* 27.0 a))))
(if (<= t_1 -5e+25)
(* 27.0 (* a b))
(if (<= t_1 1e+97) (* 2.0 x) (* a (* 27.0 b))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (27.0 * a);
double tmp;
if (t_1 <= -5e+25) {
tmp = 27.0 * (a * b);
} else if (t_1 <= 1e+97) {
tmp = 2.0 * x;
} else {
tmp = a * (27.0 * b);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = b * (27.0d0 * a)
if (t_1 <= (-5d+25)) then
tmp = 27.0d0 * (a * b)
else if (t_1 <= 1d+97) then
tmp = 2.0d0 * x
else
tmp = a * (27.0d0 * b)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (27.0 * a);
double tmp;
if (t_1 <= -5e+25) {
tmp = 27.0 * (a * b);
} else if (t_1 <= 1e+97) {
tmp = 2.0 * x;
} else {
tmp = a * (27.0 * b);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = b * (27.0 * a) tmp = 0 if t_1 <= -5e+25: tmp = 27.0 * (a * b) elif t_1 <= 1e+97: tmp = 2.0 * x else: tmp = a * (27.0 * b) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(27.0 * a)) tmp = 0.0 if (t_1 <= -5e+25) tmp = Float64(27.0 * Float64(a * b)); elseif (t_1 <= 1e+97) tmp = Float64(2.0 * x); else tmp = Float64(a * Float64(27.0 * b)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = b * (27.0 * a);
tmp = 0.0;
if (t_1 <= -5e+25)
tmp = 27.0 * (a * b);
elseif (t_1 <= 1e+97)
tmp = 2.0 * x;
else
tmp = a * (27.0 * b);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(27.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+25], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+97], N[(2.0 * x), $MachinePrecision], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(27 \cdot a\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+25}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+97}:\\
\;\;\;\;2 \cdot x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -5.00000000000000024e25Initial program 92.7%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6498.0
Simplified98.0%
Taylor expanded in y around 0
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6491.0
Simplified91.0%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6468.5
Simplified68.5%
if -5.00000000000000024e25 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 1.0000000000000001e97Initial program 96.7%
Taylor expanded in x around inf
lower-*.f6448.1
Simplified48.1%
if 1.0000000000000001e97 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 90.1%
Taylor expanded in a around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6477.8
Simplified77.8%
Final simplification58.0%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (* 27.0 a))) (t_2 (* 27.0 (* a b)))) (if (<= t_1 -5e+25) t_2 (if (<= t_1 1e+97) (* 2.0 x) t_2))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (27.0 * a);
double t_2 = 27.0 * (a * b);
double tmp;
if (t_1 <= -5e+25) {
tmp = t_2;
} else if (t_1 <= 1e+97) {
tmp = 2.0 * x;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = b * (27.0d0 * a)
t_2 = 27.0d0 * (a * b)
if (t_1 <= (-5d+25)) then
tmp = t_2
else if (t_1 <= 1d+97) then
tmp = 2.0d0 * x
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (27.0 * a);
double t_2 = 27.0 * (a * b);
double tmp;
if (t_1 <= -5e+25) {
tmp = t_2;
} else if (t_1 <= 1e+97) {
tmp = 2.0 * x;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = b * (27.0 * a) t_2 = 27.0 * (a * b) tmp = 0 if t_1 <= -5e+25: tmp = t_2 elif t_1 <= 1e+97: tmp = 2.0 * x else: tmp = t_2 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(27.0 * a)) t_2 = Float64(27.0 * Float64(a * b)) tmp = 0.0 if (t_1 <= -5e+25) tmp = t_2; elseif (t_1 <= 1e+97) tmp = Float64(2.0 * x); else tmp = t_2; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = b * (27.0 * a);
t_2 = 27.0 * (a * b);
tmp = 0.0;
if (t_1 <= -5e+25)
tmp = t_2;
elseif (t_1 <= 1e+97)
tmp = 2.0 * x;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(27.0 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+25], t$95$2, If[LessEqual[t$95$1, 1e+97], N[(2.0 * x), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(27 \cdot a\right)\\
t_2 := 27 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+25}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 10^{+97}:\\
\;\;\;\;2 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -5.00000000000000024e25 or 1.0000000000000001e97 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 91.4%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6497.0
Simplified97.0%
Taylor expanded in y around 0
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6492.4
Simplified92.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6472.9
Simplified72.9%
if -5.00000000000000024e25 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 1.0000000000000001e97Initial program 96.7%
Taylor expanded in x around inf
lower-*.f6448.1
Simplified48.1%
Final simplification58.0%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (* 2.0 x))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
return 2.0 * x;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
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
code = 2.0d0 * x
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
return 2.0 * x;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): return 2.0 * x
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(2.0 * x) end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
tmp = 2.0 * x;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := N[(2.0 * x), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
2 \cdot x
\end{array}
Initial program 94.6%
Taylor expanded in x around inf
lower-*.f6431.4
Simplified31.4%
(FPCore (x y z t a b) :precision binary64 (if (< y 7.590524218811189e-161) (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* a (* 27.0 b))) (+ (- (* x 2.0) (* 9.0 (* y (* t z)))) (* (* a 27.0) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y < 7.590524218811189e-161) {
tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
} else {
tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (y < 7.590524218811189d-161) then
tmp = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + (a * (27.0d0 * b))
else
tmp = ((x * 2.0d0) - (9.0d0 * (y * (t * z)))) + ((a * 27.0d0) * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y < 7.590524218811189e-161) {
tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
} else {
tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y < 7.590524218811189e-161: tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b)) else: tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y < 7.590524218811189e-161) tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(a * Float64(27.0 * b))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(9.0 * Float64(y * Float64(t * z)))) + Float64(Float64(a * 27.0) * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y < 7.590524218811189e-161) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b)); else tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Less[y, 7.590524218811189e-161], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y < 7.590524218811189 \cdot 10^{-161}:\\
\;\;\;\;\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - 9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right) + \left(a \cdot 27\right) \cdot b\\
\end{array}
\end{array}
herbie shell --seed 2024215
(FPCore (x y z t a b)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, A"
:precision binary64
:alt
(! :herbie-platform default (if (< y 7590524218811189/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x 2) (* (* (* y 9) z) t)) (* a (* 27 b))) (+ (- (* x 2) (* 9 (* y (* t z)))) (* (* a 27) b))))
(+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))