
(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 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z 6.8e+106) (fma a (* 27.0 b) (fma x 2.0 (* y (* z (* t -9.0))))) (* 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);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 6.8e+106) {
tmp = fma(a, (27.0 * b), fma(x, 2.0, (y * (z * (t * -9.0)))));
} 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]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 6.8e+106) tmp = fma(a, Float64(27.0 * b), fma(x, 2.0, Float64(y * Float64(z * Float64(t * -9.0))))); 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
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 6.8e+106], N[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 6.8 \cdot 10^{+106}:\\
\;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;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 z < 6.79999999999999989e106Initial program 97.2%
+-commutative97.2%
associate-+r-97.2%
*-commutative97.2%
cancel-sign-sub-inv97.2%
associate-*r*93.2%
distribute-lft-neg-in93.2%
*-commutative93.2%
cancel-sign-sub-inv93.2%
associate-+r-93.2%
associate-*l*93.2%
fma-define93.7%
fma-neg93.7%
associate-*l*98.1%
distribute-rgt-neg-in98.1%
*-commutative98.1%
associate-*l*98.1%
*-commutative98.1%
distribute-lft-neg-in98.1%
associate-*r*98.1%
Simplified98.1%
if 6.79999999999999989e106 < z Initial program 87.8%
sub-neg87.8%
sub-neg87.8%
associate-*l*90.2%
associate-*l*90.2%
Simplified90.2%
Taylor expanded in t around inf 74.0%
Final simplification94.3%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* 9.0 (* y (* z t)))) (t_2 (* 27.0 (* a b))) (t_3 (- t_2 t_1)))
(if (<= y -3.3e+165)
t_3
(if (<= y -1.15e+132)
(- (* x 2.0) t_1)
(if (<= y -4.1e+85)
t_3
(if (<= y -4.2e+66)
(- (* x 2.0) (* 9.0 (* t (* z y))))
(+ t_2 (* 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 t_1 = 9.0 * (y * (z * t));
double t_2 = 27.0 * (a * b);
double t_3 = t_2 - t_1;
double tmp;
if (y <= -3.3e+165) {
tmp = t_3;
} else if (y <= -1.15e+132) {
tmp = (x * 2.0) - t_1;
} else if (y <= -4.1e+85) {
tmp = t_3;
} else if (y <= -4.2e+66) {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
} else {
tmp = t_2 + (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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 9.0d0 * (y * (z * t))
t_2 = 27.0d0 * (a * b)
t_3 = t_2 - t_1
if (y <= (-3.3d+165)) then
tmp = t_3
else if (y <= (-1.15d+132)) then
tmp = (x * 2.0d0) - t_1
else if (y <= (-4.1d+85)) then
tmp = t_3
else if (y <= (-4.2d+66)) then
tmp = (x * 2.0d0) - (9.0d0 * (t * (z * y)))
else
tmp = t_2 + (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 t_1 = 9.0 * (y * (z * t));
double t_2 = 27.0 * (a * b);
double t_3 = t_2 - t_1;
double tmp;
if (y <= -3.3e+165) {
tmp = t_3;
} else if (y <= -1.15e+132) {
tmp = (x * 2.0) - t_1;
} else if (y <= -4.1e+85) {
tmp = t_3;
} else if (y <= -4.2e+66) {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
} else {
tmp = t_2 + (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): t_1 = 9.0 * (y * (z * t)) t_2 = 27.0 * (a * b) t_3 = t_2 - t_1 tmp = 0 if y <= -3.3e+165: tmp = t_3 elif y <= -1.15e+132: tmp = (x * 2.0) - t_1 elif y <= -4.1e+85: tmp = t_3 elif y <= -4.2e+66: tmp = (x * 2.0) - (9.0 * (t * (z * y))) else: tmp = t_2 + (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) t_1 = Float64(9.0 * Float64(y * Float64(z * t))) t_2 = Float64(27.0 * Float64(a * b)) t_3 = Float64(t_2 - t_1) tmp = 0.0 if (y <= -3.3e+165) tmp = t_3; elseif (y <= -1.15e+132) tmp = Float64(Float64(x * 2.0) - t_1); elseif (y <= -4.1e+85) tmp = t_3; elseif (y <= -4.2e+66) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(z * y)))); else tmp = Float64(t_2 + 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)
t_1 = 9.0 * (y * (z * t));
t_2 = 27.0 * (a * b);
t_3 = t_2 - t_1;
tmp = 0.0;
if (y <= -3.3e+165)
tmp = t_3;
elseif (y <= -1.15e+132)
tmp = (x * 2.0) - t_1;
elseif (y <= -4.1e+85)
tmp = t_3;
elseif (y <= -4.2e+66)
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
else
tmp = t_2 + (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_] := Block[{t$95$1 = N[(9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 - t$95$1), $MachinePrecision]}, If[LessEqual[y, -3.3e+165], t$95$3, If[LessEqual[y, -1.15e+132], N[(N[(x * 2.0), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[y, -4.1e+85], t$95$3, If[LessEqual[y, -4.2e+66], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
t_2 := 27 \cdot \left(a \cdot b\right)\\
t_3 := t\_2 - t\_1\\
\mathbf{if}\;y \leq -3.3 \cdot 10^{+165}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -1.15 \cdot 10^{+132}:\\
\;\;\;\;x \cdot 2 - t\_1\\
\mathbf{elif}\;y \leq -4.1 \cdot 10^{+85}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{+66}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 + x \cdot 2\\
\end{array}
\end{array}
if y < -3.2999999999999999e165 or -1.1500000000000001e132 < y < -4.09999999999999978e85Initial program 87.2%
sub-neg87.2%
sub-neg87.2%
associate-*l*99.9%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in x around 0 79.4%
pow179.4%
*-commutative79.4%
associate-*l*89.8%
Applied egg-rr89.8%
unpow189.8%
*-commutative89.8%
Simplified89.8%
if -3.2999999999999999e165 < y < -1.1500000000000001e132Initial program 100.0%
sub-neg100.0%
sub-neg100.0%
associate-*l*99.7%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in a around 0 85.1%
pow155.8%
*-commutative55.8%
associate-*l*55.8%
Applied egg-rr85.1%
unpow155.8%
*-commutative55.8%
Simplified85.1%
if -4.09999999999999978e85 < y < -4.20000000000000011e66Initial program 99.6%
sub-neg99.6%
sub-neg99.6%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in a around 0 99.2%
if -4.20000000000000011e66 < y Initial program 96.9%
sub-neg96.9%
sub-neg96.9%
associate-*l*95.6%
associate-*l*95.6%
Simplified95.6%
Taylor expanded in y around 0 76.0%
Final simplification78.7%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (* x 2.0) (* 9.0 (* y (* z t)))))
(t_2 (+ (* 27.0 (* a b)) (* x 2.0))))
(if (<= a -5.6e+102)
t_2
(if (<= a -2e-10)
t_1
(if (<= a -7.8e-69)
t_2
(if (<= a 1.5e-64) t_1 (* b (+ (* 2.0 (/ x b)) (* a 27.0)))))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * 2.0) - (9.0 * (y * (z * t)));
double t_2 = (27.0 * (a * b)) + (x * 2.0);
double tmp;
if (a <= -5.6e+102) {
tmp = t_2;
} else if (a <= -2e-10) {
tmp = t_1;
} else if (a <= -7.8e-69) {
tmp = t_2;
} else if (a <= 1.5e-64) {
tmp = t_1;
} else {
tmp = b * ((2.0 * (x / b)) + (a * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x * 2.0d0) - (9.0d0 * (y * (z * t)))
t_2 = (27.0d0 * (a * b)) + (x * 2.0d0)
if (a <= (-5.6d+102)) then
tmp = t_2
else if (a <= (-2d-10)) then
tmp = t_1
else if (a <= (-7.8d-69)) then
tmp = t_2
else if (a <= 1.5d-64) then
tmp = t_1
else
tmp = b * ((2.0d0 * (x / b)) + (a * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * 2.0) - (9.0 * (y * (z * t)));
double t_2 = (27.0 * (a * b)) + (x * 2.0);
double tmp;
if (a <= -5.6e+102) {
tmp = t_2;
} else if (a <= -2e-10) {
tmp = t_1;
} else if (a <= -7.8e-69) {
tmp = t_2;
} else if (a <= 1.5e-64) {
tmp = t_1;
} else {
tmp = b * ((2.0 * (x / b)) + (a * 27.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = (x * 2.0) - (9.0 * (y * (z * t))) t_2 = (27.0 * (a * b)) + (x * 2.0) tmp = 0 if a <= -5.6e+102: tmp = t_2 elif a <= -2e-10: tmp = t_1 elif a <= -7.8e-69: tmp = t_2 elif a <= 1.5e-64: tmp = t_1 else: tmp = b * ((2.0 * (x / b)) + (a * 27.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(y * Float64(z * t)))) t_2 = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)) tmp = 0.0 if (a <= -5.6e+102) tmp = t_2; elseif (a <= -2e-10) tmp = t_1; elseif (a <= -7.8e-69) tmp = t_2; elseif (a <= 1.5e-64) tmp = t_1; else tmp = Float64(b * Float64(Float64(2.0 * Float64(x / b)) + Float64(a * 27.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (x * 2.0) - (9.0 * (y * (z * t)));
t_2 = (27.0 * (a * b)) + (x * 2.0);
tmp = 0.0;
if (a <= -5.6e+102)
tmp = t_2;
elseif (a <= -2e-10)
tmp = t_1;
elseif (a <= -7.8e-69)
tmp = t_2;
elseif (a <= 1.5e-64)
tmp = t_1;
else
tmp = b * ((2.0 * (x / b)) + (a * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.6e+102], t$95$2, If[LessEqual[a, -2e-10], t$95$1, If[LessEqual[a, -7.8e-69], t$95$2, If[LessEqual[a, 1.5e-64], t$95$1, N[(b * N[(N[(2.0 * N[(x / b), $MachinePrecision]), $MachinePrecision] + 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}
t_1 := x \cdot 2 - 9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
t_2 := 27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{if}\;a \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -2 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -7.8 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(2 \cdot \frac{x}{b} + a \cdot 27\right)\\
\end{array}
\end{array}
if a < -5.60000000000000037e102 or -2.00000000000000007e-10 < a < -7.79999999999999961e-69Initial program 94.4%
sub-neg94.4%
sub-neg94.4%
associate-*l*94.8%
associate-*l*94.8%
Simplified94.8%
Taylor expanded in y around 0 83.4%
if -5.60000000000000037e102 < a < -2.00000000000000007e-10 or -7.79999999999999961e-69 < a < 1.5e-64Initial program 96.3%
sub-neg96.3%
sub-neg96.3%
associate-*l*96.9%
associate-*l*96.9%
Simplified96.9%
Taylor expanded in a around 0 82.6%
pow152.9%
*-commutative52.9%
associate-*l*52.4%
Applied egg-rr83.2%
unpow152.4%
*-commutative52.4%
Simplified83.2%
if 1.5e-64 < a Initial program 95.7%
sub-neg95.7%
sub-neg95.7%
associate-*l*97.0%
associate-*l*97.0%
Simplified97.0%
Taylor expanded in y around 0 80.8%
Taylor expanded in b around inf 71.6%
Final simplification80.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 (* y (* -9.0 (* z t)))))
(if (<= a -5.5e+102)
(* 27.0 (* a b))
(if (<= a -190000000000.0)
t_1
(if (<= a -1.12e-177)
(* x 2.0)
(if (<= a 9.5e-302)
t_1
(if (<= a 4e-115) (* x 2.0) (* b (* a 27.0)))))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (-9.0 * (z * t));
double tmp;
if (a <= -5.5e+102) {
tmp = 27.0 * (a * b);
} else if (a <= -190000000000.0) {
tmp = t_1;
} else if (a <= -1.12e-177) {
tmp = x * 2.0;
} else if (a <= 9.5e-302) {
tmp = t_1;
} else if (a <= 4e-115) {
tmp = x * 2.0;
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y * ((-9.0d0) * (z * t))
if (a <= (-5.5d+102)) then
tmp = 27.0d0 * (a * b)
else if (a <= (-190000000000.0d0)) then
tmp = t_1
else if (a <= (-1.12d-177)) then
tmp = x * 2.0d0
else if (a <= 9.5d-302) then
tmp = t_1
else if (a <= 4d-115) then
tmp = x * 2.0d0
else
tmp = b * (a * 27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (-9.0 * (z * t));
double tmp;
if (a <= -5.5e+102) {
tmp = 27.0 * (a * b);
} else if (a <= -190000000000.0) {
tmp = t_1;
} else if (a <= -1.12e-177) {
tmp = x * 2.0;
} else if (a <= 9.5e-302) {
tmp = t_1;
} else if (a <= 4e-115) {
tmp = x * 2.0;
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = y * (-9.0 * (z * t)) tmp = 0 if a <= -5.5e+102: tmp = 27.0 * (a * b) elif a <= -190000000000.0: tmp = t_1 elif a <= -1.12e-177: tmp = x * 2.0 elif a <= 9.5e-302: tmp = t_1 elif a <= 4e-115: tmp = x * 2.0 else: tmp = b * (a * 27.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(-9.0 * Float64(z * t))) tmp = 0.0 if (a <= -5.5e+102) tmp = Float64(27.0 * Float64(a * b)); elseif (a <= -190000000000.0) tmp = t_1; elseif (a <= -1.12e-177) tmp = Float64(x * 2.0); elseif (a <= 9.5e-302) tmp = t_1; elseif (a <= 4e-115) tmp = Float64(x * 2.0); else tmp = Float64(b * Float64(a * 27.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = y * (-9.0 * (z * t));
tmp = 0.0;
if (a <= -5.5e+102)
tmp = 27.0 * (a * b);
elseif (a <= -190000000000.0)
tmp = t_1;
elseif (a <= -1.12e-177)
tmp = x * 2.0;
elseif (a <= 9.5e-302)
tmp = t_1;
elseif (a <= 4e-115)
tmp = x * 2.0;
else
tmp = b * (a * 27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.5e+102], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -190000000000.0], t$95$1, If[LessEqual[a, -1.12e-177], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, 9.5e-302], t$95$1, If[LessEqual[a, 4e-115], N[(x * 2.0), $MachinePrecision], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{if}\;a \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq -190000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.12 \cdot 10^{-177}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{-302}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4 \cdot 10^{-115}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if a < -5.49999999999999981e102Initial program 93.0%
sub-neg93.0%
sub-neg93.0%
associate-*l*95.4%
associate-*l*95.4%
Simplified95.4%
Taylor expanded in a around inf 73.3%
if -5.49999999999999981e102 < a < -1.9e11 or -1.12000000000000008e-177 < a < 9.49999999999999991e-302Initial program 94.6%
sub-neg94.6%
sub-neg94.6%
associate-*l*96.2%
associate-*l*96.3%
Simplified96.3%
+-commutative96.3%
associate-+r-96.3%
*-commutative96.3%
associate-*l*96.3%
associate-*l*96.3%
Applied egg-rr96.3%
Taylor expanded in y around inf 38.0%
associate-*r*38.1%
*-commutative38.1%
associate-*l*38.7%
*-commutative38.7%
Simplified38.7%
Taylor expanded in z around 0 38.8%
if -1.9e11 < a < -1.12000000000000008e-177 or 9.49999999999999991e-302 < a < 4.0000000000000002e-115Initial program 98.6%
sub-neg98.6%
sub-neg98.6%
associate-*l*96.3%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in x around inf 40.9%
if 4.0000000000000002e-115 < a Initial program 95.1%
sub-neg95.1%
sub-neg95.1%
associate-*l*97.4%
associate-*l*97.4%
Simplified97.4%
Taylor expanded in y around 0 77.4%
Taylor expanded in b around inf 67.1%
Taylor expanded in x around 0 51.9%
Final simplification49.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 (<= b -5.8e-140)
(* 27.0 (* a b))
(if (<= b 1.6e+75)
(* x 2.0)
(if (<= b 7.4e+102)
(* -9.0 (* t (* z y)))
(if (<= b 9.5e+129) (* b (* 2.0 (/ x b))) (* b (* a 27.0)))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.8e-140) {
tmp = 27.0 * (a * b);
} else if (b <= 1.6e+75) {
tmp = x * 2.0;
} else if (b <= 7.4e+102) {
tmp = -9.0 * (t * (z * y));
} else if (b <= 9.5e+129) {
tmp = b * (2.0 * (x / b));
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-5.8d-140)) then
tmp = 27.0d0 * (a * b)
else if (b <= 1.6d+75) then
tmp = x * 2.0d0
else if (b <= 7.4d+102) then
tmp = (-9.0d0) * (t * (z * y))
else if (b <= 9.5d+129) then
tmp = b * (2.0d0 * (x / b))
else
tmp = b * (a * 27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.8e-140) {
tmp = 27.0 * (a * b);
} else if (b <= 1.6e+75) {
tmp = x * 2.0;
} else if (b <= 7.4e+102) {
tmp = -9.0 * (t * (z * y));
} else if (b <= 9.5e+129) {
tmp = b * (2.0 * (x / b));
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if b <= -5.8e-140: tmp = 27.0 * (a * b) elif b <= 1.6e+75: tmp = x * 2.0 elif b <= 7.4e+102: tmp = -9.0 * (t * (z * y)) elif b <= 9.5e+129: tmp = b * (2.0 * (x / b)) else: tmp = b * (a * 27.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5.8e-140) tmp = Float64(27.0 * Float64(a * b)); elseif (b <= 1.6e+75) tmp = Float64(x * 2.0); elseif (b <= 7.4e+102) tmp = Float64(-9.0 * Float64(t * Float64(z * y))); elseif (b <= 9.5e+129) tmp = Float64(b * Float64(2.0 * Float64(x / b))); else tmp = Float64(b * Float64(a * 27.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (b <= -5.8e-140)
tmp = 27.0 * (a * b);
elseif (b <= 1.6e+75)
tmp = x * 2.0;
elseif (b <= 7.4e+102)
tmp = -9.0 * (t * (z * y));
elseif (b <= 9.5e+129)
tmp = b * (2.0 * (x / b));
else
tmp = b * (a * 27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5.8e-140], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.6e+75], N[(x * 2.0), $MachinePrecision], If[LessEqual[b, 7.4e+102], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.5e+129], N[(b * N[(2.0 * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.8 \cdot 10^{-140}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;b \leq 1.6 \cdot 10^{+75}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 7.4 \cdot 10^{+102}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{+129}:\\
\;\;\;\;b \cdot \left(2 \cdot \frac{x}{b}\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if b < -5.79999999999999995e-140Initial program 95.7%
sub-neg95.7%
sub-neg95.7%
associate-*l*96.7%
associate-*l*96.6%
Simplified96.6%
Taylor expanded in a around inf 49.8%
if -5.79999999999999995e-140 < b < 1.59999999999999992e75Initial program 97.0%
sub-neg97.0%
sub-neg97.0%
associate-*l*95.2%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in x around inf 47.6%
if 1.59999999999999992e75 < b < 7.40000000000000045e102Initial program 88.2%
sub-neg88.2%
sub-neg88.2%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in y around inf 63.8%
if 7.40000000000000045e102 < b < 9.5000000000000004e129Initial program 90.6%
sub-neg90.6%
sub-neg90.6%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in y around 0 78.2%
Taylor expanded in b around inf 78.2%
Taylor expanded in x around inf 28.7%
if 9.5000000000000004e129 < b Initial program 95.2%
sub-neg95.2%
sub-neg95.2%
associate-*l*97.5%
associate-*l*97.5%
Simplified97.5%
Taylor expanded in y around 0 79.3%
Taylor expanded in b around inf 79.4%
Taylor expanded in x around 0 65.9%
Final simplification51.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 (<= y -3.5e+121) (and (not (<= y -1.05e+100)) (<= y -3.15e+66))) (- (* x 2.0) (* 9.0 (* t (* z y)))) (+ (* 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 ((y <= -3.5e+121) || (!(y <= -1.05e+100) && (y <= -3.15e+66))) {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
} else {
tmp = (27.0 * (a * b)) + (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 ((y <= (-3.5d+121)) .or. (.not. (y <= (-1.05d+100))) .and. (y <= (-3.15d+66))) then
tmp = (x * 2.0d0) - (9.0d0 * (t * (z * y)))
else
tmp = (27.0d0 * (a * b)) + (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 ((y <= -3.5e+121) || (!(y <= -1.05e+100) && (y <= -3.15e+66))) {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
} else {
tmp = (27.0 * (a * b)) + (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 (y <= -3.5e+121) or (not (y <= -1.05e+100) and (y <= -3.15e+66)): tmp = (x * 2.0) - (9.0 * (t * (z * y))) else: tmp = (27.0 * (a * b)) + (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 ((y <= -3.5e+121) || (!(y <= -1.05e+100) && (y <= -3.15e+66))) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(z * y)))); else tmp = Float64(Float64(27.0 * Float64(a * b)) + 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 ((y <= -3.5e+121) || (~((y <= -1.05e+100)) && (y <= -3.15e+66)))
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
else
tmp = (27.0 * (a * b)) + (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[y, -3.5e+121], And[N[Not[LessEqual[y, -1.05e+100]], $MachinePrecision], LessEqual[y, -3.15e+66]]], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{+121} \lor \neg \left(y \leq -1.05 \cdot 10^{+100}\right) \land y \leq -3.15 \cdot 10^{+66}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\end{array}
\end{array}
if y < -3.5e121 or -1.0499999999999999e100 < y < -3.1499999999999999e66Initial program 90.1%
sub-neg90.1%
sub-neg90.1%
associate-*l*99.9%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in a around 0 71.3%
if -3.5e121 < y < -1.0499999999999999e100 or -3.1499999999999999e66 < y Initial program 97.0%
sub-neg97.0%
sub-neg97.0%
associate-*l*95.7%
associate-*l*95.7%
Simplified95.7%
Taylor expanded in y around 0 76.0%
Final simplification75.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 (* 9.0 (* t (* z y)))))
(if (<= y -1.1e+132)
(- (* x 2.0) (* 9.0 (* y (* z t))))
(if (<= y -4.7e+85)
(- t_1 t_2)
(if (<= y -4.1e+66) (- (* x 2.0) t_2) (+ t_1 (* 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 t_1 = 27.0 * (a * b);
double t_2 = 9.0 * (t * (z * y));
double tmp;
if (y <= -1.1e+132) {
tmp = (x * 2.0) - (9.0 * (y * (z * t)));
} else if (y <= -4.7e+85) {
tmp = t_1 - t_2;
} else if (y <= -4.1e+66) {
tmp = (x * 2.0) - t_2;
} else {
tmp = t_1 + (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 27.0d0 * (a * b)
t_2 = 9.0d0 * (t * (z * y))
if (y <= (-1.1d+132)) then
tmp = (x * 2.0d0) - (9.0d0 * (y * (z * t)))
else if (y <= (-4.7d+85)) then
tmp = t_1 - t_2
else if (y <= (-4.1d+66)) then
tmp = (x * 2.0d0) - t_2
else
tmp = t_1 + (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 t_1 = 27.0 * (a * b);
double t_2 = 9.0 * (t * (z * y));
double tmp;
if (y <= -1.1e+132) {
tmp = (x * 2.0) - (9.0 * (y * (z * t)));
} else if (y <= -4.7e+85) {
tmp = t_1 - t_2;
} else if (y <= -4.1e+66) {
tmp = (x * 2.0) - t_2;
} else {
tmp = t_1 + (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): t_1 = 27.0 * (a * b) t_2 = 9.0 * (t * (z * y)) tmp = 0 if y <= -1.1e+132: tmp = (x * 2.0) - (9.0 * (y * (z * t))) elif y <= -4.7e+85: tmp = t_1 - t_2 elif y <= -4.1e+66: tmp = (x * 2.0) - t_2 else: tmp = t_1 + (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) t_1 = Float64(27.0 * Float64(a * b)) t_2 = Float64(9.0 * Float64(t * Float64(z * y))) tmp = 0.0 if (y <= -1.1e+132) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(y * Float64(z * t)))); elseif (y <= -4.7e+85) tmp = Float64(t_1 - t_2); elseif (y <= -4.1e+66) tmp = Float64(Float64(x * 2.0) - t_2); else tmp = Float64(t_1 + 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)
t_1 = 27.0 * (a * b);
t_2 = 9.0 * (t * (z * y));
tmp = 0.0;
if (y <= -1.1e+132)
tmp = (x * 2.0) - (9.0 * (y * (z * t)));
elseif (y <= -4.7e+85)
tmp = t_1 - t_2;
elseif (y <= -4.1e+66)
tmp = (x * 2.0) - t_2;
else
tmp = t_1 + (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_] := Block[{t$95$1 = N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.1e+132], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.7e+85], N[(t$95$1 - t$95$2), $MachinePrecision], If[LessEqual[y, -4.1e+66], N[(N[(x * 2.0), $MachinePrecision] - t$95$2), $MachinePrecision], N[(t$95$1 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(a \cdot b\right)\\
t_2 := 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{if}\;y \leq -1.1 \cdot 10^{+132}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;y \leq -4.7 \cdot 10^{+85}:\\
\;\;\;\;t\_1 - t\_2\\
\mathbf{elif}\;y \leq -4.1 \cdot 10^{+66}:\\
\;\;\;\;x \cdot 2 - t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1 + x \cdot 2\\
\end{array}
\end{array}
if y < -1.09999999999999994e132Initial program 89.7%
sub-neg89.7%
sub-neg89.7%
associate-*l*99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in a around 0 70.7%
pow168.8%
*-commutative68.8%
associate-*l*76.6%
Applied egg-rr78.2%
unpow176.6%
*-commutative76.6%
Simplified78.2%
if -1.09999999999999994e132 < y < -4.7000000000000002e85Initial program 91.4%
sub-neg91.4%
sub-neg91.4%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in x around 0 91.3%
if -4.7000000000000002e85 < y < -4.09999999999999994e66Initial program 99.6%
sub-neg99.6%
sub-neg99.6%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in a around 0 99.2%
if -4.09999999999999994e66 < y Initial program 96.9%
sub-neg96.9%
sub-neg96.9%
associate-*l*95.6%
associate-*l*95.6%
Simplified95.6%
Taylor expanded in y around 0 76.0%
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 (if (<= z 55000000000.0) (- (+ (* 27.0 (* a b)) (* x 2.0)) (* y (* 9.0 (* z t)))) (* 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);
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 <= 55000000000.0) {
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (9.0 * (z * t)));
} 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.
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 <= 55000000000.0d0) then
tmp = ((27.0d0 * (a * b)) + (x * 2.0d0)) - (y * (9.0d0 * (z * t)))
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;
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 <= 55000000000.0) {
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (9.0 * (z * t)));
} 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]) [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 <= 55000000000.0: tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (9.0 * (z * t))) 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]) 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 <= 55000000000.0) tmp = Float64(Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)) - Float64(y * Float64(9.0 * Float64(z * t)))); 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])){:}
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 <= 55000000000.0)
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (9.0 * (z * t)));
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. 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, 55000000000.0], N[(N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] - N[(y * N[(9.0 * N[(z * t), $MachinePrecision]), $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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 55000000000:\\
\;\;\;\;\left(27 \cdot \left(a \cdot b\right) + x \cdot 2\right) - y \cdot \left(9 \cdot \left(z \cdot t\right)\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 z < 5.5e10Initial program 96.9%
sub-neg96.9%
sub-neg96.9%
associate-*l*97.5%
associate-*l*97.5%
Simplified97.5%
+-commutative97.5%
associate-+r-97.5%
*-commutative97.5%
associate-*l*97.5%
associate-*l*97.5%
Applied egg-rr97.5%
if 5.5e10 < z Initial program 91.4%
sub-neg91.4%
sub-neg91.4%
associate-*l*93.0%
associate-*l*93.0%
Simplified93.0%
Taylor expanded in t around inf 71.8%
Final simplification91.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= b -3.6e-135)
(* 27.0 (* a b))
(if (<= b 3.8e+71)
(* x 2.0)
(if (<= b 8.5e+102)
(* -9.0 (* t (* z y)))
(if (<= b 1.95e+129) (* x 2.0) (* b (* a 27.0)))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.6e-135) {
tmp = 27.0 * (a * b);
} else if (b <= 3.8e+71) {
tmp = x * 2.0;
} else if (b <= 8.5e+102) {
tmp = -9.0 * (t * (z * y));
} else if (b <= 1.95e+129) {
tmp = x * 2.0;
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-3.6d-135)) then
tmp = 27.0d0 * (a * b)
else if (b <= 3.8d+71) then
tmp = x * 2.0d0
else if (b <= 8.5d+102) then
tmp = (-9.0d0) * (t * (z * y))
else if (b <= 1.95d+129) then
tmp = x * 2.0d0
else
tmp = b * (a * 27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.6e-135) {
tmp = 27.0 * (a * b);
} else if (b <= 3.8e+71) {
tmp = x * 2.0;
} else if (b <= 8.5e+102) {
tmp = -9.0 * (t * (z * y));
} else if (b <= 1.95e+129) {
tmp = x * 2.0;
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if b <= -3.6e-135: tmp = 27.0 * (a * b) elif b <= 3.8e+71: tmp = x * 2.0 elif b <= 8.5e+102: tmp = -9.0 * (t * (z * y)) elif b <= 1.95e+129: tmp = x * 2.0 else: tmp = b * (a * 27.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -3.6e-135) tmp = Float64(27.0 * Float64(a * b)); elseif (b <= 3.8e+71) tmp = Float64(x * 2.0); elseif (b <= 8.5e+102) tmp = Float64(-9.0 * Float64(t * Float64(z * y))); elseif (b <= 1.95e+129) tmp = Float64(x * 2.0); else tmp = Float64(b * Float64(a * 27.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (b <= -3.6e-135)
tmp = 27.0 * (a * b);
elseif (b <= 3.8e+71)
tmp = x * 2.0;
elseif (b <= 8.5e+102)
tmp = -9.0 * (t * (z * y));
elseif (b <= 1.95e+129)
tmp = x * 2.0;
else
tmp = b * (a * 27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.6e-135], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.8e+71], N[(x * 2.0), $MachinePrecision], If[LessEqual[b, 8.5e+102], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.95e+129], N[(x * 2.0), $MachinePrecision], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.6 \cdot 10^{-135}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;b \leq 3.8 \cdot 10^{+71}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 8.5 \cdot 10^{+102}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{elif}\;b \leq 1.95 \cdot 10^{+129}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if b < -3.59999999999999978e-135Initial program 95.7%
sub-neg95.7%
sub-neg95.7%
associate-*l*96.7%
associate-*l*96.6%
Simplified96.6%
Taylor expanded in a around inf 49.8%
if -3.59999999999999978e-135 < b < 3.8000000000000001e71 or 8.4999999999999996e102 < b < 1.9499999999999999e129Initial program 96.4%
sub-neg96.4%
sub-neg96.4%
associate-*l*95.7%
associate-*l*95.7%
Simplified95.7%
Taylor expanded in x around inf 45.9%
if 3.8000000000000001e71 < b < 8.4999999999999996e102Initial program 88.2%
sub-neg88.2%
sub-neg88.2%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in y around inf 63.8%
if 1.9499999999999999e129 < b Initial program 95.2%
sub-neg95.2%
sub-neg95.2%
associate-*l*97.5%
associate-*l*97.5%
Simplified97.5%
Taylor expanded in y around 0 79.3%
Taylor expanded in b around inf 79.4%
Taylor expanded in x around 0 65.9%
Final simplification51.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 (<= y -7.9e+239) (and (not (<= y -2.1e+228)) (<= y -2.25e+177))) (* y (* -9.0 (* z t))) (+ (* 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 ((y <= -7.9e+239) || (!(y <= -2.1e+228) && (y <= -2.25e+177))) {
tmp = y * (-9.0 * (z * t));
} else {
tmp = (27.0 * (a * b)) + (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 ((y <= (-7.9d+239)) .or. (.not. (y <= (-2.1d+228))) .and. (y <= (-2.25d+177))) then
tmp = y * ((-9.0d0) * (z * t))
else
tmp = (27.0d0 * (a * b)) + (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 ((y <= -7.9e+239) || (!(y <= -2.1e+228) && (y <= -2.25e+177))) {
tmp = y * (-9.0 * (z * t));
} else {
tmp = (27.0 * (a * b)) + (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 (y <= -7.9e+239) or (not (y <= -2.1e+228) and (y <= -2.25e+177)): tmp = y * (-9.0 * (z * t)) else: tmp = (27.0 * (a * b)) + (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 ((y <= -7.9e+239) || (!(y <= -2.1e+228) && (y <= -2.25e+177))) tmp = Float64(y * Float64(-9.0 * Float64(z * t))); else tmp = Float64(Float64(27.0 * Float64(a * b)) + 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 ((y <= -7.9e+239) || (~((y <= -2.1e+228)) && (y <= -2.25e+177)))
tmp = y * (-9.0 * (z * t));
else
tmp = (27.0 * (a * b)) + (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[y, -7.9e+239], And[N[Not[LessEqual[y, -2.1e+228]], $MachinePrecision], LessEqual[y, -2.25e+177]]], N[(y * N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.9 \cdot 10^{+239} \lor \neg \left(y \leq -2.1 \cdot 10^{+228}\right) \land y \leq -2.25 \cdot 10^{+177}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\end{array}
\end{array}
if y < -7.9000000000000002e239 or -2.09999999999999994e228 < y < -2.2499999999999998e177Initial program 85.3%
sub-neg85.3%
sub-neg85.3%
associate-*l*99.8%
associate-*l*99.8%
Simplified99.8%
+-commutative99.8%
associate-+r-99.8%
*-commutative99.8%
associate-*l*99.8%
associate-*l*99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 72.6%
associate-*r*72.6%
*-commutative72.6%
associate-*l*82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in z around 0 82.7%
if -7.9000000000000002e239 < y < -2.09999999999999994e228 or -2.2499999999999998e177 < y Initial program 96.5%
sub-neg96.5%
sub-neg96.5%
associate-*l*96.2%
associate-*l*96.2%
Simplified96.2%
Taylor expanded in y around 0 73.5%
Final simplification74.2%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z 1.5e-24) (- (+ (* 27.0 (* a b)) (* x 2.0)) (* y (* 9.0 (* z t)))) (+ (* z (- (* 2.0 (/ x z)) (* 9.0 (* y t)))) (* a (* 27.0 b)))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.5e-24) {
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (9.0 * (z * t)));
} else {
tmp = (z * ((2.0 * (x / z)) - (9.0 * (y * t)))) + (a * (27.0 * b));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= 1.5d-24) then
tmp = ((27.0d0 * (a * b)) + (x * 2.0d0)) - (y * (9.0d0 * (z * t)))
else
tmp = (z * ((2.0d0 * (x / z)) - (9.0d0 * (y * t)))) + (a * (27.0d0 * b))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.5e-24) {
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (9.0 * (z * t)));
} else {
tmp = (z * ((2.0 * (x / z)) - (9.0 * (y * t)))) + (a * (27.0 * b));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= 1.5e-24: tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (9.0 * (z * t))) else: tmp = (z * ((2.0 * (x / z)) - (9.0 * (y * t)))) + (a * (27.0 * b)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 1.5e-24) tmp = Float64(Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)) - Float64(y * Float64(9.0 * Float64(z * t)))); else tmp = Float64(Float64(z * Float64(Float64(2.0 * Float64(x / z)) - Float64(9.0 * Float64(y * t)))) + Float64(a * Float64(27.0 * b))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= 1.5e-24)
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (9.0 * (z * t)));
else
tmp = (z * ((2.0 * (x / z)) - (9.0 * (y * t)))) + (a * (27.0 * b));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 1.5e-24], N[(N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] - N[(y * N[(9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(N[(2.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.5 \cdot 10^{-24}:\\
\;\;\;\;\left(27 \cdot \left(a \cdot b\right) + x \cdot 2\right) - y \cdot \left(9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(2 \cdot \frac{x}{z} - 9 \cdot \left(y \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if z < 1.49999999999999998e-24Initial program 96.7%
sub-neg96.7%
sub-neg96.7%
associate-*l*97.3%
associate-*l*97.3%
Simplified97.3%
+-commutative97.3%
associate-+r-97.3%
*-commutative97.3%
associate-*l*97.3%
associate-*l*97.3%
Applied egg-rr97.3%
if 1.49999999999999998e-24 < z Initial program 92.9%
sub-neg92.9%
sub-neg92.9%
associate-*l*94.2%
associate-*l*94.2%
Simplified94.2%
Taylor expanded in z around inf 97.6%
Final simplification97.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 (<= z 1.42e+144) (+ (* a (* 27.0 b)) (- (* x 2.0) (* (* z t) (* y 9.0)))) (* t (- (* 27.0 (/ (* a b) t)) (* 9.0 (* z y))))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.42e+144) {
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((z * t) * (y * 9.0)));
} 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.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= 1.42d+144) then
tmp = (a * (27.0d0 * b)) + ((x * 2.0d0) - ((z * t) * (y * 9.0d0)))
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;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.42e+144) {
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((z * t) * (y * 9.0)));
} 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]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= 1.42e+144: tmp = (a * (27.0 * b)) + ((x * 2.0) - ((z * t) * (y * 9.0))) 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]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 1.42e+144) tmp = Float64(Float64(a * Float64(27.0 * b)) + Float64(Float64(x * 2.0) - Float64(Float64(z * t) * Float64(y * 9.0)))); 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])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= 1.42e+144)
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((z * t) * (y * 9.0)));
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. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 1.42e+144], N[(N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(N[(z * t), $MachinePrecision] * N[(y * 9.0), $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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.42 \cdot 10^{+144}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right) + \left(x \cdot 2 - \left(z \cdot t\right) \cdot \left(y \cdot 9\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 z < 1.42000000000000009e144Initial program 97.3%
sub-neg97.3%
sub-neg97.3%
associate-*l*97.8%
associate-*l*97.7%
Simplified97.7%
if 1.42000000000000009e144 < z Initial program 83.8%
sub-neg83.8%
sub-neg83.8%
associate-*l*86.9%
associate-*l*86.9%
Simplified86.9%
Taylor expanded in x around 0 70.8%
Taylor expanded in t around inf 71.1%
Final simplification94.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= b -3.6e-135) (not (<= b 1850.0))) (* 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 <= -3.6e-135) || !(b <= 1850.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.
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.6d-135)) .or. (.not. (b <= 1850.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;
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.6e-135) || !(b <= 1850.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]) [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.6e-135) or not (b <= 1850.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]) 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.6e-135) || !(b <= 1850.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])){:}
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.6e-135) || ~((b <= 1850.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. 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.6e-135], N[Not[LessEqual[b, 1850.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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.6 \cdot 10^{-135} \lor \neg \left(b \leq 1850\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if b < -3.59999999999999978e-135 or 1850 < b Initial program 94.2%
sub-neg94.2%
sub-neg94.2%
associate-*l*97.0%
associate-*l*96.9%
Simplified96.9%
Taylor expanded in a around inf 53.3%
if -3.59999999999999978e-135 < b < 1850Initial program 98.7%
sub-neg98.7%
sub-neg98.7%
associate-*l*95.6%
associate-*l*95.6%
Simplified95.6%
Taylor expanded in x around inf 50.3%
Final simplification52.3%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= b -3.6e-135) (* 27.0 (* a b)) (if (<= b 1820.0) (* x 2.0) (* b (* a 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.6e-135) {
tmp = 27.0 * (a * b);
} else if (b <= 1820.0) {
tmp = x * 2.0;
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-3.6d-135)) then
tmp = 27.0d0 * (a * b)
else if (b <= 1820.0d0) then
tmp = x * 2.0d0
else
tmp = b * (a * 27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.6e-135) {
tmp = 27.0 * (a * b);
} else if (b <= 1820.0) {
tmp = x * 2.0;
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if b <= -3.6e-135: tmp = 27.0 * (a * b) elif b <= 1820.0: tmp = x * 2.0 else: tmp = b * (a * 27.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -3.6e-135) tmp = Float64(27.0 * Float64(a * b)); elseif (b <= 1820.0) tmp = Float64(x * 2.0); else tmp = Float64(b * Float64(a * 27.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (b <= -3.6e-135)
tmp = 27.0 * (a * b);
elseif (b <= 1820.0)
tmp = x * 2.0;
else
tmp = b * (a * 27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.6e-135], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1820.0], N[(x * 2.0), $MachinePrecision], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.6 \cdot 10^{-135}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;b \leq 1820:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if b < -3.59999999999999978e-135Initial program 95.7%
sub-neg95.7%
sub-neg95.7%
associate-*l*96.7%
associate-*l*96.6%
Simplified96.6%
Taylor expanded in a around inf 49.8%
if -3.59999999999999978e-135 < b < 1820Initial program 98.7%
sub-neg98.7%
sub-neg98.7%
associate-*l*95.6%
associate-*l*95.6%
Simplified95.6%
Taylor expanded in x around inf 50.3%
if 1820 < b Initial program 92.2%
sub-neg92.2%
sub-neg92.2%
associate-*l*97.3%
associate-*l*97.3%
Simplified97.3%
Taylor expanded in y around 0 74.7%
Taylor expanded in b around inf 74.8%
Taylor expanded in x around 0 57.8%
Final simplification52.3%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (* 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.7%
sub-neg95.7%
sub-neg95.7%
associate-*l*96.5%
associate-*l*96.5%
Simplified96.5%
Taylor expanded in x around inf 33.4%
Final simplification33.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 2024110
(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)))