
(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 18 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
(let* ((t_1 (* (* y 9.0) z)))
(if (<= t_1 5e+250)
(+ (- (* x 2.0) (* t_1 t)) (* b (* a 27.0)))
(* y (- (+ (* 2.0 (/ x y)) (* 27.0 (* b (/ a y)))) (* 9.0 (* z 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 <= 5e+250) {
tmp = ((x * 2.0) - (t_1 * t)) + (b * (a * 27.0));
} else {
tmp = y * (((2.0 * (x / y)) + (27.0 * (b * (a / y)))) - (9.0 * (z * 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 <= 5d+250) then
tmp = ((x * 2.0d0) - (t_1 * t)) + (b * (a * 27.0d0))
else
tmp = y * (((2.0d0 * (x / y)) + (27.0d0 * (b * (a / y)))) - (9.0d0 * (z * 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 <= 5e+250) {
tmp = ((x * 2.0) - (t_1 * t)) + (b * (a * 27.0));
} else {
tmp = y * (((2.0 * (x / y)) + (27.0 * (b * (a / y)))) - (9.0 * (z * 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 <= 5e+250: tmp = ((x * 2.0) - (t_1 * t)) + (b * (a * 27.0)) else: tmp = y * (((2.0 * (x / y)) + (27.0 * (b * (a / y)))) - (9.0 * (z * 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 <= 5e+250) tmp = Float64(Float64(Float64(x * 2.0) - Float64(t_1 * t)) + Float64(b * Float64(a * 27.0))); else tmp = Float64(y * Float64(Float64(Float64(2.0 * Float64(x / y)) + Float64(27.0 * Float64(b * Float64(a / y)))) - Float64(9.0 * Float64(z * 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 <= 5e+250)
tmp = ((x * 2.0) - (t_1 * t)) + (b * (a * 27.0));
else
tmp = y * (((2.0 * (x / y)) + (27.0 * (b * (a / y)))) - (9.0 * (z * 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, 5e+250], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t$95$1 * t), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(N[(2.0 * N[(x / y), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(b * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(z * 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 5 \cdot 10^{+250}:\\
\;\;\;\;\left(x \cdot 2 - t\_1 \cdot t\right) + b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(2 \cdot \frac{x}{y} + 27 \cdot \left(b \cdot \frac{a}{y}\right)\right) - 9 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 y 9) z) < 5.0000000000000002e250Initial program 97.4%
if 5.0000000000000002e250 < (*.f64 (*.f64 y 9) z) Initial program 67.2%
sub-neg67.2%
sub-neg67.2%
associate-*l*86.6%
associate-*l*86.5%
Simplified86.5%
Taylor expanded in y around inf 93.2%
*-commutative93.2%
*-un-lft-identity93.2%
times-frac93.2%
Applied egg-rr93.2%
Final simplification97.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
(let* ((t_1 (* 27.0 (* a b)))
(t_2 (- t_1 (* 9.0 (* t (* y z)))))
(t_3 (+ t_1 (* x 2.0))))
(if (<= t -5.5e-124)
(- (* x 2.0) (* 9.0 (* z (* y t))))
(if (<= t 2.22e-48)
t_3
(if (<= t 2.7e+33)
t_2
(if (<= t 6.6e+99)
t_3
(if (or (<= t 9.8e+243) (not (<= t 4.8e+276)))
t_2
(* t (+ (* 2.0 (/ x 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 t_1 = 27.0 * (a * b);
double t_2 = t_1 - (9.0 * (t * (y * z)));
double t_3 = t_1 + (x * 2.0);
double tmp;
if (t <= -5.5e-124) {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
} else if (t <= 2.22e-48) {
tmp = t_3;
} else if (t <= 2.7e+33) {
tmp = t_2;
} else if (t <= 6.6e+99) {
tmp = t_3;
} else if ((t <= 9.8e+243) || !(t <= 4.8e+276)) {
tmp = t_2;
} else {
tmp = t * ((2.0 * (x / 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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 27.0d0 * (a * b)
t_2 = t_1 - (9.0d0 * (t * (y * z)))
t_3 = t_1 + (x * 2.0d0)
if (t <= (-5.5d-124)) then
tmp = (x * 2.0d0) - (9.0d0 * (z * (y * t)))
else if (t <= 2.22d-48) then
tmp = t_3
else if (t <= 2.7d+33) then
tmp = t_2
else if (t <= 6.6d+99) then
tmp = t_3
else if ((t <= 9.8d+243) .or. (.not. (t <= 4.8d+276))) then
tmp = t_2
else
tmp = t * ((2.0d0 * (x / 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 t_1 = 27.0 * (a * b);
double t_2 = t_1 - (9.0 * (t * (y * z)));
double t_3 = t_1 + (x * 2.0);
double tmp;
if (t <= -5.5e-124) {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
} else if (t <= 2.22e-48) {
tmp = t_3;
} else if (t <= 2.7e+33) {
tmp = t_2;
} else if (t <= 6.6e+99) {
tmp = t_3;
} else if ((t <= 9.8e+243) || !(t <= 4.8e+276)) {
tmp = t_2;
} else {
tmp = t * ((2.0 * (x / 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): t_1 = 27.0 * (a * b) t_2 = t_1 - (9.0 * (t * (y * z))) t_3 = t_1 + (x * 2.0) tmp = 0 if t <= -5.5e-124: tmp = (x * 2.0) - (9.0 * (z * (y * t))) elif t <= 2.22e-48: tmp = t_3 elif t <= 2.7e+33: tmp = t_2 elif t <= 6.6e+99: tmp = t_3 elif (t <= 9.8e+243) or not (t <= 4.8e+276): tmp = t_2 else: tmp = t * ((2.0 * (x / 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) t_1 = Float64(27.0 * Float64(a * b)) t_2 = Float64(t_1 - Float64(9.0 * Float64(t * Float64(y * z)))) t_3 = Float64(t_1 + Float64(x * 2.0)) tmp = 0.0 if (t <= -5.5e-124) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(z * Float64(y * t)))); elseif (t <= 2.22e-48) tmp = t_3; elseif (t <= 2.7e+33) tmp = t_2; elseif (t <= 6.6e+99) tmp = t_3; elseif ((t <= 9.8e+243) || !(t <= 4.8e+276)) tmp = t_2; else tmp = Float64(t * Float64(Float64(2.0 * Float64(x / 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)
t_1 = 27.0 * (a * b);
t_2 = t_1 - (9.0 * (t * (y * z)));
t_3 = t_1 + (x * 2.0);
tmp = 0.0;
if (t <= -5.5e-124)
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
elseif (t <= 2.22e-48)
tmp = t_3;
elseif (t <= 2.7e+33)
tmp = t_2;
elseif (t <= 6.6e+99)
tmp = t_3;
elseif ((t <= 9.8e+243) || ~((t <= 4.8e+276)))
tmp = t_2;
else
tmp = t * ((2.0 * (x / 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_] := Block[{t$95$1 = N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.5e-124], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.22e-48], t$95$3, If[LessEqual[t, 2.7e+33], t$95$2, If[LessEqual[t, 6.6e+99], t$95$3, If[Or[LessEqual[t, 9.8e+243], N[Not[LessEqual[t, 4.8e+276]], $MachinePrecision]], t$95$2, N[(t * N[(N[(2.0 * N[(x / t), $MachinePrecision]), $MachinePrecision] + N[(z * N[(y * -9.0), $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 := 27 \cdot \left(a \cdot b\right)\\
t_2 := t\_1 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
t_3 := t\_1 + x \cdot 2\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{-124}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;t \leq 2.22 \cdot 10^{-48}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+33}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 6.6 \cdot 10^{+99}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 9.8 \cdot 10^{+243} \lor \neg \left(t \leq 4.8 \cdot 10^{+276}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(2 \cdot \frac{x}{t} + z \cdot \left(y \cdot -9\right)\right)\\
\end{array}
\end{array}
if t < -5.50000000000000016e-124Initial program 95.7%
sub-neg95.7%
sub-neg95.7%
associate-*l*93.7%
associate-*l*94.7%
Simplified94.7%
Taylor expanded in a around 0 70.4%
pow170.4%
Applied egg-rr70.4%
unpow170.4%
*-commutative70.4%
*-commutative70.4%
associate-*l*63.8%
*-commutative63.8%
Simplified63.8%
if -5.50000000000000016e-124 < t < 2.22000000000000005e-48 or 2.69999999999999991e33 < t < 6.5999999999999998e99Initial program 93.0%
sub-neg93.0%
sub-neg93.0%
associate-*l*99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in y around 0 86.4%
if 2.22000000000000005e-48 < t < 2.69999999999999991e33 or 6.5999999999999998e99 < t < 9.79999999999999967e243 or 4.80000000000000005e276 < t Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*92.2%
associate-*l*92.3%
Simplified92.3%
Taylor expanded in x around 0 84.3%
if 9.79999999999999967e243 < t < 4.80000000000000005e276Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in a around 0 87.7%
Taylor expanded in t around inf 87.6%
cancel-sign-sub-inv87.6%
metadata-eval87.6%
associate-*r*87.8%
Simplified87.8%
Final simplification77.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
(let* ((t_1 (* 27.0 (* a b)))
(t_2 (- t_1 (* 9.0 (* t (* y z)))))
(t_3 (+ t_1 (* x 2.0))))
(if (<= t -1.85e-125)
(* y (- (* 27.0 (/ (* a b) y)) (* 9.0 (* z t))))
(if (<= t 1.86e-48)
t_3
(if (<= t 4.4e+33)
t_2
(if (<= t 1.9e+100)
t_3
(if (or (<= t 9.5e+244) (not (<= t 3.7e+276)))
t_2
(* t (+ (* 2.0 (/ x 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 t_1 = 27.0 * (a * b);
double t_2 = t_1 - (9.0 * (t * (y * z)));
double t_3 = t_1 + (x * 2.0);
double tmp;
if (t <= -1.85e-125) {
tmp = y * ((27.0 * ((a * b) / y)) - (9.0 * (z * t)));
} else if (t <= 1.86e-48) {
tmp = t_3;
} else if (t <= 4.4e+33) {
tmp = t_2;
} else if (t <= 1.9e+100) {
tmp = t_3;
} else if ((t <= 9.5e+244) || !(t <= 3.7e+276)) {
tmp = t_2;
} else {
tmp = t * ((2.0 * (x / 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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 27.0d0 * (a * b)
t_2 = t_1 - (9.0d0 * (t * (y * z)))
t_3 = t_1 + (x * 2.0d0)
if (t <= (-1.85d-125)) then
tmp = y * ((27.0d0 * ((a * b) / y)) - (9.0d0 * (z * t)))
else if (t <= 1.86d-48) then
tmp = t_3
else if (t <= 4.4d+33) then
tmp = t_2
else if (t <= 1.9d+100) then
tmp = t_3
else if ((t <= 9.5d+244) .or. (.not. (t <= 3.7d+276))) then
tmp = t_2
else
tmp = t * ((2.0d0 * (x / 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 t_1 = 27.0 * (a * b);
double t_2 = t_1 - (9.0 * (t * (y * z)));
double t_3 = t_1 + (x * 2.0);
double tmp;
if (t <= -1.85e-125) {
tmp = y * ((27.0 * ((a * b) / y)) - (9.0 * (z * t)));
} else if (t <= 1.86e-48) {
tmp = t_3;
} else if (t <= 4.4e+33) {
tmp = t_2;
} else if (t <= 1.9e+100) {
tmp = t_3;
} else if ((t <= 9.5e+244) || !(t <= 3.7e+276)) {
tmp = t_2;
} else {
tmp = t * ((2.0 * (x / 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): t_1 = 27.0 * (a * b) t_2 = t_1 - (9.0 * (t * (y * z))) t_3 = t_1 + (x * 2.0) tmp = 0 if t <= -1.85e-125: tmp = y * ((27.0 * ((a * b) / y)) - (9.0 * (z * t))) elif t <= 1.86e-48: tmp = t_3 elif t <= 4.4e+33: tmp = t_2 elif t <= 1.9e+100: tmp = t_3 elif (t <= 9.5e+244) or not (t <= 3.7e+276): tmp = t_2 else: tmp = t * ((2.0 * (x / 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) t_1 = Float64(27.0 * Float64(a * b)) t_2 = Float64(t_1 - Float64(9.0 * Float64(t * Float64(y * z)))) t_3 = Float64(t_1 + Float64(x * 2.0)) tmp = 0.0 if (t <= -1.85e-125) tmp = Float64(y * Float64(Float64(27.0 * Float64(Float64(a * b) / y)) - Float64(9.0 * Float64(z * t)))); elseif (t <= 1.86e-48) tmp = t_3; elseif (t <= 4.4e+33) tmp = t_2; elseif (t <= 1.9e+100) tmp = t_3; elseif ((t <= 9.5e+244) || !(t <= 3.7e+276)) tmp = t_2; else tmp = Float64(t * Float64(Float64(2.0 * Float64(x / 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)
t_1 = 27.0 * (a * b);
t_2 = t_1 - (9.0 * (t * (y * z)));
t_3 = t_1 + (x * 2.0);
tmp = 0.0;
if (t <= -1.85e-125)
tmp = y * ((27.0 * ((a * b) / y)) - (9.0 * (z * t)));
elseif (t <= 1.86e-48)
tmp = t_3;
elseif (t <= 4.4e+33)
tmp = t_2;
elseif (t <= 1.9e+100)
tmp = t_3;
elseif ((t <= 9.5e+244) || ~((t <= 3.7e+276)))
tmp = t_2;
else
tmp = t * ((2.0 * (x / 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_] := Block[{t$95$1 = N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.85e-125], N[(y * N[(N[(27.0 * N[(N[(a * b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.86e-48], t$95$3, If[LessEqual[t, 4.4e+33], t$95$2, If[LessEqual[t, 1.9e+100], t$95$3, If[Or[LessEqual[t, 9.5e+244], N[Not[LessEqual[t, 3.7e+276]], $MachinePrecision]], t$95$2, N[(t * N[(N[(2.0 * N[(x / t), $MachinePrecision]), $MachinePrecision] + N[(z * N[(y * -9.0), $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 := 27 \cdot \left(a \cdot b\right)\\
t_2 := t\_1 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
t_3 := t\_1 + x \cdot 2\\
\mathbf{if}\;t \leq -1.85 \cdot 10^{-125}:\\
\;\;\;\;y \cdot \left(27 \cdot \frac{a \cdot b}{y} - 9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;t \leq 1.86 \cdot 10^{-48}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{+33}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+100}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+244} \lor \neg \left(t \leq 3.7 \cdot 10^{+276}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(2 \cdot \frac{x}{t} + z \cdot \left(y \cdot -9\right)\right)\\
\end{array}
\end{array}
if t < -1.85e-125Initial program 95.7%
sub-neg95.7%
sub-neg95.7%
associate-*l*93.7%
associate-*l*94.7%
Simplified94.7%
Taylor expanded in y around inf 84.3%
Taylor expanded in x around 0 68.6%
if -1.85e-125 < t < 1.8599999999999999e-48 or 4.39999999999999988e33 < t < 1.89999999999999982e100Initial program 93.0%
sub-neg93.0%
sub-neg93.0%
associate-*l*99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in y around 0 86.4%
if 1.8599999999999999e-48 < t < 4.39999999999999988e33 or 1.89999999999999982e100 < t < 9.4999999999999999e244 or 3.69999999999999977e276 < t Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*92.2%
associate-*l*92.3%
Simplified92.3%
Taylor expanded in x around 0 84.3%
if 9.4999999999999999e244 < t < 3.69999999999999977e276Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in a around 0 87.7%
Taylor expanded in t around inf 87.6%
cancel-sign-sub-inv87.6%
metadata-eval87.6%
associate-*r*87.8%
Simplified87.8%
Final simplification79.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
(let* ((t_1 (* -9.0 (* t (* y z)))))
(if (<= y -4.7e+246)
t_1
(if (<= y -3.9e+211)
(* b (* a 27.0))
(if (<= y -4.05e+108)
t_1
(if (<= y -5400000.0)
(* x 2.0)
(if (<= y 0.0031) (* 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 (y <= -4.7e+246) {
tmp = t_1;
} else if (y <= -3.9e+211) {
tmp = b * (a * 27.0);
} else if (y <= -4.05e+108) {
tmp = t_1;
} else if (y <= -5400000.0) {
tmp = x * 2.0;
} else if (y <= 0.0031) {
tmp = 27.0 * (a * b);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (-9.0d0) * (t * (y * z))
if (y <= (-4.7d+246)) then
tmp = t_1
else if (y <= (-3.9d+211)) then
tmp = b * (a * 27.0d0)
else if (y <= (-4.05d+108)) then
tmp = t_1
else if (y <= (-5400000.0d0)) then
tmp = x * 2.0d0
else if (y <= 0.0031d0) then
tmp = 27.0d0 * (a * b)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -9.0 * (t * (y * z));
double tmp;
if (y <= -4.7e+246) {
tmp = t_1;
} else if (y <= -3.9e+211) {
tmp = b * (a * 27.0);
} else if (y <= -4.05e+108) {
tmp = t_1;
} else if (y <= -5400000.0) {
tmp = x * 2.0;
} else if (y <= 0.0031) {
tmp = 27.0 * (a * b);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = -9.0 * (t * (y * z)) tmp = 0 if y <= -4.7e+246: tmp = t_1 elif y <= -3.9e+211: tmp = b * (a * 27.0) elif y <= -4.05e+108: tmp = t_1 elif y <= -5400000.0: tmp = x * 2.0 elif y <= 0.0031: tmp = 27.0 * (a * b) else: tmp = t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(-9.0 * Float64(t * Float64(y * z))) tmp = 0.0 if (y <= -4.7e+246) tmp = t_1; elseif (y <= -3.9e+211) tmp = Float64(b * Float64(a * 27.0)); elseif (y <= -4.05e+108) tmp = t_1; elseif (y <= -5400000.0) tmp = Float64(x * 2.0); elseif (y <= 0.0031) tmp = Float64(27.0 * Float64(a * b)); else tmp = t_1; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = -9.0 * (t * (y * z));
tmp = 0.0;
if (y <= -4.7e+246)
tmp = t_1;
elseif (y <= -3.9e+211)
tmp = b * (a * 27.0);
elseif (y <= -4.05e+108)
tmp = t_1;
elseif (y <= -5400000.0)
tmp = x * 2.0;
elseif (y <= 0.0031)
tmp = 27.0 * (a * b);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.7e+246], t$95$1, If[LessEqual[y, -3.9e+211], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.05e+108], t$95$1, If[LessEqual[y, -5400000.0], N[(x * 2.0), $MachinePrecision], If[LessEqual[y, 0.0031], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;y \leq -4.7 \cdot 10^{+246}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.9 \cdot 10^{+211}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{elif}\;y \leq -4.05 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -5400000:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;y \leq 0.0031:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.69999999999999976e246 or -3.90000000000000023e211 < y < -4.05e108 or 0.00309999999999999989 < y Initial program 92.4%
sub-neg92.4%
sub-neg92.4%
associate-*l*97.8%
associate-*l*97.8%
Simplified97.8%
Taylor expanded in y around inf 56.5%
if -4.69999999999999976e246 < y < -3.90000000000000023e211Initial program 80.0%
sub-neg80.0%
sub-neg80.0%
associate-*l*100.0%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in a around inf 56.3%
associate-*r*56.6%
Simplified56.6%
if -4.05e108 < y < -5.4e6Initial program 94.2%
sub-neg94.2%
sub-neg94.2%
associate-*l*94.2%
associate-*l*94.2%
Simplified94.2%
Taylor expanded in x around inf 45.5%
if -5.4e6 < y < 0.00309999999999999989Initial program 99.0%
sub-neg99.0%
sub-neg99.0%
associate-*l*94.6%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in a around inf 45.4%
Final simplification50.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
(let* ((t_1 (* -9.0 (* y (* z t)))))
(if (<= y -4.7e+246)
t_1
(if (<= y -4.2e+211)
(* b (* a 27.0))
(if (<= y -4.9e+108)
t_1
(if (<= y -510000.0)
(* x 2.0)
(if (<= y 1.85e-24) (* 27.0 (* a b)) (* -9.0 (* t (* y z))))))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -9.0 * (y * (z * t));
double tmp;
if (y <= -4.7e+246) {
tmp = t_1;
} else if (y <= -4.2e+211) {
tmp = b * (a * 27.0);
} else if (y <= -4.9e+108) {
tmp = t_1;
} else if (y <= -510000.0) {
tmp = x * 2.0;
} else if (y <= 1.85e-24) {
tmp = 27.0 * (a * b);
} else {
tmp = -9.0 * (t * (y * z));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (-9.0d0) * (y * (z * t))
if (y <= (-4.7d+246)) then
tmp = t_1
else if (y <= (-4.2d+211)) then
tmp = b * (a * 27.0d0)
else if (y <= (-4.9d+108)) then
tmp = t_1
else if (y <= (-510000.0d0)) then
tmp = x * 2.0d0
else if (y <= 1.85d-24) then
tmp = 27.0d0 * (a * b)
else
tmp = (-9.0d0) * (t * (y * z))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -9.0 * (y * (z * t));
double tmp;
if (y <= -4.7e+246) {
tmp = t_1;
} else if (y <= -4.2e+211) {
tmp = b * (a * 27.0);
} else if (y <= -4.9e+108) {
tmp = t_1;
} else if (y <= -510000.0) {
tmp = x * 2.0;
} else if (y <= 1.85e-24) {
tmp = 27.0 * (a * b);
} else {
tmp = -9.0 * (t * (y * z));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = -9.0 * (y * (z * t)) tmp = 0 if y <= -4.7e+246: tmp = t_1 elif y <= -4.2e+211: tmp = b * (a * 27.0) elif y <= -4.9e+108: tmp = t_1 elif y <= -510000.0: tmp = x * 2.0 elif y <= 1.85e-24: tmp = 27.0 * (a * b) else: tmp = -9.0 * (t * (y * z)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(-9.0 * Float64(y * Float64(z * t))) tmp = 0.0 if (y <= -4.7e+246) tmp = t_1; elseif (y <= -4.2e+211) tmp = Float64(b * Float64(a * 27.0)); elseif (y <= -4.9e+108) tmp = t_1; elseif (y <= -510000.0) tmp = Float64(x * 2.0); elseif (y <= 1.85e-24) tmp = Float64(27.0 * Float64(a * b)); else tmp = Float64(-9.0 * Float64(t * Float64(y * z))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = -9.0 * (y * (z * t));
tmp = 0.0;
if (y <= -4.7e+246)
tmp = t_1;
elseif (y <= -4.2e+211)
tmp = b * (a * 27.0);
elseif (y <= -4.9e+108)
tmp = t_1;
elseif (y <= -510000.0)
tmp = x * 2.0;
elseif (y <= 1.85e-24)
tmp = 27.0 * (a * b);
else
tmp = -9.0 * (t * (y * z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.7e+246], t$95$1, If[LessEqual[y, -4.2e+211], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.9e+108], t$95$1, If[LessEqual[y, -510000.0], N[(x * 2.0), $MachinePrecision], If[LessEqual[y, 1.85e-24], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := -9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{if}\;y \leq -4.7 \cdot 10^{+246}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{+211}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{elif}\;y \leq -4.9 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -510000:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{-24}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if y < -4.69999999999999976e246 or -4.2e211 < y < -4.90000000000000014e108Initial program 92.3%
sub-neg92.3%
sub-neg92.3%
associate-*l*97.2%
associate-*l*97.2%
Simplified97.2%
Taylor expanded in y around inf 99.7%
*-commutative99.7%
*-un-lft-identity99.7%
times-frac94.9%
Applied egg-rr94.9%
Taylor expanded in y around inf 59.0%
*-commutative59.0%
associate-*l*61.6%
*-commutative61.6%
Simplified61.6%
if -4.69999999999999976e246 < y < -4.2e211Initial program 80.0%
sub-neg80.0%
sub-neg80.0%
associate-*l*100.0%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in a around inf 56.3%
associate-*r*56.6%
Simplified56.6%
if -4.90000000000000014e108 < y < -5.1e5Initial program 94.2%
sub-neg94.2%
sub-neg94.2%
associate-*l*94.2%
associate-*l*94.2%
Simplified94.2%
Taylor expanded in x around inf 45.5%
if -5.1e5 < y < 1.8499999999999999e-24Initial program 99.0%
sub-neg99.0%
sub-neg99.0%
associate-*l*94.4%
associate-*l*95.1%
Simplified95.1%
Taylor expanded in a around inf 45.5%
if 1.8499999999999999e-24 < y Initial program 93.0%
sub-neg93.0%
sub-neg93.0%
associate-*l*98.3%
associate-*l*98.3%
Simplified98.3%
Taylor expanded in y around inf 54.0%
Final simplification50.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= y -4.7e+246)
(* -9.0 (* y (* z t)))
(if (<= y -2.2e+212)
(* b (* a 27.0))
(if (<= y -1.8e+109)
(* y (* t (* z -9.0)))
(if (<= y -2300000.0)
(* x 2.0)
(if (<= y 1.6e-5) (* 27.0 (* a b)) (* -9.0 (* t (* y z)))))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.7e+246) {
tmp = -9.0 * (y * (z * t));
} else if (y <= -2.2e+212) {
tmp = b * (a * 27.0);
} else if (y <= -1.8e+109) {
tmp = y * (t * (z * -9.0));
} else if (y <= -2300000.0) {
tmp = x * 2.0;
} else if (y <= 1.6e-5) {
tmp = 27.0 * (a * b);
} else {
tmp = -9.0 * (t * (y * z));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-4.7d+246)) then
tmp = (-9.0d0) * (y * (z * t))
else if (y <= (-2.2d+212)) then
tmp = b * (a * 27.0d0)
else if (y <= (-1.8d+109)) then
tmp = y * (t * (z * (-9.0d0)))
else if (y <= (-2300000.0d0)) then
tmp = x * 2.0d0
else if (y <= 1.6d-5) then
tmp = 27.0d0 * (a * b)
else
tmp = (-9.0d0) * (t * (y * z))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.7e+246) {
tmp = -9.0 * (y * (z * t));
} else if (y <= -2.2e+212) {
tmp = b * (a * 27.0);
} else if (y <= -1.8e+109) {
tmp = y * (t * (z * -9.0));
} else if (y <= -2300000.0) {
tmp = x * 2.0;
} else if (y <= 1.6e-5) {
tmp = 27.0 * (a * b);
} else {
tmp = -9.0 * (t * (y * z));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if y <= -4.7e+246: tmp = -9.0 * (y * (z * t)) elif y <= -2.2e+212: tmp = b * (a * 27.0) elif y <= -1.8e+109: tmp = y * (t * (z * -9.0)) elif y <= -2300000.0: tmp = x * 2.0 elif y <= 1.6e-5: tmp = 27.0 * (a * b) else: tmp = -9.0 * (t * (y * z)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.7e+246) tmp = Float64(-9.0 * Float64(y * Float64(z * t))); elseif (y <= -2.2e+212) tmp = Float64(b * Float64(a * 27.0)); elseif (y <= -1.8e+109) tmp = Float64(y * Float64(t * Float64(z * -9.0))); elseif (y <= -2300000.0) tmp = Float64(x * 2.0); elseif (y <= 1.6e-5) tmp = Float64(27.0 * Float64(a * b)); else tmp = Float64(-9.0 * Float64(t * Float64(y * z))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (y <= -4.7e+246)
tmp = -9.0 * (y * (z * t));
elseif (y <= -2.2e+212)
tmp = b * (a * 27.0);
elseif (y <= -1.8e+109)
tmp = y * (t * (z * -9.0));
elseif (y <= -2300000.0)
tmp = x * 2.0;
elseif (y <= 1.6e-5)
tmp = 27.0 * (a * b);
else
tmp = -9.0 * (t * (y * z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.7e+246], N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.2e+212], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.8e+109], N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2300000.0], N[(x * 2.0), $MachinePrecision], If[LessEqual[y, 1.6e-5], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.7 \cdot 10^{+246}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{+212}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{+109}:\\
\;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\
\mathbf{elif}\;y \leq -2300000:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-5}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if y < -4.69999999999999976e246Initial program 91.6%
sub-neg91.6%
sub-neg91.6%
associate-*l*99.7%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in y around inf 99.9%
*-commutative99.9%
*-un-lft-identity99.9%
times-frac92.0%
Applied egg-rr92.0%
Taylor expanded in y around inf 59.6%
*-commutative59.6%
associate-*l*59.6%
*-commutative59.6%
Simplified59.6%
if -4.69999999999999976e246 < y < -2.19999999999999995e212Initial program 80.0%
sub-neg80.0%
sub-neg80.0%
associate-*l*100.0%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in a around inf 56.3%
associate-*r*56.6%
Simplified56.6%
if -2.19999999999999995e212 < y < -1.8e109Initial program 92.6%
sub-neg92.6%
sub-neg92.6%
associate-*l*96.1%
associate-*l*96.1%
Simplified96.1%
Taylor expanded in y around inf 99.7%
Taylor expanded in y around inf 62.2%
*-commutative62.2%
associate-*r*62.2%
Simplified62.2%
if -1.8e109 < y < -2.3e6Initial program 94.2%
sub-neg94.2%
sub-neg94.2%
associate-*l*94.2%
associate-*l*94.2%
Simplified94.2%
Taylor expanded in x around inf 45.5%
if -2.3e6 < y < 1.59999999999999993e-5Initial program 99.0%
sub-neg99.0%
sub-neg99.0%
associate-*l*94.6%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in a around inf 45.4%
if 1.59999999999999993e-5 < y Initial program 92.4%
sub-neg92.4%
sub-neg92.4%
associate-*l*98.2%
associate-*l*98.2%
Simplified98.2%
Taylor expanded in y around inf 55.0%
Final simplification50.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= y -4.7e+246)
(* -9.0 (* y (* z t)))
(if (<= y -5.8e+212)
(* y (* 27.0 (/ (* a b) y)))
(if (<= y -2e+109)
(* y (* t (* z -9.0)))
(if (<= y -520000000.0)
(* x 2.0)
(if (<= y 4800.0) (* 27.0 (* a b)) (* -9.0 (* t (* y z)))))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.7e+246) {
tmp = -9.0 * (y * (z * t));
} else if (y <= -5.8e+212) {
tmp = y * (27.0 * ((a * b) / y));
} else if (y <= -2e+109) {
tmp = y * (t * (z * -9.0));
} else if (y <= -520000000.0) {
tmp = x * 2.0;
} else if (y <= 4800.0) {
tmp = 27.0 * (a * b);
} else {
tmp = -9.0 * (t * (y * z));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-4.7d+246)) then
tmp = (-9.0d0) * (y * (z * t))
else if (y <= (-5.8d+212)) then
tmp = y * (27.0d0 * ((a * b) / y))
else if (y <= (-2d+109)) then
tmp = y * (t * (z * (-9.0d0)))
else if (y <= (-520000000.0d0)) then
tmp = x * 2.0d0
else if (y <= 4800.0d0) then
tmp = 27.0d0 * (a * b)
else
tmp = (-9.0d0) * (t * (y * z))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.7e+246) {
tmp = -9.0 * (y * (z * t));
} else if (y <= -5.8e+212) {
tmp = y * (27.0 * ((a * b) / y));
} else if (y <= -2e+109) {
tmp = y * (t * (z * -9.0));
} else if (y <= -520000000.0) {
tmp = x * 2.0;
} else if (y <= 4800.0) {
tmp = 27.0 * (a * b);
} else {
tmp = -9.0 * (t * (y * z));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if y <= -4.7e+246: tmp = -9.0 * (y * (z * t)) elif y <= -5.8e+212: tmp = y * (27.0 * ((a * b) / y)) elif y <= -2e+109: tmp = y * (t * (z * -9.0)) elif y <= -520000000.0: tmp = x * 2.0 elif y <= 4800.0: tmp = 27.0 * (a * b) else: tmp = -9.0 * (t * (y * z)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.7e+246) tmp = Float64(-9.0 * Float64(y * Float64(z * t))); elseif (y <= -5.8e+212) tmp = Float64(y * Float64(27.0 * Float64(Float64(a * b) / y))); elseif (y <= -2e+109) tmp = Float64(y * Float64(t * Float64(z * -9.0))); elseif (y <= -520000000.0) tmp = Float64(x * 2.0); elseif (y <= 4800.0) tmp = Float64(27.0 * Float64(a * b)); else tmp = Float64(-9.0 * Float64(t * Float64(y * z))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (y <= -4.7e+246)
tmp = -9.0 * (y * (z * t));
elseif (y <= -5.8e+212)
tmp = y * (27.0 * ((a * b) / y));
elseif (y <= -2e+109)
tmp = y * (t * (z * -9.0));
elseif (y <= -520000000.0)
tmp = x * 2.0;
elseif (y <= 4800.0)
tmp = 27.0 * (a * b);
else
tmp = -9.0 * (t * (y * z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.7e+246], N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.8e+212], N[(y * N[(27.0 * N[(N[(a * b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2e+109], N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -520000000.0], N[(x * 2.0), $MachinePrecision], If[LessEqual[y, 4800.0], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.7 \cdot 10^{+246}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;y \leq -5.8 \cdot 10^{+212}:\\
\;\;\;\;y \cdot \left(27 \cdot \frac{a \cdot b}{y}\right)\\
\mathbf{elif}\;y \leq -2 \cdot 10^{+109}:\\
\;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\
\mathbf{elif}\;y \leq -520000000:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;y \leq 4800:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if y < -4.69999999999999976e246Initial program 91.6%
sub-neg91.6%
sub-neg91.6%
associate-*l*99.7%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in y around inf 99.9%
*-commutative99.9%
*-un-lft-identity99.9%
times-frac92.0%
Applied egg-rr92.0%
Taylor expanded in y around inf 59.6%
*-commutative59.6%
associate-*l*59.6%
*-commutative59.6%
Simplified59.6%
if -4.69999999999999976e246 < y < -5.7999999999999997e212Initial program 80.0%
sub-neg80.0%
sub-neg80.0%
associate-*l*100.0%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in y around inf 99.7%
Taylor expanded in a around inf 56.5%
if -5.7999999999999997e212 < y < -1.99999999999999996e109Initial program 92.6%
sub-neg92.6%
sub-neg92.6%
associate-*l*96.1%
associate-*l*96.1%
Simplified96.1%
Taylor expanded in y around inf 99.7%
Taylor expanded in y around inf 62.2%
*-commutative62.2%
associate-*r*62.2%
Simplified62.2%
if -1.99999999999999996e109 < y < -5.2e8Initial program 94.2%
sub-neg94.2%
sub-neg94.2%
associate-*l*94.2%
associate-*l*94.2%
Simplified94.2%
Taylor expanded in x around inf 45.5%
if -5.2e8 < y < 4800Initial program 99.1%
sub-neg99.1%
sub-neg99.1%
associate-*l*94.6%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in a around inf 45.8%
if 4800 < y Initial program 92.3%
sub-neg92.3%
sub-neg92.3%
associate-*l*98.1%
associate-*l*98.1%
Simplified98.1%
Taylor expanded in y around inf 55.7%
Final simplification50.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 (+ (* 27.0 (* a b)) (* x 2.0))))
(if (<= t -5.5e-124)
(- (* x 2.0) (* 9.0 (* z (* y t))))
(if (<= t 2150000000.0)
t_1
(if (<= t 3e+21)
(* -9.0 (* y (* z t)))
(if (<= t 2.8e+70) t_1 (- (* 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 t_1 = (27.0 * (a * b)) + (x * 2.0);
double tmp;
if (t <= -5.5e-124) {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
} else if (t <= 2150000000.0) {
tmp = t_1;
} else if (t <= 3e+21) {
tmp = -9.0 * (y * (z * t));
} else if (t <= 2.8e+70) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (27.0d0 * (a * b)) + (x * 2.0d0)
if (t <= (-5.5d-124)) then
tmp = (x * 2.0d0) - (9.0d0 * (z * (y * t)))
else if (t <= 2150000000.0d0) then
tmp = t_1
else if (t <= 3d+21) then
tmp = (-9.0d0) * (y * (z * t))
else if (t <= 2.8d+70) then
tmp = t_1
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 t_1 = (27.0 * (a * b)) + (x * 2.0);
double tmp;
if (t <= -5.5e-124) {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
} else if (t <= 2150000000.0) {
tmp = t_1;
} else if (t <= 3e+21) {
tmp = -9.0 * (y * (z * t));
} else if (t <= 2.8e+70) {
tmp = t_1;
} 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): t_1 = (27.0 * (a * b)) + (x * 2.0) tmp = 0 if t <= -5.5e-124: tmp = (x * 2.0) - (9.0 * (z * (y * t))) elif t <= 2150000000.0: tmp = t_1 elif t <= 3e+21: tmp = -9.0 * (y * (z * t)) elif t <= 2.8e+70: tmp = t_1 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) t_1 = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)) tmp = 0.0 if (t <= -5.5e-124) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(z * Float64(y * t)))); elseif (t <= 2150000000.0) tmp = t_1; elseif (t <= 3e+21) tmp = Float64(-9.0 * Float64(y * Float64(z * t))); elseif (t <= 2.8e+70) tmp = t_1; 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)
t_1 = (27.0 * (a * b)) + (x * 2.0);
tmp = 0.0;
if (t <= -5.5e-124)
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
elseif (t <= 2150000000.0)
tmp = t_1;
elseif (t <= 3e+21)
tmp = -9.0 * (y * (z * t));
elseif (t <= 2.8e+70)
tmp = t_1;
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_] := Block[{t$95$1 = N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.5e-124], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2150000000.0], t$95$1, If[LessEqual[t, 3e+21], N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+70], t$95$1, 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}
t_1 := 27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{-124}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;t \leq 2150000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+21}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if t < -5.50000000000000016e-124Initial program 95.7%
sub-neg95.7%
sub-neg95.7%
associate-*l*93.7%
associate-*l*94.7%
Simplified94.7%
Taylor expanded in a around 0 70.4%
pow170.4%
Applied egg-rr70.4%
unpow170.4%
*-commutative70.4%
*-commutative70.4%
associate-*l*63.8%
*-commutative63.8%
Simplified63.8%
if -5.50000000000000016e-124 < t < 2.15e9 or 3e21 < t < 2.7999999999999999e70Initial program 93.7%
sub-neg93.7%
sub-neg93.7%
associate-*l*99.8%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in y around 0 84.0%
if 2.15e9 < t < 3e21Initial program 100.0%
sub-neg100.0%
sub-neg100.0%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in y around inf 100.0%
*-commutative100.0%
*-un-lft-identity100.0%
times-frac100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 50.1%
*-commutative50.1%
associate-*l*50.1%
*-commutative50.1%
Simplified50.1%
if 2.7999999999999999e70 < t Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*91.6%
associate-*l*91.6%
Simplified91.6%
Taylor expanded in a around 0 91.2%
Final simplification77.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 (+ (* 27.0 (* a b)) (* x 2.0))))
(if (<= t -3.5e-124)
(- (* x 2.0) (* 9.0 (* z (* y t))))
(if (<= t 2100000000.0)
t_1
(if (<= t 3e+21)
(* -9.0 (* y (* z t)))
(if (<= t 5.4e+70) t_1 (- (* 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 t_1 = (27.0 * (a * b)) + (x * 2.0);
double tmp;
if (t <= -3.5e-124) {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
} else if (t <= 2100000000.0) {
tmp = t_1;
} else if (t <= 3e+21) {
tmp = -9.0 * (y * (z * t));
} else if (t <= 5.4e+70) {
tmp = t_1;
} else {
tmp = (x * 2.0) - (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) :: t_1
real(8) :: tmp
t_1 = (27.0d0 * (a * b)) + (x * 2.0d0)
if (t <= (-3.5d-124)) then
tmp = (x * 2.0d0) - (9.0d0 * (z * (y * t)))
else if (t <= 2100000000.0d0) then
tmp = t_1
else if (t <= 3d+21) then
tmp = (-9.0d0) * (y * (z * t))
else if (t <= 5.4d+70) then
tmp = t_1
else
tmp = (x * 2.0d0) - (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 t_1 = (27.0 * (a * b)) + (x * 2.0);
double tmp;
if (t <= -3.5e-124) {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
} else if (t <= 2100000000.0) {
tmp = t_1;
} else if (t <= 3e+21) {
tmp = -9.0 * (y * (z * t));
} else if (t <= 5.4e+70) {
tmp = t_1;
} else {
tmp = (x * 2.0) - (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): t_1 = (27.0 * (a * b)) + (x * 2.0) tmp = 0 if t <= -3.5e-124: tmp = (x * 2.0) - (9.0 * (z * (y * t))) elif t <= 2100000000.0: tmp = t_1 elif t <= 3e+21: tmp = -9.0 * (y * (z * t)) elif t <= 5.4e+70: tmp = t_1 else: tmp = (x * 2.0) - (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) t_1 = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)) tmp = 0.0 if (t <= -3.5e-124) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(z * Float64(y * t)))); elseif (t <= 2100000000.0) tmp = t_1; elseif (t <= 3e+21) tmp = Float64(-9.0 * Float64(y * Float64(z * t))); elseif (t <= 5.4e+70) tmp = t_1; else tmp = Float64(Float64(x * 2.0) - 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)
t_1 = (27.0 * (a * b)) + (x * 2.0);
tmp = 0.0;
if (t <= -3.5e-124)
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
elseif (t <= 2100000000.0)
tmp = t_1;
elseif (t <= 3e+21)
tmp = -9.0 * (y * (z * t));
elseif (t <= 5.4e+70)
tmp = t_1;
else
tmp = (x * 2.0) - (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_] := Block[{t$95$1 = N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.5e-124], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2100000000.0], t$95$1, If[LessEqual[t, 3e+21], N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e+70], t$95$1, N[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{if}\;t \leq -3.5 \cdot 10^{-124}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;t \leq 2100000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+21}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - t \cdot \left(9 \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if t < -3.4999999999999999e-124Initial program 95.7%
sub-neg95.7%
sub-neg95.7%
associate-*l*93.7%
associate-*l*94.7%
Simplified94.7%
Taylor expanded in a around 0 70.4%
pow170.4%
Applied egg-rr70.4%
unpow170.4%
*-commutative70.4%
*-commutative70.4%
associate-*l*63.8%
*-commutative63.8%
Simplified63.8%
if -3.4999999999999999e-124 < t < 2.1e9 or 3e21 < t < 5.3999999999999999e70Initial program 93.7%
sub-neg93.7%
sub-neg93.7%
associate-*l*99.8%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in y around 0 84.0%
if 2.1e9 < t < 3e21Initial program 100.0%
sub-neg100.0%
sub-neg100.0%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in y around inf 100.0%
*-commutative100.0%
*-un-lft-identity100.0%
times-frac100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 50.1%
*-commutative50.1%
associate-*l*50.1%
*-commutative50.1%
Simplified50.1%
if 5.3999999999999999e70 < t Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*91.6%
associate-*l*91.6%
Simplified91.6%
Taylor expanded in a around 0 91.2%
pow191.2%
*-commutative91.2%
Applied egg-rr91.2%
unpow191.2%
associate-*l*91.2%
*-commutative91.2%
associate-*r*91.2%
Simplified91.2%
Taylor expanded in y around 0 91.2%
*-commutative91.2%
Simplified91.2%
Final simplification77.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 (* (* y 9.0) z)))
(if (<= t_1 5e+250)
(+ (- (* x 2.0) (* t_1 t)) (* b (* a 27.0)))
(* y (- (+ (* 2.0 (/ x y)) (* 27.0 (/ (* a b) y))) (* 9.0 (* z 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 <= 5e+250) {
tmp = ((x * 2.0) - (t_1 * t)) + (b * (a * 27.0));
} else {
tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (z * 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 <= 5d+250) then
tmp = ((x * 2.0d0) - (t_1 * t)) + (b * (a * 27.0d0))
else
tmp = y * (((2.0d0 * (x / y)) + (27.0d0 * ((a * b) / y))) - (9.0d0 * (z * 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 <= 5e+250) {
tmp = ((x * 2.0) - (t_1 * t)) + (b * (a * 27.0));
} else {
tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (z * 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 <= 5e+250: tmp = ((x * 2.0) - (t_1 * t)) + (b * (a * 27.0)) else: tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (z * 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 <= 5e+250) tmp = Float64(Float64(Float64(x * 2.0) - Float64(t_1 * t)) + Float64(b * Float64(a * 27.0))); else tmp = Float64(y * Float64(Float64(Float64(2.0 * Float64(x / y)) + Float64(27.0 * Float64(Float64(a * b) / y))) - Float64(9.0 * Float64(z * 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 <= 5e+250)
tmp = ((x * 2.0) - (t_1 * t)) + (b * (a * 27.0));
else
tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (z * 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, 5e+250], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t$95$1 * t), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(N[(2.0 * N[(x / y), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(N[(a * b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(z * 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 5 \cdot 10^{+250}:\\
\;\;\;\;\left(x \cdot 2 - t\_1 \cdot t\right) + b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(2 \cdot \frac{x}{y} + 27 \cdot \frac{a \cdot b}{y}\right) - 9 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 y 9) z) < 5.0000000000000002e250Initial program 97.4%
if 5.0000000000000002e250 < (*.f64 (*.f64 y 9) z) Initial program 67.2%
sub-neg67.2%
sub-neg67.2%
associate-*l*86.6%
associate-*l*86.5%
Simplified86.5%
Taylor expanded in y around inf 93.2%
Final simplification97.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
(let* ((t_1 (* a (* 27.0 b))))
(if (<= (* y 9.0) -2e+52)
(+ (+ (* y (* z (* t -9.0))) (* x 2.0)) t_1)
(+ t_1 (- (* 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 = a * (27.0 * b);
double tmp;
if ((y * 9.0) <= -2e+52) {
tmp = ((y * (z * (t * -9.0))) + (x * 2.0)) + t_1;
} else {
tmp = t_1 + ((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 = a * (27.0d0 * b)
if ((y * 9.0d0) <= (-2d+52)) then
tmp = ((y * (z * (t * (-9.0d0)))) + (x * 2.0d0)) + t_1
else
tmp = t_1 + ((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 = a * (27.0 * b);
double tmp;
if ((y * 9.0) <= -2e+52) {
tmp = ((y * (z * (t * -9.0))) + (x * 2.0)) + t_1;
} else {
tmp = t_1 + ((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 = a * (27.0 * b) tmp = 0 if (y * 9.0) <= -2e+52: tmp = ((y * (z * (t * -9.0))) + (x * 2.0)) + t_1 else: tmp = t_1 + ((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(a * Float64(27.0 * b)) tmp = 0.0 if (Float64(y * 9.0) <= -2e+52) tmp = Float64(Float64(Float64(y * Float64(z * Float64(t * -9.0))) + Float64(x * 2.0)) + t_1); else tmp = Float64(t_1 + 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 = a * (27.0 * b);
tmp = 0.0;
if ((y * 9.0) <= -2e+52)
tmp = ((y * (z * (t * -9.0))) + (x * 2.0)) + t_1;
else
tmp = t_1 + ((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[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(y * 9.0), $MachinePrecision], -2e+52], N[(N[(N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$1 + N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right)\\
\mathbf{if}\;y \cdot 9 \leq -2 \cdot 10^{+52}:\\
\;\;\;\;\left(y \cdot \left(z \cdot \left(t \cdot -9\right)\right) + x \cdot 2\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \left(x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 y 9) < -2e52Initial program 90.3%
sub-neg90.3%
sub-neg90.3%
associate-*l*95.9%
associate-*l*95.9%
Simplified95.9%
sub-neg95.9%
*-commutative95.9%
distribute-rgt-neg-in95.9%
*-commutative95.9%
distribute-lft-neg-in95.9%
metadata-eval95.9%
associate-*l*95.9%
associate-*r*96.0%
*-commutative96.0%
Applied egg-rr96.0%
if -2e52 < (*.f64 y 9) Initial program 96.9%
sub-neg96.9%
sub-neg96.9%
associate-*l*96.0%
associate-*l*96.4%
Simplified96.4%
Taylor expanded in y around 0 97.4%
associate-*r*95.6%
Simplified95.6%
Final simplification95.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 (<= z 4.3e+67) (+ (+ (* y (* z (* t -9.0))) (* x 2.0)) (* a (* 27.0 b))) (- (* 27.0 (* a b)) (* 9.0 (* t (* y z))))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 4.3e+67) {
tmp = ((y * (z * (t * -9.0))) + (x * 2.0)) + (a * (27.0 * b));
} else {
tmp = (27.0 * (a * b)) - (9.0 * (t * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= 4.3d+67) then
tmp = ((y * (z * (t * (-9.0d0)))) + (x * 2.0d0)) + (a * (27.0d0 * b))
else
tmp = (27.0d0 * (a * b)) - (9.0d0 * (t * (y * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 4.3e+67) {
tmp = ((y * (z * (t * -9.0))) + (x * 2.0)) + (a * (27.0 * b));
} else {
tmp = (27.0 * (a * b)) - (9.0 * (t * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= 4.3e+67: tmp = ((y * (z * (t * -9.0))) + (x * 2.0)) + (a * (27.0 * b)) else: tmp = (27.0 * (a * b)) - (9.0 * (t * (y * z))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 4.3e+67) tmp = Float64(Float64(Float64(y * Float64(z * Float64(t * -9.0))) + Float64(x * 2.0)) + Float64(a * Float64(27.0 * b))); else tmp = Float64(Float64(27.0 * Float64(a * b)) - Float64(9.0 * Float64(t * Float64(y * z)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= 4.3e+67)
tmp = ((y * (z * (t * -9.0))) + (x * 2.0)) + (a * (27.0 * b));
else
tmp = (27.0 * (a * b)) - (9.0 * (t * (y * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 4.3e+67], N[(N[(N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 4.3 \cdot 10^{+67}:\\
\;\;\;\;\left(y \cdot \left(z \cdot \left(t \cdot -9\right)\right) + x \cdot 2\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < 4.3000000000000001e67Initial program 96.3%
sub-neg96.3%
sub-neg96.3%
associate-*l*95.9%
associate-*l*96.3%
Simplified96.3%
sub-neg96.3%
*-commutative96.3%
distribute-rgt-neg-in96.3%
*-commutative96.3%
distribute-lft-neg-in96.3%
metadata-eval96.3%
associate-*l*96.4%
associate-*r*96.4%
*-commutative96.4%
Applied egg-rr96.4%
if 4.3000000000000001e67 < z Initial program 92.9%
sub-neg92.9%
sub-neg92.9%
associate-*l*96.3%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in x around 0 70.2%
Final simplification90.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 5e+161) (+ (+ (* y (* z (* t -9.0))) (* x 2.0)) (* a (* 27.0 b))) (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* 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 (t <= 5e+161) {
tmp = ((y * (z * (t * -9.0))) + (x * 2.0)) + (a * (27.0 * b));
} else {
tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (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 (t <= 5d+161) then
tmp = ((y * (z * (t * (-9.0d0)))) + (x * 2.0d0)) + (a * (27.0d0 * b))
else
tmp = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + (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 (t <= 5e+161) {
tmp = ((y * (z * (t * -9.0))) + (x * 2.0)) + (a * (27.0 * b));
} else {
tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (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 t <= 5e+161: tmp = ((y * (z * (t * -9.0))) + (x * 2.0)) + (a * (27.0 * b)) else: tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (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 (t <= 5e+161) tmp = Float64(Float64(Float64(y * Float64(z * Float64(t * -9.0))) + Float64(x * 2.0)) + Float64(a * Float64(27.0 * b))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + 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 (t <= 5e+161)
tmp = ((y * (z * (t * -9.0))) + (x * 2.0)) + (a * (27.0 * b));
else
tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (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[t, 5e+161], N[(N[(N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $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}\;t \leq 5 \cdot 10^{+161}:\\
\;\;\;\;\left(y \cdot \left(z \cdot \left(t \cdot -9\right)\right) + x \cdot 2\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if t < 4.9999999999999997e161Initial program 95.0%
sub-neg95.0%
sub-neg95.0%
associate-*l*96.7%
associate-*l*97.1%
Simplified97.1%
sub-neg97.1%
*-commutative97.1%
distribute-rgt-neg-in97.1%
*-commutative97.1%
distribute-lft-neg-in97.1%
metadata-eval97.1%
associate-*l*97.2%
associate-*r*97.2%
*-commutative97.2%
Applied egg-rr97.2%
if 4.9999999999999997e161 < t Initial program 99.8%
Final simplification97.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= z -7.5e+44)
(* -9.0 (* y (* z t)))
(if (<= z 0.0008)
(+ (* 27.0 (* a b)) (* x 2.0))
(- (* x 2.0) (* 9.0 (* t (* y z)))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -7.5e+44) {
tmp = -9.0 * (y * (z * t));
} else if (z <= 0.0008) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-7.5d+44)) then
tmp = (-9.0d0) * (y * (z * t))
else if (z <= 0.0008d0) then
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
else
tmp = (x * 2.0d0) - (9.0d0 * (t * (y * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -7.5e+44) {
tmp = -9.0 * (y * (z * t));
} else if (z <= 0.0008) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -7.5e+44: tmp = -9.0 * (y * (z * t)) elif z <= 0.0008: tmp = (27.0 * (a * b)) + (x * 2.0) else: tmp = (x * 2.0) - (9.0 * (t * (y * z))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -7.5e+44) tmp = Float64(-9.0 * Float64(y * Float64(z * t))); elseif (z <= 0.0008) tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)); else tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(y * z)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -7.5e+44)
tmp = -9.0 * (y * (z * t));
elseif (z <= 0.0008)
tmp = (27.0 * (a * b)) + (x * 2.0);
else
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -7.5e+44], N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.0008], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+44}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;z \leq 0.0008:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -7.50000000000000027e44Initial program 87.3%
sub-neg87.3%
sub-neg87.3%
associate-*l*85.7%
associate-*l*87.4%
Simplified87.4%
Taylor expanded in y around inf 77.2%
*-commutative77.2%
*-un-lft-identity77.2%
times-frac75.5%
Applied egg-rr75.5%
Taylor expanded in y around inf 50.8%
*-commutative50.8%
associate-*l*47.3%
*-commutative47.3%
Simplified47.3%
if -7.50000000000000027e44 < z < 8.00000000000000038e-4Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in y around 0 79.5%
if 8.00000000000000038e-4 < z Initial program 94.2%
sub-neg94.2%
sub-neg94.2%
associate-*l*96.9%
associate-*l*96.9%
Simplified96.9%
Taylor expanded in a around 0 79.8%
Final simplification72.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= z -8.5e+44)
(* -9.0 (* y (* z t)))
(if (<= z 31000000000.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 (z <= -8.5e+44) {
tmp = -9.0 * (y * (z * t));
} else if (z <= 31000000000.0) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = -9.0 * (t * (y * z));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-8.5d+44)) then
tmp = (-9.0d0) * (y * (z * t))
else if (z <= 31000000000.0d0) then
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
else
tmp = (-9.0d0) * (t * (y * z))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -8.5e+44) {
tmp = -9.0 * (y * (z * t));
} else if (z <= 31000000000.0) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = -9.0 * (t * (y * z));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -8.5e+44: tmp = -9.0 * (y * (z * t)) elif z <= 31000000000.0: tmp = (27.0 * (a * b)) + (x * 2.0) else: tmp = -9.0 * (t * (y * z)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -8.5e+44) tmp = Float64(-9.0 * Float64(y * Float64(z * t))); elseif (z <= 31000000000.0) tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)); else tmp = Float64(-9.0 * Float64(t * Float64(y * z))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -8.5e+44)
tmp = -9.0 * (y * (z * t));
elseif (z <= 31000000000.0)
tmp = (27.0 * (a * b)) + (x * 2.0);
else
tmp = -9.0 * (t * (y * z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -8.5e+44], N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 31000000000.0], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+44}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;z \leq 31000000000:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -8.5e44Initial program 87.3%
sub-neg87.3%
sub-neg87.3%
associate-*l*85.7%
associate-*l*87.4%
Simplified87.4%
Taylor expanded in y around inf 77.2%
*-commutative77.2%
*-un-lft-identity77.2%
times-frac75.5%
Applied egg-rr75.5%
Taylor expanded in y around inf 50.8%
*-commutative50.8%
associate-*l*47.3%
*-commutative47.3%
Simplified47.3%
if -8.5e44 < z < 3.1e10Initial program 99.7%
sub-neg99.7%
sub-neg99.7%
associate-*l*99.7%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in y around 0 78.0%
if 3.1e10 < z Initial program 93.8%
sub-neg93.8%
sub-neg93.8%
associate-*l*96.7%
associate-*l*96.7%
Simplified96.7%
Taylor expanded in y around inf 56.8%
Final simplification66.2%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.62e-65) (not (<= b 3.7e+41))) (* 27.0 (* a b)) (* x 2.0)))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.62e-65) || !(b <= 3.7e+41)) {
tmp = 27.0 * (a * b);
} else {
tmp = x * 2.0;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-1.62d-65)) .or. (.not. (b <= 3.7d+41))) then
tmp = 27.0d0 * (a * b)
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.62e-65) || !(b <= 3.7e+41)) {
tmp = 27.0 * (a * b);
} else {
tmp = x * 2.0;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.62e-65) or not (b <= 3.7e+41): tmp = 27.0 * (a * b) else: tmp = x * 2.0 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.62e-65) || !(b <= 3.7e+41)) tmp = Float64(27.0 * Float64(a * b)); else tmp = Float64(x * 2.0); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((b <= -1.62e-65) || ~((b <= 3.7e+41)))
tmp = 27.0 * (a * b);
else
tmp = x * 2.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.62e-65], N[Not[LessEqual[b, 3.7e+41]], $MachinePrecision]], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], N[(x * 2.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.62 \cdot 10^{-65} \lor \neg \left(b \leq 3.7 \cdot 10^{+41}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if b < -1.6200000000000001e-65 or 3.69999999999999981e41 < b Initial program 95.6%
sub-neg95.6%
sub-neg95.6%
associate-*l*96.3%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in a around inf 52.6%
if -1.6200000000000001e-65 < b < 3.69999999999999981e41Initial program 95.6%
sub-neg95.6%
sub-neg95.6%
associate-*l*95.6%
associate-*l*96.4%
Simplified96.4%
Taylor expanded in x around inf 40.8%
Final simplification47.4%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= b -3.1e-71) (not (<= b 2.7e+41))) (* 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 ((b <= -3.1e-71) || !(b <= 2.7e+41)) {
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 ((b <= (-3.1d-71)) .or. (.not. (b <= 2.7d+41))) 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 ((b <= -3.1e-71) || !(b <= 2.7e+41)) {
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 (b <= -3.1e-71) or not (b <= 2.7e+41): 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 ((b <= -3.1e-71) || !(b <= 2.7e+41)) 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 ((b <= -3.1e-71) || ~((b <= 2.7e+41)))
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[b, -3.1e-71], N[Not[LessEqual[b, 2.7e+41]], $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}\;b \leq -3.1 \cdot 10^{-71} \lor \neg \left(b \leq 2.7 \cdot 10^{+41}\right):\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if b < -3.10000000000000002e-71 or 2.7e41 < b Initial program 95.6%
sub-neg95.6%
sub-neg95.6%
associate-*l*96.3%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in a around inf 52.6%
associate-*r*52.6%
Simplified52.6%
if -3.10000000000000002e-71 < b < 2.7e41Initial program 95.6%
sub-neg95.6%
sub-neg95.6%
associate-*l*95.6%
associate-*l*96.4%
Simplified96.4%
Taylor expanded in x around inf 40.8%
Final simplification47.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 (* x 2.0))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * 2.0d0
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): return x * 2.0
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(x * 2.0) end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
tmp = x * 2.0;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := N[(x * 2.0), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
x \cdot 2
\end{array}
Initial program 95.6%
sub-neg95.6%
sub-neg95.6%
associate-*l*96.0%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in x around inf 28.4%
Final simplification28.4%
(FPCore (x y z t a b) :precision binary64 (if (< y 7.590524218811189e-161) (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* a (* 27.0 b))) (+ (- (* x 2.0) (* 9.0 (* y (* t z)))) (* (* a 27.0) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y < 7.590524218811189e-161) {
tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
} else {
tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y < 7.590524218811189d-161) then
tmp = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + (a * (27.0d0 * b))
else
tmp = ((x * 2.0d0) - (9.0d0 * (y * (t * z)))) + ((a * 27.0d0) * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y < 7.590524218811189e-161) {
tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
} else {
tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y < 7.590524218811189e-161: tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b)) else: tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y < 7.590524218811189e-161) tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(a * Float64(27.0 * b))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(9.0 * Float64(y * Float64(t * z)))) + Float64(Float64(a * 27.0) * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y < 7.590524218811189e-161) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b)); else tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Less[y, 7.590524218811189e-161], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y < 7.590524218811189 \cdot 10^{-161}:\\
\;\;\;\;\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - 9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right) + \left(a \cdot 27\right) \cdot b\\
\end{array}
\end{array}
herbie shell --seed 2024080
(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)))