
(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 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= t 4.4e-7) (+ (+ (* x 2.0) (* z (* (* t -9.0) y))) (* a (* 27.0 b))) (* t (- (+ (* 2.0 (/ x t)) (* 27.0 (/ (* a b) t))) (* 9.0 (* z y))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 4.4e-7) {
tmp = ((x * 2.0) + (z * ((t * -9.0) * y))) + (a * (27.0 * b));
} else {
tmp = t * (((2.0 * (x / t)) + (27.0 * ((a * b) / t))) - (9.0 * (z * y)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= 4.4d-7) then
tmp = ((x * 2.0d0) + (z * ((t * (-9.0d0)) * y))) + (a * (27.0d0 * b))
else
tmp = t * (((2.0d0 * (x / t)) + (27.0d0 * ((a * b) / t))) - (9.0d0 * (z * y)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 4.4e-7) {
tmp = ((x * 2.0) + (z * ((t * -9.0) * y))) + (a * (27.0 * b));
} else {
tmp = t * (((2.0 * (x / t)) + (27.0 * ((a * b) / t))) - (9.0 * (z * y)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if t <= 4.4e-7: tmp = ((x * 2.0) + (z * ((t * -9.0) * y))) + (a * (27.0 * b)) else: tmp = t * (((2.0 * (x / t)) + (27.0 * ((a * b) / t))) - (9.0 * (z * y))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 4.4e-7) tmp = Float64(Float64(Float64(x * 2.0) + Float64(z * Float64(Float64(t * -9.0) * y))) + Float64(a * Float64(27.0 * b))); else tmp = Float64(t * Float64(Float64(Float64(2.0 * Float64(x / t)) + Float64(27.0 * Float64(Float64(a * b) / t))) - Float64(9.0 * Float64(z * y)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (t <= 4.4e-7)
tmp = ((x * 2.0) + (z * ((t * -9.0) * y))) + (a * (27.0 * b));
else
tmp = t * (((2.0 * (x / t)) + (27.0 * ((a * b) / t))) - (9.0 * (z * y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 4.4e-7], N[(N[(N[(x * 2.0), $MachinePrecision] + N[(z * N[(N[(t * -9.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(N[(2.0 * N[(x / t), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(N[(a * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.4 \cdot 10^{-7}:\\
\;\;\;\;\left(x \cdot 2 + z \cdot \left(\left(t \cdot -9\right) \cdot y\right)\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\left(2 \cdot \frac{x}{t} + 27 \cdot \frac{a \cdot b}{t}\right) - 9 \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if t < 4.4000000000000002e-7Initial program 94.7%
sub-neg94.7%
sub-neg94.7%
associate-*l*96.4%
associate-*l*96.4%
Simplified96.4%
sub-neg96.4%
*-commutative96.4%
distribute-rgt-neg-in96.4%
*-commutative96.4%
distribute-lft-neg-in96.4%
metadata-eval96.4%
associate-*l*96.4%
associate-*r*96.4%
associate-*l*97.9%
Applied egg-rr97.9%
if 4.4000000000000002e-7 < t Initial program 96.3%
sub-neg96.3%
sub-neg96.3%
associate-*l*88.5%
associate-*l*88.4%
Simplified88.4%
Taylor expanded in t around inf 99.6%
Final simplification98.3%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.35e-138)
(* y (- (* 2.0 (/ x y)) (* 9.0 (* t z))))
(if (<= t 6e+72)
(+ (* 27.0 (* a b)) (* x 2.0))
(if (or (<= t 1.06e+184) (not (<= t 3.2e+233)))
(- (* x 2.0) (* 9.0 (* t (* z y))))
(* t (- (* 27.0 (/ (* a b) t)) (* 9.0 (* z y))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.35e-138) {
tmp = y * ((2.0 * (x / y)) - (9.0 * (t * z)));
} else if (t <= 6e+72) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else if ((t <= 1.06e+184) || !(t <= 3.2e+233)) {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
} else {
tmp = t * ((27.0 * ((a * b) / t)) - (9.0 * (z * y)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.35d-138)) then
tmp = y * ((2.0d0 * (x / y)) - (9.0d0 * (t * z)))
else if (t <= 6d+72) then
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
else if ((t <= 1.06d+184) .or. (.not. (t <= 3.2d+233))) then
tmp = (x * 2.0d0) - (9.0d0 * (t * (z * y)))
else
tmp = t * ((27.0d0 * ((a * b) / t)) - (9.0d0 * (z * y)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.35e-138) {
tmp = y * ((2.0 * (x / y)) - (9.0 * (t * z)));
} else if (t <= 6e+72) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else if ((t <= 1.06e+184) || !(t <= 3.2e+233)) {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
} else {
tmp = t * ((27.0 * ((a * b) / t)) - (9.0 * (z * y)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if t <= -1.35e-138: tmp = y * ((2.0 * (x / y)) - (9.0 * (t * z))) elif t <= 6e+72: tmp = (27.0 * (a * b)) + (x * 2.0) elif (t <= 1.06e+184) or not (t <= 3.2e+233): tmp = (x * 2.0) - (9.0 * (t * (z * y))) else: tmp = t * ((27.0 * ((a * b) / t)) - (9.0 * (z * y))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.35e-138) tmp = Float64(y * Float64(Float64(2.0 * Float64(x / y)) - Float64(9.0 * Float64(t * z)))); elseif (t <= 6e+72) tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)); elseif ((t <= 1.06e+184) || !(t <= 3.2e+233)) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(z * y)))); else tmp = Float64(t * Float64(Float64(27.0 * Float64(Float64(a * b) / t)) - Float64(9.0 * Float64(z * y)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (t <= -1.35e-138)
tmp = y * ((2.0 * (x / y)) - (9.0 * (t * z)));
elseif (t <= 6e+72)
tmp = (27.0 * (a * b)) + (x * 2.0);
elseif ((t <= 1.06e+184) || ~((t <= 3.2e+233)))
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
else
tmp = t * ((27.0 * ((a * b) / t)) - (9.0 * (z * y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.35e-138], N[(y * N[(N[(2.0 * N[(x / y), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e+72], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 1.06e+184], N[Not[LessEqual[t, 3.2e+233]], $MachinePrecision]], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(27.0 * N[(N[(a * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{-138}:\\
\;\;\;\;y \cdot \left(2 \cdot \frac{x}{y} - 9 \cdot \left(t \cdot z\right)\right)\\
\mathbf{elif}\;t \leq 6 \cdot 10^{+72}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{elif}\;t \leq 1.06 \cdot 10^{+184} \lor \neg \left(t \leq 3.2 \cdot 10^{+233}\right):\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(27 \cdot \frac{a \cdot b}{t} - 9 \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if t < -1.35000000000000014e-138Initial program 96.9%
sub-neg96.9%
sub-neg96.9%
associate-*l*92.6%
associate-*l*92.7%
Simplified92.7%
Taylor expanded in a around 0 70.0%
Taylor expanded in y around inf 64.6%
if -1.35000000000000014e-138 < t < 6.00000000000000006e72Initial program 93.8%
sub-neg93.8%
sub-neg93.8%
associate-*l*99.7%
associate-*l*99.6%
Simplified99.6%
Taylor expanded in y around 0 80.4%
if 6.00000000000000006e72 < t < 1.06e184 or 3.20000000000000018e233 < t Initial program 96.6%
sub-neg96.6%
sub-neg96.6%
associate-*l*84.8%
associate-*l*84.8%
Simplified84.8%
Taylor expanded in a around 0 89.2%
if 1.06e184 < t < 3.20000000000000018e233Initial program 87.3%
sub-neg87.3%
sub-neg87.3%
associate-*l*76.3%
associate-*l*76.3%
Simplified76.3%
Taylor expanded in t around inf 99.8%
Taylor expanded in x around 0 99.8%
Final simplification76.4%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.1e-144)
(* (* t z) (* -9.0 y))
(if (<= t 2.55e-195)
(* a (* 27.0 b))
(if (<= t 7.8e-72)
(* x 2.0)
(if (<= t 3e+52)
(* 27.0 (* a b))
(if (<= t 9.6e+160) (* x 2.0) (* t (* -9.0 (* z y)))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.1e-144) {
tmp = (t * z) * (-9.0 * y);
} else if (t <= 2.55e-195) {
tmp = a * (27.0 * b);
} else if (t <= 7.8e-72) {
tmp = x * 2.0;
} else if (t <= 3e+52) {
tmp = 27.0 * (a * b);
} else if (t <= 9.6e+160) {
tmp = x * 2.0;
} else {
tmp = t * (-9.0 * (z * y));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.1d-144)) then
tmp = (t * z) * ((-9.0d0) * y)
else if (t <= 2.55d-195) then
tmp = a * (27.0d0 * b)
else if (t <= 7.8d-72) then
tmp = x * 2.0d0
else if (t <= 3d+52) then
tmp = 27.0d0 * (a * b)
else if (t <= 9.6d+160) then
tmp = x * 2.0d0
else
tmp = t * ((-9.0d0) * (z * y))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.1e-144) {
tmp = (t * z) * (-9.0 * y);
} else if (t <= 2.55e-195) {
tmp = a * (27.0 * b);
} else if (t <= 7.8e-72) {
tmp = x * 2.0;
} else if (t <= 3e+52) {
tmp = 27.0 * (a * b);
} else if (t <= 9.6e+160) {
tmp = x * 2.0;
} else {
tmp = t * (-9.0 * (z * y));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if t <= -1.1e-144: tmp = (t * z) * (-9.0 * y) elif t <= 2.55e-195: tmp = a * (27.0 * b) elif t <= 7.8e-72: tmp = x * 2.0 elif t <= 3e+52: tmp = 27.0 * (a * b) elif t <= 9.6e+160: tmp = x * 2.0 else: tmp = t * (-9.0 * (z * y)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.1e-144) tmp = Float64(Float64(t * z) * Float64(-9.0 * y)); elseif (t <= 2.55e-195) tmp = Float64(a * Float64(27.0 * b)); elseif (t <= 7.8e-72) tmp = Float64(x * 2.0); elseif (t <= 3e+52) tmp = Float64(27.0 * Float64(a * b)); elseif (t <= 9.6e+160) tmp = Float64(x * 2.0); else tmp = Float64(t * Float64(-9.0 * Float64(z * y))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (t <= -1.1e-144)
tmp = (t * z) * (-9.0 * y);
elseif (t <= 2.55e-195)
tmp = a * (27.0 * b);
elseif (t <= 7.8e-72)
tmp = x * 2.0;
elseif (t <= 3e+52)
tmp = 27.0 * (a * b);
elseif (t <= 9.6e+160)
tmp = x * 2.0;
else
tmp = t * (-9.0 * (z * y));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.1e-144], N[(N[(t * z), $MachinePrecision] * N[(-9.0 * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.55e-195], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e-72], N[(x * 2.0), $MachinePrecision], If[LessEqual[t, 3e+52], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.6e+160], N[(x * 2.0), $MachinePrecision], N[(t * N[(-9.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{-144}:\\
\;\;\;\;\left(t \cdot z\right) \cdot \left(-9 \cdot y\right)\\
\mathbf{elif}\;t \leq 2.55 \cdot 10^{-195}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{-72}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+52}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;t \leq 9.6 \cdot 10^{+160}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-9 \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if t < -1.10000000000000003e-144Initial program 96.9%
sub-neg96.9%
sub-neg96.9%
associate-*l*92.6%
associate-*l*92.7%
Simplified92.7%
+-commutative92.7%
associate-+r-92.7%
associate-*r*92.6%
*-commutative92.6%
associate-*l*92.6%
associate-*l*92.6%
associate-*r*92.6%
Applied egg-rr92.6%
Taylor expanded in y around 0 96.9%
associate-*r*96.8%
*-commutative96.8%
associate-*l*96.8%
*-commutative96.8%
associate-*r*96.9%
*-commutative96.9%
Simplified96.9%
Taylor expanded in t around inf 41.7%
associate-*r*41.6%
associate-*r*41.6%
metadata-eval41.6%
distribute-lft-neg-in41.6%
distribute-lft-neg-in41.6%
*-commutative41.6%
associate-*r*41.7%
associate-*l*41.7%
distribute-rgt-neg-in41.7%
distribute-rgt-neg-in41.7%
distribute-lft-neg-in41.7%
metadata-eval41.7%
*-commutative41.7%
Simplified41.7%
pow141.7%
Applied egg-rr41.7%
unpow141.7%
associate-*r*41.7%
*-commutative41.7%
associate-*r*41.7%
associate-*r*38.5%
*-commutative38.5%
Simplified38.5%
if -1.10000000000000003e-144 < t < 2.55e-195Initial program 89.7%
sub-neg89.7%
sub-neg89.7%
associate-*l*99.6%
associate-*l*99.5%
Simplified99.5%
Taylor expanded in a around inf 47.6%
associate-*r*47.7%
*-commutative47.7%
associate-*r*47.6%
Simplified47.6%
if 2.55e-195 < t < 7.8e-72 or 3e52 < t < 9.6000000000000006e160Initial program 97.9%
sub-neg97.9%
sub-neg97.9%
associate-*l*92.4%
associate-*l*92.3%
Simplified92.3%
Taylor expanded in x around inf 40.3%
if 7.8e-72 < t < 3e52Initial program 96.4%
sub-neg96.4%
sub-neg96.4%
associate-*l*99.7%
associate-*l*99.5%
Simplified99.5%
Taylor expanded in a around inf 37.2%
if 9.6000000000000006e160 < t Initial program 95.4%
sub-neg95.4%
sub-neg95.4%
associate-*l*87.1%
associate-*l*87.0%
Simplified87.0%
Taylor expanded in a around 0 88.3%
Taylor expanded in t around inf 88.2%
Taylor expanded in x around 0 79.4%
Final simplification44.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.1e-144)
(* -9.0 (* z (* t y)))
(if (<= t 7e-195)
(* a (* 27.0 b))
(if (<= t 1.56e-72)
(* x 2.0)
(if (<= t 7.2e+51)
(* 27.0 (* a b))
(if (<= t 1e+161) (* x 2.0) (* t (* -9.0 (* z y)))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.1e-144) {
tmp = -9.0 * (z * (t * y));
} else if (t <= 7e-195) {
tmp = a * (27.0 * b);
} else if (t <= 1.56e-72) {
tmp = x * 2.0;
} else if (t <= 7.2e+51) {
tmp = 27.0 * (a * b);
} else if (t <= 1e+161) {
tmp = x * 2.0;
} else {
tmp = t * (-9.0 * (z * y));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.1d-144)) then
tmp = (-9.0d0) * (z * (t * y))
else if (t <= 7d-195) then
tmp = a * (27.0d0 * b)
else if (t <= 1.56d-72) then
tmp = x * 2.0d0
else if (t <= 7.2d+51) then
tmp = 27.0d0 * (a * b)
else if (t <= 1d+161) then
tmp = x * 2.0d0
else
tmp = t * ((-9.0d0) * (z * y))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.1e-144) {
tmp = -9.0 * (z * (t * y));
} else if (t <= 7e-195) {
tmp = a * (27.0 * b);
} else if (t <= 1.56e-72) {
tmp = x * 2.0;
} else if (t <= 7.2e+51) {
tmp = 27.0 * (a * b);
} else if (t <= 1e+161) {
tmp = x * 2.0;
} else {
tmp = t * (-9.0 * (z * y));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if t <= -1.1e-144: tmp = -9.0 * (z * (t * y)) elif t <= 7e-195: tmp = a * (27.0 * b) elif t <= 1.56e-72: tmp = x * 2.0 elif t <= 7.2e+51: tmp = 27.0 * (a * b) elif t <= 1e+161: tmp = x * 2.0 else: tmp = t * (-9.0 * (z * y)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.1e-144) tmp = Float64(-9.0 * Float64(z * Float64(t * y))); elseif (t <= 7e-195) tmp = Float64(a * Float64(27.0 * b)); elseif (t <= 1.56e-72) tmp = Float64(x * 2.0); elseif (t <= 7.2e+51) tmp = Float64(27.0 * Float64(a * b)); elseif (t <= 1e+161) tmp = Float64(x * 2.0); else tmp = Float64(t * Float64(-9.0 * Float64(z * y))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (t <= -1.1e-144)
tmp = -9.0 * (z * (t * y));
elseif (t <= 7e-195)
tmp = a * (27.0 * b);
elseif (t <= 1.56e-72)
tmp = x * 2.0;
elseif (t <= 7.2e+51)
tmp = 27.0 * (a * b);
elseif (t <= 1e+161)
tmp = x * 2.0;
else
tmp = t * (-9.0 * (z * y));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.1e-144], N[(-9.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e-195], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.56e-72], N[(x * 2.0), $MachinePrecision], If[LessEqual[t, 7.2e+51], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e+161], N[(x * 2.0), $MachinePrecision], N[(t * N[(-9.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{-144}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-195}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;t \leq 1.56 \cdot 10^{-72}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+51}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;t \leq 10^{+161}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-9 \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if t < -1.10000000000000003e-144Initial program 96.9%
sub-neg96.9%
sub-neg96.9%
associate-*l*92.6%
associate-*l*92.7%
Simplified92.7%
Taylor expanded in y around inf 41.7%
pow141.7%
*-commutative41.7%
associate-*l*38.5%
Applied egg-rr38.5%
unpow138.5%
associate-*r*41.7%
*-commutative41.7%
associate-*r*41.6%
Simplified41.6%
if -1.10000000000000003e-144 < t < 7.00000000000000028e-195Initial program 89.7%
sub-neg89.7%
sub-neg89.7%
associate-*l*99.6%
associate-*l*99.5%
Simplified99.5%
Taylor expanded in a around inf 47.6%
associate-*r*47.7%
*-commutative47.7%
associate-*r*47.6%
Simplified47.6%
if 7.00000000000000028e-195 < t < 1.55999999999999993e-72 or 7.20000000000000022e51 < t < 1e161Initial program 97.9%
sub-neg97.9%
sub-neg97.9%
associate-*l*92.4%
associate-*l*92.3%
Simplified92.3%
Taylor expanded in x around inf 40.3%
if 1.55999999999999993e-72 < t < 7.20000000000000022e51Initial program 96.4%
sub-neg96.4%
sub-neg96.4%
associate-*l*99.7%
associate-*l*99.5%
Simplified99.5%
Taylor expanded in a around inf 37.2%
if 1e161 < t Initial program 95.4%
sub-neg95.4%
sub-neg95.4%
associate-*l*87.1%
associate-*l*87.0%
Simplified87.0%
Taylor expanded in a around 0 88.3%
Taylor expanded in t around inf 88.2%
Taylor expanded in x around 0 79.4%
Final simplification45.7%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.1e-144)
(* -9.0 (* z (* t y)))
(if (<= t 4.6e-195)
(* a (* 27.0 b))
(if (<= t 6.4e-71)
(* x 2.0)
(if (<= t 3.7e+53)
(* 27.0 (* a b))
(if (<= t 1.1e+161) (* x 2.0) (* -9.0 (* t (* z y)))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.1e-144) {
tmp = -9.0 * (z * (t * y));
} else if (t <= 4.6e-195) {
tmp = a * (27.0 * b);
} else if (t <= 6.4e-71) {
tmp = x * 2.0;
} else if (t <= 3.7e+53) {
tmp = 27.0 * (a * b);
} else if (t <= 1.1e+161) {
tmp = x * 2.0;
} else {
tmp = -9.0 * (t * (z * y));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.1d-144)) then
tmp = (-9.0d0) * (z * (t * y))
else if (t <= 4.6d-195) then
tmp = a * (27.0d0 * b)
else if (t <= 6.4d-71) then
tmp = x * 2.0d0
else if (t <= 3.7d+53) then
tmp = 27.0d0 * (a * b)
else if (t <= 1.1d+161) then
tmp = x * 2.0d0
else
tmp = (-9.0d0) * (t * (z * y))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.1e-144) {
tmp = -9.0 * (z * (t * y));
} else if (t <= 4.6e-195) {
tmp = a * (27.0 * b);
} else if (t <= 6.4e-71) {
tmp = x * 2.0;
} else if (t <= 3.7e+53) {
tmp = 27.0 * (a * b);
} else if (t <= 1.1e+161) {
tmp = x * 2.0;
} else {
tmp = -9.0 * (t * (z * y));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if t <= -1.1e-144: tmp = -9.0 * (z * (t * y)) elif t <= 4.6e-195: tmp = a * (27.0 * b) elif t <= 6.4e-71: tmp = x * 2.0 elif t <= 3.7e+53: tmp = 27.0 * (a * b) elif t <= 1.1e+161: tmp = x * 2.0 else: tmp = -9.0 * (t * (z * y)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.1e-144) tmp = Float64(-9.0 * Float64(z * Float64(t * y))); elseif (t <= 4.6e-195) tmp = Float64(a * Float64(27.0 * b)); elseif (t <= 6.4e-71) tmp = Float64(x * 2.0); elseif (t <= 3.7e+53) tmp = Float64(27.0 * Float64(a * b)); elseif (t <= 1.1e+161) tmp = Float64(x * 2.0); else tmp = Float64(-9.0 * Float64(t * Float64(z * y))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (t <= -1.1e-144)
tmp = -9.0 * (z * (t * y));
elseif (t <= 4.6e-195)
tmp = a * (27.0 * b);
elseif (t <= 6.4e-71)
tmp = x * 2.0;
elseif (t <= 3.7e+53)
tmp = 27.0 * (a * b);
elseif (t <= 1.1e+161)
tmp = x * 2.0;
else
tmp = -9.0 * (t * (z * y));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.1e-144], N[(-9.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.6e-195], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.4e-71], N[(x * 2.0), $MachinePrecision], If[LessEqual[t, 3.7e+53], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e+161], N[(x * 2.0), $MachinePrecision], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{-144}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-195}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;t \leq 6.4 \cdot 10^{-71}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{+53}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+161}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if t < -1.10000000000000003e-144Initial program 96.9%
sub-neg96.9%
sub-neg96.9%
associate-*l*92.6%
associate-*l*92.7%
Simplified92.7%
Taylor expanded in y around inf 41.7%
pow141.7%
*-commutative41.7%
associate-*l*38.5%
Applied egg-rr38.5%
unpow138.5%
associate-*r*41.7%
*-commutative41.7%
associate-*r*41.6%
Simplified41.6%
if -1.10000000000000003e-144 < t < 4.6000000000000004e-195Initial program 89.7%
sub-neg89.7%
sub-neg89.7%
associate-*l*99.6%
associate-*l*99.5%
Simplified99.5%
Taylor expanded in a around inf 47.6%
associate-*r*47.7%
*-commutative47.7%
associate-*r*47.6%
Simplified47.6%
if 4.6000000000000004e-195 < t < 6.3999999999999998e-71 or 3.7e53 < t < 1.1e161Initial program 97.9%
sub-neg97.9%
sub-neg97.9%
associate-*l*92.4%
associate-*l*92.3%
Simplified92.3%
Taylor expanded in x around inf 40.3%
if 6.3999999999999998e-71 < t < 3.7e53Initial program 96.4%
sub-neg96.4%
sub-neg96.4%
associate-*l*99.7%
associate-*l*99.5%
Simplified99.5%
Taylor expanded in a around inf 37.2%
if 1.1e161 < t Initial program 95.4%
sub-neg95.4%
sub-neg95.4%
associate-*l*87.1%
associate-*l*87.0%
Simplified87.0%
Taylor expanded in y around inf 79.5%
Final simplification45.7%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* -9.0 (* t (* z y)))))
(if (<= t -7e-74)
t_1
(if (<= t 2.2e-195)
(* a (* 27.0 b))
(if (<= t 2.8e-71)
(* x 2.0)
(if (<= t 4.8e+51)
(* 27.0 (* a b))
(if (<= t 9.6e+160) (* x 2.0) t_1)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -9.0 * (t * (z * y));
double tmp;
if (t <= -7e-74) {
tmp = t_1;
} else if (t <= 2.2e-195) {
tmp = a * (27.0 * b);
} else if (t <= 2.8e-71) {
tmp = x * 2.0;
} else if (t <= 4.8e+51) {
tmp = 27.0 * (a * b);
} else if (t <= 9.6e+160) {
tmp = x * 2.0;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (-9.0d0) * (t * (z * y))
if (t <= (-7d-74)) then
tmp = t_1
else if (t <= 2.2d-195) then
tmp = a * (27.0d0 * b)
else if (t <= 2.8d-71) then
tmp = x * 2.0d0
else if (t <= 4.8d+51) then
tmp = 27.0d0 * (a * b)
else if (t <= 9.6d+160) then
tmp = x * 2.0d0
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -9.0 * (t * (z * y));
double tmp;
if (t <= -7e-74) {
tmp = t_1;
} else if (t <= 2.2e-195) {
tmp = a * (27.0 * b);
} else if (t <= 2.8e-71) {
tmp = x * 2.0;
} else if (t <= 4.8e+51) {
tmp = 27.0 * (a * b);
} else if (t <= 9.6e+160) {
tmp = x * 2.0;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = -9.0 * (t * (z * y)) tmp = 0 if t <= -7e-74: tmp = t_1 elif t <= 2.2e-195: tmp = a * (27.0 * b) elif t <= 2.8e-71: tmp = x * 2.0 elif t <= 4.8e+51: tmp = 27.0 * (a * b) elif t <= 9.6e+160: tmp = x * 2.0 else: tmp = t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(-9.0 * Float64(t * Float64(z * y))) tmp = 0.0 if (t <= -7e-74) tmp = t_1; elseif (t <= 2.2e-195) tmp = Float64(a * Float64(27.0 * b)); elseif (t <= 2.8e-71) tmp = Float64(x * 2.0); elseif (t <= 4.8e+51) tmp = Float64(27.0 * Float64(a * b)); elseif (t <= 9.6e+160) tmp = Float64(x * 2.0); else tmp = t_1; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = -9.0 * (t * (z * y));
tmp = 0.0;
if (t <= -7e-74)
tmp = t_1;
elseif (t <= 2.2e-195)
tmp = a * (27.0 * b);
elseif (t <= 2.8e-71)
tmp = x * 2.0;
elseif (t <= 4.8e+51)
tmp = 27.0 * (a * b);
elseif (t <= 9.6e+160)
tmp = x * 2.0;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7e-74], t$95$1, If[LessEqual[t, 2.2e-195], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-71], N[(x * 2.0), $MachinePrecision], If[LessEqual[t, 4.8e+51], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.6e+160], N[(x * 2.0), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := -9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{if}\;t \leq -7 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-195}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-71}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{+51}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;t \leq 9.6 \cdot 10^{+160}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.00000000000000029e-74 or 9.6000000000000006e160 < t Initial program 98.0%
sub-neg98.0%
sub-neg98.0%
associate-*l*90.6%
associate-*l*90.6%
Simplified90.6%
Taylor expanded in y around inf 52.4%
if -7.00000000000000029e-74 < t < 2.20000000000000005e-195Initial program 88.9%
sub-neg88.9%
sub-neg88.9%
associate-*l*99.6%
associate-*l*99.5%
Simplified99.5%
Taylor expanded in a around inf 46.9%
associate-*r*47.0%
*-commutative47.0%
associate-*r*47.0%
Simplified47.0%
if 2.20000000000000005e-195 < t < 2.8e-71 or 4.7999999999999997e51 < t < 9.6000000000000006e160Initial program 97.9%
sub-neg97.9%
sub-neg97.9%
associate-*l*92.4%
associate-*l*92.3%
Simplified92.3%
Taylor expanded in x around inf 40.3%
if 2.8e-71 < t < 4.7999999999999997e51Initial program 96.4%
sub-neg96.4%
sub-neg96.4%
associate-*l*99.7%
associate-*l*99.5%
Simplified99.5%
Taylor expanded in a around inf 37.2%
Final simplification46.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= (* y 9.0) -5e-9) (- (+ (* 27.0 (* a b)) (* x 2.0)) (* y (* t (* z 9.0)))) (+ (+ (* x 2.0) (* z (* (* t -9.0) y))) (* a (* 27.0 b)))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y * 9.0) <= -5e-9) {
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (t * (z * 9.0)));
} else {
tmp = ((x * 2.0) + (z * ((t * -9.0) * y))) + (a * (27.0 * b));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y * 9.0d0) <= (-5d-9)) then
tmp = ((27.0d0 * (a * b)) + (x * 2.0d0)) - (y * (t * (z * 9.0d0)))
else
tmp = ((x * 2.0d0) + (z * ((t * (-9.0d0)) * y))) + (a * (27.0d0 * b))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y * 9.0) <= -5e-9) {
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (t * (z * 9.0)));
} else {
tmp = ((x * 2.0) + (z * ((t * -9.0) * y))) + (a * (27.0 * b));
}
return tmp;
}
[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 * 9.0) <= -5e-9: tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (t * (z * 9.0))) else: tmp = ((x * 2.0) + (z * ((t * -9.0) * y))) + (a * (27.0 * b)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(y * 9.0) <= -5e-9) tmp = Float64(Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)) - Float64(y * Float64(t * Float64(z * 9.0)))); else tmp = Float64(Float64(Float64(x * 2.0) + Float64(z * Float64(Float64(t * -9.0) * y))) + Float64(a * Float64(27.0 * b))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((y * 9.0) <= -5e-9)
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (t * (z * 9.0)));
else
tmp = ((x * 2.0) + (z * ((t * -9.0) * y))) + (a * (27.0 * b));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(y * 9.0), $MachinePrecision], -5e-9], N[(N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] - N[(y * N[(t * N[(z * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] + N[(z * N[(N[(t * -9.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;y \cdot 9 \leq -5 \cdot 10^{-9}:\\
\;\;\;\;\left(27 \cdot \left(a \cdot b\right) + x \cdot 2\right) - y \cdot \left(t \cdot \left(z \cdot 9\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 + z \cdot \left(\left(t \cdot -9\right) \cdot y\right)\right) + a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if (*.f64 y #s(literal 9 binary64)) < -5.0000000000000001e-9Initial program 90.6%
sub-neg90.6%
sub-neg90.6%
associate-*l*97.9%
associate-*l*97.9%
Simplified97.9%
+-commutative97.9%
associate-+r-97.9%
associate-*r*97.9%
*-commutative97.9%
associate-*l*97.9%
associate-*l*99.4%
associate-*r*99.4%
Applied egg-rr99.4%
if -5.0000000000000001e-9 < (*.f64 y #s(literal 9 binary64)) Initial program 96.4%
sub-neg96.4%
sub-neg96.4%
associate-*l*93.6%
associate-*l*93.6%
Simplified93.6%
sub-neg93.6%
*-commutative93.6%
distribute-rgt-neg-in93.6%
*-commutative93.6%
distribute-lft-neg-in93.6%
metadata-eval93.6%
associate-*l*93.6%
associate-*r*93.6%
associate-*l*96.4%
Applied egg-rr96.4%
Final simplification97.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* 27.0 b))))
(if (<= (* y 9.0) -5e+84)
(+ t_1 (- (* x 2.0) (* (* y 9.0) (* t z))))
(+ (+ (* x 2.0) (* z (* (* t -9.0) y))) t_1))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (27.0 * b);
double tmp;
if ((y * 9.0) <= -5e+84) {
tmp = t_1 + ((x * 2.0) - ((y * 9.0) * (t * z)));
} else {
tmp = ((x * 2.0) + (z * ((t * -9.0) * y))) + t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * (27.0d0 * b)
if ((y * 9.0d0) <= (-5d+84)) then
tmp = t_1 + ((x * 2.0d0) - ((y * 9.0d0) * (t * z)))
else
tmp = ((x * 2.0d0) + (z * ((t * (-9.0d0)) * y))) + t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (27.0 * b);
double tmp;
if ((y * 9.0) <= -5e+84) {
tmp = t_1 + ((x * 2.0) - ((y * 9.0) * (t * z)));
} else {
tmp = ((x * 2.0) + (z * ((t * -9.0) * y))) + t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = a * (27.0 * b) tmp = 0 if (y * 9.0) <= -5e+84: tmp = t_1 + ((x * 2.0) - ((y * 9.0) * (t * z))) else: tmp = ((x * 2.0) + (z * ((t * -9.0) * y))) + t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(27.0 * b)) tmp = 0.0 if (Float64(y * 9.0) <= -5e+84) tmp = Float64(t_1 + Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(t * z)))); else tmp = Float64(Float64(Float64(x * 2.0) + Float64(z * Float64(Float64(t * -9.0) * y))) + t_1); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = a * (27.0 * b);
tmp = 0.0;
if ((y * 9.0) <= -5e+84)
tmp = t_1 + ((x * 2.0) - ((y * 9.0) * (t * z)));
else
tmp = ((x * 2.0) + (z * ((t * -9.0) * y))) + t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(y * 9.0), $MachinePrecision], -5e+84], N[(t$95$1 + N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] + N[(z * N[(N[(t * -9.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]
\begin{array}{l}
[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 -5 \cdot 10^{+84}:\\
\;\;\;\;t\_1 + \left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(t \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 + z \cdot \left(\left(t \cdot -9\right) \cdot y\right)\right) + t\_1\\
\end{array}
\end{array}
if (*.f64 y #s(literal 9 binary64)) < -5.0000000000000001e84Initial program 87.5%
sub-neg87.5%
sub-neg87.5%
associate-*l*97.3%
associate-*l*97.3%
Simplified97.3%
if -5.0000000000000001e84 < (*.f64 y #s(literal 9 binary64)) Initial program 96.7%
sub-neg96.7%
sub-neg96.7%
associate-*l*94.0%
associate-*l*94.0%
Simplified94.0%
sub-neg94.0%
*-commutative94.0%
distribute-rgt-neg-in94.0%
*-commutative94.0%
distribute-lft-neg-in94.0%
metadata-eval94.0%
associate-*l*94.0%
associate-*r*94.0%
associate-*l*96.6%
Applied egg-rr96.6%
Final simplification96.8%
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 -3.5e-225) (+ (* a (* 27.0 b)) (- (* x 2.0) (* (* y 9.0) (* t z)))) (- (+ (* 27.0 (* a b)) (* x 2.0)) (* t (* y (* z 9.0))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.5e-225) {
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (t * z)));
} else {
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (t * (y * (z * 9.0)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-3.5d-225)) then
tmp = (a * (27.0d0 * b)) + ((x * 2.0d0) - ((y * 9.0d0) * (t * z)))
else
tmp = ((27.0d0 * (a * b)) + (x * 2.0d0)) - (t * (y * (z * 9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.5e-225) {
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (t * z)));
} else {
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (t * (y * (z * 9.0)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -3.5e-225: tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (t * z))) else: tmp = ((27.0 * (a * b)) + (x * 2.0)) - (t * (y * (z * 9.0))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.5e-225) tmp = Float64(Float64(a * Float64(27.0 * b)) + Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(t * z)))); else tmp = Float64(Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)) - Float64(t * Float64(y * Float64(z * 9.0)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -3.5e-225)
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (t * z)));
else
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (t * (y * (z * 9.0)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.5e-225], N[(N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] - N[(t * N[(y * N[(z * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{-225}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right) + \left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(t \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(27 \cdot \left(a \cdot b\right) + x \cdot 2\right) - t \cdot \left(y \cdot \left(z \cdot 9\right)\right)\\
\end{array}
\end{array}
if z < -3.4999999999999997e-225Initial program 93.4%
sub-neg93.4%
sub-neg93.4%
associate-*l*91.3%
associate-*l*91.3%
Simplified91.3%
if -3.4999999999999997e-225 < z Initial program 96.2%
sub-neg96.2%
sub-neg96.2%
associate-*l*96.7%
associate-*l*96.7%
Simplified96.7%
+-commutative96.7%
associate-+r-96.7%
associate-*r*96.7%
*-commutative96.7%
associate-*l*96.6%
associate-*l*97.3%
associate-*r*97.2%
Applied egg-rr97.2%
Taylor expanded in y around 0 96.7%
associate-*r*96.6%
*-commutative96.6%
associate-*l*96.6%
*-commutative96.6%
associate-*r*96.7%
*-commutative96.7%
Simplified96.7%
Final simplification94.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z -5e-246) (+ (* a (* 27.0 b)) (- (* x 2.0) (* (* y 9.0) (* t z)))) (+ (- (* x 2.0) (* t (* z (* y 9.0)))) (* b (* a 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5e-246) {
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (t * z)));
} else {
tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 <= (-5d-246)) then
tmp = (a * (27.0d0 * b)) + ((x * 2.0d0) - ((y * 9.0d0) * (t * z)))
else
tmp = ((x * 2.0d0) - (t * (z * (y * 9.0d0)))) + (b * (a * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5e-246) {
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (t * z)));
} else {
tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
}
return tmp;
}
[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 <= -5e-246: tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (t * z))) else: tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0)) return tmp
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 <= -5e-246) tmp = Float64(Float64(a * Float64(27.0 * b)) + Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(t * z)))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(t * Float64(z * Float64(y * 9.0)))) + Float64(b * Float64(a * 27.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -5e-246)
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (t * z)));
else
tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5e-246], N[(N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(z * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-246}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right) + \left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(t \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - t \cdot \left(z \cdot \left(y \cdot 9\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if z < -4.9999999999999997e-246Initial program 93.7%
sub-neg93.7%
sub-neg93.7%
associate-*l*91.8%
associate-*l*91.8%
Simplified91.8%
if -4.9999999999999997e-246 < z Initial program 96.0%
Final simplification94.3%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.35e-138)
(* y (- (* 2.0 (/ x y)) (* 9.0 (* t z))))
(if (<= t 2.2e+72)
(+ (* 27.0 (* a b)) (* x 2.0))
(- (* x 2.0) (* 9.0 (* t (* z y)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.35e-138) {
tmp = y * ((2.0 * (x / y)) - (9.0 * (t * z)));
} else if (t <= 2.2e+72) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.35d-138)) then
tmp = y * ((2.0d0 * (x / y)) - (9.0d0 * (t * z)))
else if (t <= 2.2d+72) then
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
else
tmp = (x * 2.0d0) - (9.0d0 * (t * (z * y)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.35e-138) {
tmp = y * ((2.0 * (x / y)) - (9.0 * (t * z)));
} else if (t <= 2.2e+72) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if t <= -1.35e-138: tmp = y * ((2.0 * (x / y)) - (9.0 * (t * z))) elif t <= 2.2e+72: tmp = (27.0 * (a * b)) + (x * 2.0) else: tmp = (x * 2.0) - (9.0 * (t * (z * y))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.35e-138) tmp = Float64(y * Float64(Float64(2.0 * Float64(x / y)) - Float64(9.0 * Float64(t * z)))); elseif (t <= 2.2e+72) 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(z * y)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (t <= -1.35e-138)
tmp = y * ((2.0 * (x / y)) - (9.0 * (t * z)));
elseif (t <= 2.2e+72)
tmp = (27.0 * (a * b)) + (x * 2.0);
else
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.35e-138], N[(y * N[(N[(2.0 * N[(x / y), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e+72], 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[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{-138}:\\
\;\;\;\;y \cdot \left(2 \cdot \frac{x}{y} - 9 \cdot \left(t \cdot z\right)\right)\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{+72}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if t < -1.35000000000000014e-138Initial program 96.9%
sub-neg96.9%
sub-neg96.9%
associate-*l*92.6%
associate-*l*92.7%
Simplified92.7%
Taylor expanded in a around 0 70.0%
Taylor expanded in y around inf 64.6%
if -1.35000000000000014e-138 < t < 2.2e72Initial program 93.8%
sub-neg93.8%
sub-neg93.8%
associate-*l*99.7%
associate-*l*99.6%
Simplified99.6%
Taylor expanded in y around 0 80.4%
if 2.2e72 < t Initial program 94.7%
sub-neg94.7%
sub-neg94.7%
associate-*l*83.1%
associate-*l*83.0%
Simplified83.0%
Taylor expanded in a around 0 88.8%
Final simplification76.0%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.35e-138)
(* (* t z) (* -9.0 y))
(if (<= t 1.08e+72)
(+ (* 27.0 (* a b)) (* x 2.0))
(- (* x 2.0) (* 9.0 (* t (* z y)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.35e-138) {
tmp = (t * z) * (-9.0 * y);
} else if (t <= 1.08e+72) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.35d-138)) then
tmp = (t * z) * ((-9.0d0) * y)
else if (t <= 1.08d+72) then
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
else
tmp = (x * 2.0d0) - (9.0d0 * (t * (z * y)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.35e-138) {
tmp = (t * z) * (-9.0 * y);
} else if (t <= 1.08e+72) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if t <= -1.35e-138: tmp = (t * z) * (-9.0 * y) elif t <= 1.08e+72: tmp = (27.0 * (a * b)) + (x * 2.0) else: tmp = (x * 2.0) - (9.0 * (t * (z * y))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.35e-138) tmp = Float64(Float64(t * z) * Float64(-9.0 * y)); elseif (t <= 1.08e+72) 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(z * y)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (t <= -1.35e-138)
tmp = (t * z) * (-9.0 * y);
elseif (t <= 1.08e+72)
tmp = (27.0 * (a * b)) + (x * 2.0);
else
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.35e-138], N[(N[(t * z), $MachinePrecision] * N[(-9.0 * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.08e+72], 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[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{-138}:\\
\;\;\;\;\left(t \cdot z\right) \cdot \left(-9 \cdot y\right)\\
\mathbf{elif}\;t \leq 1.08 \cdot 10^{+72}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if t < -1.35000000000000014e-138Initial program 96.9%
sub-neg96.9%
sub-neg96.9%
associate-*l*92.6%
associate-*l*92.7%
Simplified92.7%
+-commutative92.7%
associate-+r-92.7%
associate-*r*92.6%
*-commutative92.6%
associate-*l*92.6%
associate-*l*92.6%
associate-*r*92.6%
Applied egg-rr92.6%
Taylor expanded in y around 0 96.9%
associate-*r*96.8%
*-commutative96.8%
associate-*l*96.8%
*-commutative96.8%
associate-*r*96.9%
*-commutative96.9%
Simplified96.9%
Taylor expanded in t around inf 41.7%
associate-*r*41.6%
associate-*r*41.6%
metadata-eval41.6%
distribute-lft-neg-in41.6%
distribute-lft-neg-in41.6%
*-commutative41.6%
associate-*r*41.7%
associate-*l*41.7%
distribute-rgt-neg-in41.7%
distribute-rgt-neg-in41.7%
distribute-lft-neg-in41.7%
metadata-eval41.7%
*-commutative41.7%
Simplified41.7%
pow141.7%
Applied egg-rr41.7%
unpow141.7%
associate-*r*41.7%
*-commutative41.7%
associate-*r*41.7%
associate-*r*38.5%
*-commutative38.5%
Simplified38.5%
if -1.35000000000000014e-138 < t < 1.07999999999999999e72Initial program 93.8%
sub-neg93.8%
sub-neg93.8%
associate-*l*99.7%
associate-*l*99.6%
Simplified99.6%
Taylor expanded in y around 0 80.4%
if 1.07999999999999999e72 < t Initial program 94.7%
sub-neg94.7%
sub-neg94.7%
associate-*l*83.1%
associate-*l*83.0%
Simplified83.0%
Taylor expanded in a around 0 88.8%
Final simplification66.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.35e-138)
(* (* t z) (* -9.0 y))
(if (<= t 8.5e+137)
(+ (* 27.0 (* a b)) (* x 2.0))
(+ (* x 2.0) (* z (* (* t -9.0) y))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.35e-138) {
tmp = (t * z) * (-9.0 * y);
} else if (t <= 8.5e+137) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) + (z * ((t * -9.0) * y));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.35d-138)) then
tmp = (t * z) * ((-9.0d0) * y)
else if (t <= 8.5d+137) then
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
else
tmp = (x * 2.0d0) + (z * ((t * (-9.0d0)) * y))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.35e-138) {
tmp = (t * z) * (-9.0 * y);
} else if (t <= 8.5e+137) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) + (z * ((t * -9.0) * y));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if t <= -1.35e-138: tmp = (t * z) * (-9.0 * y) elif t <= 8.5e+137: tmp = (27.0 * (a * b)) + (x * 2.0) else: tmp = (x * 2.0) + (z * ((t * -9.0) * y)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.35e-138) tmp = Float64(Float64(t * z) * Float64(-9.0 * y)); elseif (t <= 8.5e+137) tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)); else tmp = Float64(Float64(x * 2.0) + Float64(z * Float64(Float64(t * -9.0) * y))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (t <= -1.35e-138)
tmp = (t * z) * (-9.0 * y);
elseif (t <= 8.5e+137)
tmp = (27.0 * (a * b)) + (x * 2.0);
else
tmp = (x * 2.0) + (z * ((t * -9.0) * y));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.35e-138], N[(N[(t * z), $MachinePrecision] * N[(-9.0 * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.5e+137], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + N[(z * N[(N[(t * -9.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{-138}:\\
\;\;\;\;\left(t \cdot z\right) \cdot \left(-9 \cdot y\right)\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{+137}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + z \cdot \left(\left(t \cdot -9\right) \cdot y\right)\\
\end{array}
\end{array}
if t < -1.35000000000000014e-138Initial program 96.9%
sub-neg96.9%
sub-neg96.9%
associate-*l*92.6%
associate-*l*92.7%
Simplified92.7%
+-commutative92.7%
associate-+r-92.7%
associate-*r*92.6%
*-commutative92.6%
associate-*l*92.6%
associate-*l*92.6%
associate-*r*92.6%
Applied egg-rr92.6%
Taylor expanded in y around 0 96.9%
associate-*r*96.8%
*-commutative96.8%
associate-*l*96.8%
*-commutative96.8%
associate-*r*96.9%
*-commutative96.9%
Simplified96.9%
Taylor expanded in t around inf 41.7%
associate-*r*41.6%
associate-*r*41.6%
metadata-eval41.6%
distribute-lft-neg-in41.6%
distribute-lft-neg-in41.6%
*-commutative41.6%
associate-*r*41.7%
associate-*l*41.7%
distribute-rgt-neg-in41.7%
distribute-rgt-neg-in41.7%
distribute-lft-neg-in41.7%
metadata-eval41.7%
*-commutative41.7%
Simplified41.7%
pow141.7%
Applied egg-rr41.7%
unpow141.7%
associate-*r*41.7%
*-commutative41.7%
associate-*r*41.7%
associate-*r*38.5%
*-commutative38.5%
Simplified38.5%
if -1.35000000000000014e-138 < t < 8.50000000000000028e137Initial program 93.6%
sub-neg93.6%
sub-neg93.6%
associate-*l*98.3%
associate-*l*98.2%
Simplified98.2%
Taylor expanded in y around 0 77.1%
if 8.50000000000000028e137 < t Initial program 96.0%
sub-neg96.0%
sub-neg96.0%
associate-*l*82.7%
associate-*l*82.6%
Simplified82.6%
Taylor expanded in a around 0 86.8%
cancel-sign-sub-inv86.8%
*-commutative86.8%
metadata-eval86.8%
+-commutative86.8%
associate-*r*86.6%
associate-*r*75.0%
*-commutative75.0%
Applied egg-rr75.0%
Final simplification63.0%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.35e-138)
(* (* t z) (* -9.0 y))
(if (<= t 1.75e+138)
(+ (* 27.0 (* a b)) (* x 2.0))
(+ (* x 2.0) (* z (* -9.0 (* t y)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.35e-138) {
tmp = (t * z) * (-9.0 * y);
} else if (t <= 1.75e+138) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) + (z * (-9.0 * (t * y)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.35d-138)) then
tmp = (t * z) * ((-9.0d0) * y)
else if (t <= 1.75d+138) then
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
else
tmp = (x * 2.0d0) + (z * ((-9.0d0) * (t * y)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.35e-138) {
tmp = (t * z) * (-9.0 * y);
} else if (t <= 1.75e+138) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) + (z * (-9.0 * (t * y)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if t <= -1.35e-138: tmp = (t * z) * (-9.0 * y) elif t <= 1.75e+138: tmp = (27.0 * (a * b)) + (x * 2.0) else: tmp = (x * 2.0) + (z * (-9.0 * (t * y))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.35e-138) tmp = Float64(Float64(t * z) * Float64(-9.0 * y)); elseif (t <= 1.75e+138) tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)); else tmp = Float64(Float64(x * 2.0) + Float64(z * Float64(-9.0 * Float64(t * y)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (t <= -1.35e-138)
tmp = (t * z) * (-9.0 * y);
elseif (t <= 1.75e+138)
tmp = (27.0 * (a * b)) + (x * 2.0);
else
tmp = (x * 2.0) + (z * (-9.0 * (t * y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.35e-138], N[(N[(t * z), $MachinePrecision] * N[(-9.0 * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.75e+138], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + N[(z * N[(-9.0 * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{-138}:\\
\;\;\;\;\left(t \cdot z\right) \cdot \left(-9 \cdot y\right)\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{+138}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + z \cdot \left(-9 \cdot \left(t \cdot y\right)\right)\\
\end{array}
\end{array}
if t < -1.35000000000000014e-138Initial program 96.9%
sub-neg96.9%
sub-neg96.9%
associate-*l*92.6%
associate-*l*92.7%
Simplified92.7%
+-commutative92.7%
associate-+r-92.7%
associate-*r*92.6%
*-commutative92.6%
associate-*l*92.6%
associate-*l*92.6%
associate-*r*92.6%
Applied egg-rr92.6%
Taylor expanded in y around 0 96.9%
associate-*r*96.8%
*-commutative96.8%
associate-*l*96.8%
*-commutative96.8%
associate-*r*96.9%
*-commutative96.9%
Simplified96.9%
Taylor expanded in t around inf 41.7%
associate-*r*41.6%
associate-*r*41.6%
metadata-eval41.6%
distribute-lft-neg-in41.6%
distribute-lft-neg-in41.6%
*-commutative41.6%
associate-*r*41.7%
associate-*l*41.7%
distribute-rgt-neg-in41.7%
distribute-rgt-neg-in41.7%
distribute-lft-neg-in41.7%
metadata-eval41.7%
*-commutative41.7%
Simplified41.7%
pow141.7%
Applied egg-rr41.7%
unpow141.7%
associate-*r*41.7%
*-commutative41.7%
associate-*r*41.7%
associate-*r*38.5%
*-commutative38.5%
Simplified38.5%
if -1.35000000000000014e-138 < t < 1.7499999999999999e138Initial program 93.6%
sub-neg93.6%
sub-neg93.6%
associate-*l*98.3%
associate-*l*98.2%
Simplified98.2%
Taylor expanded in y around 0 77.1%
if 1.7499999999999999e138 < t Initial program 96.0%
sub-neg96.0%
sub-neg96.0%
associate-*l*82.7%
associate-*l*82.6%
Simplified82.6%
Taylor expanded in a around 0 86.8%
cancel-sign-sub-inv86.8%
*-commutative86.8%
metadata-eval86.8%
+-commutative86.8%
associate-*r*86.6%
associate-*r*75.0%
*-commutative75.0%
Applied egg-rr75.0%
Taylor expanded in t around 0 75.0%
Final simplification63.0%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= t -1.35e-138) (* (* t z) (* -9.0 y)) (if (<= t 9e+161) (+ (* 27.0 (* a b)) (* x 2.0)) (* t (* -9.0 (* z y))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.35e-138) {
tmp = (t * z) * (-9.0 * y);
} else if (t <= 9e+161) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = t * (-9.0 * (z * y));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.35d-138)) then
tmp = (t * z) * ((-9.0d0) * y)
else if (t <= 9d+161) then
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
else
tmp = t * ((-9.0d0) * (z * y))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.35e-138) {
tmp = (t * z) * (-9.0 * y);
} else if (t <= 9e+161) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = t * (-9.0 * (z * y));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if t <= -1.35e-138: tmp = (t * z) * (-9.0 * y) elif t <= 9e+161: tmp = (27.0 * (a * b)) + (x * 2.0) else: tmp = t * (-9.0 * (z * y)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.35e-138) tmp = Float64(Float64(t * z) * Float64(-9.0 * y)); elseif (t <= 9e+161) tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)); else tmp = Float64(t * Float64(-9.0 * Float64(z * y))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (t <= -1.35e-138)
tmp = (t * z) * (-9.0 * y);
elseif (t <= 9e+161)
tmp = (27.0 * (a * b)) + (x * 2.0);
else
tmp = t * (-9.0 * (z * y));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.35e-138], N[(N[(t * z), $MachinePrecision] * N[(-9.0 * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9e+161], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(-9.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{-138}:\\
\;\;\;\;\left(t \cdot z\right) \cdot \left(-9 \cdot y\right)\\
\mathbf{elif}\;t \leq 9 \cdot 10^{+161}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-9 \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if t < -1.35000000000000014e-138Initial program 96.9%
sub-neg96.9%
sub-neg96.9%
associate-*l*92.6%
associate-*l*92.7%
Simplified92.7%
+-commutative92.7%
associate-+r-92.7%
associate-*r*92.6%
*-commutative92.6%
associate-*l*92.6%
associate-*l*92.6%
associate-*r*92.6%
Applied egg-rr92.6%
Taylor expanded in y around 0 96.9%
associate-*r*96.8%
*-commutative96.8%
associate-*l*96.8%
*-commutative96.8%
associate-*r*96.9%
*-commutative96.9%
Simplified96.9%
Taylor expanded in t around inf 41.7%
associate-*r*41.6%
associate-*r*41.6%
metadata-eval41.6%
distribute-lft-neg-in41.6%
distribute-lft-neg-in41.6%
*-commutative41.6%
associate-*r*41.7%
associate-*l*41.7%
distribute-rgt-neg-in41.7%
distribute-rgt-neg-in41.7%
distribute-lft-neg-in41.7%
metadata-eval41.7%
*-commutative41.7%
Simplified41.7%
pow141.7%
Applied egg-rr41.7%
unpow141.7%
associate-*r*41.7%
*-commutative41.7%
associate-*r*41.7%
associate-*r*38.5%
*-commutative38.5%
Simplified38.5%
if -1.35000000000000014e-138 < t < 8.99999999999999984e161Initial program 93.8%
sub-neg93.8%
sub-neg93.8%
associate-*l*97.1%
associate-*l*97.0%
Simplified97.0%
Taylor expanded in y around 0 75.2%
if 8.99999999999999984e161 < t Initial program 95.4%
sub-neg95.4%
sub-neg95.4%
associate-*l*87.1%
associate-*l*87.0%
Simplified87.0%
Taylor expanded in a around 0 88.3%
Taylor expanded in t around inf 88.2%
Taylor expanded in x around 0 79.4%
Final simplification62.4%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (+ (+ (* x 2.0) (* z (* (* t -9.0) y))) (* a (* 27.0 b))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) + (z * ((t * -9.0) * y))) + (a * (27.0 * b));
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * 2.0d0) + (z * ((t * (-9.0d0)) * y))) + (a * (27.0d0 * b))
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) + (z * ((t * -9.0) * y))) + (a * (27.0 * b));
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): return ((x * 2.0) + (z * ((t * -9.0) * y))) + (a * (27.0 * b))
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) + Float64(z * Float64(Float64(t * -9.0) * y))) + Float64(a * Float64(27.0 * b))) end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
tmp = ((x * 2.0) + (z * ((t * -9.0) * y))) + (a * (27.0 * b));
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] + N[(z * N[(N[(t * -9.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\left(x \cdot 2 + z \cdot \left(\left(t \cdot -9\right) \cdot y\right)\right) + a \cdot \left(27 \cdot b\right)
\end{array}
Initial program 95.1%
sub-neg95.1%
sub-neg95.1%
associate-*l*94.6%
associate-*l*94.6%
Simplified94.6%
sub-neg94.6%
*-commutative94.6%
distribute-rgt-neg-in94.6%
*-commutative94.6%
distribute-lft-neg-in94.6%
metadata-eval94.6%
associate-*l*95.0%
associate-*r*94.9%
associate-*l*94.6%
Applied egg-rr94.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.05e-49) (not (<= b 2700000000.0))) (* a (* 27.0 b)) (* x 2.0)))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.05e-49) || !(b <= 2700000000.0)) {
tmp = a * (27.0 * 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.
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.05d-49)) .or. (.not. (b <= 2700000000.0d0))) then
tmp = a * (27.0d0 * b)
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.05e-49) || !(b <= 2700000000.0)) {
tmp = a * (27.0 * b);
} else {
tmp = x * 2.0;
}
return tmp;
}
[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.05e-49) or not (b <= 2700000000.0): tmp = a * (27.0 * b) else: tmp = x * 2.0 return tmp
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.05e-49) || !(b <= 2700000000.0)) tmp = Float64(a * Float64(27.0 * 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])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((b <= -1.05e-49) || ~((b <= 2700000000.0)))
tmp = a * (27.0 * 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. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.05e-49], N[Not[LessEqual[b, 2700000000.0]], $MachinePrecision]], N[(a * N[(27.0 * 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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.05 \cdot 10^{-49} \lor \neg \left(b \leq 2700000000\right):\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if b < -1.0499999999999999e-49 or 2.7e9 < b Initial program 94.8%
sub-neg94.8%
sub-neg94.8%
associate-*l*94.6%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in a around inf 46.7%
associate-*r*46.8%
*-commutative46.8%
associate-*r*46.8%
Simplified46.8%
if -1.0499999999999999e-49 < b < 2.7e9Initial program 95.3%
sub-neg95.3%
sub-neg95.3%
associate-*l*94.6%
associate-*l*94.6%
Simplified94.6%
Taylor expanded in x around inf 46.1%
Final simplification46.4%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.15e-49) (not (<= b 1500000000000.0))) (* 27.0 (* a b)) (* x 2.0)))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.15e-49) || !(b <= 1500000000000.0)) {
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.
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.15d-49)) .or. (.not. (b <= 1500000000000.0d0))) 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;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.15e-49) || !(b <= 1500000000000.0)) {
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]) def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.15e-49) or not (b <= 1500000000000.0): 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]) function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.15e-49) || !(b <= 1500000000000.0)) 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])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((b <= -1.15e-49) || ~((b <= 1500000000000.0)))
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. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.15e-49], N[Not[LessEqual[b, 1500000000000.0]], $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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.15 \cdot 10^{-49} \lor \neg \left(b \leq 1500000000000\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if b < -1.15e-49 or 1.5e12 < b Initial program 94.8%
sub-neg94.8%
sub-neg94.8%
associate-*l*94.6%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in a around inf 46.7%
if -1.15e-49 < b < 1.5e12Initial program 95.3%
sub-neg95.3%
sub-neg95.3%
associate-*l*94.6%
associate-*l*94.6%
Simplified94.6%
Taylor expanded in x around inf 46.1%
Final simplification46.4%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= b -7e-50) (* a (* 27.0 b)) (if (<= b 7e+15) (* x 2.0) (* b (* a 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7e-50) {
tmp = a * (27.0 * b);
} else if (b <= 7e+15) {
tmp = x * 2.0;
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 <= (-7d-50)) then
tmp = a * (27.0d0 * b)
else if (b <= 7d+15) then
tmp = x * 2.0d0
else
tmp = b * (a * 27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7e-50) {
tmp = a * (27.0 * b);
} else if (b <= 7e+15) {
tmp = x * 2.0;
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if b <= -7e-50: tmp = a * (27.0 * b) elif b <= 7e+15: tmp = x * 2.0 else: tmp = b * (a * 27.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -7e-50) tmp = Float64(a * Float64(27.0 * b)); elseif (b <= 7e+15) tmp = Float64(x * 2.0); else tmp = Float64(b * Float64(a * 27.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (b <= -7e-50)
tmp = a * (27.0 * b);
elseif (b <= 7e+15)
tmp = x * 2.0;
else
tmp = b * (a * 27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -7e-50], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7e+15], N[(x * 2.0), $MachinePrecision], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7 \cdot 10^{-50}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;b \leq 7 \cdot 10^{+15}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if b < -6.99999999999999993e-50Initial program 95.5%
sub-neg95.5%
sub-neg95.5%
associate-*l*95.2%
associate-*l*95.2%
Simplified95.2%
Taylor expanded in a around inf 47.8%
associate-*r*47.9%
*-commutative47.9%
associate-*r*47.9%
Simplified47.9%
if -6.99999999999999993e-50 < b < 7e15Initial program 95.3%
sub-neg95.3%
sub-neg95.3%
associate-*l*94.6%
associate-*l*94.6%
Simplified94.6%
Taylor expanded in x around inf 46.1%
if 7e15 < b Initial program 94.1%
sub-neg94.1%
sub-neg94.1%
associate-*l*93.9%
associate-*l*93.9%
Simplified93.9%
Taylor expanded in a around inf 45.7%
associate-*r*45.7%
Simplified45.7%
Final simplification46.4%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (* x 2.0))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * 2.0d0
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): return x * 2.0
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(x * 2.0) end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
tmp = x * 2.0;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := N[(x * 2.0), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
x \cdot 2
\end{array}
Initial program 95.1%
sub-neg95.1%
sub-neg95.1%
associate-*l*94.6%
associate-*l*94.6%
Simplified94.6%
Taylor expanded in x around inf 32.8%
Final simplification32.8%
(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 2024100
(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)))