
(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 (+ (- (* x 2.0) (* (* y (* z t)) 9.0)) (* (* 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) {
return ((x * 2.0) - ((y * (z * t)) * 9.0)) + ((a * 27.0) * b);
}
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) - ((y * (z * t)) * 9.0d0)) + ((a * 27.0d0) * b)
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) - ((y * (z * t)) * 9.0)) + ((a * 27.0) * b);
}
[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) - ((y * (z * t)) * 9.0)) + ((a * 27.0) * b)
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(y * Float64(z * t)) * 9.0)) + Float64(Float64(a * 27.0) * b)) 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) - ((y * (z * t)) * 9.0)) + ((a * 27.0) * b);
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[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\left(x \cdot 2 - \left(y \cdot \left(z \cdot t\right)\right) \cdot 9\right) + \left(a \cdot 27\right) \cdot b
\end{array}
Initial program 95.0%
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6496.0%
Applied egg-rr96.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 (* (* a 27.0) b)))
(if (<= t_1 -5e+38)
(* a (* 27.0 b))
(if (<= t_1 -2e-230)
(* -9.0 (* z (* y t)))
(if (<= t_1 1e-176)
(* x 2.0)
(if (<= t_1 2e+141) (* (* y (* z t)) -9.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 = (a * 27.0) * b;
double tmp;
if (t_1 <= -5e+38) {
tmp = a * (27.0 * b);
} else if (t_1 <= -2e-230) {
tmp = -9.0 * (z * (y * t));
} else if (t_1 <= 1e-176) {
tmp = x * 2.0;
} else if (t_1 <= 2e+141) {
tmp = (y * (z * t)) * -9.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) :: t_1
real(8) :: tmp
t_1 = (a * 27.0d0) * b
if (t_1 <= (-5d+38)) then
tmp = a * (27.0d0 * b)
else if (t_1 <= (-2d-230)) then
tmp = (-9.0d0) * (z * (y * t))
else if (t_1 <= 1d-176) then
tmp = x * 2.0d0
else if (t_1 <= 2d+141) then
tmp = (y * (z * t)) * (-9.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 t_1 = (a * 27.0) * b;
double tmp;
if (t_1 <= -5e+38) {
tmp = a * (27.0 * b);
} else if (t_1 <= -2e-230) {
tmp = -9.0 * (z * (y * t));
} else if (t_1 <= 1e-176) {
tmp = x * 2.0;
} else if (t_1 <= 2e+141) {
tmp = (y * (z * t)) * -9.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): t_1 = (a * 27.0) * b tmp = 0 if t_1 <= -5e+38: tmp = a * (27.0 * b) elif t_1 <= -2e-230: tmp = -9.0 * (z * (y * t)) elif t_1 <= 1e-176: tmp = x * 2.0 elif t_1 <= 2e+141: tmp = (y * (z * t)) * -9.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) t_1 = Float64(Float64(a * 27.0) * b) tmp = 0.0 if (t_1 <= -5e+38) tmp = Float64(a * Float64(27.0 * b)); elseif (t_1 <= -2e-230) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (t_1 <= 1e-176) tmp = Float64(x * 2.0); elseif (t_1 <= 2e+141) tmp = Float64(Float64(y * Float64(z * t)) * -9.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)
t_1 = (a * 27.0) * b;
tmp = 0.0;
if (t_1 <= -5e+38)
tmp = a * (27.0 * b);
elseif (t_1 <= -2e-230)
tmp = -9.0 * (z * (y * t));
elseif (t_1 <= 1e-176)
tmp = x * 2.0;
elseif (t_1 <= 2e+141)
tmp = (y * (z * t)) * -9.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_] := Block[{t$95$1 = N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+38], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-230], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-176], N[(x * 2.0), $MachinePrecision], If[LessEqual[t$95$1, 2e+141], N[(N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision] * -9.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}
t_1 := \left(a \cdot 27\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+38}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-230}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;t\_1 \leq 10^{-176}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+141}:\\
\;\;\;\;\left(y \cdot \left(z \cdot t\right)\right) \cdot -9\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -4.9999999999999997e38Initial program 94.1%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6453.7%
Simplified53.7%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6453.7%
Applied egg-rr53.7%
if -4.9999999999999997e38 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -2.00000000000000009e-230Initial program 95.8%
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6493.8%
Applied egg-rr93.8%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6461.8%
Simplified61.8%
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
associate-*r*N/A
distribute-lft-neg-inN/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6461.8%
Applied egg-rr61.8%
if -2.00000000000000009e-230 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 1e-176Initial program 94.0%
Taylor expanded in x around inf
*-lowering-*.f6460.0%
Simplified60.0%
if 1e-176 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 2.00000000000000003e141Initial program 96.1%
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6499.7%
Applied egg-rr99.7%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6458.1%
Simplified58.1%
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6461.7%
Applied egg-rr61.7%
if 2.00000000000000003e141 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 95.3%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6484.2%
Simplified84.2%
Final simplification63.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 (* (* a 27.0) b)))
(if (<= t_1 -5e+38)
(* a (* 27.0 b))
(if (<= t_1 -2e-230)
(* -9.0 (* z (* y t)))
(if (<= t_1 1e-176)
(* x 2.0)
(if (<= t_1 2e+141) (* y (* t (* z -9.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 = (a * 27.0) * b;
double tmp;
if (t_1 <= -5e+38) {
tmp = a * (27.0 * b);
} else if (t_1 <= -2e-230) {
tmp = -9.0 * (z * (y * t));
} else if (t_1 <= 1e-176) {
tmp = x * 2.0;
} else if (t_1 <= 2e+141) {
tmp = y * (t * (z * -9.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) :: t_1
real(8) :: tmp
t_1 = (a * 27.0d0) * b
if (t_1 <= (-5d+38)) then
tmp = a * (27.0d0 * b)
else if (t_1 <= (-2d-230)) then
tmp = (-9.0d0) * (z * (y * t))
else if (t_1 <= 1d-176) then
tmp = x * 2.0d0
else if (t_1 <= 2d+141) then
tmp = y * (t * (z * (-9.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 t_1 = (a * 27.0) * b;
double tmp;
if (t_1 <= -5e+38) {
tmp = a * (27.0 * b);
} else if (t_1 <= -2e-230) {
tmp = -9.0 * (z * (y * t));
} else if (t_1 <= 1e-176) {
tmp = x * 2.0;
} else if (t_1 <= 2e+141) {
tmp = y * (t * (z * -9.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): t_1 = (a * 27.0) * b tmp = 0 if t_1 <= -5e+38: tmp = a * (27.0 * b) elif t_1 <= -2e-230: tmp = -9.0 * (z * (y * t)) elif t_1 <= 1e-176: tmp = x * 2.0 elif t_1 <= 2e+141: tmp = y * (t * (z * -9.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) t_1 = Float64(Float64(a * 27.0) * b) tmp = 0.0 if (t_1 <= -5e+38) tmp = Float64(a * Float64(27.0 * b)); elseif (t_1 <= -2e-230) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (t_1 <= 1e-176) tmp = Float64(x * 2.0); elseif (t_1 <= 2e+141) tmp = Float64(y * Float64(t * Float64(z * -9.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)
t_1 = (a * 27.0) * b;
tmp = 0.0;
if (t_1 <= -5e+38)
tmp = a * (27.0 * b);
elseif (t_1 <= -2e-230)
tmp = -9.0 * (z * (y * t));
elseif (t_1 <= 1e-176)
tmp = x * 2.0;
elseif (t_1 <= 2e+141)
tmp = y * (t * (z * -9.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_] := Block[{t$95$1 = N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+38], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-230], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-176], N[(x * 2.0), $MachinePrecision], If[LessEqual[t$95$1, 2e+141], N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $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}
t_1 := \left(a \cdot 27\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+38}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-230}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;t\_1 \leq 10^{-176}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+141}:\\
\;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -4.9999999999999997e38Initial program 94.1%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6453.7%
Simplified53.7%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6453.7%
Applied egg-rr53.7%
if -4.9999999999999997e38 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -2.00000000000000009e-230Initial program 95.8%
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6493.8%
Applied egg-rr93.8%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6461.8%
Simplified61.8%
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
associate-*r*N/A
distribute-lft-neg-inN/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6461.8%
Applied egg-rr61.8%
if -2.00000000000000009e-230 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 1e-176Initial program 94.0%
Taylor expanded in x around inf
*-lowering-*.f6460.0%
Simplified60.0%
if 1e-176 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 2.00000000000000003e141Initial program 96.1%
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6499.7%
Applied egg-rr99.7%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6458.1%
Simplified58.1%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6461.7%
Applied egg-rr61.7%
if 2.00000000000000003e141 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 95.3%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6484.2%
Simplified84.2%
Final simplification63.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 (* (* a 27.0) b)))
(if (<= t_1 -5e+38)
(* a (* 27.0 b))
(if (<= t_1 -2e-230)
(* (* z t) (* y -9.0))
(if (<= t_1 1e-176)
(* x 2.0)
(if (<= t_1 2e+141) (* y (* t (* z -9.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 = (a * 27.0) * b;
double tmp;
if (t_1 <= -5e+38) {
tmp = a * (27.0 * b);
} else if (t_1 <= -2e-230) {
tmp = (z * t) * (y * -9.0);
} else if (t_1 <= 1e-176) {
tmp = x * 2.0;
} else if (t_1 <= 2e+141) {
tmp = y * (t * (z * -9.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) :: t_1
real(8) :: tmp
t_1 = (a * 27.0d0) * b
if (t_1 <= (-5d+38)) then
tmp = a * (27.0d0 * b)
else if (t_1 <= (-2d-230)) then
tmp = (z * t) * (y * (-9.0d0))
else if (t_1 <= 1d-176) then
tmp = x * 2.0d0
else if (t_1 <= 2d+141) then
tmp = y * (t * (z * (-9.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 t_1 = (a * 27.0) * b;
double tmp;
if (t_1 <= -5e+38) {
tmp = a * (27.0 * b);
} else if (t_1 <= -2e-230) {
tmp = (z * t) * (y * -9.0);
} else if (t_1 <= 1e-176) {
tmp = x * 2.0;
} else if (t_1 <= 2e+141) {
tmp = y * (t * (z * -9.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): t_1 = (a * 27.0) * b tmp = 0 if t_1 <= -5e+38: tmp = a * (27.0 * b) elif t_1 <= -2e-230: tmp = (z * t) * (y * -9.0) elif t_1 <= 1e-176: tmp = x * 2.0 elif t_1 <= 2e+141: tmp = y * (t * (z * -9.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) t_1 = Float64(Float64(a * 27.0) * b) tmp = 0.0 if (t_1 <= -5e+38) tmp = Float64(a * Float64(27.0 * b)); elseif (t_1 <= -2e-230) tmp = Float64(Float64(z * t) * Float64(y * -9.0)); elseif (t_1 <= 1e-176) tmp = Float64(x * 2.0); elseif (t_1 <= 2e+141) tmp = Float64(y * Float64(t * Float64(z * -9.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)
t_1 = (a * 27.0) * b;
tmp = 0.0;
if (t_1 <= -5e+38)
tmp = a * (27.0 * b);
elseif (t_1 <= -2e-230)
tmp = (z * t) * (y * -9.0);
elseif (t_1 <= 1e-176)
tmp = x * 2.0;
elseif (t_1 <= 2e+141)
tmp = y * (t * (z * -9.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_] := Block[{t$95$1 = N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+38], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-230], N[(N[(z * t), $MachinePrecision] * N[(y * -9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-176], N[(x * 2.0), $MachinePrecision], If[LessEqual[t$95$1, 2e+141], N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $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}
t_1 := \left(a \cdot 27\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+38}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-230}:\\
\;\;\;\;\left(z \cdot t\right) \cdot \left(y \cdot -9\right)\\
\mathbf{elif}\;t\_1 \leq 10^{-176}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+141}:\\
\;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -4.9999999999999997e38Initial program 94.1%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6453.7%
Simplified53.7%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6453.7%
Applied egg-rr53.7%
if -4.9999999999999997e38 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -2.00000000000000009e-230Initial program 95.8%
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6493.8%
Applied egg-rr93.8%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6461.8%
Simplified61.8%
associate-*r*N/A
associate-*r*N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
*-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-lft-neg-inN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6457.9%
Applied egg-rr57.9%
if -2.00000000000000009e-230 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 1e-176Initial program 94.0%
Taylor expanded in x around inf
*-lowering-*.f6460.0%
Simplified60.0%
if 1e-176 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 2.00000000000000003e141Initial program 96.1%
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6499.7%
Applied egg-rr99.7%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6458.1%
Simplified58.1%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6461.7%
Applied egg-rr61.7%
if 2.00000000000000003e141 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 95.3%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6484.2%
Simplified84.2%
Final simplification62.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 (* y (* t (* z -9.0)))) (t_2 (* (* a 27.0) b)))
(if (<= t_2 -5e+38)
(* a (* 27.0 b))
(if (<= t_2 -2e-230)
t_1
(if (<= t_2 1e-176)
(* x 2.0)
(if (<= t_2 2e+141) t_1 (* 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 = y * (t * (z * -9.0));
double t_2 = (a * 27.0) * b;
double tmp;
if (t_2 <= -5e+38) {
tmp = a * (27.0 * b);
} else if (t_2 <= -2e-230) {
tmp = t_1;
} else if (t_2 <= 1e-176) {
tmp = x * 2.0;
} else if (t_2 <= 2e+141) {
tmp = t_1;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (t * (z * (-9.0d0)))
t_2 = (a * 27.0d0) * b
if (t_2 <= (-5d+38)) then
tmp = a * (27.0d0 * b)
else if (t_2 <= (-2d-230)) then
tmp = t_1
else if (t_2 <= 1d-176) then
tmp = x * 2.0d0
else if (t_2 <= 2d+141) then
tmp = t_1
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 t_1 = y * (t * (z * -9.0));
double t_2 = (a * 27.0) * b;
double tmp;
if (t_2 <= -5e+38) {
tmp = a * (27.0 * b);
} else if (t_2 <= -2e-230) {
tmp = t_1;
} else if (t_2 <= 1e-176) {
tmp = x * 2.0;
} else if (t_2 <= 2e+141) {
tmp = t_1;
} 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): t_1 = y * (t * (z * -9.0)) t_2 = (a * 27.0) * b tmp = 0 if t_2 <= -5e+38: tmp = a * (27.0 * b) elif t_2 <= -2e-230: tmp = t_1 elif t_2 <= 1e-176: tmp = x * 2.0 elif t_2 <= 2e+141: tmp = t_1 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) t_1 = Float64(y * Float64(t * Float64(z * -9.0))) t_2 = Float64(Float64(a * 27.0) * b) tmp = 0.0 if (t_2 <= -5e+38) tmp = Float64(a * Float64(27.0 * b)); elseif (t_2 <= -2e-230) tmp = t_1; elseif (t_2 <= 1e-176) tmp = Float64(x * 2.0); elseif (t_2 <= 2e+141) tmp = t_1; 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)
t_1 = y * (t * (z * -9.0));
t_2 = (a * 27.0) * b;
tmp = 0.0;
if (t_2 <= -5e+38)
tmp = a * (27.0 * b);
elseif (t_2 <= -2e-230)
tmp = t_1;
elseif (t_2 <= 1e-176)
tmp = x * 2.0;
elseif (t_2 <= 2e+141)
tmp = t_1;
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_] := Block[{t$95$1 = N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+38], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -2e-230], t$95$1, If[LessEqual[t$95$2, 1e-176], N[(x * 2.0), $MachinePrecision], If[LessEqual[t$95$2, 2e+141], t$95$1, 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}
t_1 := y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\
t_2 := \left(a \cdot 27\right) \cdot b\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+38}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-230}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{-176}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+141}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -4.9999999999999997e38Initial program 94.1%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6453.7%
Simplified53.7%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6453.7%
Applied egg-rr53.7%
if -4.9999999999999997e38 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -2.00000000000000009e-230 or 1e-176 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 2.00000000000000003e141Initial program 95.9%
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6496.8%
Applied egg-rr96.8%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6459.9%
Simplified59.9%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6459.8%
Applied egg-rr59.8%
if -2.00000000000000009e-230 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 1e-176Initial program 94.0%
Taylor expanded in x around inf
*-lowering-*.f6460.0%
Simplified60.0%
if 2.00000000000000003e141 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 95.3%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6484.2%
Simplified84.2%
Final simplification62.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 (* -9.0 (* y z)))) (t_2 (* (* a 27.0) b)))
(if (<= t_2 -2e+36)
(* a (* 27.0 b))
(if (<= t_2 -2e-230)
t_1
(if (<= t_2 1e-176)
(* x 2.0)
(if (<= t_2 5e+170) t_1 (* 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 * (-9.0 * (y * z));
double t_2 = (a * 27.0) * b;
double tmp;
if (t_2 <= -2e+36) {
tmp = a * (27.0 * b);
} else if (t_2 <= -2e-230) {
tmp = t_1;
} else if (t_2 <= 1e-176) {
tmp = x * 2.0;
} else if (t_2 <= 5e+170) {
tmp = t_1;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * ((-9.0d0) * (y * z))
t_2 = (a * 27.0d0) * b
if (t_2 <= (-2d+36)) then
tmp = a * (27.0d0 * b)
else if (t_2 <= (-2d-230)) then
tmp = t_1
else if (t_2 <= 1d-176) then
tmp = x * 2.0d0
else if (t_2 <= 5d+170) then
tmp = t_1
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 t_1 = t * (-9.0 * (y * z));
double t_2 = (a * 27.0) * b;
double tmp;
if (t_2 <= -2e+36) {
tmp = a * (27.0 * b);
} else if (t_2 <= -2e-230) {
tmp = t_1;
} else if (t_2 <= 1e-176) {
tmp = x * 2.0;
} else if (t_2 <= 5e+170) {
tmp = t_1;
} 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): t_1 = t * (-9.0 * (y * z)) t_2 = (a * 27.0) * b tmp = 0 if t_2 <= -2e+36: tmp = a * (27.0 * b) elif t_2 <= -2e-230: tmp = t_1 elif t_2 <= 1e-176: tmp = x * 2.0 elif t_2 <= 5e+170: tmp = t_1 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) t_1 = Float64(t * Float64(-9.0 * Float64(y * z))) t_2 = Float64(Float64(a * 27.0) * b) tmp = 0.0 if (t_2 <= -2e+36) tmp = Float64(a * Float64(27.0 * b)); elseif (t_2 <= -2e-230) tmp = t_1; elseif (t_2 <= 1e-176) tmp = Float64(x * 2.0); elseif (t_2 <= 5e+170) tmp = t_1; 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)
t_1 = t * (-9.0 * (y * z));
t_2 = (a * 27.0) * b;
tmp = 0.0;
if (t_2 <= -2e+36)
tmp = a * (27.0 * b);
elseif (t_2 <= -2e-230)
tmp = t_1;
elseif (t_2 <= 1e-176)
tmp = x * 2.0;
elseif (t_2 <= 5e+170)
tmp = t_1;
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_] := Block[{t$95$1 = N[(t * N[(-9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+36], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -2e-230], t$95$1, If[LessEqual[t$95$2, 1e-176], N[(x * 2.0), $MachinePrecision], If[LessEqual[t$95$2, 5e+170], t$95$1, 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}
t_1 := t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\
t_2 := \left(a \cdot 27\right) \cdot b\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+36}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-230}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{-176}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+170}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -2.00000000000000008e36Initial program 92.4%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6452.8%
Simplified52.8%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6452.8%
Applied egg-rr52.8%
if -2.00000000000000008e36 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -2.00000000000000009e-230 or 1e-176 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 4.99999999999999977e170Initial program 96.0%
Taylor expanded in y around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6459.1%
Simplified59.1%
if -2.00000000000000009e-230 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 1e-176Initial program 94.0%
Taylor expanded in x around inf
*-lowering-*.f6460.0%
Simplified60.0%
if 4.99999999999999977e170 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 97.4%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6490.2%
Simplified90.2%
Final simplification62.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 (* z -9.0)))) (t_2 (* (* a 27.0) b)))
(if (<= t_2 -2e+36)
(* a (* 27.0 b))
(if (<= t_2 -2e-230)
t_1
(if (<= t_2 1e-176)
(* x 2.0)
(if (<= t_2 5e+170) t_1 (* 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 * (z * -9.0));
double t_2 = (a * 27.0) * b;
double tmp;
if (t_2 <= -2e+36) {
tmp = a * (27.0 * b);
} else if (t_2 <= -2e-230) {
tmp = t_1;
} else if (t_2 <= 1e-176) {
tmp = x * 2.0;
} else if (t_2 <= 5e+170) {
tmp = t_1;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * (y * (z * (-9.0d0)))
t_2 = (a * 27.0d0) * b
if (t_2 <= (-2d+36)) then
tmp = a * (27.0d0 * b)
else if (t_2 <= (-2d-230)) then
tmp = t_1
else if (t_2 <= 1d-176) then
tmp = x * 2.0d0
else if (t_2 <= 5d+170) then
tmp = t_1
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 t_1 = t * (y * (z * -9.0));
double t_2 = (a * 27.0) * b;
double tmp;
if (t_2 <= -2e+36) {
tmp = a * (27.0 * b);
} else if (t_2 <= -2e-230) {
tmp = t_1;
} else if (t_2 <= 1e-176) {
tmp = x * 2.0;
} else if (t_2 <= 5e+170) {
tmp = t_1;
} 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): t_1 = t * (y * (z * -9.0)) t_2 = (a * 27.0) * b tmp = 0 if t_2 <= -2e+36: tmp = a * (27.0 * b) elif t_2 <= -2e-230: tmp = t_1 elif t_2 <= 1e-176: tmp = x * 2.0 elif t_2 <= 5e+170: tmp = t_1 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) t_1 = Float64(t * Float64(y * Float64(z * -9.0))) t_2 = Float64(Float64(a * 27.0) * b) tmp = 0.0 if (t_2 <= -2e+36) tmp = Float64(a * Float64(27.0 * b)); elseif (t_2 <= -2e-230) tmp = t_1; elseif (t_2 <= 1e-176) tmp = Float64(x * 2.0); elseif (t_2 <= 5e+170) tmp = t_1; 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)
t_1 = t * (y * (z * -9.0));
t_2 = (a * 27.0) * b;
tmp = 0.0;
if (t_2 <= -2e+36)
tmp = a * (27.0 * b);
elseif (t_2 <= -2e-230)
tmp = t_1;
elseif (t_2 <= 1e-176)
tmp = x * 2.0;
elseif (t_2 <= 5e+170)
tmp = t_1;
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_] := Block[{t$95$1 = N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+36], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -2e-230], t$95$1, If[LessEqual[t$95$2, 1e-176], N[(x * 2.0), $MachinePrecision], If[LessEqual[t$95$2, 5e+170], t$95$1, 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}
t_1 := t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
t_2 := \left(a \cdot 27\right) \cdot b\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+36}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-230}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{-176}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+170}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -2.00000000000000008e36Initial program 92.4%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6452.8%
Simplified52.8%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6452.8%
Applied egg-rr52.8%
if -2.00000000000000008e36 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -2.00000000000000009e-230 or 1e-176 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 4.99999999999999977e170Initial program 96.0%
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6496.9%
Applied egg-rr96.9%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6459.1%
Simplified59.1%
if -2.00000000000000009e-230 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 1e-176Initial program 94.0%
Taylor expanded in x around inf
*-lowering-*.f6460.0%
Simplified60.0%
if 4.99999999999999977e170 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 97.4%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6490.2%
Simplified90.2%
Final simplification62.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 (* (* a 27.0) b)))
(if (<= t_1 -2e-21)
(+ t_1 (* (* y t) (* z -9.0)))
(if (<= t_1 2e+21)
(+ (* y (* t (* z -9.0))) (* x 2.0))
(+ t_1 (* (* y (* z t)) -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 = (a * 27.0) * b;
double tmp;
if (t_1 <= -2e-21) {
tmp = t_1 + ((y * t) * (z * -9.0));
} else if (t_1 <= 2e+21) {
tmp = (y * (t * (z * -9.0))) + (x * 2.0);
} else {
tmp = t_1 + ((y * (z * t)) * -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 = (a * 27.0d0) * b
if (t_1 <= (-2d-21)) then
tmp = t_1 + ((y * t) * (z * (-9.0d0)))
else if (t_1 <= 2d+21) then
tmp = (y * (t * (z * (-9.0d0)))) + (x * 2.0d0)
else
tmp = t_1 + ((y * (z * t)) * (-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 = (a * 27.0) * b;
double tmp;
if (t_1 <= -2e-21) {
tmp = t_1 + ((y * t) * (z * -9.0));
} else if (t_1 <= 2e+21) {
tmp = (y * (t * (z * -9.0))) + (x * 2.0);
} else {
tmp = t_1 + ((y * (z * t)) * -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 = (a * 27.0) * b tmp = 0 if t_1 <= -2e-21: tmp = t_1 + ((y * t) * (z * -9.0)) elif t_1 <= 2e+21: tmp = (y * (t * (z * -9.0))) + (x * 2.0) else: tmp = t_1 + ((y * (z * t)) * -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(Float64(a * 27.0) * b) tmp = 0.0 if (t_1 <= -2e-21) tmp = Float64(t_1 + Float64(Float64(y * t) * Float64(z * -9.0))); elseif (t_1 <= 2e+21) tmp = Float64(Float64(y * Float64(t * Float64(z * -9.0))) + Float64(x * 2.0)); else tmp = Float64(t_1 + Float64(Float64(y * Float64(z * t)) * -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 = (a * 27.0) * b;
tmp = 0.0;
if (t_1 <= -2e-21)
tmp = t_1 + ((y * t) * (z * -9.0));
elseif (t_1 <= 2e+21)
tmp = (y * (t * (z * -9.0))) + (x * 2.0);
else
tmp = t_1 + ((y * (z * t)) * -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[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-21], N[(t$95$1 + N[(N[(y * t), $MachinePrecision] * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+21], N[(N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision] * -9.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \left(a \cdot 27\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-21}:\\
\;\;\;\;t\_1 + \left(y \cdot t\right) \cdot \left(z \cdot -9\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+21}:\\
\;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \left(y \cdot \left(z \cdot t\right)\right) \cdot -9\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -1.99999999999999982e-21Initial program 93.7%
Taylor expanded in x around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6483.0%
Simplified83.0%
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6483.1%
Applied egg-rr83.1%
if -1.99999999999999982e-21 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 2e21Initial program 95.6%
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6497.0%
Applied egg-rr97.0%
Taylor expanded in a around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6491.6%
Simplified91.6%
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6492.9%
Applied egg-rr92.9%
if 2e21 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 95.0%
Taylor expanded in x around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6489.1%
Simplified89.1%
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6490.5%
Applied egg-rr90.5%
Final simplification89.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 (* (* a 27.0) b)))
(if (<= t_1 -2e-21)
(+ t_1 (* (* y t) (* z -9.0)))
(if (<= t_1 2e+21)
(+ (* y (* t (* z -9.0))) (* x 2.0))
(+ t_1 (* t (* -9.0 (* y z))))))))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 tmp;
if (t_1 <= -2e-21) {
tmp = t_1 + ((y * t) * (z * -9.0));
} else if (t_1 <= 2e+21) {
tmp = (y * (t * (z * -9.0))) + (x * 2.0);
} else {
tmp = t_1 + (t * (-9.0 * (y * z)));
}
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 = (a * 27.0d0) * b
if (t_1 <= (-2d-21)) then
tmp = t_1 + ((y * t) * (z * (-9.0d0)))
else if (t_1 <= 2d+21) then
tmp = (y * (t * (z * (-9.0d0)))) + (x * 2.0d0)
else
tmp = t_1 + (t * ((-9.0d0) * (y * z)))
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 = (a * 27.0) * b;
double tmp;
if (t_1 <= -2e-21) {
tmp = t_1 + ((y * t) * (z * -9.0));
} else if (t_1 <= 2e+21) {
tmp = (y * (t * (z * -9.0))) + (x * 2.0);
} else {
tmp = t_1 + (t * (-9.0 * (y * z)));
}
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 = (a * 27.0) * b tmp = 0 if t_1 <= -2e-21: tmp = t_1 + ((y * t) * (z * -9.0)) elif t_1 <= 2e+21: tmp = (y * (t * (z * -9.0))) + (x * 2.0) else: tmp = t_1 + (t * (-9.0 * (y * z))) 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(Float64(a * 27.0) * b) tmp = 0.0 if (t_1 <= -2e-21) tmp = Float64(t_1 + Float64(Float64(y * t) * Float64(z * -9.0))); elseif (t_1 <= 2e+21) tmp = Float64(Float64(y * Float64(t * Float64(z * -9.0))) + Float64(x * 2.0)); else tmp = Float64(t_1 + Float64(t * Float64(-9.0 * Float64(y * z)))); 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 = (a * 27.0) * b;
tmp = 0.0;
if (t_1 <= -2e-21)
tmp = t_1 + ((y * t) * (z * -9.0));
elseif (t_1 <= 2e+21)
tmp = (y * (t * (z * -9.0))) + (x * 2.0);
else
tmp = t_1 + (t * (-9.0 * (y * z)));
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[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-21], N[(t$95$1 + N[(N[(y * t), $MachinePrecision] * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+21], N[(N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(t * N[(-9.0 * N[(y * z), $MachinePrecision]), $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 := \left(a \cdot 27\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-21}:\\
\;\;\;\;t\_1 + \left(y \cdot t\right) \cdot \left(z \cdot -9\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+21}:\\
\;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t\_1 + t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -1.99999999999999982e-21Initial program 93.7%
Taylor expanded in x around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6483.0%
Simplified83.0%
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6483.1%
Applied egg-rr83.1%
if -1.99999999999999982e-21 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 2e21Initial program 95.6%
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6497.0%
Applied egg-rr97.0%
Taylor expanded in a around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6491.6%
Simplified91.6%
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6492.9%
Applied egg-rr92.9%
if 2e21 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 95.0%
Taylor expanded in x around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6489.1%
Simplified89.1%
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_1 (* t (* -9.0 (* y z))))))
(if (<= t_1 -2e-21)
t_2
(if (<= t_1 2e+21) (+ (* y (* t (* z -9.0))) (* x 2.0)) 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 = (a * 27.0) * b;
double t_2 = t_1 + (t * (-9.0 * (y * z)));
double tmp;
if (t_1 <= -2e-21) {
tmp = t_2;
} else if (t_1 <= 2e+21) {
tmp = (y * (t * (z * -9.0))) + (x * 2.0);
} 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 = (a * 27.0d0) * b
t_2 = t_1 + (t * ((-9.0d0) * (y * z)))
if (t_1 <= (-2d-21)) then
tmp = t_2
else if (t_1 <= 2d+21) then
tmp = (y * (t * (z * (-9.0d0)))) + (x * 2.0d0)
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 = (a * 27.0) * b;
double t_2 = t_1 + (t * (-9.0 * (y * z)));
double tmp;
if (t_1 <= -2e-21) {
tmp = t_2;
} else if (t_1 <= 2e+21) {
tmp = (y * (t * (z * -9.0))) + (x * 2.0);
} 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 = (a * 27.0) * b t_2 = t_1 + (t * (-9.0 * (y * z))) tmp = 0 if t_1 <= -2e-21: tmp = t_2 elif t_1 <= 2e+21: tmp = (y * (t * (z * -9.0))) + (x * 2.0) 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(Float64(a * 27.0) * b) t_2 = Float64(t_1 + Float64(t * Float64(-9.0 * Float64(y * z)))) tmp = 0.0 if (t_1 <= -2e-21) tmp = t_2; elseif (t_1 <= 2e+21) tmp = Float64(Float64(y * Float64(t * Float64(z * -9.0))) + Float64(x * 2.0)); 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 = (a * 27.0) * b;
t_2 = t_1 + (t * (-9.0 * (y * z)));
tmp = 0.0;
if (t_1 <= -2e-21)
tmp = t_2;
elseif (t_1 <= 2e+21)
tmp = (y * (t * (z * -9.0))) + (x * 2.0);
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[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(t * N[(-9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-21], t$95$2, If[LessEqual[t$95$1, 2e+21], N[(N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $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 := \left(a \cdot 27\right) \cdot b\\
t_2 := t\_1 + t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-21}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+21}:\\
\;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -1.99999999999999982e-21 or 2e21 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 94.3%
Taylor expanded in x around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6485.9%
Simplified85.9%
if -1.99999999999999982e-21 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 2e21Initial program 95.6%
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6497.0%
Applied egg-rr97.0%
Taylor expanded in a around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6491.6%
Simplified91.6%
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6492.9%
Applied egg-rr92.9%
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)))
(if (<= t_1 -5e+168)
(+ t_1 (* x 2.0))
(if (<= t_1 5e+170)
(+ (* y (* t (* z -9.0))) (* x 2.0))
(+ (* 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 = (a * 27.0) * b;
double tmp;
if (t_1 <= -5e+168) {
tmp = t_1 + (x * 2.0);
} else if (t_1 <= 5e+170) {
tmp = (y * (t * (z * -9.0))) + (x * 2.0);
} 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 = (a * 27.0d0) * b
if (t_1 <= (-5d+168)) then
tmp = t_1 + (x * 2.0d0)
else if (t_1 <= 5d+170) then
tmp = (y * (t * (z * (-9.0d0)))) + (x * 2.0d0)
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 = (a * 27.0) * b;
double tmp;
if (t_1 <= -5e+168) {
tmp = t_1 + (x * 2.0);
} else if (t_1 <= 5e+170) {
tmp = (y * (t * (z * -9.0))) + (x * 2.0);
} 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 = (a * 27.0) * b tmp = 0 if t_1 <= -5e+168: tmp = t_1 + (x * 2.0) elif t_1 <= 5e+170: tmp = (y * (t * (z * -9.0))) + (x * 2.0) 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(Float64(a * 27.0) * b) tmp = 0.0 if (t_1 <= -5e+168) tmp = Float64(t_1 + Float64(x * 2.0)); elseif (t_1 <= 5e+170) tmp = Float64(Float64(y * Float64(t * Float64(z * -9.0))) + Float64(x * 2.0)); 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 = (a * 27.0) * b;
tmp = 0.0;
if (t_1 <= -5e+168)
tmp = t_1 + (x * 2.0);
elseif (t_1 <= 5e+170)
tmp = (y * (t * (z * -9.0))) + (x * 2.0);
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[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+168], N[(t$95$1 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+170], N[(N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $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 := \left(a \cdot 27\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+168}:\\
\;\;\;\;t\_1 + x \cdot 2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+170}:\\
\;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right) + x \cdot 2\\
\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) < -4.99999999999999967e168Initial program 91.6%
Taylor expanded in x around inf
*-lowering-*.f6473.3%
Simplified73.3%
if -4.99999999999999967e168 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 4.99999999999999977e170Initial program 95.1%
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6497.2%
Applied egg-rr97.2%
Taylor expanded in a around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6484.6%
Simplified84.6%
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6486.6%
Applied egg-rr86.6%
if 4.99999999999999977e170 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 97.4%
Taylor expanded in y around 0
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6494.8%
Simplified94.8%
Final simplification85.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 (* (* a 27.0) b)))
(if (<= t_1 -2e+36)
(+ (* x 2.0) (* a (* 27.0 b)))
(if (<= t_1 5e+170)
(+ (* x 2.0) (* t (* y (* z -9.0))))
(+ (* 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 = (a * 27.0) * b;
double tmp;
if (t_1 <= -2e+36) {
tmp = (x * 2.0) + (a * (27.0 * b));
} else if (t_1 <= 5e+170) {
tmp = (x * 2.0) + (t * (y * (z * -9.0)));
} 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 = (a * 27.0d0) * b
if (t_1 <= (-2d+36)) then
tmp = (x * 2.0d0) + (a * (27.0d0 * b))
else if (t_1 <= 5d+170) then
tmp = (x * 2.0d0) + (t * (y * (z * (-9.0d0))))
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 = (a * 27.0) * b;
double tmp;
if (t_1 <= -2e+36) {
tmp = (x * 2.0) + (a * (27.0 * b));
} else if (t_1 <= 5e+170) {
tmp = (x * 2.0) + (t * (y * (z * -9.0)));
} 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 = (a * 27.0) * b tmp = 0 if t_1 <= -2e+36: tmp = (x * 2.0) + (a * (27.0 * b)) elif t_1 <= 5e+170: tmp = (x * 2.0) + (t * (y * (z * -9.0))) 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(Float64(a * 27.0) * b) tmp = 0.0 if (t_1 <= -2e+36) tmp = Float64(Float64(x * 2.0) + Float64(a * Float64(27.0 * b))); elseif (t_1 <= 5e+170) tmp = Float64(Float64(x * 2.0) + Float64(t * Float64(y * Float64(z * -9.0)))); 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 = (a * 27.0) * b;
tmp = 0.0;
if (t_1 <= -2e+36)
tmp = (x * 2.0) + (a * (27.0 * b));
elseif (t_1 <= 5e+170)
tmp = (x * 2.0) + (t * (y * (z * -9.0)));
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[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+36], N[(N[(x * 2.0), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+170], N[(N[(x * 2.0), $MachinePrecision] + N[(t * N[(y * N[(z * -9.0), $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 := \left(a \cdot 27\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+36}:\\
\;\;\;\;x \cdot 2 + a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+170}:\\
\;\;\;\;x \cdot 2 + t \cdot \left(y \cdot \left(z \cdot -9\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) < -2.00000000000000008e36Initial program 92.4%
Taylor expanded in x around inf
*-lowering-*.f6467.5%
Simplified67.5%
*-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6465.6%
Applied egg-rr65.6%
if -2.00000000000000008e36 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 4.99999999999999977e170Initial program 95.2%
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6496.9%
Applied egg-rr96.9%
Taylor expanded in a around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6487.6%
Simplified87.6%
if 4.99999999999999977e170 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 97.4%
Taylor expanded in y around 0
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6494.8%
Simplified94.8%
Final simplification84.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 (* (* a 27.0) b)))
(if (<= t_1 -10.0)
(* a (* 27.0 b))
(if (<= t_1 2e+21) (* 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 = (a * 27.0) * b;
double tmp;
if (t_1 <= -10.0) {
tmp = a * (27.0 * b);
} else if (t_1 <= 2e+21) {
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) :: t_1
real(8) :: tmp
t_1 = (a * 27.0d0) * b
if (t_1 <= (-10.0d0)) then
tmp = a * (27.0d0 * b)
else if (t_1 <= 2d+21) 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 t_1 = (a * 27.0) * b;
double tmp;
if (t_1 <= -10.0) {
tmp = a * (27.0 * b);
} else if (t_1 <= 2e+21) {
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): t_1 = (a * 27.0) * b tmp = 0 if t_1 <= -10.0: tmp = a * (27.0 * b) elif t_1 <= 2e+21: 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) t_1 = Float64(Float64(a * 27.0) * b) tmp = 0.0 if (t_1 <= -10.0) tmp = Float64(a * Float64(27.0 * b)); elseif (t_1 <= 2e+21) 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)
t_1 = (a * 27.0) * b;
tmp = 0.0;
if (t_1 <= -10.0)
tmp = a * (27.0 * b);
elseif (t_1 <= 2e+21)
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_] := Block[{t$95$1 = N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$1, -10.0], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+21], 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}
t_1 := \left(a \cdot 27\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -10:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+21}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -10Initial program 93.4%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6449.1%
Simplified49.1%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6449.1%
Applied egg-rr49.1%
if -10 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 2e21Initial program 95.7%
Taylor expanded in x around inf
*-lowering-*.f6447.2%
Simplified47.2%
if 2e21 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 95.0%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6467.9%
Simplified67.9%
Final simplification52.4%
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 (* -9.0 (* z (* y t)))))
(if (<= z -1.6e-91)
t_1
(if (<= z 4.6e+17) (+ (* (* a 27.0) b) (* 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 = -9.0 * (z * (y * t));
double tmp;
if (z <= -1.6e-91) {
tmp = t_1;
} else if (z <= 4.6e+17) {
tmp = ((a * 27.0) * b) + (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 = (-9.0d0) * (z * (y * t))
if (z <= (-1.6d-91)) then
tmp = t_1
else if (z <= 4.6d+17) then
tmp = ((a * 27.0d0) * b) + (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 = -9.0 * (z * (y * t));
double tmp;
if (z <= -1.6e-91) {
tmp = t_1;
} else if (z <= 4.6e+17) {
tmp = ((a * 27.0) * b) + (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 = -9.0 * (z * (y * t)) tmp = 0 if z <= -1.6e-91: tmp = t_1 elif z <= 4.6e+17: tmp = ((a * 27.0) * b) + (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(-9.0 * Float64(z * Float64(y * t))) tmp = 0.0 if (z <= -1.6e-91) tmp = t_1; elseif (z <= 4.6e+17) tmp = Float64(Float64(Float64(a * 27.0) * b) + 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 = -9.0 * (z * (y * t));
tmp = 0.0;
if (z <= -1.6e-91)
tmp = t_1;
elseif (z <= 4.6e+17)
tmp = ((a * 27.0) * b) + (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[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e-91], t$95$1, If[LessEqual[z, 4.6e+17], N[(N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision] + N[(x * 2.0), $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 := -9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{-91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+17}:\\
\;\;\;\;\left(a \cdot 27\right) \cdot b + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.59999999999999998e-91 or 4.6e17 < z Initial program 91.3%
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6493.1%
Applied egg-rr93.1%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6453.8%
Simplified53.8%
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
associate-*r*N/A
distribute-lft-neg-inN/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6458.9%
Applied egg-rr58.9%
if -1.59999999999999998e-91 < z < 4.6e17Initial program 99.8%
Taylor expanded in x around inf
*-lowering-*.f6475.6%
Simplified75.6%
Final simplification66.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 (+ (* (* a 27.0) b) (- (* x 2.0) (* z (* 9.0 (* y 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) {
return ((a * 27.0) * b) + ((x * 2.0) - (z * (9.0 * (y * t))));
}
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 = ((a * 27.0d0) * b) + ((x * 2.0d0) - (z * (9.0d0 * (y * t))))
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 ((a * 27.0) * b) + ((x * 2.0) - (z * (9.0 * (y * t))));
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): return ((a * 27.0) * b) + ((x * 2.0) - (z * (9.0 * (y * t))))
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(Float64(Float64(a * 27.0) * b) + Float64(Float64(x * 2.0) - Float64(z * Float64(9.0 * Float64(y * t))))) 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 = ((a * 27.0) * b) + ((x * 2.0) - (z * (9.0 * (y * t))));
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[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(z * N[(9.0 * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - z \cdot \left(9 \cdot \left(y \cdot t\right)\right)\right)
\end{array}
Initial program 95.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6495.4%
Applied egg-rr95.4%
Final simplification95.4%
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 -2.5e-108) t_1 (if (<= b 1.6e+20) (* 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 (b <= -2.5e-108) {
tmp = t_1;
} else if (b <= 1.6e+20) {
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 (b <= (-2.5d-108)) then
tmp = t_1
else if (b <= 1.6d+20) 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 (b <= -2.5e-108) {
tmp = t_1;
} else if (b <= 1.6e+20) {
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 b <= -2.5e-108: tmp = t_1 elif b <= 1.6e+20: 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 (b <= -2.5e-108) tmp = t_1; elseif (b <= 1.6e+20) 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 (b <= -2.5e-108)
tmp = t_1;
elseif (b <= 1.6e+20)
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[b, -2.5e-108], t$95$1, If[LessEqual[b, 1.6e+20], 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}\;b \leq -2.5 \cdot 10^{-108}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.6 \cdot 10^{+20}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.5e-108 or 1.6e20 < b Initial program 95.2%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6446.1%
Simplified46.1%
if -2.5e-108 < b < 1.6e20Initial program 94.7%
Taylor expanded in x around inf
*-lowering-*.f6444.2%
Simplified44.2%
Final simplification45.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 (* 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.0%
Taylor expanded in x around inf
*-lowering-*.f6430.1%
Simplified30.1%
Final simplification30.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 2024192
(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)))