
(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 16 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. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= (* y 9.0) -2e-88) (fma a (* 27.0 b) (fma x 2.0 (* y (* z (* t -9.0))))) (+ (- (* x 2.0) (* t (* (* y 9.0) z))) (* b (* a 27.0)))))
assert(x < y && y < z && z < t && t < a && 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 ((y * 9.0) <= -2e-88) {
tmp = fma(a, (27.0 * b), fma(x, 2.0, (y * (z * (t * -9.0)))));
} else {
tmp = ((x * 2.0) - (t * ((y * 9.0) * z))) + (b * (a * 27.0));
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(y * 9.0) <= -2e-88) tmp = fma(a, Float64(27.0 * b), fma(x, 2.0, Float64(y * Float64(z * Float64(t * -9.0))))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(t * Float64(Float64(y * 9.0) * z))) + Float64(b * Float64(a * 27.0))); end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(y * 9.0), $MachinePrecision], -2e-88], N[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;y \cdot 9 \leq -2 \cdot 10^{-88}:\\
\;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - t \cdot \left(\left(y \cdot 9\right) \cdot z\right)\right) + b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if (*.f64 y #s(literal 9 binary64)) < -1.99999999999999987e-88Initial program 95.2%
+-commutative95.2%
associate-+r-95.2%
*-commutative95.2%
cancel-sign-sub-inv95.2%
associate-*r*92.0%
distribute-lft-neg-in92.0%
*-commutative92.0%
cancel-sign-sub-inv92.0%
associate-+r-92.0%
associate-*l*92.0%
fma-define92.0%
fma-neg92.0%
associate-*l*98.6%
distribute-rgt-neg-in98.6%
*-commutative98.6%
associate-*l*98.6%
*-commutative98.6%
distribute-lft-neg-in98.6%
associate-*r*98.7%
Simplified98.7%
if -1.99999999999999987e-88 < (*.f64 y #s(literal 9 binary64)) Initial program 95.5%
Final simplification96.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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 (<= t 500000.0) (- (+ (* 27.0 (* a b)) (* x 2.0)) (* y (* t (* 9.0 z)))) (fma a (* 27.0 b) (fma x 2.0 (* t (* y (* z -9.0)))))))
assert(x < y && y < z && z < t && t < a && 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 (t <= 500000.0) {
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (t * (9.0 * z)));
} else {
tmp = fma(a, (27.0 * b), fma(x, 2.0, (t * (y * (z * -9.0)))));
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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 (t <= 500000.0) tmp = Float64(Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)) - Float64(y * Float64(t * Float64(9.0 * z)))); else tmp = fma(a, Float64(27.0 * b), fma(x, 2.0, Float64(t * Float64(y * Float64(z * -9.0))))); end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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[t, 500000.0], N[(N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] - N[(y * N[(t * N[(9.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(t * N[(y * 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, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 500000:\\
\;\;\;\;\left(27 \cdot \left(a \cdot b\right) + x \cdot 2\right) - y \cdot \left(t \cdot \left(9 \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\right)\right)\\
\end{array}
\end{array}
if t < 5e5Initial program 94.3%
associate-+l-94.3%
*-commutative94.3%
*-commutative94.3%
associate-*l*94.3%
associate-+l-94.3%
associate-*l*94.3%
*-commutative94.3%
*-commutative94.3%
associate-*l*97.3%
associate-*l*96.7%
Simplified96.7%
+-commutative96.7%
associate-+r-96.7%
associate-*r*97.3%
*-commutative97.3%
associate-*l*97.2%
associate-*l*97.2%
associate-*r*96.7%
Applied egg-rr96.7%
if 5e5 < t Initial program 98.4%
+-commutative98.4%
associate-+r-98.4%
*-commutative98.4%
cancel-sign-sub-inv98.4%
associate-*r*87.5%
distribute-lft-neg-in87.5%
*-commutative87.5%
cancel-sign-sub-inv87.5%
associate-+r-87.5%
associate-*l*87.4%
fma-define88.9%
cancel-sign-sub-inv88.9%
fma-define88.9%
distribute-lft-neg-in88.9%
distribute-rgt-neg-in88.9%
*-commutative88.9%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Final simplification97.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 -0.0255)
(* -9.0 (* y (* z t)))
(if (<= z -9.2e-300)
(* x 2.0)
(if (<= z 3.9e-290)
(* 27.0 (* a b))
(if (<= z 6.5e-233)
(* x 2.0)
(if (<= z 1.4e-98) (* a (* 27.0 b)) (* -9.0 (* t (* y z)))))))))assert(x < y && y < z && z < t && t < a && 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 (z <= -0.0255) {
tmp = -9.0 * (y * (z * t));
} else if (z <= -9.2e-300) {
tmp = x * 2.0;
} else if (z <= 3.9e-290) {
tmp = 27.0 * (a * b);
} else if (z <= 6.5e-233) {
tmp = x * 2.0;
} else if (z <= 1.4e-98) {
tmp = a * (27.0 * b);
} else {
tmp = -9.0 * (t * (y * z));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 <= (-0.0255d0)) then
tmp = (-9.0d0) * (y * (z * t))
else if (z <= (-9.2d-300)) then
tmp = x * 2.0d0
else if (z <= 3.9d-290) then
tmp = 27.0d0 * (a * b)
else if (z <= 6.5d-233) then
tmp = x * 2.0d0
else if (z <= 1.4d-98) then
tmp = a * (27.0d0 * b)
else
tmp = (-9.0d0) * (t * (y * z))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 <= -0.0255) {
tmp = -9.0 * (y * (z * t));
} else if (z <= -9.2e-300) {
tmp = x * 2.0;
} else if (z <= 3.9e-290) {
tmp = 27.0 * (a * b);
} else if (z <= 6.5e-233) {
tmp = x * 2.0;
} else if (z <= 1.4e-98) {
tmp = a * (27.0 * b);
} else {
tmp = -9.0 * (t * (y * z));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [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 <= -0.0255: tmp = -9.0 * (y * (z * t)) elif z <= -9.2e-300: tmp = x * 2.0 elif z <= 3.9e-290: tmp = 27.0 * (a * b) elif z <= 6.5e-233: tmp = x * 2.0 elif z <= 1.4e-98: tmp = a * (27.0 * b) else: tmp = -9.0 * (t * (y * z)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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 <= -0.0255) tmp = Float64(-9.0 * Float64(y * Float64(z * t))); elseif (z <= -9.2e-300) tmp = Float64(x * 2.0); elseif (z <= 3.9e-290) tmp = Float64(27.0 * Float64(a * b)); elseif (z <= 6.5e-233) tmp = Float64(x * 2.0); elseif (z <= 1.4e-98) tmp = Float64(a * Float64(27.0 * b)); else tmp = Float64(-9.0 * Float64(t * Float64(y * z))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 <= -0.0255)
tmp = -9.0 * (y * (z * t));
elseif (z <= -9.2e-300)
tmp = x * 2.0;
elseif (z <= 3.9e-290)
tmp = 27.0 * (a * b);
elseif (z <= 6.5e-233)
tmp = x * 2.0;
elseif (z <= 1.4e-98)
tmp = a * (27.0 * b);
else
tmp = -9.0 * (t * (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. 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, -0.0255], N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9.2e-300], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 3.9e-290], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e-233], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 1.4e-98], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0255:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;z \leq -9.2 \cdot 10^{-300}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-290}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-233}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-98}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -0.0254999999999999984Initial program 89.2%
associate-+l-89.2%
*-commutative89.2%
*-commutative89.2%
associate-*l*89.1%
associate-+l-89.1%
associate-*l*89.2%
*-commutative89.2%
*-commutative89.2%
associate-*l*93.8%
associate-*l*93.8%
Simplified93.8%
Taylor expanded in x around 0 68.5%
Taylor expanded in a around 0 51.1%
*-commutative51.1%
associate-*l*49.7%
*-commutative49.7%
Simplified49.7%
if -0.0254999999999999984 < z < -9.20000000000000003e-300 or 3.89999999999999973e-290 < z < 6.49999999999999989e-233Initial program 99.9%
associate-+l-99.9%
*-commutative99.9%
*-commutative99.9%
associate-*l*99.8%
associate-+l-99.8%
associate-*l*99.9%
*-commutative99.9%
*-commutative99.9%
associate-*l*99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in x around inf 50.5%
if -9.20000000000000003e-300 < z < 3.89999999999999973e-290Initial program 99.6%
associate-+l-99.6%
*-commutative99.6%
*-commutative99.6%
associate-*l*99.6%
associate-+l-99.6%
associate-*l*99.6%
*-commutative99.6%
*-commutative99.6%
associate-*l*99.6%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in a around inf 82.0%
if 6.49999999999999989e-233 < z < 1.3999999999999999e-98Initial program 97.4%
associate-+l-97.4%
*-commutative97.4%
*-commutative97.4%
associate-*l*97.4%
associate-+l-97.4%
associate-*l*97.4%
*-commutative97.4%
*-commutative97.4%
associate-*l*99.7%
associate-*l*96.4%
Simplified96.4%
Taylor expanded in a around inf 32.6%
associate-*r*32.8%
*-commutative32.8%
associate-*r*29.4%
Simplified29.4%
if 1.3999999999999999e-98 < z Initial program 95.1%
associate-+l-95.1%
*-commutative95.1%
*-commutative95.1%
associate-*l*95.1%
associate-+l-95.1%
associate-*l*95.1%
*-commutative95.1%
*-commutative95.1%
associate-*l*89.0%
associate-*l*88.9%
Simplified88.9%
Taylor expanded in y around inf 57.2%
Final simplification51.0%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 -0.0014)
(* (* z (* 9.0 t)) (- y))
(if (<= z -9.2e-300)
(* x 2.0)
(if (<= z 3.6e-289)
(* 27.0 (* a b))
(if (<= z 5.8e-232)
(* x 2.0)
(if (<= z 6.5e-99) (* a (* 27.0 b)) (* -9.0 (* t (* y z)))))))))assert(x < y && y < z && z < t && t < a && 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 (z <= -0.0014) {
tmp = (z * (9.0 * t)) * -y;
} else if (z <= -9.2e-300) {
tmp = x * 2.0;
} else if (z <= 3.6e-289) {
tmp = 27.0 * (a * b);
} else if (z <= 5.8e-232) {
tmp = x * 2.0;
} else if (z <= 6.5e-99) {
tmp = a * (27.0 * b);
} else {
tmp = -9.0 * (t * (y * z));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 <= (-0.0014d0)) then
tmp = (z * (9.0d0 * t)) * -y
else if (z <= (-9.2d-300)) then
tmp = x * 2.0d0
else if (z <= 3.6d-289) then
tmp = 27.0d0 * (a * b)
else if (z <= 5.8d-232) then
tmp = x * 2.0d0
else if (z <= 6.5d-99) then
tmp = a * (27.0d0 * b)
else
tmp = (-9.0d0) * (t * (y * z))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 <= -0.0014) {
tmp = (z * (9.0 * t)) * -y;
} else if (z <= -9.2e-300) {
tmp = x * 2.0;
} else if (z <= 3.6e-289) {
tmp = 27.0 * (a * b);
} else if (z <= 5.8e-232) {
tmp = x * 2.0;
} else if (z <= 6.5e-99) {
tmp = a * (27.0 * b);
} else {
tmp = -9.0 * (t * (y * z));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [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 <= -0.0014: tmp = (z * (9.0 * t)) * -y elif z <= -9.2e-300: tmp = x * 2.0 elif z <= 3.6e-289: tmp = 27.0 * (a * b) elif z <= 5.8e-232: tmp = x * 2.0 elif z <= 6.5e-99: tmp = a * (27.0 * b) else: tmp = -9.0 * (t * (y * z)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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 <= -0.0014) tmp = Float64(Float64(z * Float64(9.0 * t)) * Float64(-y)); elseif (z <= -9.2e-300) tmp = Float64(x * 2.0); elseif (z <= 3.6e-289) tmp = Float64(27.0 * Float64(a * b)); elseif (z <= 5.8e-232) tmp = Float64(x * 2.0); elseif (z <= 6.5e-99) tmp = Float64(a * Float64(27.0 * b)); else tmp = Float64(-9.0 * Float64(t * Float64(y * z))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 <= -0.0014)
tmp = (z * (9.0 * t)) * -y;
elseif (z <= -9.2e-300)
tmp = x * 2.0;
elseif (z <= 3.6e-289)
tmp = 27.0 * (a * b);
elseif (z <= 5.8e-232)
tmp = x * 2.0;
elseif (z <= 6.5e-99)
tmp = a * (27.0 * b);
else
tmp = -9.0 * (t * (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. 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, -0.0014], N[(N[(z * N[(9.0 * t), $MachinePrecision]), $MachinePrecision] * (-y)), $MachinePrecision], If[LessEqual[z, -9.2e-300], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 3.6e-289], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e-232], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 6.5e-99], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0014:\\
\;\;\;\;\left(z \cdot \left(9 \cdot t\right)\right) \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq -9.2 \cdot 10^{-300}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-289}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-232}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-99}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -0.00139999999999999999Initial program 89.2%
pow189.2%
associate-*l*89.1%
Applied egg-rr89.1%
Taylor expanded in y around inf 51.1%
*-commutative51.1%
associate-*l*51.2%
associate-*l*51.1%
Simplified51.1%
*-commutative51.1%
associate-*r*51.2%
associate-*l*51.1%
metadata-eval51.1%
distribute-lft-neg-in51.1%
distribute-rgt-neg-in51.1%
associate-*l*49.8%
*-commutative49.8%
Applied egg-rr49.8%
if -0.00139999999999999999 < z < -9.20000000000000003e-300 or 3.6e-289 < z < 5.7999999999999998e-232Initial program 99.9%
associate-+l-99.9%
*-commutative99.9%
*-commutative99.9%
associate-*l*99.8%
associate-+l-99.8%
associate-*l*99.9%
*-commutative99.9%
*-commutative99.9%
associate-*l*99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in x around inf 50.5%
if -9.20000000000000003e-300 < z < 3.6e-289Initial program 99.6%
associate-+l-99.6%
*-commutative99.6%
*-commutative99.6%
associate-*l*99.6%
associate-+l-99.6%
associate-*l*99.6%
*-commutative99.6%
*-commutative99.6%
associate-*l*99.6%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in a around inf 82.0%
if 5.7999999999999998e-232 < z < 6.50000000000000033e-99Initial program 97.4%
associate-+l-97.4%
*-commutative97.4%
*-commutative97.4%
associate-*l*97.4%
associate-+l-97.4%
associate-*l*97.4%
*-commutative97.4%
*-commutative97.4%
associate-*l*99.7%
associate-*l*96.4%
Simplified96.4%
Taylor expanded in a around inf 32.6%
associate-*r*32.8%
*-commutative32.8%
associate-*r*29.4%
Simplified29.4%
if 6.50000000000000033e-99 < z Initial program 95.1%
associate-+l-95.1%
*-commutative95.1%
*-commutative95.1%
associate-*l*95.1%
associate-+l-95.1%
associate-*l*95.1%
*-commutative95.1%
*-commutative95.1%
associate-*l*89.0%
associate-*l*88.9%
Simplified88.9%
Taylor expanded in y around inf 57.2%
Final simplification51.0%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (* t (* y z)))))
(if (or (<= b -1.25e-53) (not (<= b 5e+117)))
(- (* 27.0 (* a b)) t_1)
(- (* x 2.0) t_1))))assert(x < y && y < z && z < t && t < a && 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 = 9.0 * (t * (y * z));
double tmp;
if ((b <= -1.25e-53) || !(b <= 5e+117)) {
tmp = (27.0 * (a * b)) - t_1;
} else {
tmp = (x * 2.0) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 * (t * (y * z))
if ((b <= (-1.25d-53)) .or. (.not. (b <= 5d+117))) then
tmp = (27.0d0 * (a * b)) - t_1
else
tmp = (x * 2.0d0) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 * (t * (y * z));
double tmp;
if ((b <= -1.25e-53) || !(b <= 5e+117)) {
tmp = (27.0 * (a * b)) - t_1;
} else {
tmp = (x * 2.0) - t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [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 * (t * (y * z)) tmp = 0 if (b <= -1.25e-53) or not (b <= 5e+117): tmp = (27.0 * (a * b)) - t_1 else: tmp = (x * 2.0) - t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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(t * Float64(y * z))) tmp = 0.0 if ((b <= -1.25e-53) || !(b <= 5e+117)) tmp = Float64(Float64(27.0 * Float64(a * b)) - t_1); else tmp = Float64(Float64(x * 2.0) - t_1); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 * (t * (y * z));
tmp = 0.0;
if ((b <= -1.25e-53) || ~((b <= 5e+117)))
tmp = (27.0 * (a * b)) - t_1;
else
tmp = (x * 2.0) - 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.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[b, -1.25e-53], N[Not[LessEqual[b, 5e+117]], $MachinePrecision]], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;b \leq -1.25 \cdot 10^{-53} \lor \neg \left(b \leq 5 \cdot 10^{+117}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - t\_1\\
\end{array}
\end{array}
if b < -1.25e-53 or 4.99999999999999983e117 < b Initial program 94.9%
associate-+l-94.9%
*-commutative94.9%
*-commutative94.9%
associate-*l*94.9%
associate-+l-94.9%
associate-*l*94.9%
*-commutative94.9%
*-commutative94.9%
associate-*l*90.3%
associate-*l*89.3%
Simplified89.3%
Taylor expanded in x around 0 81.5%
if -1.25e-53 < b < 4.99999999999999983e117Initial program 95.7%
associate-+l-95.7%
*-commutative95.7%
*-commutative95.7%
associate-*l*95.7%
associate-+l-95.7%
associate-*l*95.7%
*-commutative95.7%
*-commutative95.7%
associate-*l*98.0%
associate-*l*98.0%
Simplified98.0%
Taylor expanded in a around 0 82.0%
Final simplification81.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (* t (* y z)))))
(if (<= b -1.65e-101)
(- (* a (* 27.0 b)) (* (* y z) (* 9.0 t)))
(if (<= b 9.5e+117) (- (* x 2.0) t_1) (- (* 27.0 (* a b)) t_1)))))assert(x < y && y < z && z < t && t < a && 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 = 9.0 * (t * (y * z));
double tmp;
if (b <= -1.65e-101) {
tmp = (a * (27.0 * b)) - ((y * z) * (9.0 * t));
} else if (b <= 9.5e+117) {
tmp = (x * 2.0) - t_1;
} else {
tmp = (27.0 * (a * b)) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 * (t * (y * z))
if (b <= (-1.65d-101)) then
tmp = (a * (27.0d0 * b)) - ((y * z) * (9.0d0 * t))
else if (b <= 9.5d+117) then
tmp = (x * 2.0d0) - t_1
else
tmp = (27.0d0 * (a * b)) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 * (t * (y * z));
double tmp;
if (b <= -1.65e-101) {
tmp = (a * (27.0 * b)) - ((y * z) * (9.0 * t));
} else if (b <= 9.5e+117) {
tmp = (x * 2.0) - t_1;
} else {
tmp = (27.0 * (a * b)) - t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [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 * (t * (y * z)) tmp = 0 if b <= -1.65e-101: tmp = (a * (27.0 * b)) - ((y * z) * (9.0 * t)) elif b <= 9.5e+117: tmp = (x * 2.0) - t_1 else: tmp = (27.0 * (a * b)) - t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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(t * Float64(y * z))) tmp = 0.0 if (b <= -1.65e-101) tmp = Float64(Float64(a * Float64(27.0 * b)) - Float64(Float64(y * z) * Float64(9.0 * t))); elseif (b <= 9.5e+117) tmp = Float64(Float64(x * 2.0) - t_1); else tmp = Float64(Float64(27.0 * Float64(a * b)) - t_1); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 * (t * (y * z));
tmp = 0.0;
if (b <= -1.65e-101)
tmp = (a * (27.0 * b)) - ((y * z) * (9.0 * t));
elseif (b <= 9.5e+117)
tmp = (x * 2.0) - t_1;
else
tmp = (27.0 * (a * b)) - 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.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.65e-101], N[(N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] * N[(9.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.5e+117], N[(N[(x * 2.0), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;b \leq -1.65 \cdot 10^{-101}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right) - \left(y \cdot z\right) \cdot \left(9 \cdot t\right)\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{+117}:\\
\;\;\;\;x \cdot 2 - t\_1\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) - t\_1\\
\end{array}
\end{array}
if b < -1.64999999999999992e-101Initial program 98.6%
pow198.6%
associate-*l*98.7%
Applied egg-rr98.7%
Taylor expanded in x around 0 80.7%
associate-*r*80.8%
*-commutative80.8%
associate-*r*80.7%
associate-*r*80.7%
Simplified80.7%
if -1.64999999999999992e-101 < b < 9.50000000000000041e117Initial program 95.4%
associate-+l-95.4%
*-commutative95.4%
*-commutative95.4%
associate-*l*95.4%
associate-+l-95.4%
associate-*l*95.4%
*-commutative95.4%
*-commutative95.4%
associate-*l*98.5%
associate-*l*98.5%
Simplified98.5%
Taylor expanded in a around 0 80.6%
if 9.50000000000000041e117 < b Initial program 86.9%
associate-+l-86.9%
*-commutative86.9%
*-commutative86.9%
associate-*l*86.8%
associate-+l-86.8%
associate-*l*86.9%
*-commutative86.9%
*-commutative86.9%
associate-*l*87.1%
associate-*l*84.0%
Simplified84.0%
Taylor expanded in x around 0 80.7%
Final simplification80.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (* t (* y z)))))
(if (<= t -1.7e-86)
t_1
(if (<= t 3.7e-51) (* x 2.0) (if (<= t 2.6e+34) (* 27.0 (* a b)) t_1)))))assert(x < y && y < z && z < t && t < a && 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 = -9.0 * (t * (y * z));
double tmp;
if (t <= -1.7e-86) {
tmp = t_1;
} else if (t <= 3.7e-51) {
tmp = x * 2.0;
} else if (t <= 2.6e+34) {
tmp = 27.0 * (a * b);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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) * (t * (y * z))
if (t <= (-1.7d-86)) then
tmp = t_1
else if (t <= 3.7d-51) then
tmp = x * 2.0d0
else if (t <= 2.6d+34) then
tmp = 27.0d0 * (a * b)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 * (t * (y * z));
double tmp;
if (t <= -1.7e-86) {
tmp = t_1;
} else if (t <= 3.7e-51) {
tmp = x * 2.0;
} else if (t <= 2.6e+34) {
tmp = 27.0 * (a * b);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [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 * (t * (y * z)) tmp = 0 if t <= -1.7e-86: tmp = t_1 elif t <= 3.7e-51: tmp = x * 2.0 elif t <= 2.6e+34: tmp = 27.0 * (a * b) else: tmp = t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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(t * Float64(y * z))) tmp = 0.0 if (t <= -1.7e-86) tmp = t_1; elseif (t <= 3.7e-51) tmp = Float64(x * 2.0); elseif (t <= 2.6e+34) tmp = Float64(27.0 * Float64(a * b)); else tmp = t_1; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 * (t * (y * z));
tmp = 0.0;
if (t <= -1.7e-86)
tmp = t_1;
elseif (t <= 3.7e-51)
tmp = x * 2.0;
elseif (t <= 2.6e+34)
tmp = 27.0 * (a * b);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.7e-86], t$95$1, If[LessEqual[t, 3.7e-51], N[(x * 2.0), $MachinePrecision], If[LessEqual[t, 2.6e+34], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;t \leq -1.7 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{-51}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+34}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.7e-86 or 2.59999999999999997e34 < t Initial program 97.8%
associate-+l-97.8%
*-commutative97.8%
*-commutative97.8%
associate-*l*97.8%
associate-+l-97.8%
associate-*l*97.8%
*-commutative97.8%
*-commutative97.8%
associate-*l*91.2%
associate-*l*91.2%
Simplified91.2%
Taylor expanded in y around inf 56.4%
if -1.7e-86 < t < 3.69999999999999973e-51Initial program 92.5%
associate-+l-92.5%
*-commutative92.5%
*-commutative92.5%
associate-*l*92.5%
associate-+l-92.5%
associate-*l*92.5%
*-commutative92.5%
*-commutative92.5%
associate-*l*99.9%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in x around inf 48.8%
if 3.69999999999999973e-51 < t < 2.59999999999999997e34Initial program 94.7%
associate-+l-94.7%
*-commutative94.7%
*-commutative94.7%
associate-*l*94.6%
associate-+l-94.6%
associate-*l*94.7%
*-commutative94.7%
*-commutative94.7%
associate-*l*94.6%
associate-*l*89.6%
Simplified89.6%
Taylor expanded in a around inf 42.9%
Final simplification52.3%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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 9.6e+69) (+ (- (* x 2.0) (* (* y 9.0) (* z t))) (* a (* 27.0 b))) (- (* x 2.0) (* 9.0 (* t (* y z))))))
assert(x < y && y < z && z < t && t < a && 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 (z <= 9.6e+69) {
tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
} else {
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 <= 9.6d+69) then
tmp = ((x * 2.0d0) - ((y * 9.0d0) * (z * t))) + (a * (27.0d0 * b))
else
tmp = (x * 2.0d0) - (9.0d0 * (t * (y * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 <= 9.6e+69) {
tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
} else {
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [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 <= 9.6e+69: tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b)) else: tmp = (x * 2.0) - (9.0 * (t * (y * z))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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 <= 9.6e+69) tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(z * t))) + Float64(a * Float64(27.0 * b))); else tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(y * z)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 <= 9.6e+69)
tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
else
tmp = (x * 2.0) - (9.0 * (t * (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. 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, 9.6e+69], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 9.6 \cdot 10^{+69}:\\
\;\;\;\;\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < 9.6000000000000007e69Initial program 96.1%
associate-+l-96.1%
*-commutative96.1%
*-commutative96.1%
associate-*l*96.1%
associate-+l-96.1%
associate-*l*96.1%
*-commutative96.1%
*-commutative96.1%
associate-*l*97.9%
associate-*l*97.4%
Simplified97.4%
if 9.6000000000000007e69 < z Initial program 92.7%
associate-+l-92.7%
*-commutative92.7%
*-commutative92.7%
associate-*l*92.7%
associate-+l-92.7%
associate-*l*92.7%
*-commutative92.7%
*-commutative92.7%
associate-*l*83.7%
associate-*l*83.7%
Simplified83.7%
Taylor expanded in a around 0 76.9%
Final simplification93.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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-255) (- (+ (* 27.0 (* a b)) (* x 2.0)) (* y (* t (* 9.0 z)))) (+ (- (* x 2.0) (* t (* (* y 9.0) z))) (* b (* a 27.0)))))
assert(x < y && y < z && z < t && t < a && 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 (z <= 2e-255) {
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (t * (9.0 * z)));
} else {
tmp = ((x * 2.0) - (t * ((y * 9.0) * z))) + (b * (a * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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-255) then
tmp = ((27.0d0 * (a * b)) + (x * 2.0d0)) - (y * (t * (9.0d0 * z)))
else
tmp = ((x * 2.0d0) - (t * ((y * 9.0d0) * z))) + (b * (a * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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-255) {
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (t * (9.0 * z)));
} else {
tmp = ((x * 2.0) - (t * ((y * 9.0) * z))) + (b * (a * 27.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [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-255: tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (t * (9.0 * z))) else: tmp = ((x * 2.0) - (t * ((y * 9.0) * z))) + (b * (a * 27.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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-255) tmp = Float64(Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)) - Float64(y * Float64(t * Float64(9.0 * z)))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(t * Float64(Float64(y * 9.0) * z))) + Float64(b * Float64(a * 27.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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-255)
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (t * (9.0 * z)));
else
tmp = ((x * 2.0) - (t * ((y * 9.0) * z))) + (b * (a * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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-255], N[(N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] - N[(y * N[(t * N[(9.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2 \cdot 10^{-255}:\\
\;\;\;\;\left(27 \cdot \left(a \cdot b\right) + x \cdot 2\right) - y \cdot \left(t \cdot \left(9 \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - t \cdot \left(\left(y \cdot 9\right) \cdot z\right)\right) + b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if z < 2e-255Initial program 95.1%
associate-+l-95.1%
*-commutative95.1%
*-commutative95.1%
associate-*l*95.0%
associate-+l-95.0%
associate-*l*95.1%
*-commutative95.1%
*-commutative95.1%
associate-*l*97.1%
associate-*l*97.1%
Simplified97.1%
+-commutative97.1%
associate-+r-97.1%
associate-*r*97.1%
*-commutative97.1%
associate-*l*97.1%
associate-*l*97.1%
associate-*r*96.4%
Applied egg-rr96.4%
if 2e-255 < z Initial program 95.9%
Final simplification96.2%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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 (or (<= b -6.9e-31) (not (<= b 9.5e+150))) (+ (* 27.0 (* a b)) (* x 2.0)) (- (* x 2.0) (* 9.0 (* t (* y z))))))
assert(x < y && y < z && z < t && t < a && 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 ((b <= -6.9e-31) || !(b <= 9.5e+150)) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 ((b <= (-6.9d-31)) .or. (.not. (b <= 9.5d+150))) then
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
else
tmp = (x * 2.0d0) - (9.0d0 * (t * (y * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 ((b <= -6.9e-31) || !(b <= 9.5e+150)) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (b <= -6.9e-31) or not (b <= 9.5e+150): tmp = (27.0 * (a * b)) + (x * 2.0) else: tmp = (x * 2.0) - (9.0 * (t * (y * z))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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 ((b <= -6.9e-31) || !(b <= 9.5e+150)) tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)); else tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(y * z)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 ((b <= -6.9e-31) || ~((b <= 9.5e+150)))
tmp = (27.0 * (a * b)) + (x * 2.0);
else
tmp = (x * 2.0) - (9.0 * (t * (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. 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[Or[LessEqual[b, -6.9e-31], N[Not[LessEqual[b, 9.5e+150]], $MachinePrecision]], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.9 \cdot 10^{-31} \lor \neg \left(b \leq 9.5 \cdot 10^{+150}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if b < -6.9000000000000004e-31 or 9.5000000000000001e150 < b Initial program 94.7%
associate-+l-94.7%
*-commutative94.7%
*-commutative94.7%
associate-*l*94.7%
associate-+l-94.7%
associate-*l*94.7%
*-commutative94.7%
*-commutative94.7%
associate-*l*89.9%
associate-*l*88.9%
Simplified88.9%
Taylor expanded in y around 0 69.1%
if -6.9000000000000004e-31 < b < 9.5000000000000001e150Initial program 95.9%
associate-+l-95.9%
*-commutative95.9%
*-commutative95.9%
associate-*l*95.8%
associate-+l-95.8%
associate-*l*95.9%
*-commutative95.9%
*-commutative95.9%
associate-*l*98.0%
associate-*l*98.0%
Simplified98.0%
Taylor expanded in a around 0 81.2%
Final simplification76.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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 -1.15e+19) (* (* z (* 9.0 t)) (- y)) (if (<= z 1.9e-52) (+ (* 27.0 (* a b)) (* x 2.0)) (* -9.0 (* t (* y z))))))
assert(x < y && y < z && z < t && t < a && 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 (z <= -1.15e+19) {
tmp = (z * (9.0 * t)) * -y;
} else if (z <= 1.9e-52) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = -9.0 * (t * (y * z));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 <= (-1.15d+19)) then
tmp = (z * (9.0d0 * t)) * -y
else if (z <= 1.9d-52) then
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
else
tmp = (-9.0d0) * (t * (y * z))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 <= -1.15e+19) {
tmp = (z * (9.0 * t)) * -y;
} else if (z <= 1.9e-52) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = -9.0 * (t * (y * z));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [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 <= -1.15e+19: tmp = (z * (9.0 * t)) * -y elif z <= 1.9e-52: tmp = (27.0 * (a * b)) + (x * 2.0) else: tmp = -9.0 * (t * (y * z)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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 <= -1.15e+19) tmp = Float64(Float64(z * Float64(9.0 * t)) * Float64(-y)); elseif (z <= 1.9e-52) tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)); else tmp = Float64(-9.0 * Float64(t * Float64(y * z))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 <= -1.15e+19)
tmp = (z * (9.0 * t)) * -y;
elseif (z <= 1.9e-52)
tmp = (27.0 * (a * b)) + (x * 2.0);
else
tmp = -9.0 * (t * (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. 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, -1.15e+19], N[(N[(z * N[(9.0 * t), $MachinePrecision]), $MachinePrecision] * (-y)), $MachinePrecision], If[LessEqual[z, 1.9e-52], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+19}:\\
\;\;\;\;\left(z \cdot \left(9 \cdot t\right)\right) \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-52}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -1.15e19Initial program 88.3%
pow188.3%
associate-*l*88.2%
Applied egg-rr88.2%
Taylor expanded in y around inf 53.5%
*-commutative53.5%
associate-*l*53.6%
associate-*l*53.5%
Simplified53.5%
*-commutative53.5%
associate-*r*53.6%
associate-*l*53.5%
metadata-eval53.5%
distribute-lft-neg-in53.5%
distribute-rgt-neg-in53.5%
associate-*l*52.0%
*-commutative52.0%
Applied egg-rr52.0%
if -1.15e19 < z < 1.9000000000000002e-52Initial program 99.3%
associate-+l-99.3%
*-commutative99.3%
*-commutative99.3%
associate-*l*99.2%
associate-+l-99.2%
associate-*l*99.3%
*-commutative99.3%
*-commutative99.3%
associate-*l*99.8%
associate-*l*99.0%
Simplified99.0%
Taylor expanded in y around 0 80.4%
if 1.9000000000000002e-52 < z Initial program 94.5%
associate-+l-94.5%
*-commutative94.5%
*-commutative94.5%
associate-*l*94.5%
associate-+l-94.5%
associate-*l*94.5%
*-commutative94.5%
*-commutative94.5%
associate-*l*87.7%
associate-*l*87.7%
Simplified87.7%
Taylor expanded in y around inf 62.0%
Final simplification68.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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) (* t (* (* y 9.0) z))) (* b (* a 27.0))))
assert(x < y && y < z && z < t && t < a && 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) {
return ((x * 2.0) - (t * ((y * 9.0) * z))) + (b * (a * 27.0));
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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) - (t * ((y * 9.0d0) * z))) + (b * (a * 27.0d0))
end function
assert x < y && y < z && z < t && t < a && a < b;
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) - (t * ((y * 9.0) * z))) + (b * (a * 27.0));
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, 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) - (t * ((y * 9.0) * z))) + (b * (a * 27.0))
x, y, z, t, a, b = sort([x, y, z, t, a, 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(t * Float64(Float64(y * 9.0) * z))) + Float64(b * Float64(a * 27.0))) end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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) - (t * ((y * 9.0) * z))) + (b * (a * 27.0));
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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[(t * N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\left(x \cdot 2 - t \cdot \left(\left(y \cdot 9\right) \cdot z\right)\right) + b \cdot \left(a \cdot 27\right)
\end{array}
Initial program 95.4%
Final simplification95.4%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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 (+ (* b (* a 27.0)) (- (* x 2.0) (* t (* y (* 9.0 z))))))
assert(x < y && y < z && z < t && t < a && 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) {
return (b * (a * 27.0)) + ((x * 2.0) - (t * (y * (9.0 * z))));
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 = (b * (a * 27.0d0)) + ((x * 2.0d0) - (t * (y * (9.0d0 * z))))
end function
assert x < y && y < z && z < t && t < a && a < b;
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 (b * (a * 27.0)) + ((x * 2.0) - (t * (y * (9.0 * z))));
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): return (b * (a * 27.0)) + ((x * 2.0) - (t * (y * (9.0 * z))))
x, y, z, t, a, b = sort([x, y, z, t, a, 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(b * Float64(a * 27.0)) + Float64(Float64(x * 2.0) - Float64(t * Float64(y * Float64(9.0 * z))))) end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
tmp = (b * (a * 27.0)) + ((x * 2.0) - (t * (y * (9.0 * z))));
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(y * N[(9.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
b \cdot \left(a \cdot 27\right) + \left(x \cdot 2 - t \cdot \left(y \cdot \left(9 \cdot z\right)\right)\right)
\end{array}
Initial program 95.4%
pow195.4%
associate-*l*95.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. 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 (or (<= b -2.3e-69) (not (<= b 2.5e+117))) (* 27.0 (* a b)) (* x 2.0)))
assert(x < y && y < z && z < t && t < a && 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 ((b <= -2.3e-69) || !(b <= 2.5e+117)) {
tmp = 27.0 * (a * b);
} else {
tmp = x * 2.0;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 ((b <= (-2.3d-69)) .or. (.not. (b <= 2.5d+117))) then
tmp = 27.0d0 * (a * b)
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 ((b <= -2.3e-69) || !(b <= 2.5e+117)) {
tmp = 27.0 * (a * b);
} else {
tmp = x * 2.0;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (b <= -2.3e-69) or not (b <= 2.5e+117): tmp = 27.0 * (a * b) else: tmp = x * 2.0 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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 ((b <= -2.3e-69) || !(b <= 2.5e+117)) tmp = Float64(27.0 * Float64(a * b)); else tmp = Float64(x * 2.0); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 ((b <= -2.3e-69) || ~((b <= 2.5e+117)))
tmp = 27.0 * (a * b);
else
tmp = x * 2.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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[Or[LessEqual[b, -2.3e-69], N[Not[LessEqual[b, 2.5e+117]], $MachinePrecision]], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], N[(x * 2.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.3 \cdot 10^{-69} \lor \neg \left(b \leq 2.5 \cdot 10^{+117}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if b < -2.3000000000000001e-69 or 2.49999999999999992e117 < b Initial program 95.1%
associate-+l-95.1%
*-commutative95.1%
*-commutative95.1%
associate-*l*95.1%
associate-+l-95.1%
associate-*l*95.1%
*-commutative95.1%
*-commutative95.1%
associate-*l*90.7%
associate-*l*89.7%
Simplified89.7%
Taylor expanded in a around inf 53.5%
if -2.3000000000000001e-69 < b < 2.49999999999999992e117Initial program 95.6%
associate-+l-95.6%
*-commutative95.6%
*-commutative95.6%
associate-*l*95.6%
associate-+l-95.6%
associate-*l*95.6%
*-commutative95.6%
*-commutative95.6%
associate-*l*97.9%
associate-*l*97.9%
Simplified97.9%
Taylor expanded in x around inf 43.4%
Final simplification47.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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 (<= b -8e-68) (* a (* 27.0 b)) (if (<= b 2.5e+117) (* x 2.0) (* 27.0 (* a b)))))
assert(x < y && y < z && z < t && t < a && 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 (b <= -8e-68) {
tmp = a * (27.0 * b);
} else if (b <= 2.5e+117) {
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.
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 (b <= (-8d-68)) then
tmp = a * (27.0d0 * b)
else if (b <= 2.5d+117) 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;
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 (b <= -8e-68) {
tmp = a * (27.0 * b);
} else if (b <= 2.5e+117) {
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]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if b <= -8e-68: tmp = a * (27.0 * b) elif b <= 2.5e+117: 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]) 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 (b <= -8e-68) tmp = Float64(a * Float64(27.0 * b)); elseif (b <= 2.5e+117) 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])){:}
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 (b <= -8e-68)
tmp = a * (27.0 * b);
elseif (b <= 2.5e+117)
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. 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[b, -8e-68], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.5e+117], 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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8 \cdot 10^{-68}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;b \leq 2.5 \cdot 10^{+117}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if b < -8.00000000000000053e-68Initial program 98.5%
associate-+l-98.5%
*-commutative98.5%
*-commutative98.5%
associate-*l*98.6%
associate-+l-98.6%
associate-*l*98.5%
*-commutative98.5%
*-commutative98.5%
associate-*l*92.2%
associate-*l*92.1%
Simplified92.1%
Taylor expanded in a around inf 51.0%
associate-*r*51.1%
*-commutative51.1%
associate-*r*51.0%
Simplified51.0%
if -8.00000000000000053e-68 < b < 2.49999999999999992e117Initial program 95.6%
associate-+l-95.6%
*-commutative95.6%
*-commutative95.6%
associate-*l*95.6%
associate-+l-95.6%
associate-*l*95.6%
*-commutative95.6%
*-commutative95.6%
associate-*l*97.9%
associate-*l*97.9%
Simplified97.9%
Taylor expanded in x around inf 43.4%
if 2.49999999999999992e117 < b Initial program 86.9%
associate-+l-86.9%
*-commutative86.9%
*-commutative86.9%
associate-*l*86.8%
associate-+l-86.8%
associate-*l*86.9%
*-commutative86.9%
*-commutative86.9%
associate-*l*87.1%
associate-*l*84.0%
Simplified84.0%
Taylor expanded in a around inf 59.4%
Final simplification47.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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);
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.
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;
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]) [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]) 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])){:}
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. 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, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
x \cdot 2
\end{array}
Initial program 95.4%
associate-+l-95.4%
*-commutative95.4%
*-commutative95.4%
associate-*l*95.4%
associate-+l-95.4%
associate-*l*95.4%
*-commutative95.4%
*-commutative95.4%
associate-*l*95.0%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in x around inf 31.4%
Final simplification31.4%
(FPCore (x y z t a b) :precision binary64 (if (< y 7.590524218811189e-161) (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* a (* 27.0 b))) (+ (- (* x 2.0) (* 9.0 (* y (* t z)))) (* (* a 27.0) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y < 7.590524218811189e-161) {
tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
} else {
tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y < 7.590524218811189d-161) then
tmp = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + (a * (27.0d0 * b))
else
tmp = ((x * 2.0d0) - (9.0d0 * (y * (t * z)))) + ((a * 27.0d0) * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y < 7.590524218811189e-161) {
tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
} else {
tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y < 7.590524218811189e-161: tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b)) else: tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y < 7.590524218811189e-161) tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(a * Float64(27.0 * b))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(9.0 * Float64(y * Float64(t * z)))) + Float64(Float64(a * 27.0) * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y < 7.590524218811189e-161) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b)); else tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Less[y, 7.590524218811189e-161], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y < 7.590524218811189 \cdot 10^{-161}:\\
\;\;\;\;\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - 9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right) + \left(a \cdot 27\right) \cdot b\\
\end{array}
\end{array}
herbie shell --seed 2024067
(FPCore (x y z t a b)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, A"
:precision binary64
:alt
(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)))
(+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))