
(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 8 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 (+ (* x 2.0) (+ (* a (* 27.0 b)) (* y (* t (* z -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) {
return (x * 2.0) + ((a * (27.0 * b)) + (y * (t * (z * -9.0))));
}
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 = (x * 2.0d0) + ((a * (27.0d0 * b)) + (y * (t * (z * (-9.0d0)))))
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 (x * 2.0) + ((a * (27.0 * b)) + (y * (t * (z * -9.0))));
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): return (x * 2.0) + ((a * (27.0 * b)) + (y * (t * (z * -9.0))))
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(Float64(x * 2.0) + Float64(Float64(a * Float64(27.0 * b)) + Float64(y * Float64(t * Float64(z * -9.0))))) 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 = (x * 2.0) + ((a * (27.0 * b)) + (y * (t * (z * -9.0))));
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[(N[(x * 2.0), $MachinePrecision] + N[(N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
x \cdot 2 + \left(a \cdot \left(27 \cdot b\right) + y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\right)
\end{array}
Initial program 95.6%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval96.1%
Simplified96.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 (* a 27.0))))
(if (<= t_1 -2e+113)
(+ (* x 2.0) t_1)
(if (<= t_1 1e+29)
(+ (* x 2.0) (* -9.0 (* y (* t z))))
(+ (* x 2.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 = b * (a * 27.0);
double tmp;
if (t_1 <= -2e+113) {
tmp = (x * 2.0) + t_1;
} else if (t_1 <= 1e+29) {
tmp = (x * 2.0) + (-9.0 * (y * (t * z)));
} else {
tmp = (x * 2.0) + (27.0 * (a * 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 * (a * 27.0d0)
if (t_1 <= (-2d+113)) then
tmp = (x * 2.0d0) + t_1
else if (t_1 <= 1d+29) then
tmp = (x * 2.0d0) + ((-9.0d0) * (y * (t * z)))
else
tmp = (x * 2.0d0) + (27.0d0 * (a * 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 * (a * 27.0);
double tmp;
if (t_1 <= -2e+113) {
tmp = (x * 2.0) + t_1;
} else if (t_1 <= 1e+29) {
tmp = (x * 2.0) + (-9.0 * (y * (t * z)));
} else {
tmp = (x * 2.0) + (27.0 * (a * 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 * (a * 27.0) tmp = 0 if t_1 <= -2e+113: tmp = (x * 2.0) + t_1 elif t_1 <= 1e+29: tmp = (x * 2.0) + (-9.0 * (y * (t * z))) else: tmp = (x * 2.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(b * Float64(a * 27.0)) tmp = 0.0 if (t_1 <= -2e+113) tmp = Float64(Float64(x * 2.0) + t_1); elseif (t_1 <= 1e+29) tmp = Float64(Float64(x * 2.0) + Float64(-9.0 * Float64(y * Float64(t * z)))); else tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * 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 * (a * 27.0);
tmp = 0.0;
if (t_1 <= -2e+113)
tmp = (x * 2.0) + t_1;
elseif (t_1 <= 1e+29)
tmp = (x * 2.0) + (-9.0 * (y * (t * z)));
else
tmp = (x * 2.0) + (27.0 * (a * 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[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+113], N[(N[(x * 2.0), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t$95$1, 1e+29], N[(N[(x * 2.0), $MachinePrecision] + N[(-9.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + 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 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+113}:\\
\;\;\;\;x \cdot 2 + t\_1\\
\mathbf{elif}\;t\_1 \leq 10^{+29}:\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -2e113Initial program 89.5%
Taylor expanded in x around inf
*-lowering-*.f6485.5%
Simplified85.5%
if -2e113 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 9.99999999999999914e28Initial program 98.6%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval96.3%
Simplified96.3%
Taylor expanded in a around 0
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6482.2%
Simplified82.2%
if 9.99999999999999914e28 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 91.1%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval93.5%
Simplified93.5%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6487.4%
Simplified87.4%
Final simplification83.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
(if (<= z -2e-22)
(* y (* t (* z -9.0)))
(if (<= z 8400000000.0)
(+ (* x 2.0) (* b (* a 27.0)))
(* z (* t (* 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 tmp;
if (z <= -2e-22) {
tmp = y * (t * (z * -9.0));
} else if (z <= 8400000000.0) {
tmp = (x * 2.0) + (b * (a * 27.0));
} else {
tmp = z * (t * (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) :: tmp
if (z <= (-2d-22)) then
tmp = y * (t * (z * (-9.0d0)))
else if (z <= 8400000000.0d0) then
tmp = (x * 2.0d0) + (b * (a * 27.0d0))
else
tmp = z * (t * (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 tmp;
if (z <= -2e-22) {
tmp = y * (t * (z * -9.0));
} else if (z <= 8400000000.0) {
tmp = (x * 2.0) + (b * (a * 27.0));
} else {
tmp = z * (t * (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): tmp = 0 if z <= -2e-22: tmp = y * (t * (z * -9.0)) elif z <= 8400000000.0: tmp = (x * 2.0) + (b * (a * 27.0)) else: tmp = z * (t * (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) tmp = 0.0 if (z <= -2e-22) tmp = Float64(y * Float64(t * Float64(z * -9.0))); elseif (z <= 8400000000.0) tmp = Float64(Float64(x * 2.0) + Float64(b * Float64(a * 27.0))); else tmp = Float64(z * Float64(t * 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)
tmp = 0.0;
if (z <= -2e-22)
tmp = y * (t * (z * -9.0));
elseif (z <= 8400000000.0)
tmp = (x * 2.0) + (b * (a * 27.0));
else
tmp = z * (t * (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_] := If[LessEqual[z, -2e-22], N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8400000000.0], N[(N[(x * 2.0), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(t * 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}
\mathbf{if}\;z \leq -2 \cdot 10^{-22}:\\
\;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq 8400000000:\\
\;\;\;\;x \cdot 2 + b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(t \cdot \left(y \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -2.0000000000000001e-22Initial program 92.6%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval90.0%
Simplified90.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6452.4%
Simplified52.4%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6452.4%
Applied egg-rr52.4%
if -2.0000000000000001e-22 < z < 8.4e9Initial program 98.9%
Taylor expanded in x around inf
*-lowering-*.f6478.7%
Simplified78.7%
if 8.4e9 < z Initial program 92.1%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval95.2%
Simplified95.2%
Taylor expanded in y around inf
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6454.9%
Simplified54.9%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6454.9%
Applied egg-rr54.9%
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6454.9%
Applied egg-rr54.9%
Final simplification65.9%
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 (* 27.0 (* a b)))) (if (<= b -5.8e-26) t_1 (if (<= b 2.7e+94) (* y (* t (* z -9.0))) 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 = 27.0 * (a * b);
double tmp;
if (b <= -5.8e-26) {
tmp = t_1;
} else if (b <= 2.7e+94) {
tmp = y * (t * (z * -9.0));
} 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) :: tmp
t_1 = 27.0d0 * (a * b)
if (b <= (-5.8d-26)) then
tmp = t_1
else if (b <= 2.7d+94) then
tmp = y * (t * (z * (-9.0d0)))
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 = 27.0 * (a * b);
double tmp;
if (b <= -5.8e-26) {
tmp = t_1;
} else if (b <= 2.7e+94) {
tmp = y * (t * (z * -9.0));
} 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 = 27.0 * (a * b) tmp = 0 if b <= -5.8e-26: tmp = t_1 elif b <= 2.7e+94: tmp = y * (t * (z * -9.0)) 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(27.0 * Float64(a * b)) tmp = 0.0 if (b <= -5.8e-26) tmp = t_1; elseif (b <= 2.7e+94) tmp = Float64(y * Float64(t * Float64(z * -9.0))); 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 = 27.0 * (a * b);
tmp = 0.0;
if (b <= -5.8e-26)
tmp = t_1;
elseif (b <= 2.7e+94)
tmp = y * (t * (z * -9.0));
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[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.8e-26], t$95$1, If[LessEqual[b, 2.7e+94], N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $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 := 27 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;b \leq -5.8 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.7 \cdot 10^{+94}:\\
\;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -5.7999999999999996e-26 or 2.7000000000000001e94 < b Initial program 96.1%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval96.2%
Simplified96.2%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6464.9%
Simplified64.9%
if -5.7999999999999996e-26 < b < 2.7000000000000001e94Initial program 95.2%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval96.0%
Simplified96.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6446.8%
Simplified46.8%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6446.8%
Applied egg-rr46.8%
Final simplification54.3%
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 (* 27.0 (* a b)))) (if (<= b -3.3e-26) t_1 (if (<= b 1.5e+94) (* -9.0 (* y (* t z))) 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 = 27.0 * (a * b);
double tmp;
if (b <= -3.3e-26) {
tmp = t_1;
} else if (b <= 1.5e+94) {
tmp = -9.0 * (y * (t * z));
} 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) :: tmp
t_1 = 27.0d0 * (a * b)
if (b <= (-3.3d-26)) then
tmp = t_1
else if (b <= 1.5d+94) then
tmp = (-9.0d0) * (y * (t * z))
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 = 27.0 * (a * b);
double tmp;
if (b <= -3.3e-26) {
tmp = t_1;
} else if (b <= 1.5e+94) {
tmp = -9.0 * (y * (t * z));
} 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 = 27.0 * (a * b) tmp = 0 if b <= -3.3e-26: tmp = t_1 elif b <= 1.5e+94: tmp = -9.0 * (y * (t * z)) 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(27.0 * Float64(a * b)) tmp = 0.0 if (b <= -3.3e-26) tmp = t_1; elseif (b <= 1.5e+94) tmp = Float64(-9.0 * Float64(y * Float64(t * z))); 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 = 27.0 * (a * b);
tmp = 0.0;
if (b <= -3.3e-26)
tmp = t_1;
elseif (b <= 1.5e+94)
tmp = -9.0 * (y * (t * z));
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[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.3e-26], t$95$1, If[LessEqual[b, 1.5e+94], N[(-9.0 * N[(y * N[(t * z), $MachinePrecision]), $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 := 27 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;b \leq -3.3 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.5 \cdot 10^{+94}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.2999999999999998e-26 or 1.5e94 < b Initial program 96.1%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval96.2%
Simplified96.2%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6464.9%
Simplified64.9%
if -3.2999999999999998e-26 < b < 1.5e94Initial program 95.2%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval96.0%
Simplified96.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6446.8%
Simplified46.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 (if (<= a -0.008) (* b (* a 27.0)) (if (<= a 7.2e-135) (* x 2.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 tmp;
if (a <= -0.008) {
tmp = b * (a * 27.0);
} else if (a <= 7.2e-135) {
tmp = x * 2.0;
} else {
tmp = 27.0 * (a * 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) :: tmp
if (a <= (-0.008d0)) then
tmp = b * (a * 27.0d0)
else if (a <= 7.2d-135) then
tmp = x * 2.0d0
else
tmp = 27.0d0 * (a * 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 tmp;
if (a <= -0.008) {
tmp = b * (a * 27.0);
} else if (a <= 7.2e-135) {
tmp = x * 2.0;
} else {
tmp = 27.0 * (a * b);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if a <= -0.008: tmp = b * (a * 27.0) elif a <= 7.2e-135: tmp = x * 2.0 else: tmp = 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) tmp = 0.0 if (a <= -0.008) tmp = Float64(b * Float64(a * 27.0)); elseif (a <= 7.2e-135) tmp = Float64(x * 2.0); else tmp = Float64(27.0 * Float64(a * 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)
tmp = 0.0;
if (a <= -0.008)
tmp = b * (a * 27.0);
elseif (a <= 7.2e-135)
tmp = x * 2.0;
else
tmp = 27.0 * (a * 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_] := If[LessEqual[a, -0.008], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.2e-135], N[(x * 2.0), $MachinePrecision], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.008:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{elif}\;a \leq 7.2 \cdot 10^{-135}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if a < -0.0080000000000000002Initial program 91.5%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval93.6%
Simplified93.6%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6457.2%
Simplified57.2%
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6457.3%
Applied egg-rr57.3%
if -0.0080000000000000002 < a < 7.19999999999999955e-135Initial program 97.8%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval95.8%
Simplified95.8%
Taylor expanded in x around inf
*-lowering-*.f6441.9%
Simplified41.9%
if 7.19999999999999955e-135 < a Initial program 95.9%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval97.9%
Simplified97.9%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6447.1%
Simplified47.1%
Final simplification47.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 (* 27.0 (* a b)))) (if (<= a -0.0065) t_1 (if (<= a 1.3e-137) (* x 2.0) 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 = 27.0 * (a * b);
double tmp;
if (a <= -0.0065) {
tmp = t_1;
} else if (a <= 1.3e-137) {
tmp = x * 2.0;
} 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) :: tmp
t_1 = 27.0d0 * (a * b)
if (a <= (-0.0065d0)) then
tmp = t_1
else if (a <= 1.3d-137) then
tmp = x * 2.0d0
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 = 27.0 * (a * b);
double tmp;
if (a <= -0.0065) {
tmp = t_1;
} else if (a <= 1.3e-137) {
tmp = x * 2.0;
} 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 = 27.0 * (a * b) tmp = 0 if a <= -0.0065: tmp = t_1 elif a <= 1.3e-137: tmp = x * 2.0 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(27.0 * Float64(a * b)) tmp = 0.0 if (a <= -0.0065) tmp = t_1; elseif (a <= 1.3e-137) tmp = Float64(x * 2.0); 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 = 27.0 * (a * b);
tmp = 0.0;
if (a <= -0.0065)
tmp = t_1;
elseif (a <= 1.3e-137)
tmp = x * 2.0;
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[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -0.0065], t$95$1, If[LessEqual[a, 1.3e-137], N[(x * 2.0), $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 := 27 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;a \leq -0.0065:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{-137}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -0.0064999999999999997 or 1.3e-137 < a Initial program 94.3%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval96.3%
Simplified96.3%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6451.0%
Simplified51.0%
if -0.0064999999999999997 < a < 1.3e-137Initial program 97.8%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval95.8%
Simplified95.8%
Taylor expanded in x around inf
*-lowering-*.f6441.9%
Simplified41.9%
Final simplification47.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 (* x 2.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) {
return x * 2.0;
}
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 = x * 2.0d0
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 x * 2.0;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): return x * 2.0
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(x * 2.0) 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 = x * 2.0;
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[(x * 2.0), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
x \cdot 2
\end{array}
Initial program 95.6%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval96.1%
Simplified96.1%
Taylor expanded in x around inf
*-lowering-*.f6427.1%
Simplified27.1%
Final simplification27.1%
(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 2024145
(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)))