
(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 19 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) z) 1e+275) (fma a (* 27.0 b) (fma x 2.0 (* t (* y (* z -9.0))))) (+ (* x 2.0) (* -9.0 (* z (* y t))))))
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) * z) <= 1e+275) {
tmp = fma(a, (27.0 * b), fma(x, 2.0, (t * (y * (z * -9.0)))));
} else {
tmp = (x * 2.0) + (-9.0 * (z * (y * t)));
}
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(Float64(y * 9.0) * z) <= 1e+275) tmp = fma(a, Float64(27.0 * b), fma(x, 2.0, Float64(t * Float64(y * Float64(z * -9.0))))); else tmp = Float64(Float64(x * 2.0) + Float64(-9.0 * Float64(z * Float64(y * t)))); 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[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision], 1e+275], N[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + N[(-9.0 * N[(z * N[(y * t), $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}\;\left(y \cdot 9\right) \cdot z \leq 10^{+275}:\\
\;\;\;\;\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)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 y #s(literal 9 binary64)) z) < 9.9999999999999996e274Initial program 95.0%
+-commutative95.0%
associate-+r-95.0%
*-commutative95.0%
cancel-sign-sub-inv95.0%
associate-*r*93.4%
distribute-lft-neg-in93.4%
*-commutative93.4%
cancel-sign-sub-inv93.4%
associate-+r-93.4%
associate-*l*93.8%
fma-define95.1%
cancel-sign-sub-inv95.1%
fma-define95.1%
distribute-lft-neg-in95.1%
distribute-rgt-neg-in95.1%
*-commutative95.1%
associate-*r*96.7%
associate-*l*96.7%
neg-mul-196.7%
associate-*r*96.7%
Simplified96.7%
if 9.9999999999999996e274 < (*.f64 (*.f64 y #s(literal 9 binary64)) z) Initial program 88.4%
Taylor expanded in y around 0 88.5%
associate-*r*88.4%
*-commutative88.4%
associate-*r*88.5%
Simplified88.5%
Taylor expanded in a around 0 88.5%
cancel-sign-sub-inv88.5%
metadata-eval88.5%
associate-*r*99.7%
Simplified99.7%
Final simplification96.9%
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 (* (* y 9.0) z)))
(if (<= t_1 1e+275)
(+ (- (* x 2.0) (* t_1 t)) (* b (* a 27.0)))
(+ (* x 2.0) (* -9.0 (* z (* y t)))))))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 = (y * 9.0) * z;
double tmp;
if (t_1 <= 1e+275) {
tmp = ((x * 2.0) - (t_1 * t)) + (b * (a * 27.0));
} else {
tmp = (x * 2.0) + (-9.0 * (z * (y * t)));
}
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 = (y * 9.0d0) * z
if (t_1 <= 1d+275) then
tmp = ((x * 2.0d0) - (t_1 * t)) + (b * (a * 27.0d0))
else
tmp = (x * 2.0d0) + ((-9.0d0) * (z * (y * t)))
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 = (y * 9.0) * z;
double tmp;
if (t_1 <= 1e+275) {
tmp = ((x * 2.0) - (t_1 * t)) + (b * (a * 27.0));
} else {
tmp = (x * 2.0) + (-9.0 * (z * (y * t)));
}
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 = (y * 9.0) * z tmp = 0 if t_1 <= 1e+275: tmp = ((x * 2.0) - (t_1 * t)) + (b * (a * 27.0)) else: tmp = (x * 2.0) + (-9.0 * (z * (y * t))) 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(Float64(y * 9.0) * z) tmp = 0.0 if (t_1 <= 1e+275) tmp = Float64(Float64(Float64(x * 2.0) - Float64(t_1 * t)) + Float64(b * Float64(a * 27.0))); else tmp = Float64(Float64(x * 2.0) + Float64(-9.0 * Float64(z * Float64(y * t)))); 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 = (y * 9.0) * z;
tmp = 0.0;
if (t_1 <= 1e+275)
tmp = ((x * 2.0) - (t_1 * t)) + (b * (a * 27.0));
else
tmp = (x * 2.0) + (-9.0 * (z * (y * t)));
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[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+275], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t$95$1 * t), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + N[(-9.0 * N[(z * N[(y * t), $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}
t_1 := \left(y \cdot 9\right) \cdot z\\
\mathbf{if}\;t\_1 \leq 10^{+275}:\\
\;\;\;\;\left(x \cdot 2 - t\_1 \cdot t\right) + b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 y #s(literal 9 binary64)) z) < 9.9999999999999996e274Initial program 95.0%
if 9.9999999999999996e274 < (*.f64 (*.f64 y #s(literal 9 binary64)) z) Initial program 88.4%
Taylor expanded in y around 0 88.5%
associate-*r*88.4%
*-commutative88.4%
associate-*r*88.5%
Simplified88.5%
Taylor expanded in a around 0 88.5%
cancel-sign-sub-inv88.5%
metadata-eval88.5%
associate-*r*99.7%
Simplified99.7%
Final simplification95.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
(let* ((t_1 (* 9.0 (* t (* y z)))))
(if (or (<= x -3600000000.0) (not (<= x 17.0)))
(- (* 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 ((x <= -3600000000.0) || !(x <= 17.0)) {
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 ((x <= (-3600000000.0d0)) .or. (.not. (x <= 17.0d0))) 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 ((x <= -3600000000.0) || !(x <= 17.0)) {
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 (x <= -3600000000.0) or not (x <= 17.0): 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 ((x <= -3600000000.0) || !(x <= 17.0)) 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 ((x <= -3600000000.0) || ~((x <= 17.0)))
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[Or[LessEqual[x, -3600000000.0], N[Not[LessEqual[x, 17.0]], $MachinePrecision]], 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}\;x \leq -3600000000 \lor \neg \left(x \leq 17\right):\\
\;\;\;\;x \cdot 2 - t\_1\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) - t\_1\\
\end{array}
\end{array}
if x < -3.6e9 or 17 < x Initial program 94.5%
sub-neg94.5%
sub-neg94.5%
associate-*l*94.5%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in a around 0 81.0%
if -3.6e9 < x < 17Initial program 94.7%
sub-neg94.7%
sub-neg94.7%
associate-*l*95.5%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in x around 0 87.9%
Final simplification84.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
(let* ((t_1 (* t (* y z))))
(if (or (<= x -215.0) (not (<= x 29.0)))
(- (* x 2.0) (* 9.0 t_1))
(+ (* -9.0 t_1) (* a (* 27.0 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 t_1 = t * (y * z);
double tmp;
if ((x <= -215.0) || !(x <= 29.0)) {
tmp = (x * 2.0) - (9.0 * t_1);
} else {
tmp = (-9.0 * t_1) + (a * (27.0 * 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) :: t_1
real(8) :: tmp
t_1 = t * (y * z)
if ((x <= (-215.0d0)) .or. (.not. (x <= 29.0d0))) then
tmp = (x * 2.0d0) - (9.0d0 * t_1)
else
tmp = ((-9.0d0) * t_1) + (a * (27.0d0 * 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 t_1 = t * (y * z);
double tmp;
if ((x <= -215.0) || !(x <= 29.0)) {
tmp = (x * 2.0) - (9.0 * t_1);
} else {
tmp = (-9.0 * t_1) + (a * (27.0 * 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): t_1 = t * (y * z) tmp = 0 if (x <= -215.0) or not (x <= 29.0): tmp = (x * 2.0) - (9.0 * t_1) else: tmp = (-9.0 * t_1) + (a * (27.0 * 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) t_1 = Float64(t * Float64(y * z)) tmp = 0.0 if ((x <= -215.0) || !(x <= 29.0)) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * t_1)); else tmp = Float64(Float64(-9.0 * t_1) + Float64(a * Float64(27.0 * 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)
t_1 = t * (y * z);
tmp = 0.0;
if ((x <= -215.0) || ~((x <= 29.0)))
tmp = (x * 2.0) - (9.0 * t_1);
else
tmp = (-9.0 * t_1) + (a * (27.0 * b));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x, -215.0], N[Not[LessEqual[x, 29.0]], $MachinePrecision]], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(-9.0 * t$95$1), $MachinePrecision] + N[(a * N[(27.0 * b), $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}
t_1 := t \cdot \left(y \cdot z\right)\\
\mathbf{if}\;x \leq -215 \lor \neg \left(x \leq 29\right):\\
\;\;\;\;x \cdot 2 - 9 \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;-9 \cdot t\_1 + a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if x < -215 or 29 < x Initial program 94.5%
sub-neg94.5%
sub-neg94.5%
associate-*l*94.5%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in a around 0 81.0%
if -215 < x < 29Initial program 94.7%
sub-neg94.7%
sub-neg94.7%
associate-*l*95.5%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in x around 0 87.9%
pow187.9%
*-commutative87.9%
associate-*l*89.2%
Applied egg-rr89.2%
unpow189.2%
associate-*r*87.9%
*-commutative87.9%
associate-*r*87.1%
Simplified87.1%
cancel-sign-sub-inv87.1%
associate-*r*86.4%
metadata-eval86.4%
associate-*r*87.2%
*-commutative87.2%
associate-*l*88.0%
Applied egg-rr88.0%
Final simplification84.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 -4.2e-166)
(* y (* z (* t -9.0)))
(if (<= t 1.1e-68)
(* a (* 27.0 b))
(if (<= t 1.36e+45) (* x 2.0) (* t (* z (* y -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 <= -4.2e-166) {
tmp = y * (z * (t * -9.0));
} else if (t <= 1.1e-68) {
tmp = a * (27.0 * b);
} else if (t <= 1.36e+45) {
tmp = x * 2.0;
} else {
tmp = t * (z * (y * -9.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (t <= (-4.2d-166)) then
tmp = y * (z * (t * (-9.0d0)))
else if (t <= 1.1d-68) then
tmp = a * (27.0d0 * b)
else if (t <= 1.36d+45) then
tmp = x * 2.0d0
else
tmp = t * (z * (y * (-9.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 (t <= -4.2e-166) {
tmp = y * (z * (t * -9.0));
} else if (t <= 1.1e-68) {
tmp = a * (27.0 * b);
} else if (t <= 1.36e+45) {
tmp = x * 2.0;
} else {
tmp = t * (z * (y * -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]) def code(x, y, z, t, a, b): tmp = 0 if t <= -4.2e-166: tmp = y * (z * (t * -9.0)) elif t <= 1.1e-68: tmp = a * (27.0 * b) elif t <= 1.36e+45: tmp = x * 2.0 else: tmp = t * (z * (y * -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 <= -4.2e-166) tmp = Float64(y * Float64(z * Float64(t * -9.0))); elseif (t <= 1.1e-68) tmp = Float64(a * Float64(27.0 * b)); elseif (t <= 1.36e+45) tmp = Float64(x * 2.0); else tmp = Float64(t * Float64(z * Float64(y * -9.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 (t <= -4.2e-166)
tmp = y * (z * (t * -9.0));
elseif (t <= 1.1e-68)
tmp = a * (27.0 * b);
elseif (t <= 1.36e+45)
tmp = x * 2.0;
else
tmp = t * (z * (y * -9.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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, -4.2e-166], N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e-68], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.36e+45], N[(x * 2.0), $MachinePrecision], N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{-166}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-68}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;t \leq 1.36 \cdot 10^{+45}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\end{array}
\end{array}
if t < -4.1999999999999999e-166Initial program 94.6%
sub-neg94.6%
sub-neg94.6%
associate-*l*93.6%
associate-*l*94.7%
Simplified94.7%
Taylor expanded in x around 0 66.1%
Taylor expanded in y around inf 64.0%
Taylor expanded in y around inf 43.3%
associate-*r*43.3%
*-commutative43.3%
associate-*r*43.3%
*-commutative43.3%
Simplified43.3%
if -4.1999999999999999e-166 < t < 1.10000000000000001e-68Initial program 90.7%
+-commutative90.7%
associate-+r-90.7%
*-commutative90.7%
cancel-sign-sub-inv90.7%
associate-*r*98.5%
distribute-lft-neg-in98.5%
*-commutative98.5%
cancel-sign-sub-inv98.5%
associate-+r-98.5%
associate-*l*98.5%
fma-define98.5%
cancel-sign-sub-inv98.5%
fma-define98.5%
distribute-lft-neg-in98.5%
distribute-rgt-neg-in98.5%
*-commutative98.5%
associate-*r*90.8%
associate-*l*90.8%
neg-mul-190.8%
associate-*r*90.8%
Simplified90.8%
Taylor expanded in t around 0 85.5%
Taylor expanded in x around 0 50.7%
*-commutative50.7%
associate-*r*50.8%
Simplified50.8%
if 1.10000000000000001e-68 < t < 1.36e45Initial program 96.5%
+-commutative96.5%
associate-+r-96.5%
*-commutative96.5%
cancel-sign-sub-inv96.5%
associate-*r*99.7%
distribute-lft-neg-in99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
associate-+r-99.7%
associate-*l*99.8%
fma-define99.8%
cancel-sign-sub-inv99.8%
fma-define99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
*-commutative99.8%
associate-*r*96.6%
associate-*l*96.6%
neg-mul-196.6%
associate-*r*96.6%
Simplified96.6%
Taylor expanded in t around 0 61.7%
Taylor expanded in x around inf 34.4%
if 1.36e45 < t Initial program 98.2%
+-commutative98.2%
associate-+r-98.2%
*-commutative98.2%
cancel-sign-sub-inv98.2%
associate-*r*87.8%
distribute-lft-neg-in87.8%
*-commutative87.8%
cancel-sign-sub-inv87.8%
associate-+r-87.8%
associate-*l*87.8%
fma-define89.4%
cancel-sign-sub-inv89.4%
fma-define89.4%
distribute-lft-neg-in89.4%
distribute-rgt-neg-in89.4%
*-commutative89.4%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around inf 64.2%
*-commutative64.2%
associate-*r*64.3%
*-commutative64.3%
associate-*l*64.2%
Simplified64.2%
Final simplification49.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 -1e-167)
(* -9.0 (* z (* y t)))
(if (<= t 3.4e-67)
(* a (* 27.0 b))
(if (<= t 2.6e+47) (* x 2.0) (* t (* z (* y -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 <= -1e-167) {
tmp = -9.0 * (z * (y * t));
} else if (t <= 3.4e-67) {
tmp = a * (27.0 * b);
} else if (t <= 2.6e+47) {
tmp = x * 2.0;
} else {
tmp = t * (z * (y * -9.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (t <= (-1d-167)) then
tmp = (-9.0d0) * (z * (y * t))
else if (t <= 3.4d-67) then
tmp = a * (27.0d0 * b)
else if (t <= 2.6d+47) then
tmp = x * 2.0d0
else
tmp = t * (z * (y * (-9.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 (t <= -1e-167) {
tmp = -9.0 * (z * (y * t));
} else if (t <= 3.4e-67) {
tmp = a * (27.0 * b);
} else if (t <= 2.6e+47) {
tmp = x * 2.0;
} else {
tmp = t * (z * (y * -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]) def code(x, y, z, t, a, b): tmp = 0 if t <= -1e-167: tmp = -9.0 * (z * (y * t)) elif t <= 3.4e-67: tmp = a * (27.0 * b) elif t <= 2.6e+47: tmp = x * 2.0 else: tmp = t * (z * (y * -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 <= -1e-167) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (t <= 3.4e-67) tmp = Float64(a * Float64(27.0 * b)); elseif (t <= 2.6e+47) tmp = Float64(x * 2.0); else tmp = Float64(t * Float64(z * Float64(y * -9.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 (t <= -1e-167)
tmp = -9.0 * (z * (y * t));
elseif (t <= 3.4e-67)
tmp = a * (27.0 * b);
elseif (t <= 2.6e+47)
tmp = x * 2.0;
else
tmp = t * (z * (y * -9.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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, -1e-167], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e-67], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e+47], N[(x * 2.0), $MachinePrecision], N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-167}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-67}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+47}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\end{array}
\end{array}
if t < -1e-167Initial program 94.6%
+-commutative94.6%
associate-+r-94.6%
*-commutative94.6%
cancel-sign-sub-inv94.6%
associate-*r*92.5%
distribute-lft-neg-in92.5%
*-commutative92.5%
cancel-sign-sub-inv92.5%
associate-+r-92.5%
associate-*l*93.5%
fma-define95.7%
cancel-sign-sub-inv95.7%
fma-define95.7%
distribute-lft-neg-in95.7%
distribute-rgt-neg-in95.7%
*-commutative95.7%
associate-*r*97.9%
associate-*l*97.9%
neg-mul-197.9%
associate-*r*97.9%
Simplified97.9%
Taylor expanded in t around inf 43.3%
*-commutative43.3%
associate-*r*43.2%
associate-*l*43.3%
Simplified43.3%
Taylor expanded in t around 0 43.3%
associate-*r*42.2%
Simplified42.2%
if -1e-167 < t < 3.4000000000000001e-67Initial program 90.7%
+-commutative90.7%
associate-+r-90.7%
*-commutative90.7%
cancel-sign-sub-inv90.7%
associate-*r*98.5%
distribute-lft-neg-in98.5%
*-commutative98.5%
cancel-sign-sub-inv98.5%
associate-+r-98.5%
associate-*l*98.5%
fma-define98.5%
cancel-sign-sub-inv98.5%
fma-define98.5%
distribute-lft-neg-in98.5%
distribute-rgt-neg-in98.5%
*-commutative98.5%
associate-*r*90.8%
associate-*l*90.8%
neg-mul-190.8%
associate-*r*90.8%
Simplified90.8%
Taylor expanded in t around 0 85.5%
Taylor expanded in x around 0 50.7%
*-commutative50.7%
associate-*r*50.8%
Simplified50.8%
if 3.4000000000000001e-67 < t < 2.60000000000000003e47Initial program 96.5%
+-commutative96.5%
associate-+r-96.5%
*-commutative96.5%
cancel-sign-sub-inv96.5%
associate-*r*99.7%
distribute-lft-neg-in99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
associate-+r-99.7%
associate-*l*99.8%
fma-define99.8%
cancel-sign-sub-inv99.8%
fma-define99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
*-commutative99.8%
associate-*r*96.6%
associate-*l*96.6%
neg-mul-196.6%
associate-*r*96.6%
Simplified96.6%
Taylor expanded in t around 0 61.7%
Taylor expanded in x around inf 34.4%
if 2.60000000000000003e47 < t Initial program 98.2%
+-commutative98.2%
associate-+r-98.2%
*-commutative98.2%
cancel-sign-sub-inv98.2%
associate-*r*87.8%
distribute-lft-neg-in87.8%
*-commutative87.8%
cancel-sign-sub-inv87.8%
associate-+r-87.8%
associate-*l*87.8%
fma-define89.4%
cancel-sign-sub-inv89.4%
fma-define89.4%
distribute-lft-neg-in89.4%
distribute-rgt-neg-in89.4%
*-commutative89.4%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around inf 64.2%
*-commutative64.2%
associate-*r*64.3%
*-commutative64.3%
associate-*l*64.2%
Simplified64.2%
Final simplification49.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 (<= t -4.2e-166)
(* -9.0 (* z (* y t)))
(if (<= t 7.6e-69)
(* a (* 27.0 b))
(if (<= t 3e+45) (* x 2.0) (* t (* -9.0 (* 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 (t <= -4.2e-166) {
tmp = -9.0 * (z * (y * t));
} else if (t <= 7.6e-69) {
tmp = a * (27.0 * b);
} else if (t <= 3e+45) {
tmp = x * 2.0;
} else {
tmp = 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.
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 (t <= (-4.2d-166)) then
tmp = (-9.0d0) * (z * (y * t))
else if (t <= 7.6d-69) then
tmp = a * (27.0d0 * b)
else if (t <= 3d+45) then
tmp = x * 2.0d0
else
tmp = t * ((-9.0d0) * (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 (t <= -4.2e-166) {
tmp = -9.0 * (z * (y * t));
} else if (t <= 7.6e-69) {
tmp = a * (27.0 * b);
} else if (t <= 3e+45) {
tmp = x * 2.0;
} else {
tmp = t * (-9.0 * (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 t <= -4.2e-166: tmp = -9.0 * (z * (y * t)) elif t <= 7.6e-69: tmp = a * (27.0 * b) elif t <= 3e+45: tmp = x * 2.0 else: tmp = t * (-9.0 * (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 (t <= -4.2e-166) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (t <= 7.6e-69) tmp = Float64(a * Float64(27.0 * b)); elseif (t <= 3e+45) tmp = Float64(x * 2.0); else tmp = 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])){:}
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 (t <= -4.2e-166)
tmp = -9.0 * (z * (y * t));
elseif (t <= 7.6e-69)
tmp = a * (27.0 * b);
elseif (t <= 3e+45)
tmp = x * 2.0;
else
tmp = 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. 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, -4.2e-166], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.6e-69], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e+45], N[(x * 2.0), $MachinePrecision], N[(t * N[(-9.0 * 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}\;t \leq -4.2 \cdot 10^{-166}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;t \leq 7.6 \cdot 10^{-69}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+45}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if t < -4.1999999999999999e-166Initial program 94.6%
+-commutative94.6%
associate-+r-94.6%
*-commutative94.6%
cancel-sign-sub-inv94.6%
associate-*r*92.5%
distribute-lft-neg-in92.5%
*-commutative92.5%
cancel-sign-sub-inv92.5%
associate-+r-92.5%
associate-*l*93.5%
fma-define95.7%
cancel-sign-sub-inv95.7%
fma-define95.7%
distribute-lft-neg-in95.7%
distribute-rgt-neg-in95.7%
*-commutative95.7%
associate-*r*97.9%
associate-*l*97.9%
neg-mul-197.9%
associate-*r*97.9%
Simplified97.9%
Taylor expanded in t around inf 43.3%
*-commutative43.3%
associate-*r*43.2%
associate-*l*43.3%
Simplified43.3%
Taylor expanded in t around 0 43.3%
associate-*r*42.2%
Simplified42.2%
if -4.1999999999999999e-166 < t < 7.5999999999999995e-69Initial program 90.7%
+-commutative90.7%
associate-+r-90.7%
*-commutative90.7%
cancel-sign-sub-inv90.7%
associate-*r*98.5%
distribute-lft-neg-in98.5%
*-commutative98.5%
cancel-sign-sub-inv98.5%
associate-+r-98.5%
associate-*l*98.5%
fma-define98.5%
cancel-sign-sub-inv98.5%
fma-define98.5%
distribute-lft-neg-in98.5%
distribute-rgt-neg-in98.5%
*-commutative98.5%
associate-*r*90.8%
associate-*l*90.8%
neg-mul-190.8%
associate-*r*90.8%
Simplified90.8%
Taylor expanded in t around 0 85.5%
Taylor expanded in x around 0 50.7%
*-commutative50.7%
associate-*r*50.8%
Simplified50.8%
if 7.5999999999999995e-69 < t < 3.00000000000000011e45Initial program 96.5%
+-commutative96.5%
associate-+r-96.5%
*-commutative96.5%
cancel-sign-sub-inv96.5%
associate-*r*99.7%
distribute-lft-neg-in99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
associate-+r-99.7%
associate-*l*99.8%
fma-define99.8%
cancel-sign-sub-inv99.8%
fma-define99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
*-commutative99.8%
associate-*r*96.6%
associate-*l*96.6%
neg-mul-196.6%
associate-*r*96.6%
Simplified96.6%
Taylor expanded in t around 0 61.7%
Taylor expanded in x around inf 34.4%
if 3.00000000000000011e45 < t Initial program 98.2%
+-commutative98.2%
associate-+r-98.2%
*-commutative98.2%
cancel-sign-sub-inv98.2%
associate-*r*87.8%
distribute-lft-neg-in87.8%
*-commutative87.8%
cancel-sign-sub-inv87.8%
associate-+r-87.8%
associate-*l*87.8%
fma-define89.4%
cancel-sign-sub-inv89.4%
fma-define89.4%
distribute-lft-neg-in89.4%
distribute-rgt-neg-in89.4%
*-commutative89.4%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around inf 64.2%
*-commutative64.2%
associate-*r*64.3%
associate-*l*64.2%
Simplified64.2%
Taylor expanded in y around 0 64.3%
Final simplification49.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 (<= t -1.45e-172)
(* -9.0 (* z (* y t)))
(if (<= t 2.8e-68)
(* a (* 27.0 b))
(if (<= t 1.55e+39) (* 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 (t <= -1.45e-172) {
tmp = -9.0 * (z * (y * t));
} else if (t <= 2.8e-68) {
tmp = a * (27.0 * b);
} else if (t <= 1.55e+39) {
tmp = 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 (t <= (-1.45d-172)) then
tmp = (-9.0d0) * (z * (y * t))
else if (t <= 2.8d-68) then
tmp = a * (27.0d0 * b)
else if (t <= 1.55d+39) then
tmp = 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 (t <= -1.45e-172) {
tmp = -9.0 * (z * (y * t));
} else if (t <= 2.8e-68) {
tmp = a * (27.0 * b);
} else if (t <= 1.55e+39) {
tmp = 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 t <= -1.45e-172: tmp = -9.0 * (z * (y * t)) elif t <= 2.8e-68: tmp = a * (27.0 * b) elif t <= 1.55e+39: tmp = 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 (t <= -1.45e-172) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (t <= 2.8e-68) tmp = Float64(a * Float64(27.0 * b)); elseif (t <= 1.55e+39) tmp = 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 (t <= -1.45e-172)
tmp = -9.0 * (z * (y * t));
elseif (t <= 2.8e-68)
tmp = a * (27.0 * b);
elseif (t <= 1.55e+39)
tmp = 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[t, -1.45e-172], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-68], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.55e+39], N[(x * 2.0), $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}\;t \leq -1.45 \cdot 10^{-172}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-68}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{+39}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if t < -1.44999999999999999e-172Initial program 94.6%
+-commutative94.6%
associate-+r-94.6%
*-commutative94.6%
cancel-sign-sub-inv94.6%
associate-*r*92.5%
distribute-lft-neg-in92.5%
*-commutative92.5%
cancel-sign-sub-inv92.5%
associate-+r-92.5%
associate-*l*93.5%
fma-define95.7%
cancel-sign-sub-inv95.7%
fma-define95.7%
distribute-lft-neg-in95.7%
distribute-rgt-neg-in95.7%
*-commutative95.7%
associate-*r*97.9%
associate-*l*97.9%
neg-mul-197.9%
associate-*r*97.9%
Simplified97.9%
Taylor expanded in t around inf 43.3%
*-commutative43.3%
associate-*r*43.2%
associate-*l*43.3%
Simplified43.3%
Taylor expanded in t around 0 43.3%
associate-*r*42.2%
Simplified42.2%
if -1.44999999999999999e-172 < t < 2.8000000000000001e-68Initial program 90.7%
+-commutative90.7%
associate-+r-90.7%
*-commutative90.7%
cancel-sign-sub-inv90.7%
associate-*r*98.5%
distribute-lft-neg-in98.5%
*-commutative98.5%
cancel-sign-sub-inv98.5%
associate-+r-98.5%
associate-*l*98.5%
fma-define98.5%
cancel-sign-sub-inv98.5%
fma-define98.5%
distribute-lft-neg-in98.5%
distribute-rgt-neg-in98.5%
*-commutative98.5%
associate-*r*90.8%
associate-*l*90.8%
neg-mul-190.8%
associate-*r*90.8%
Simplified90.8%
Taylor expanded in t around 0 85.5%
Taylor expanded in x around 0 50.7%
*-commutative50.7%
associate-*r*50.8%
Simplified50.8%
if 2.8000000000000001e-68 < t < 1.5500000000000001e39Initial program 96.4%
+-commutative96.4%
associate-+r-96.4%
*-commutative96.4%
cancel-sign-sub-inv96.4%
associate-*r*99.7%
distribute-lft-neg-in99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
associate-+r-99.7%
associate-*l*99.8%
fma-define99.8%
cancel-sign-sub-inv99.8%
fma-define99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
*-commutative99.8%
associate-*r*96.5%
associate-*l*96.5%
neg-mul-196.5%
associate-*r*96.5%
Simplified96.5%
Taylor expanded in t around 0 60.3%
Taylor expanded in x around inf 31.9%
if 1.5500000000000001e39 < t Initial program 98.2%
+-commutative98.2%
associate-+r-98.2%
*-commutative98.2%
cancel-sign-sub-inv98.2%
associate-*r*88.0%
distribute-lft-neg-in88.0%
*-commutative88.0%
cancel-sign-sub-inv88.0%
associate-+r-88.0%
associate-*l*88.0%
fma-define89.5%
cancel-sign-sub-inv89.5%
fma-define89.5%
distribute-lft-neg-in89.5%
distribute-rgt-neg-in89.5%
*-commutative89.5%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around inf 63.3%
Final simplification48.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 (<= t -4.2e-166)
t_1
(if (<= t 1.46e-67) (* a (* 27.0 b)) (if (<= t 3.4e+51) (* 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 (t <= -4.2e-166) {
tmp = t_1;
} else if (t <= 1.46e-67) {
tmp = a * (27.0 * b);
} else if (t <= 3.4e+51) {
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.
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 <= (-4.2d-166)) then
tmp = t_1
else if (t <= 1.46d-67) then
tmp = a * (27.0d0 * b)
else if (t <= 3.4d+51) 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;
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 <= -4.2e-166) {
tmp = t_1;
} else if (t <= 1.46e-67) {
tmp = a * (27.0 * b);
} else if (t <= 3.4e+51) {
tmp = x * 2.0;
} 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 <= -4.2e-166: tmp = t_1 elif t <= 1.46e-67: tmp = a * (27.0 * b) elif t <= 3.4e+51: tmp = x * 2.0 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 <= -4.2e-166) tmp = t_1; elseif (t <= 1.46e-67) tmp = Float64(a * Float64(27.0 * b)); elseif (t <= 3.4e+51) 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])){:}
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 <= -4.2e-166)
tmp = t_1;
elseif (t <= 1.46e-67)
tmp = a * (27.0 * b);
elseif (t <= 3.4e+51)
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.
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, -4.2e-166], t$95$1, If[LessEqual[t, 1.46e-67], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e+51], 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])\\\\
[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 -4.2 \cdot 10^{-166}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.46 \cdot 10^{-67}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{+51}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.1999999999999999e-166 or 3.39999999999999984e51 < t Initial program 96.1%
+-commutative96.1%
associate-+r-96.1%
*-commutative96.1%
cancel-sign-sub-inv96.1%
associate-*r*90.5%
distribute-lft-neg-in90.5%
*-commutative90.5%
cancel-sign-sub-inv90.5%
associate-+r-90.5%
associate-*l*91.1%
fma-define93.1%
cancel-sign-sub-inv93.1%
fma-define93.1%
distribute-lft-neg-in93.1%
distribute-rgt-neg-in93.1%
*-commutative93.1%
associate-*r*98.6%
associate-*l*98.6%
neg-mul-198.6%
associate-*r*98.6%
Simplified98.6%
Taylor expanded in t around inf 51.5%
if -4.1999999999999999e-166 < t < 1.46000000000000002e-67Initial program 90.7%
+-commutative90.7%
associate-+r-90.7%
*-commutative90.7%
cancel-sign-sub-inv90.7%
associate-*r*98.5%
distribute-lft-neg-in98.5%
*-commutative98.5%
cancel-sign-sub-inv98.5%
associate-+r-98.5%
associate-*l*98.5%
fma-define98.5%
cancel-sign-sub-inv98.5%
fma-define98.5%
distribute-lft-neg-in98.5%
distribute-rgt-neg-in98.5%
*-commutative98.5%
associate-*r*90.8%
associate-*l*90.8%
neg-mul-190.8%
associate-*r*90.8%
Simplified90.8%
Taylor expanded in t around 0 85.5%
Taylor expanded in x around 0 50.7%
*-commutative50.7%
associate-*r*50.8%
Simplified50.8%
if 1.46000000000000002e-67 < t < 3.39999999999999984e51Initial program 96.7%
+-commutative96.7%
associate-+r-96.7%
*-commutative96.7%
cancel-sign-sub-inv96.7%
associate-*r*99.7%
distribute-lft-neg-in99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
associate-+r-99.7%
associate-*l*99.8%
fma-define99.8%
cancel-sign-sub-inv99.8%
fma-define99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
*-commutative99.8%
associate-*r*96.7%
associate-*l*96.7%
neg-mul-196.7%
associate-*r*96.7%
Simplified96.7%
Taylor expanded in t around 0 59.6%
Taylor expanded in x around inf 33.3%
Final simplification49.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 (<= z -1.5e+95) (+ (* x 2.0) (* -9.0 (* z (* y t)))) (+ (* 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) {
double tmp;
if (z <= -1.5e+95) {
tmp = (x * 2.0) + (-9.0 * (z * (y * t)));
} else {
tmp = (b * (a * 27.0)) + ((x * 2.0) - (t * (y * (9.0 * 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.5d+95)) then
tmp = (x * 2.0d0) + ((-9.0d0) * (z * (y * t)))
else
tmp = (b * (a * 27.0d0)) + ((x * 2.0d0) - (t * (y * (9.0d0 * 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.5e+95) {
tmp = (x * 2.0) + (-9.0 * (z * (y * t)));
} else {
tmp = (b * (a * 27.0)) + ((x * 2.0) - (t * (y * (9.0 * 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.5e+95: tmp = (x * 2.0) + (-9.0 * (z * (y * t))) else: tmp = (b * (a * 27.0)) + ((x * 2.0) - (t * (y * (9.0 * 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.5e+95) tmp = Float64(Float64(x * 2.0) + Float64(-9.0 * Float64(z * Float64(y * t)))); else tmp = Float64(Float64(b * Float64(a * 27.0)) + Float64(Float64(x * 2.0) - Float64(t * Float64(y * Float64(9.0 * 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.5e+95)
tmp = (x * 2.0) + (-9.0 * (z * (y * t)));
else
tmp = (b * (a * 27.0)) + ((x * 2.0) - (t * (y * (9.0 * 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.5e+95], N[(N[(x * 2.0), $MachinePrecision] + N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+95}:\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;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}
\end{array}
if z < -1.49999999999999996e95Initial program 84.1%
Taylor expanded in y around 0 84.2%
associate-*r*84.1%
*-commutative84.1%
associate-*r*84.2%
Simplified84.2%
Taylor expanded in a around 0 78.7%
cancel-sign-sub-inv78.7%
metadata-eval78.7%
associate-*r*86.2%
Simplified86.2%
if -1.49999999999999996e95 < z Initial program 97.1%
Taylor expanded in y around 0 97.1%
associate-*r*97.1%
*-commutative97.1%
associate-*r*97.1%
Simplified97.1%
Final simplification95.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 (or (<= z -2.26e-125) (not (<= z 1.8e-85))) (+ (* x 2.0) (* -9.0 (* z (* y t)))) (+ (* 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 ((z <= -2.26e-125) || !(z <= 1.8e-85)) {
tmp = (x * 2.0) + (-9.0 * (z * (y * t)));
} 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.
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 <= (-2.26d-125)) .or. (.not. (z <= 1.8d-85))) then
tmp = (x * 2.0d0) + ((-9.0d0) * (z * (y * t)))
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;
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 <= -2.26e-125) || !(z <= 1.8e-85)) {
tmp = (x * 2.0) + (-9.0 * (z * (y * t)));
} else {
tmp = (x * 2.0) + (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 (z <= -2.26e-125) or not (z <= 1.8e-85): tmp = (x * 2.0) + (-9.0 * (z * (y * t))) else: tmp = (x * 2.0) + (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 ((z <= -2.26e-125) || !(z <= 1.8e-85)) tmp = Float64(Float64(x * 2.0) + Float64(-9.0 * Float64(z * Float64(y * t)))); 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])){:}
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 <= -2.26e-125) || ~((z <= 1.8e-85)))
tmp = (x * 2.0) + (-9.0 * (z * (y * t)));
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. 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[z, -2.26e-125], N[Not[LessEqual[z, 1.8e-85]], $MachinePrecision]], N[(N[(x * 2.0), $MachinePrecision] + N[(-9.0 * N[(z * N[(y * t), $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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.26 \cdot 10^{-125} \lor \neg \left(z \leq 1.8 \cdot 10^{-85}\right):\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if z < -2.2599999999999999e-125 or 1.7999999999999999e-85 < z Initial program 91.7%
Taylor expanded in y around 0 91.7%
associate-*r*91.7%
*-commutative91.7%
associate-*r*91.7%
Simplified91.7%
Taylor expanded in a around 0 73.7%
cancel-sign-sub-inv73.7%
metadata-eval73.7%
associate-*r*76.5%
Simplified76.5%
if -2.2599999999999999e-125 < z < 1.7999999999999999e-85Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-*r*91.6%
distribute-lft-neg-in91.6%
*-commutative91.6%
cancel-sign-sub-inv91.6%
associate-+r-91.6%
associate-*l*91.6%
fma-define91.6%
cancel-sign-sub-inv91.6%
fma-define91.6%
distribute-lft-neg-in91.6%
distribute-rgt-neg-in91.6%
*-commutative91.6%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around 0 88.2%
Final simplification80.7%
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 -3.8e-166)
(* z (+ (* -9.0 (* y t)) (* 2.0 (/ x z))))
(if (<= t 6.5e+73)
(+ (* x 2.0) (* 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 (t <= -3.8e-166) {
tmp = z * ((-9.0 * (y * t)) + (2.0 * (x / z)));
} else if (t <= 6.5e+73) {
tmp = (x * 2.0) + (27.0 * (a * 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 (t <= (-3.8d-166)) then
tmp = z * (((-9.0d0) * (y * t)) + (2.0d0 * (x / z)))
else if (t <= 6.5d+73) then
tmp = (x * 2.0d0) + (27.0d0 * (a * 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 (t <= -3.8e-166) {
tmp = z * ((-9.0 * (y * t)) + (2.0 * (x / z)));
} else if (t <= 6.5e+73) {
tmp = (x * 2.0) + (27.0 * (a * 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 t <= -3.8e-166: tmp = z * ((-9.0 * (y * t)) + (2.0 * (x / z))) elif t <= 6.5e+73: tmp = (x * 2.0) + (27.0 * (a * 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 (t <= -3.8e-166) tmp = Float64(z * Float64(Float64(-9.0 * Float64(y * t)) + Float64(2.0 * Float64(x / z)))); elseif (t <= 6.5e+73) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * 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 (t <= -3.8e-166)
tmp = z * ((-9.0 * (y * t)) + (2.0 * (x / z)));
elseif (t <= 6.5e+73)
tmp = (x * 2.0) + (27.0 * (a * 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[t, -3.8e-166], N[(z * N[(N[(-9.0 * N[(y * t), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.5e+73], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * 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}\;t \leq -3.8 \cdot 10^{-166}:\\
\;\;\;\;z \cdot \left(-9 \cdot \left(y \cdot t\right) + 2 \cdot \frac{x}{z}\right)\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{+73}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if t < -3.79999999999999982e-166Initial program 94.6%
Taylor expanded in y around 0 94.6%
associate-*r*94.6%
*-commutative94.6%
associate-*r*94.6%
Simplified94.6%
Taylor expanded in a around 0 72.3%
cancel-sign-sub-inv72.3%
metadata-eval72.3%
associate-*r*70.4%
Simplified70.4%
Taylor expanded in z around inf 57.7%
if -3.79999999999999982e-166 < t < 6.5000000000000001e73Initial program 92.0%
+-commutative92.0%
associate-+r-92.0%
*-commutative92.0%
cancel-sign-sub-inv92.0%
associate-*r*98.0%
distribute-lft-neg-in98.0%
*-commutative98.0%
cancel-sign-sub-inv98.0%
associate-+r-98.0%
associate-*l*98.0%
fma-define98.9%
cancel-sign-sub-inv98.9%
fma-define98.9%
distribute-lft-neg-in98.9%
distribute-rgt-neg-in98.9%
*-commutative98.9%
associate-*r*92.9%
associate-*l*92.9%
neg-mul-192.9%
associate-*r*92.9%
Simplified92.9%
Taylor expanded in t around 0 77.2%
if 6.5000000000000001e73 < t Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*91.2%
associate-*l*91.2%
Simplified91.2%
Taylor expanded in a around 0 87.6%
Final simplification72.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 (<= t -4.2e-166)
(+ (* x 2.0) (* -9.0 (* z (* y t))))
(if (<= t 6e+73)
(+ (* x 2.0) (* 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 (t <= -4.2e-166) {
tmp = (x * 2.0) + (-9.0 * (z * (y * t)));
} else if (t <= 6e+73) {
tmp = (x * 2.0) + (27.0 * (a * 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 (t <= (-4.2d-166)) then
tmp = (x * 2.0d0) + ((-9.0d0) * (z * (y * t)))
else if (t <= 6d+73) then
tmp = (x * 2.0d0) + (27.0d0 * (a * 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 (t <= -4.2e-166) {
tmp = (x * 2.0) + (-9.0 * (z * (y * t)));
} else if (t <= 6e+73) {
tmp = (x * 2.0) + (27.0 * (a * 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 t <= -4.2e-166: tmp = (x * 2.0) + (-9.0 * (z * (y * t))) elif t <= 6e+73: tmp = (x * 2.0) + (27.0 * (a * 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 (t <= -4.2e-166) tmp = Float64(Float64(x * 2.0) + Float64(-9.0 * Float64(z * Float64(y * t)))); elseif (t <= 6e+73) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * 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 (t <= -4.2e-166)
tmp = (x * 2.0) + (-9.0 * (z * (y * t)));
elseif (t <= 6e+73)
tmp = (x * 2.0) + (27.0 * (a * 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[t, -4.2e-166], N[(N[(x * 2.0), $MachinePrecision] + N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e+73], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * 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}\;t \leq -4.2 \cdot 10^{-166}:\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;t \leq 6 \cdot 10^{+73}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if t < -4.1999999999999999e-166Initial program 94.6%
Taylor expanded in y around 0 94.6%
associate-*r*94.6%
*-commutative94.6%
associate-*r*94.6%
Simplified94.6%
Taylor expanded in a around 0 72.3%
cancel-sign-sub-inv72.3%
metadata-eval72.3%
associate-*r*70.4%
Simplified70.4%
if -4.1999999999999999e-166 < t < 6.00000000000000021e73Initial program 92.0%
+-commutative92.0%
associate-+r-92.0%
*-commutative92.0%
cancel-sign-sub-inv92.0%
associate-*r*98.0%
distribute-lft-neg-in98.0%
*-commutative98.0%
cancel-sign-sub-inv98.0%
associate-+r-98.0%
associate-*l*98.0%
fma-define98.9%
cancel-sign-sub-inv98.9%
fma-define98.9%
distribute-lft-neg-in98.9%
distribute-rgt-neg-in98.9%
*-commutative98.9%
associate-*r*92.9%
associate-*l*92.9%
neg-mul-192.9%
associate-*r*92.9%
Simplified92.9%
Taylor expanded in t around 0 77.2%
if 6.00000000000000021e73 < t Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*91.2%
associate-*l*91.2%
Simplified91.2%
Taylor expanded in a around 0 87.6%
Final simplification77.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 -6.5e-54) (* y (* z (* t -9.0))) (if (<= z 8e-34) (+ (* x 2.0) (* 27.0 (* a b))) (* t (* z (* y -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 (z <= -6.5e-54) {
tmp = y * (z * (t * -9.0));
} else if (z <= 8e-34) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = t * (z * (y * -9.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 <= (-6.5d-54)) then
tmp = y * (z * (t * (-9.0d0)))
else if (z <= 8d-34) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = t * (z * (y * (-9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 <= -6.5e-54) {
tmp = y * (z * (t * -9.0));
} else if (z <= 8e-34) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = t * (z * (y * -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]) def code(x, y, z, t, a, b): tmp = 0 if z <= -6.5e-54: tmp = y * (z * (t * -9.0)) elif z <= 8e-34: tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = t * (z * (y * -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 (z <= -6.5e-54) tmp = Float64(y * Float64(z * Float64(t * -9.0))); elseif (z <= 8e-34) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(t * Float64(z * Float64(y * -9.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 <= -6.5e-54)
tmp = y * (z * (t * -9.0));
elseif (z <= 8e-34)
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = t * (z * (y * -9.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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, -6.5e-54], N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-34], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{-54}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-34}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -6.49999999999999991e-54Initial program 87.3%
sub-neg87.3%
sub-neg87.3%
associate-*l*90.1%
associate-*l*90.1%
Simplified90.1%
Taylor expanded in x around 0 66.5%
Taylor expanded in y around inf 66.5%
Taylor expanded in y around inf 50.8%
associate-*r*50.8%
*-commutative50.8%
associate-*r*53.5%
*-commutative53.5%
Simplified53.5%
if -6.49999999999999991e-54 < z < 7.99999999999999942e-34Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-*r*91.2%
distribute-lft-neg-in91.2%
*-commutative91.2%
cancel-sign-sub-inv91.2%
associate-+r-91.2%
associate-*l*91.2%
fma-define91.2%
cancel-sign-sub-inv91.2%
fma-define91.2%
distribute-lft-neg-in91.2%
distribute-rgt-neg-in91.2%
*-commutative91.2%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around 0 83.1%
if 7.99999999999999942e-34 < z Initial program 92.8%
+-commutative92.8%
associate-+r-92.8%
*-commutative92.8%
cancel-sign-sub-inv92.8%
associate-*r*96.8%
distribute-lft-neg-in96.8%
*-commutative96.8%
cancel-sign-sub-inv96.8%
associate-+r-96.8%
associate-*l*98.3%
fma-define99.8%
cancel-sign-sub-inv99.8%
fma-define99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
*-commutative99.8%
associate-*r*95.9%
associate-*l*95.8%
neg-mul-195.8%
associate-*r*95.8%
Simplified95.8%
Taylor expanded in t around inf 59.9%
*-commutative59.9%
associate-*r*59.9%
*-commutative59.9%
associate-*l*60.0%
Simplified60.0%
Final simplification69.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 (+ (- (* x 2.0) (* (* y 9.0) (* z t))) (* a (* 27.0 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) {
return ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
}
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) - ((y * 9.0d0) * (z * t))) + (a * (27.0d0 * b))
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) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
}
[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) - ((y * 9.0) * (z * t))) + (a * (27.0 * b))
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(Float64(y * 9.0) * Float64(z * t))) + Float64(a * Float64(27.0 * b))) 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) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
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[(N[(y * 9.0), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $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 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)
\end{array}
Initial program 94.6%
sub-neg94.6%
sub-neg94.6%
associate-*l*95.0%
associate-*l*95.4%
Simplified95.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 (<= x -5200000.0) (not (<= x 29.0))) (* x 2.0) (* a (* 27.0 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 ((x <= -5200000.0) || !(x <= 29.0)) {
tmp = x * 2.0;
} else {
tmp = a * (27.0 * b);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 ((x <= (-5200000.0d0)) .or. (.not. (x <= 29.0d0))) then
tmp = x * 2.0d0
else
tmp = a * (27.0d0 * 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 ((x <= -5200000.0) || !(x <= 29.0)) {
tmp = x * 2.0;
} else {
tmp = a * (27.0 * 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 (x <= -5200000.0) or not (x <= 29.0): tmp = x * 2.0 else: tmp = a * (27.0 * 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 ((x <= -5200000.0) || !(x <= 29.0)) tmp = Float64(x * 2.0); else tmp = Float64(a * Float64(27.0 * b)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 ((x <= -5200000.0) || ~((x <= 29.0)))
tmp = x * 2.0;
else
tmp = a * (27.0 * b);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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[x, -5200000.0], N[Not[LessEqual[x, 29.0]], $MachinePrecision]], N[(x * 2.0), $MachinePrecision], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5200000 \lor \neg \left(x \leq 29\right):\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if x < -5.2e6 or 29 < x Initial program 94.5%
+-commutative94.5%
associate-+r-94.5%
*-commutative94.5%
cancel-sign-sub-inv94.5%
associate-*r*93.7%
distribute-lft-neg-in93.7%
*-commutative93.7%
cancel-sign-sub-inv93.7%
associate-+r-93.7%
associate-*l*93.7%
fma-define96.1%
cancel-sign-sub-inv96.1%
fma-define96.1%
distribute-lft-neg-in96.1%
distribute-rgt-neg-in96.1%
*-commutative96.1%
associate-*r*96.9%
associate-*l*96.9%
neg-mul-196.9%
associate-*r*96.9%
Simplified96.9%
Taylor expanded in t around 0 71.1%
Taylor expanded in x around inf 53.1%
if -5.2e6 < x < 29Initial program 94.7%
+-commutative94.7%
associate-+r-94.7%
*-commutative94.7%
cancel-sign-sub-inv94.7%
associate-*r*94.0%
distribute-lft-neg-in94.0%
*-commutative94.0%
cancel-sign-sub-inv94.0%
associate-+r-94.0%
associate-*l*94.7%
fma-define94.7%
cancel-sign-sub-inv94.7%
fma-define94.7%
distribute-lft-neg-in94.7%
distribute-rgt-neg-in94.7%
*-commutative94.7%
associate-*r*95.5%
associate-*l*95.5%
neg-mul-195.5%
associate-*r*95.5%
Simplified95.5%
Taylor expanded in t around 0 51.9%
Taylor expanded in x around 0 44.8%
*-commutative44.8%
associate-*r*44.8%
Simplified44.8%
Final simplification48.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 (if (or (<= x -205000000000.0) (not (<= x 29.0))) (* x 2.0) (* 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 ((x <= -205000000000.0) || !(x <= 29.0)) {
tmp = x * 2.0;
} else {
tmp = 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 ((x <= (-205000000000.0d0)) .or. (.not. (x <= 29.0d0))) then
tmp = x * 2.0d0
else
tmp = 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 ((x <= -205000000000.0) || !(x <= 29.0)) {
tmp = x * 2.0;
} else {
tmp = 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 (x <= -205000000000.0) or not (x <= 29.0): tmp = x * 2.0 else: tmp = 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 ((x <= -205000000000.0) || !(x <= 29.0)) tmp = Float64(x * 2.0); else tmp = 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 ((x <= -205000000000.0) || ~((x <= 29.0)))
tmp = x * 2.0;
else
tmp = 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[Or[LessEqual[x, -205000000000.0], N[Not[LessEqual[x, 29.0]], $MachinePrecision]], N[(x * 2.0), $MachinePrecision], N[(b * N[(a * 27.0), $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}\;x \leq -205000000000 \lor \neg \left(x \leq 29\right):\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if x < -2.05e11 or 29 < x Initial program 94.5%
+-commutative94.5%
associate-+r-94.5%
*-commutative94.5%
cancel-sign-sub-inv94.5%
associate-*r*93.7%
distribute-lft-neg-in93.7%
*-commutative93.7%
cancel-sign-sub-inv93.7%
associate-+r-93.7%
associate-*l*93.7%
fma-define96.1%
cancel-sign-sub-inv96.1%
fma-define96.1%
distribute-lft-neg-in96.1%
distribute-rgt-neg-in96.1%
*-commutative96.1%
associate-*r*96.9%
associate-*l*96.9%
neg-mul-196.9%
associate-*r*96.9%
Simplified96.9%
Taylor expanded in t around 0 71.1%
Taylor expanded in x around inf 53.1%
if -2.05e11 < x < 29Initial program 94.7%
+-commutative94.7%
associate-+r-94.7%
*-commutative94.7%
cancel-sign-sub-inv94.7%
associate-*r*94.0%
distribute-lft-neg-in94.0%
*-commutative94.0%
cancel-sign-sub-inv94.0%
associate-+r-94.0%
associate-*l*94.7%
fma-define94.7%
cancel-sign-sub-inv94.7%
fma-define94.7%
distribute-lft-neg-in94.7%
distribute-rgt-neg-in94.7%
*-commutative94.7%
associate-*r*95.5%
associate-*l*95.5%
neg-mul-195.5%
associate-*r*95.5%
Simplified95.5%
Taylor expanded in t around 0 51.9%
Taylor expanded in b around inf 51.9%
Taylor expanded in b around inf 44.8%
associate-*r*44.8%
Simplified44.8%
Final simplification48.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 (if (or (<= x -58000000000.0) (not (<= x 38.0))) (* 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 ((x <= -58000000000.0) || !(x <= 38.0)) {
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 ((x <= (-58000000000.0d0)) .or. (.not. (x <= 38.0d0))) 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 ((x <= -58000000000.0) || !(x <= 38.0)) {
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 (x <= -58000000000.0) or not (x <= 38.0): 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 ((x <= -58000000000.0) || !(x <= 38.0)) 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 ((x <= -58000000000.0) || ~((x <= 38.0)))
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[Or[LessEqual[x, -58000000000.0], N[Not[LessEqual[x, 38.0]], $MachinePrecision]], 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}\;x \leq -58000000000 \lor \neg \left(x \leq 38\right):\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if x < -5.8e10 or 38 < x Initial program 94.5%
+-commutative94.5%
associate-+r-94.5%
*-commutative94.5%
cancel-sign-sub-inv94.5%
associate-*r*93.7%
distribute-lft-neg-in93.7%
*-commutative93.7%
cancel-sign-sub-inv93.7%
associate-+r-93.7%
associate-*l*93.7%
fma-define96.1%
cancel-sign-sub-inv96.1%
fma-define96.1%
distribute-lft-neg-in96.1%
distribute-rgt-neg-in96.1%
*-commutative96.1%
associate-*r*96.9%
associate-*l*96.9%
neg-mul-196.9%
associate-*r*96.9%
Simplified96.9%
Taylor expanded in t around 0 71.1%
Taylor expanded in x around inf 53.1%
if -5.8e10 < x < 38Initial program 94.7%
+-commutative94.7%
associate-+r-94.7%
*-commutative94.7%
cancel-sign-sub-inv94.7%
associate-*r*94.0%
distribute-lft-neg-in94.0%
*-commutative94.0%
cancel-sign-sub-inv94.0%
associate-+r-94.0%
associate-*l*94.7%
fma-define94.7%
cancel-sign-sub-inv94.7%
fma-define94.7%
distribute-lft-neg-in94.7%
distribute-rgt-neg-in94.7%
*-commutative94.7%
associate-*r*95.5%
associate-*l*95.5%
neg-mul-195.5%
associate-*r*95.5%
Simplified95.5%
Taylor expanded in a around inf 44.8%
Final simplification48.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))
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 94.6%
+-commutative94.6%
associate-+r-94.6%
*-commutative94.6%
cancel-sign-sub-inv94.6%
associate-*r*93.8%
distribute-lft-neg-in93.8%
*-commutative93.8%
cancel-sign-sub-inv93.8%
associate-+r-93.8%
associate-*l*94.2%
fma-define95.4%
cancel-sign-sub-inv95.4%
fma-define95.4%
distribute-lft-neg-in95.4%
distribute-rgt-neg-in95.4%
*-commutative95.4%
associate-*r*96.2%
associate-*l*96.2%
neg-mul-196.2%
associate-*r*96.2%
Simplified96.2%
Taylor expanded in t around 0 61.3%
Taylor expanded in x around inf 30.7%
Final simplification30.7%
(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 2024146
(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)))