
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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 10000.0) (fma a (* 27.0 b) (fma x 2.0 (* y (* (* z t) -9.0)))) (+ (- (* x 2.0) (* z (* t (* y 9.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 (z <= 10000.0) {
tmp = fma(a, (27.0 * b), fma(x, 2.0, (y * ((z * t) * -9.0))));
} else {
tmp = ((x * 2.0) - (z * (t * (y * 9.0)))) + (b * (a * 27.0));
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 10000.0) tmp = fma(a, Float64(27.0 * b), fma(x, 2.0, Float64(y * Float64(Float64(z * t) * -9.0)))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(z * Float64(t * Float64(y * 9.0)))) + Float64(b * Float64(a * 27.0))); end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 10000.0], N[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(y * N[(N[(z * t), $MachinePrecision] * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(z * N[(t * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 10000:\\
\;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, y \cdot \left(\left(z \cdot t\right) \cdot -9\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - z \cdot \left(t \cdot \left(y \cdot 9\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if z < 1e4Initial program 94.0%
+-commutative94.0%
associate-+r-94.0%
*-commutative94.0%
cancel-sign-sub-inv94.0%
associate-*r*94.6%
distribute-lft-neg-in94.6%
*-commutative94.6%
cancel-sign-sub-inv94.6%
associate-+r-94.6%
associate-*l*94.6%
fma-define95.1%
fma-neg95.1%
associate-*l*97.3%
distribute-rgt-neg-in97.3%
*-commutative97.3%
associate-*l*97.3%
*-commutative97.3%
distribute-lft-neg-in97.3%
distribute-rgt-neg-in97.3%
Simplified97.3%
if 1e4 < z Initial program 87.6%
associate-*l*86.0%
*-commutative86.0%
associate-*r*95.1%
Applied egg-rr95.1%
Final simplification96.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 (+ (- (* x 2.0) (* t (* z (* y 9.0)))) (* b (* a 27.0))))) (if (<= t_1 INFINITY) t_1 (* 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 t_1 = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = 27.0 * (a * b);
}
return tmp;
}
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 = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} 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): t_1 = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0)) tmp = 0 if t_1 <= math.inf: tmp = t_1 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) t_1 = Float64(Float64(Float64(x * 2.0) - Float64(t * Float64(z * Float64(y * 9.0)))) + Float64(b * Float64(a * 27.0))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(27.0 * Float64(a * b)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = 27.0 * (a * b);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(z * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 2 - t \cdot \left(z \cdot \left(y \cdot 9\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t)) (*.f64 (*.f64 a #s(literal 27 binary64)) b)) < +inf.0Initial program 94.7%
if +inf.0 < (+.f64 (-.f64 (*.f64 x #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t)) (*.f64 (*.f64 a #s(literal 27 binary64)) b)) Initial program 0.0%
Taylor expanded in a around inf 66.7%
Final simplification94.0%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* 9.0 (* t (* z y)))) (t_2 (- (* 27.0 (* a b)) t_1)))
(if (<= a -4.4e+95)
t_2
(if (<= a 7.5e-118)
(- (* x 2.0) t_1)
(if (<= a 1.08e+42) t_2 (* 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 t_1 = 9.0 * (t * (z * y));
double t_2 = (27.0 * (a * b)) - t_1;
double tmp;
if (a <= -4.4e+95) {
tmp = t_2;
} else if (a <= 7.5e-118) {
tmp = (x * 2.0) - t_1;
} else if (a <= 1.08e+42) {
tmp = t_2;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 9.0d0 * (t * (z * y))
t_2 = (27.0d0 * (a * b)) - t_1
if (a <= (-4.4d+95)) then
tmp = t_2
else if (a <= 7.5d-118) then
tmp = (x * 2.0d0) - t_1
else if (a <= 1.08d+42) then
tmp = t_2
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 t_1 = 9.0 * (t * (z * y));
double t_2 = (27.0 * (a * b)) - t_1;
double tmp;
if (a <= -4.4e+95) {
tmp = t_2;
} else if (a <= 7.5e-118) {
tmp = (x * 2.0) - t_1;
} else if (a <= 1.08e+42) {
tmp = t_2;
} 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): t_1 = 9.0 * (t * (z * y)) t_2 = (27.0 * (a * b)) - t_1 tmp = 0 if a <= -4.4e+95: tmp = t_2 elif a <= 7.5e-118: tmp = (x * 2.0) - t_1 elif a <= 1.08e+42: tmp = t_2 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) t_1 = Float64(9.0 * Float64(t * Float64(z * y))) t_2 = Float64(Float64(27.0 * Float64(a * b)) - t_1) tmp = 0.0 if (a <= -4.4e+95) tmp = t_2; elseif (a <= 7.5e-118) tmp = Float64(Float64(x * 2.0) - t_1); elseif (a <= 1.08e+42) tmp = t_2; 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)
t_1 = 9.0 * (t * (z * y));
t_2 = (27.0 * (a * b)) - t_1;
tmp = 0.0;
if (a <= -4.4e+95)
tmp = t_2;
elseif (a <= 7.5e-118)
tmp = (x * 2.0) - t_1;
elseif (a <= 1.08e+42)
tmp = t_2;
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_] := Block[{t$95$1 = N[(9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[a, -4.4e+95], t$95$2, If[LessEqual[a, 7.5e-118], N[(N[(x * 2.0), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[a, 1.08e+42], t$95$2, 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}
t_1 := 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
t_2 := 27 \cdot \left(a \cdot b\right) - t\_1\\
\mathbf{if}\;a \leq -4.4 \cdot 10^{+95}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{-118}:\\
\;\;\;\;x \cdot 2 - t\_1\\
\mathbf{elif}\;a \leq 1.08 \cdot 10^{+42}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if a < -4.3999999999999998e95 or 7.49999999999999978e-118 < a < 1.08e42Initial program 91.9%
Taylor expanded in x around 0 70.5%
if -4.3999999999999998e95 < a < 7.49999999999999978e-118Initial program 95.0%
Taylor expanded in a around 0 83.8%
if 1.08e42 < a Initial program 88.2%
Taylor expanded in a around inf 58.9%
associate-*r*58.8%
Applied egg-rr58.8%
Final simplification73.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 (* b (* a 27.0))))
(if (<= a -2.4e+104)
t_1
(if (<= a -7.5e-30)
(* y (* t (* z -9.0)))
(if (<= a -6e-193)
(* x 2.0)
(if (<= a 3.4e-28) (* -9.0 (* t (* z y))) 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 = b * (a * 27.0);
double tmp;
if (a <= -2.4e+104) {
tmp = t_1;
} else if (a <= -7.5e-30) {
tmp = y * (t * (z * -9.0));
} else if (a <= -6e-193) {
tmp = x * 2.0;
} else if (a <= 3.4e-28) {
tmp = -9.0 * (t * (z * y));
} 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 = b * (a * 27.0d0)
if (a <= (-2.4d+104)) then
tmp = t_1
else if (a <= (-7.5d-30)) then
tmp = y * (t * (z * (-9.0d0)))
else if (a <= (-6d-193)) then
tmp = x * 2.0d0
else if (a <= 3.4d-28) then
tmp = (-9.0d0) * (t * (z * y))
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 = b * (a * 27.0);
double tmp;
if (a <= -2.4e+104) {
tmp = t_1;
} else if (a <= -7.5e-30) {
tmp = y * (t * (z * -9.0));
} else if (a <= -6e-193) {
tmp = x * 2.0;
} else if (a <= 3.4e-28) {
tmp = -9.0 * (t * (z * y));
} 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 = b * (a * 27.0) tmp = 0 if a <= -2.4e+104: tmp = t_1 elif a <= -7.5e-30: tmp = y * (t * (z * -9.0)) elif a <= -6e-193: tmp = x * 2.0 elif a <= 3.4e-28: tmp = -9.0 * (t * (z * y)) 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(b * Float64(a * 27.0)) tmp = 0.0 if (a <= -2.4e+104) tmp = t_1; elseif (a <= -7.5e-30) tmp = Float64(y * Float64(t * Float64(z * -9.0))); elseif (a <= -6e-193) tmp = Float64(x * 2.0); elseif (a <= 3.4e-28) tmp = Float64(-9.0 * Float64(t * Float64(z * y))); 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 = b * (a * 27.0);
tmp = 0.0;
if (a <= -2.4e+104)
tmp = t_1;
elseif (a <= -7.5e-30)
tmp = y * (t * (z * -9.0));
elseif (a <= -6e-193)
tmp = x * 2.0;
elseif (a <= 3.4e-28)
tmp = -9.0 * (t * (z * y));
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[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.4e+104], t$95$1, If[LessEqual[a, -7.5e-30], N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -6e-193], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, 3.4e-28], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;a \leq -2.4 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -7.5 \cdot 10^{-30}:\\
\;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\
\mathbf{elif}\;a \leq -6 \cdot 10^{-193}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{-28}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.4e104 or 3.4000000000000001e-28 < a Initial program 90.0%
Taylor expanded in a around inf 53.9%
associate-*r*53.9%
Applied egg-rr53.9%
if -2.4e104 < a < -7.5000000000000006e-30Initial program 90.7%
Taylor expanded in y around inf 39.7%
associate-*r*39.7%
*-commutative39.7%
associate-*r*43.8%
*-commutative43.8%
Applied egg-rr43.8%
*-commutative43.8%
*-commutative43.8%
associate-*r*43.8%
Applied egg-rr43.8%
if -7.5000000000000006e-30 < a < -5.9999999999999998e-193Initial program 94.7%
Taylor expanded in x around inf 51.5%
if -5.9999999999999998e-193 < a < 3.4000000000000001e-28Initial program 97.0%
Taylor expanded in y around inf 44.0%
Final simplification50.0%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (* a 27.0))))
(if (<= a -6.2e+104)
t_1
(if (<= a -2.05e-29)
(* y (* z (* t -9.0)))
(if (<= a -4.9e-192)
(* x 2.0)
(if (<= a 7.8e-28) (* -9.0 (* t (* z y))) 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 = b * (a * 27.0);
double tmp;
if (a <= -6.2e+104) {
tmp = t_1;
} else if (a <= -2.05e-29) {
tmp = y * (z * (t * -9.0));
} else if (a <= -4.9e-192) {
tmp = x * 2.0;
} else if (a <= 7.8e-28) {
tmp = -9.0 * (t * (z * y));
} 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 = b * (a * 27.0d0)
if (a <= (-6.2d+104)) then
tmp = t_1
else if (a <= (-2.05d-29)) then
tmp = y * (z * (t * (-9.0d0)))
else if (a <= (-4.9d-192)) then
tmp = x * 2.0d0
else if (a <= 7.8d-28) then
tmp = (-9.0d0) * (t * (z * y))
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 = b * (a * 27.0);
double tmp;
if (a <= -6.2e+104) {
tmp = t_1;
} else if (a <= -2.05e-29) {
tmp = y * (z * (t * -9.0));
} else if (a <= -4.9e-192) {
tmp = x * 2.0;
} else if (a <= 7.8e-28) {
tmp = -9.0 * (t * (z * y));
} 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 = b * (a * 27.0) tmp = 0 if a <= -6.2e+104: tmp = t_1 elif a <= -2.05e-29: tmp = y * (z * (t * -9.0)) elif a <= -4.9e-192: tmp = x * 2.0 elif a <= 7.8e-28: tmp = -9.0 * (t * (z * y)) 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(b * Float64(a * 27.0)) tmp = 0.0 if (a <= -6.2e+104) tmp = t_1; elseif (a <= -2.05e-29) tmp = Float64(y * Float64(z * Float64(t * -9.0))); elseif (a <= -4.9e-192) tmp = Float64(x * 2.0); elseif (a <= 7.8e-28) tmp = Float64(-9.0 * Float64(t * Float64(z * y))); 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 = b * (a * 27.0);
tmp = 0.0;
if (a <= -6.2e+104)
tmp = t_1;
elseif (a <= -2.05e-29)
tmp = y * (z * (t * -9.0));
elseif (a <= -4.9e-192)
tmp = x * 2.0;
elseif (a <= 7.8e-28)
tmp = -9.0 * (t * (z * y));
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[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.2e+104], t$95$1, If[LessEqual[a, -2.05e-29], N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4.9e-192], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, 7.8e-28], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;a \leq -6.2 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.05 \cdot 10^{-29}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;a \leq -4.9 \cdot 10^{-192}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;a \leq 7.8 \cdot 10^{-28}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -6.20000000000000033e104 or 7.79999999999999998e-28 < a Initial program 90.0%
Taylor expanded in a around inf 53.9%
associate-*r*53.9%
Applied egg-rr53.9%
if -6.20000000000000033e104 < a < -2.0499999999999999e-29Initial program 90.7%
Taylor expanded in y around inf 39.7%
associate-*r*39.7%
*-commutative39.7%
associate-*r*43.8%
*-commutative43.8%
Applied egg-rr43.8%
if -2.0499999999999999e-29 < a < -4.9e-192Initial program 94.7%
Taylor expanded in x around inf 51.5%
if -4.9e-192 < a < 7.79999999999999998e-28Initial program 97.0%
Taylor expanded in y around inf 44.0%
Final simplification49.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 (* b (* a 27.0))))
(if (<= a -2.3e+104)
t_1
(if (<= a -2.25e-29)
(* (* z -9.0) (* y t))
(if (<= a -1.3e-186)
(* x 2.0)
(if (<= a 1.7e-27) (* -9.0 (* t (* z y))) 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 = b * (a * 27.0);
double tmp;
if (a <= -2.3e+104) {
tmp = t_1;
} else if (a <= -2.25e-29) {
tmp = (z * -9.0) * (y * t);
} else if (a <= -1.3e-186) {
tmp = x * 2.0;
} else if (a <= 1.7e-27) {
tmp = -9.0 * (t * (z * y));
} 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 = b * (a * 27.0d0)
if (a <= (-2.3d+104)) then
tmp = t_1
else if (a <= (-2.25d-29)) then
tmp = (z * (-9.0d0)) * (y * t)
else if (a <= (-1.3d-186)) then
tmp = x * 2.0d0
else if (a <= 1.7d-27) then
tmp = (-9.0d0) * (t * (z * y))
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 = b * (a * 27.0);
double tmp;
if (a <= -2.3e+104) {
tmp = t_1;
} else if (a <= -2.25e-29) {
tmp = (z * -9.0) * (y * t);
} else if (a <= -1.3e-186) {
tmp = x * 2.0;
} else if (a <= 1.7e-27) {
tmp = -9.0 * (t * (z * y));
} 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 = b * (a * 27.0) tmp = 0 if a <= -2.3e+104: tmp = t_1 elif a <= -2.25e-29: tmp = (z * -9.0) * (y * t) elif a <= -1.3e-186: tmp = x * 2.0 elif a <= 1.7e-27: tmp = -9.0 * (t * (z * y)) 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(b * Float64(a * 27.0)) tmp = 0.0 if (a <= -2.3e+104) tmp = t_1; elseif (a <= -2.25e-29) tmp = Float64(Float64(z * -9.0) * Float64(y * t)); elseif (a <= -1.3e-186) tmp = Float64(x * 2.0); elseif (a <= 1.7e-27) tmp = Float64(-9.0 * Float64(t * Float64(z * y))); 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 = b * (a * 27.0);
tmp = 0.0;
if (a <= -2.3e+104)
tmp = t_1;
elseif (a <= -2.25e-29)
tmp = (z * -9.0) * (y * t);
elseif (a <= -1.3e-186)
tmp = x * 2.0;
elseif (a <= 1.7e-27)
tmp = -9.0 * (t * (z * y));
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[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.3e+104], t$95$1, If[LessEqual[a, -2.25e-29], N[(N[(z * -9.0), $MachinePrecision] * N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.3e-186], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, 1.7e-27], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;a \leq -2.3 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.25 \cdot 10^{-29}:\\
\;\;\;\;\left(z \cdot -9\right) \cdot \left(y \cdot t\right)\\
\mathbf{elif}\;a \leq -1.3 \cdot 10^{-186}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{-27}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.29999999999999985e104 or 1.69999999999999985e-27 < a Initial program 90.0%
Taylor expanded in a around inf 53.9%
associate-*r*53.9%
Applied egg-rr53.9%
if -2.29999999999999985e104 < a < -2.2499999999999999e-29Initial program 90.7%
Taylor expanded in y around inf 39.7%
*-commutative39.7%
associate-*r*41.6%
associate-*l*41.7%
*-commutative41.7%
Applied egg-rr41.7%
if -2.2499999999999999e-29 < a < -1.29999999999999997e-186Initial program 94.5%
Taylor expanded in x around inf 50.1%
if -1.29999999999999997e-186 < a < 1.69999999999999985e-27Initial program 97.1%
Taylor expanded in y around inf 43.3%
Final simplification49.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 (* b (* a 27.0))))
(if (<= a -2.3e+104)
t_1
(if (<= a -2.4e-29)
(* -9.0 (* z (* y t)))
(if (<= a -2.6e-186)
(* x 2.0)
(if (<= a 1e-27) (* -9.0 (* t (* z y))) 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 = b * (a * 27.0);
double tmp;
if (a <= -2.3e+104) {
tmp = t_1;
} else if (a <= -2.4e-29) {
tmp = -9.0 * (z * (y * t));
} else if (a <= -2.6e-186) {
tmp = x * 2.0;
} else if (a <= 1e-27) {
tmp = -9.0 * (t * (z * y));
} 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 = b * (a * 27.0d0)
if (a <= (-2.3d+104)) then
tmp = t_1
else if (a <= (-2.4d-29)) then
tmp = (-9.0d0) * (z * (y * t))
else if (a <= (-2.6d-186)) then
tmp = x * 2.0d0
else if (a <= 1d-27) then
tmp = (-9.0d0) * (t * (z * y))
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 = b * (a * 27.0);
double tmp;
if (a <= -2.3e+104) {
tmp = t_1;
} else if (a <= -2.4e-29) {
tmp = -9.0 * (z * (y * t));
} else if (a <= -2.6e-186) {
tmp = x * 2.0;
} else if (a <= 1e-27) {
tmp = -9.0 * (t * (z * y));
} 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 = b * (a * 27.0) tmp = 0 if a <= -2.3e+104: tmp = t_1 elif a <= -2.4e-29: tmp = -9.0 * (z * (y * t)) elif a <= -2.6e-186: tmp = x * 2.0 elif a <= 1e-27: tmp = -9.0 * (t * (z * y)) 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(b * Float64(a * 27.0)) tmp = 0.0 if (a <= -2.3e+104) tmp = t_1; elseif (a <= -2.4e-29) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (a <= -2.6e-186) tmp = Float64(x * 2.0); elseif (a <= 1e-27) tmp = Float64(-9.0 * Float64(t * Float64(z * y))); 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 = b * (a * 27.0);
tmp = 0.0;
if (a <= -2.3e+104)
tmp = t_1;
elseif (a <= -2.4e-29)
tmp = -9.0 * (z * (y * t));
elseif (a <= -2.6e-186)
tmp = x * 2.0;
elseif (a <= 1e-27)
tmp = -9.0 * (t * (z * y));
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[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.3e+104], t$95$1, If[LessEqual[a, -2.4e-29], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.6e-186], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, 1e-27], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;a \leq -2.3 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.4 \cdot 10^{-29}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;a \leq -2.6 \cdot 10^{-186}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;a \leq 10^{-27}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.29999999999999985e104 or 1e-27 < a Initial program 90.0%
Taylor expanded in a around inf 53.9%
associate-*r*53.9%
Applied egg-rr53.9%
if -2.29999999999999985e104 < a < -2.39999999999999992e-29Initial program 90.7%
Taylor expanded in y around inf 39.7%
associate-*r*41.6%
*-commutative41.6%
Applied egg-rr41.6%
if -2.39999999999999992e-29 < a < -2.59999999999999993e-186Initial program 94.4%
Taylor expanded in x around inf 51.5%
if -2.59999999999999993e-186 < a < 1e-27Initial program 97.1%
Taylor expanded in y around inf 44.2%
Final simplification49.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
(let* ((t_1 (* -9.0 (* t (* z y)))) (t_2 (* b (* a 27.0))))
(if (<= a -2.5e+104)
t_2
(if (<= a -2.3e+76)
t_1
(if (<= a -3.2e-190) (* x 2.0) (if (<= a 1.7e-27) t_1 t_2))))))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 * (z * y));
double t_2 = b * (a * 27.0);
double tmp;
if (a <= -2.5e+104) {
tmp = t_2;
} else if (a <= -2.3e+76) {
tmp = t_1;
} else if (a <= -3.2e-190) {
tmp = x * 2.0;
} else if (a <= 1.7e-27) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = (-9.0d0) * (t * (z * y))
t_2 = b * (a * 27.0d0)
if (a <= (-2.5d+104)) then
tmp = t_2
else if (a <= (-2.3d+76)) then
tmp = t_1
else if (a <= (-3.2d-190)) then
tmp = x * 2.0d0
else if (a <= 1.7d-27) then
tmp = t_1
else
tmp = t_2
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 * (z * y));
double t_2 = b * (a * 27.0);
double tmp;
if (a <= -2.5e+104) {
tmp = t_2;
} else if (a <= -2.3e+76) {
tmp = t_1;
} else if (a <= -3.2e-190) {
tmp = x * 2.0;
} else if (a <= 1.7e-27) {
tmp = t_1;
} else {
tmp = t_2;
}
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 * (z * y)) t_2 = b * (a * 27.0) tmp = 0 if a <= -2.5e+104: tmp = t_2 elif a <= -2.3e+76: tmp = t_1 elif a <= -3.2e-190: tmp = x * 2.0 elif a <= 1.7e-27: tmp = t_1 else: tmp = t_2 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(z * y))) t_2 = Float64(b * Float64(a * 27.0)) tmp = 0.0 if (a <= -2.5e+104) tmp = t_2; elseif (a <= -2.3e+76) tmp = t_1; elseif (a <= -3.2e-190) tmp = Float64(x * 2.0); elseif (a <= 1.7e-27) tmp = t_1; else tmp = t_2; 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 * (z * y));
t_2 = b * (a * 27.0);
tmp = 0.0;
if (a <= -2.5e+104)
tmp = t_2;
elseif (a <= -2.3e+76)
tmp = t_1;
elseif (a <= -3.2e-190)
tmp = x * 2.0;
elseif (a <= 1.7e-27)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.5e+104], t$95$2, If[LessEqual[a, -2.3e+76], t$95$1, If[LessEqual[a, -3.2e-190], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, 1.7e-27], t$95$1, t$95$2]]]]]]
\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(z \cdot y\right)\right)\\
t_2 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;a \leq -2.5 \cdot 10^{+104}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -2.3 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -3.2 \cdot 10^{-190}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{-27}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -2.4999999999999998e104 or 1.69999999999999985e-27 < a Initial program 90.0%
Taylor expanded in a around inf 53.9%
associate-*r*53.9%
Applied egg-rr53.9%
if -2.4999999999999998e104 < a < -2.30000000000000001e76 or -3.2000000000000001e-190 < a < 1.69999999999999985e-27Initial program 94.7%
Taylor expanded in y around inf 42.8%
if -2.30000000000000001e76 < a < -3.2000000000000001e-190Initial program 95.1%
Taylor expanded in x around inf 43.8%
Final simplification48.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 (* b (* a 27.0)))) (if (<= (* a 27.0) 5e+33) (+ t_1 (- (* x 2.0) (* y (* t (* z 9.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 = b * (a * 27.0);
double tmp;
if ((a * 27.0) <= 5e+33) {
tmp = t_1 + ((x * 2.0) - (y * (t * (z * 9.0))));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a * 27.0d0)
if ((a * 27.0d0) <= 5d+33) then
tmp = t_1 + ((x * 2.0d0) - (y * (t * (z * 9.0d0))))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a * 27.0);
double tmp;
if ((a * 27.0) <= 5e+33) {
tmp = t_1 + ((x * 2.0) - (y * (t * (z * 9.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 = b * (a * 27.0) tmp = 0 if (a * 27.0) <= 5e+33: tmp = t_1 + ((x * 2.0) - (y * (t * (z * 9.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(b * Float64(a * 27.0)) tmp = 0.0 if (Float64(a * 27.0) <= 5e+33) tmp = Float64(t_1 + Float64(Float64(x * 2.0) - Float64(y * Float64(t * Float64(z * 9.0))))); else tmp = t_1; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = b * (a * 27.0);
tmp = 0.0;
if ((a * 27.0) <= 5e+33)
tmp = t_1 + ((x * 2.0) - (y * (t * (z * 9.0))));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 27.0), $MachinePrecision], 5e+33], N[(t$95$1 + N[(N[(x * 2.0), $MachinePrecision] - N[(y * N[(t * N[(z * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;a \cdot 27 \leq 5 \cdot 10^{+33}:\\
\;\;\;\;t\_1 + \left(x \cdot 2 - y \cdot \left(t \cdot \left(z \cdot 9\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a #s(literal 27 binary64)) < 4.99999999999999973e33Initial program 93.7%
associate-*l*93.7%
associate-*l*95.4%
Applied egg-rr95.4%
if 4.99999999999999973e33 < (*.f64 a #s(literal 27 binary64)) Initial program 88.4%
Taylor expanded in a around inf 59.5%
associate-*r*59.5%
Applied egg-rr59.5%
Final simplification87.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 (<= b 2.5e+278) (+ (- (* x 2.0) (* t (* z (* y 9.0)))) (* a (* 27.0 b))) (+ (* 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 (b <= 2.5e+278) {
tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (a * (27.0 * b));
} else {
tmp = (x * 2.0) + (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 (b <= 2.5d+278) then
tmp = ((x * 2.0d0) - (t * (z * (y * 9.0d0)))) + (a * (27.0d0 * b))
else
tmp = (x * 2.0d0) + (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 (b <= 2.5e+278) {
tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (a * (27.0 * b));
} else {
tmp = (x * 2.0) + (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 b <= 2.5e+278: tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (a * (27.0 * b)) else: tmp = (x * 2.0) + (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 (b <= 2.5e+278) tmp = Float64(Float64(Float64(x * 2.0) - Float64(t * Float64(z * Float64(y * 9.0)))) + Float64(a * Float64(27.0 * b))); else tmp = Float64(Float64(x * 2.0) + 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 (b <= 2.5e+278)
tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (a * (27.0 * b));
else
tmp = (x * 2.0) + (b * (a * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 2.5e+278], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(z * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.5 \cdot 10^{+278}:\\
\;\;\;\;\left(x \cdot 2 - t \cdot \left(z \cdot \left(y \cdot 9\right)\right)\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if b < 2.50000000000000014e278Initial program 93.4%
associate-*l*93.4%
*-commutative93.4%
Applied egg-rr93.4%
if 2.50000000000000014e278 < b Initial program 66.7%
Taylor expanded in y around 0 100.0%
associate-*r*100.0%
Applied egg-rr100.0%
Final simplification93.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (* a 27.0))))
(if (<= z 1.6e-41)
(+ t_1 (- (* x 2.0) (* y (* t (* z 9.0)))))
(+ (- (* x 2.0) (* z (* t (* y 9.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 = b * (a * 27.0);
double tmp;
if (z <= 1.6e-41) {
tmp = t_1 + ((x * 2.0) - (y * (t * (z * 9.0))));
} else {
tmp = ((x * 2.0) - (z * (t * (y * 9.0)))) + t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a * 27.0d0)
if (z <= 1.6d-41) then
tmp = t_1 + ((x * 2.0d0) - (y * (t * (z * 9.0d0))))
else
tmp = ((x * 2.0d0) - (z * (t * (y * 9.0d0)))) + t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a * 27.0);
double tmp;
if (z <= 1.6e-41) {
tmp = t_1 + ((x * 2.0) - (y * (t * (z * 9.0))));
} else {
tmp = ((x * 2.0) - (z * (t * (y * 9.0)))) + t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = b * (a * 27.0) tmp = 0 if z <= 1.6e-41: tmp = t_1 + ((x * 2.0) - (y * (t * (z * 9.0)))) else: tmp = ((x * 2.0) - (z * (t * (y * 9.0)))) + t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a * 27.0)) tmp = 0.0 if (z <= 1.6e-41) tmp = Float64(t_1 + Float64(Float64(x * 2.0) - Float64(y * Float64(t * Float64(z * 9.0))))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(z * Float64(t * Float64(y * 9.0)))) + t_1); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = b * (a * 27.0);
tmp = 0.0;
if (z <= 1.6e-41)
tmp = t_1 + ((x * 2.0) - (y * (t * (z * 9.0))));
else
tmp = ((x * 2.0) - (z * (t * (y * 9.0)))) + t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 1.6e-41], N[(t$95$1 + N[(N[(x * 2.0), $MachinePrecision] - N[(y * N[(t * N[(z * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(z * N[(t * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $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 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;z \leq 1.6 \cdot 10^{-41}:\\
\;\;\;\;t\_1 + \left(x \cdot 2 - y \cdot \left(t \cdot \left(z \cdot 9\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - z \cdot \left(t \cdot \left(y \cdot 9\right)\right)\right) + t\_1\\
\end{array}
\end{array}
if z < 1.60000000000000006e-41Initial program 93.8%
associate-*l*93.8%
associate-*l*97.2%
Applied egg-rr97.2%
if 1.60000000000000006e-41 < z Initial program 89.0%
associate-*l*86.2%
*-commutative86.2%
associate-*r*95.6%
Applied egg-rr95.6%
Final simplification96.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 (<= z -1.3e-13) (not (<= z 6e-103))) (- (* x 2.0) (* 9.0 (* t (* z y)))) (+ (* 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 ((z <= -1.3e-13) || !(z <= 6e-103)) {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
} else {
tmp = (x * 2.0) + (b * (a * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.3d-13)) .or. (.not. (z <= 6d-103))) then
tmp = (x * 2.0d0) - (9.0d0 * (t * (z * y)))
else
tmp = (x * 2.0d0) + (b * (a * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.3e-13) || !(z <= 6e-103)) {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
} else {
tmp = (x * 2.0) + (b * (a * 27.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.3e-13) or not (z <= 6e-103): tmp = (x * 2.0) - (9.0 * (t * (z * y))) else: tmp = (x * 2.0) + (b * (a * 27.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.3e-13) || !(z <= 6e-103)) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(z * y)))); else tmp = Float64(Float64(x * 2.0) + Float64(b * Float64(a * 27.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((z <= -1.3e-13) || ~((z <= 6e-103)))
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
else
tmp = (x * 2.0) + (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[z, -1.3e-13], N[Not[LessEqual[z, 6e-103]], $MachinePrecision]], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{-13} \lor \neg \left(z \leq 6 \cdot 10^{-103}\right):\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if z < -1.3e-13 or 6e-103 < z Initial program 89.2%
Taylor expanded in a around 0 68.0%
if -1.3e-13 < z < 6e-103Initial program 97.8%
Taylor expanded in y around 0 85.7%
associate-*r*85.8%
Applied egg-rr85.8%
Final simplification74.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 (or (<= a -1.85e+105) (not (<= a 2.9e-117))) (* b (* a 27.0)) (* x 2.0)))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.85e+105) || !(a <= 2.9e-117)) {
tmp = b * (a * 27.0);
} else {
tmp = x * 2.0;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-1.85d+105)) .or. (.not. (a <= 2.9d-117))) then
tmp = b * (a * 27.0d0)
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.85e+105) || !(a <= 2.9e-117)) {
tmp = b * (a * 27.0);
} else {
tmp = x * 2.0;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.85e+105) or not (a <= 2.9e-117): tmp = b * (a * 27.0) else: tmp = x * 2.0 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.85e+105) || !(a <= 2.9e-117)) tmp = Float64(b * Float64(a * 27.0)); else tmp = Float64(x * 2.0); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((a <= -1.85e+105) || ~((a <= 2.9e-117)))
tmp = b * (a * 27.0);
else
tmp = x * 2.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.85e+105], N[Not[LessEqual[a, 2.9e-117]], $MachinePrecision]], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], N[(x * 2.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.85 \cdot 10^{+105} \lor \neg \left(a \leq 2.9 \cdot 10^{-117}\right):\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if a < -1.84999999999999992e105 or 2.9000000000000001e-117 < a Initial program 90.9%
Taylor expanded in a around inf 53.5%
associate-*r*53.5%
Applied egg-rr53.5%
if -1.84999999999999992e105 < a < 2.9000000000000001e-117Initial program 94.3%
Taylor expanded in x around inf 41.4%
Final simplification48.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 (<= a -7e+105) (not (<= a 2.9e-117))) (* 27.0 (* a b)) (* x 2.0)))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -7e+105) || !(a <= 2.9e-117)) {
tmp = 27.0 * (a * b);
} else {
tmp = x * 2.0;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-7d+105)) .or. (.not. (a <= 2.9d-117))) then
tmp = 27.0d0 * (a * b)
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -7e+105) || !(a <= 2.9e-117)) {
tmp = 27.0 * (a * b);
} else {
tmp = x * 2.0;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (a <= -7e+105) or not (a <= 2.9e-117): tmp = 27.0 * (a * b) else: tmp = x * 2.0 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -7e+105) || !(a <= 2.9e-117)) tmp = Float64(27.0 * Float64(a * b)); else tmp = Float64(x * 2.0); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((a <= -7e+105) || ~((a <= 2.9e-117)))
tmp = 27.0 * (a * b);
else
tmp = x * 2.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -7e+105], N[Not[LessEqual[a, 2.9e-117]], $MachinePrecision]], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], N[(x * 2.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{+105} \lor \neg \left(a \leq 2.9 \cdot 10^{-117}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if a < -6.99999999999999982e105 or 2.9000000000000001e-117 < a Initial program 90.9%
Taylor expanded in a around inf 53.5%
if -6.99999999999999982e105 < a < 2.9000000000000001e-117Initial program 94.3%
Taylor expanded in x around inf 41.4%
Final simplification48.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 (<= t 8e+176) (+ (* x 2.0) (* b (* a 27.0))) (* y (* t (* z -9.0)))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 8e+176) {
tmp = (x * 2.0) + (b * (a * 27.0));
} else {
tmp = y * (t * (z * -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 <= 8d+176) then
tmp = (x * 2.0d0) + (b * (a * 27.0d0))
else
tmp = y * (t * (z * (-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 <= 8e+176) {
tmp = (x * 2.0) + (b * (a * 27.0));
} else {
tmp = y * (t * (z * -9.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if t <= 8e+176: tmp = (x * 2.0) + (b * (a * 27.0)) else: tmp = y * (t * (z * -9.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 8e+176) tmp = Float64(Float64(x * 2.0) + Float64(b * Float64(a * 27.0))); else tmp = Float64(y * Float64(t * Float64(z * -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 <= 8e+176)
tmp = (x * 2.0) + (b * (a * 27.0));
else
tmp = y * (t * (z * -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, 8e+176], N[(N[(x * 2.0), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(t * N[(z * -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 8 \cdot 10^{+176}:\\
\;\;\;\;x \cdot 2 + b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\
\end{array}
\end{array}
if t < 8.0000000000000001e176Initial program 92.6%
Taylor expanded in y around 0 66.9%
associate-*r*66.9%
Applied egg-rr66.9%
if 8.0000000000000001e176 < t Initial program 90.9%
Taylor expanded in y around inf 68.9%
associate-*r*69.1%
*-commutative69.1%
associate-*r*69.4%
*-commutative69.4%
Applied egg-rr69.4%
*-commutative69.4%
*-commutative69.4%
associate-*r*69.3%
Applied egg-rr69.3%
Final simplification67.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= t 1.9e+177) (+ (* 27.0 (* a b)) (* x 2.0)) (* y (* t (* z -9.0)))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 1.9e+177) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = y * (t * (z * -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 <= 1.9d+177) then
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
else
tmp = y * (t * (z * (-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 <= 1.9e+177) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = y * (t * (z * -9.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if t <= 1.9e+177: tmp = (27.0 * (a * b)) + (x * 2.0) else: tmp = y * (t * (z * -9.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 1.9e+177) tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)); else tmp = Float64(y * Float64(t * Float64(z * -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 <= 1.9e+177)
tmp = (27.0 * (a * b)) + (x * 2.0);
else
tmp = y * (t * (z * -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, 1.9e+177], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(y * N[(t * N[(z * -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.9 \cdot 10^{+177}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\
\end{array}
\end{array}
if t < 1.8999999999999999e177Initial program 92.6%
Taylor expanded in y around 0 66.9%
if 1.8999999999999999e177 < t Initial program 90.9%
Taylor expanded in y around inf 68.9%
associate-*r*69.1%
*-commutative69.1%
associate-*r*69.4%
*-commutative69.4%
Applied egg-rr69.4%
*-commutative69.4%
*-commutative69.4%
associate-*r*69.3%
Applied egg-rr69.3%
Final simplification67.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))
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 92.5%
Taylor expanded in x around inf 30.5%
Final simplification30.5%
(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 2024097
(FPCore (x y z t a b)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, A"
:precision binary64
:alt
(if (< y 7.590524218811189e-161) (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* a (* 27.0 b))) (+ (- (* x 2.0) (* 9.0 (* y (* t z)))) (* (* a 27.0) b)))
(+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))