
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= (* y 9.0) -2e+215) (* y (- (+ (* 2.0 (/ x y)) (* 27.0 (/ (* a b) y))) (* 9.0 (* t z)))) (fma a (* 27.0 b) (fma x 2.0 (* t (* y (* z -9.0)))))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y * 9.0) <= -2e+215) {
tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (t * z)));
} else {
tmp = fma(a, (27.0 * b), fma(x, 2.0, (t * (y * (z * -9.0)))));
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(y * 9.0) <= -2e+215) tmp = Float64(y * Float64(Float64(Float64(2.0 * Float64(x / y)) + Float64(27.0 * Float64(Float64(a * b) / y))) - Float64(9.0 * Float64(t * z)))); else tmp = fma(a, Float64(27.0 * b), fma(x, 2.0, Float64(t * Float64(y * Float64(z * -9.0))))); end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(y * 9.0), $MachinePrecision], -2e+215], N[(y * N[(N[(N[(2.0 * N[(x / y), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(N[(a * b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;y \cdot 9 \leq -2 \cdot 10^{+215}:\\
\;\;\;\;y \cdot \left(\left(2 \cdot \frac{x}{y} + 27 \cdot \frac{a \cdot b}{y}\right) - 9 \cdot \left(t \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 y #s(literal 9 binary64)) < -1.99999999999999981e215Initial program 87.3%
associate-+l-87.3%
*-commutative87.3%
*-commutative87.3%
associate-*l*87.3%
associate-+l-87.3%
associate-*l*87.3%
*-commutative87.3%
*-commutative87.3%
associate-*l*99.7%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in y around inf 99.7%
if -1.99999999999999981e215 < (*.f64 y #s(literal 9 binary64)) Initial program 95.5%
+-commutative95.5%
associate-+r-95.5%
*-commutative95.5%
cancel-sign-sub-inv95.5%
associate-*r*94.3%
distribute-lft-neg-in94.3%
*-commutative94.3%
cancel-sign-sub-inv94.3%
associate-+r-94.3%
associate-*l*93.9%
fma-define94.7%
cancel-sign-sub-inv94.7%
fma-define94.7%
distribute-lft-neg-in94.7%
distribute-rgt-neg-in94.7%
*-commutative94.7%
associate-*r*95.9%
associate-*l*95.9%
neg-mul-195.9%
associate-*r*95.9%
Simplified95.9%
Final simplification96.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= a -1.12e+54)
(* 27.0 (* a b))
(if (<= a -1.02e-13)
(* 2.0 x)
(if (<= a -3.5e-148)
(* y (* -9.0 (* t z)))
(if (<= a -2.5e-204)
(* 2.0 x)
(if (<= a 1.1e-187)
(* z (* -9.0 (* y t)))
(if (<= a 6.6e-56) (* 2.0 x) (* 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 (a <= -1.12e+54) {
tmp = 27.0 * (a * b);
} else if (a <= -1.02e-13) {
tmp = 2.0 * x;
} else if (a <= -3.5e-148) {
tmp = y * (-9.0 * (t * z));
} else if (a <= -2.5e-204) {
tmp = 2.0 * x;
} else if (a <= 1.1e-187) {
tmp = z * (-9.0 * (y * t));
} else if (a <= 6.6e-56) {
tmp = 2.0 * x;
} else {
tmp = a * (27.0 * b);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-1.12d+54)) then
tmp = 27.0d0 * (a * b)
else if (a <= (-1.02d-13)) then
tmp = 2.0d0 * x
else if (a <= (-3.5d-148)) then
tmp = y * ((-9.0d0) * (t * z))
else if (a <= (-2.5d-204)) then
tmp = 2.0d0 * x
else if (a <= 1.1d-187) then
tmp = z * ((-9.0d0) * (y * t))
else if (a <= 6.6d-56) then
tmp = 2.0d0 * x
else
tmp = a * (27.0d0 * b)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.12e+54) {
tmp = 27.0 * (a * b);
} else if (a <= -1.02e-13) {
tmp = 2.0 * x;
} else if (a <= -3.5e-148) {
tmp = y * (-9.0 * (t * z));
} else if (a <= -2.5e-204) {
tmp = 2.0 * x;
} else if (a <= 1.1e-187) {
tmp = z * (-9.0 * (y * t));
} else if (a <= 6.6e-56) {
tmp = 2.0 * x;
} else {
tmp = a * (27.0 * b);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if a <= -1.12e+54: tmp = 27.0 * (a * b) elif a <= -1.02e-13: tmp = 2.0 * x elif a <= -3.5e-148: tmp = y * (-9.0 * (t * z)) elif a <= -2.5e-204: tmp = 2.0 * x elif a <= 1.1e-187: tmp = z * (-9.0 * (y * t)) elif a <= 6.6e-56: tmp = 2.0 * x else: tmp = a * (27.0 * b) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.12e+54) tmp = Float64(27.0 * Float64(a * b)); elseif (a <= -1.02e-13) tmp = Float64(2.0 * x); elseif (a <= -3.5e-148) tmp = Float64(y * Float64(-9.0 * Float64(t * z))); elseif (a <= -2.5e-204) tmp = Float64(2.0 * x); elseif (a <= 1.1e-187) tmp = Float64(z * Float64(-9.0 * Float64(y * t))); elseif (a <= 6.6e-56) tmp = Float64(2.0 * x); else tmp = Float64(a * Float64(27.0 * b)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (a <= -1.12e+54)
tmp = 27.0 * (a * b);
elseif (a <= -1.02e-13)
tmp = 2.0 * x;
elseif (a <= -3.5e-148)
tmp = y * (-9.0 * (t * z));
elseif (a <= -2.5e-204)
tmp = 2.0 * x;
elseif (a <= 1.1e-187)
tmp = z * (-9.0 * (y * t));
elseif (a <= 6.6e-56)
tmp = 2.0 * x;
else
tmp = a * (27.0 * b);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.12e+54], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.02e-13], N[(2.0 * x), $MachinePrecision], If[LessEqual[a, -3.5e-148], N[(y * N[(-9.0 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.5e-204], N[(2.0 * x), $MachinePrecision], If[LessEqual[a, 1.1e-187], N[(z * N[(-9.0 * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.6e-56], N[(2.0 * x), $MachinePrecision], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.12 \cdot 10^{+54}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq -1.02 \cdot 10^{-13}:\\
\;\;\;\;2 \cdot x\\
\mathbf{elif}\;a \leq -3.5 \cdot 10^{-148}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(t \cdot z\right)\right)\\
\mathbf{elif}\;a \leq -2.5 \cdot 10^{-204}:\\
\;\;\;\;2 \cdot x\\
\mathbf{elif}\;a \leq 1.1 \cdot 10^{-187}:\\
\;\;\;\;z \cdot \left(-9 \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;a \leq 6.6 \cdot 10^{-56}:\\
\;\;\;\;2 \cdot x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if a < -1.12e54Initial program 96.0%
+-commutative96.0%
associate-+r-96.0%
*-commutative96.0%
cancel-sign-sub-inv96.0%
associate-*r*94.2%
distribute-lft-neg-in94.2%
*-commutative94.2%
cancel-sign-sub-inv94.2%
associate-+r-94.2%
associate-*l*94.1%
fma-define96.1%
cancel-sign-sub-inv96.1%
fma-define96.1%
distribute-lft-neg-in96.1%
distribute-rgt-neg-in96.1%
*-commutative96.1%
associate-*r*98.0%
associate-*l*98.0%
neg-mul-198.0%
associate-*r*98.0%
Simplified98.0%
Taylor expanded in a around inf 62.7%
if -1.12e54 < a < -1.0199999999999999e-13 or -3.5e-148 < a < -2.5000000000000001e-204 or 1.10000000000000004e-187 < a < 6.59999999999999967e-56Initial program 97.7%
+-commutative97.7%
associate-+r-97.7%
*-commutative97.7%
cancel-sign-sub-inv97.7%
associate-*r*95.7%
distribute-lft-neg-in95.7%
*-commutative95.7%
cancel-sign-sub-inv95.7%
associate-+r-95.7%
associate-*l*93.6%
fma-define93.6%
cancel-sign-sub-inv93.6%
fma-define93.6%
distribute-lft-neg-in93.6%
distribute-rgt-neg-in93.6%
*-commutative93.6%
associate-*r*95.6%
associate-*l*95.5%
neg-mul-195.5%
associate-*r*95.5%
Simplified95.5%
Taylor expanded in t around 0 71.4%
Taylor expanded in x around inf 57.9%
if -1.0199999999999999e-13 < a < -3.5e-148Initial program 87.0%
+-commutative87.0%
associate-+r-87.0%
*-commutative87.0%
cancel-sign-sub-inv87.0%
associate-*r*96.5%
distribute-lft-neg-in96.5%
*-commutative96.5%
cancel-sign-sub-inv96.5%
associate-+r-96.5%
associate-*l*96.5%
fma-define96.5%
cancel-sign-sub-inv96.5%
fma-define96.5%
distribute-lft-neg-in96.5%
distribute-rgt-neg-in96.5%
*-commutative96.5%
associate-*r*87.0%
associate-*l*87.0%
neg-mul-187.0%
associate-*r*87.0%
Simplified87.0%
Taylor expanded in t around inf 45.4%
*-commutative45.4%
associate-*r*45.5%
associate-*l*45.5%
Simplified45.5%
associate-*r*45.5%
associate-*r*45.4%
metadata-eval45.4%
distribute-rgt-neg-in45.4%
*-commutative45.4%
associate-*l*51.4%
associate-*r*51.6%
*-commutative51.6%
associate-*r*51.5%
*-commutative51.5%
Applied egg-rr51.5%
*-commutative51.5%
*-commutative51.5%
associate-*r*51.5%
associate-*r*51.5%
distribute-lft-neg-in51.5%
associate-*r*51.4%
associate-*r*51.6%
metadata-eval51.6%
Applied egg-rr51.6%
if -2.5000000000000001e-204 < a < 1.10000000000000004e-187Initial program 96.3%
+-commutative96.3%
associate-+r-96.3%
*-commutative96.3%
cancel-sign-sub-inv96.3%
associate-*r*90.5%
distribute-lft-neg-in90.5%
*-commutative90.5%
cancel-sign-sub-inv90.5%
associate-+r-90.5%
associate-*l*90.6%
fma-define90.6%
cancel-sign-sub-inv90.6%
fma-define90.6%
distribute-lft-neg-in90.6%
distribute-rgt-neg-in90.6%
*-commutative90.6%
associate-*r*96.3%
associate-*l*96.3%
neg-mul-196.3%
associate-*r*96.3%
Simplified96.3%
Taylor expanded in t around inf 49.9%
*-commutative49.9%
associate-*r*49.9%
associate-*l*50.0%
Simplified50.0%
associate-*r*49.9%
associate-*r*49.9%
metadata-eval49.9%
distribute-rgt-neg-in49.9%
*-commutative49.9%
associate-*l*45.5%
associate-*r*45.6%
*-commutative45.6%
associate-*r*45.6%
*-commutative45.6%
Applied egg-rr45.6%
*-commutative45.6%
*-commutative45.6%
associate-*r*48.2%
associate-*r*48.2%
distribute-lft-neg-in48.2%
*-commutative48.2%
associate-*r*48.3%
metadata-eval48.3%
Applied egg-rr48.3%
if 6.59999999999999967e-56 < a Initial program 95.0%
+-commutative95.0%
associate-+r-95.0%
*-commutative95.0%
cancel-sign-sub-inv95.0%
associate-*r*92.8%
distribute-lft-neg-in92.8%
*-commutative92.8%
cancel-sign-sub-inv92.8%
associate-+r-92.8%
associate-*l*92.7%
fma-define93.9%
cancel-sign-sub-inv93.9%
fma-define93.9%
distribute-lft-neg-in93.9%
distribute-rgt-neg-in93.9%
*-commutative93.9%
associate-*r*96.1%
associate-*l*96.1%
neg-mul-196.1%
associate-*r*96.1%
Simplified96.1%
Taylor expanded in t around 0 72.0%
Taylor expanded in b around inf 60.9%
Taylor expanded in b around inf 50.4%
*-commutative50.4%
associate-*r*50.5%
Simplified50.5%
Final simplification53.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 (<= a -9.6e+53)
(* 27.0 (* a b))
(if (<= a -1.6e-15)
(* 2.0 x)
(if (<= a -1.92e-78)
(* -9.0 (* t (* y z)))
(if (<= a -2.9e-204)
(* 2.0 x)
(if (<= a 1.6e-187)
(* z (* -9.0 (* y t)))
(if (<= a 5.4e-44) (* 2.0 x) (* 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 (a <= -9.6e+53) {
tmp = 27.0 * (a * b);
} else if (a <= -1.6e-15) {
tmp = 2.0 * x;
} else if (a <= -1.92e-78) {
tmp = -9.0 * (t * (y * z));
} else if (a <= -2.9e-204) {
tmp = 2.0 * x;
} else if (a <= 1.6e-187) {
tmp = z * (-9.0 * (y * t));
} else if (a <= 5.4e-44) {
tmp = 2.0 * x;
} else {
tmp = a * (27.0 * b);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-9.6d+53)) then
tmp = 27.0d0 * (a * b)
else if (a <= (-1.6d-15)) then
tmp = 2.0d0 * x
else if (a <= (-1.92d-78)) then
tmp = (-9.0d0) * (t * (y * z))
else if (a <= (-2.9d-204)) then
tmp = 2.0d0 * x
else if (a <= 1.6d-187) then
tmp = z * ((-9.0d0) * (y * t))
else if (a <= 5.4d-44) then
tmp = 2.0d0 * x
else
tmp = a * (27.0d0 * b)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -9.6e+53) {
tmp = 27.0 * (a * b);
} else if (a <= -1.6e-15) {
tmp = 2.0 * x;
} else if (a <= -1.92e-78) {
tmp = -9.0 * (t * (y * z));
} else if (a <= -2.9e-204) {
tmp = 2.0 * x;
} else if (a <= 1.6e-187) {
tmp = z * (-9.0 * (y * t));
} else if (a <= 5.4e-44) {
tmp = 2.0 * x;
} else {
tmp = a * (27.0 * b);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if a <= -9.6e+53: tmp = 27.0 * (a * b) elif a <= -1.6e-15: tmp = 2.0 * x elif a <= -1.92e-78: tmp = -9.0 * (t * (y * z)) elif a <= -2.9e-204: tmp = 2.0 * x elif a <= 1.6e-187: tmp = z * (-9.0 * (y * t)) elif a <= 5.4e-44: tmp = 2.0 * x else: tmp = a * (27.0 * b) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -9.6e+53) tmp = Float64(27.0 * Float64(a * b)); elseif (a <= -1.6e-15) tmp = Float64(2.0 * x); elseif (a <= -1.92e-78) tmp = Float64(-9.0 * Float64(t * Float64(y * z))); elseif (a <= -2.9e-204) tmp = Float64(2.0 * x); elseif (a <= 1.6e-187) tmp = Float64(z * Float64(-9.0 * Float64(y * t))); elseif (a <= 5.4e-44) tmp = Float64(2.0 * x); else tmp = Float64(a * Float64(27.0 * b)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (a <= -9.6e+53)
tmp = 27.0 * (a * b);
elseif (a <= -1.6e-15)
tmp = 2.0 * x;
elseif (a <= -1.92e-78)
tmp = -9.0 * (t * (y * z));
elseif (a <= -2.9e-204)
tmp = 2.0 * x;
elseif (a <= 1.6e-187)
tmp = z * (-9.0 * (y * t));
elseif (a <= 5.4e-44)
tmp = 2.0 * x;
else
tmp = a * (27.0 * b);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -9.6e+53], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.6e-15], N[(2.0 * x), $MachinePrecision], If[LessEqual[a, -1.92e-78], N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.9e-204], N[(2.0 * x), $MachinePrecision], If[LessEqual[a, 1.6e-187], N[(z * N[(-9.0 * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.4e-44], N[(2.0 * x), $MachinePrecision], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.6 \cdot 10^{+53}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq -1.6 \cdot 10^{-15}:\\
\;\;\;\;2 \cdot x\\
\mathbf{elif}\;a \leq -1.92 \cdot 10^{-78}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{elif}\;a \leq -2.9 \cdot 10^{-204}:\\
\;\;\;\;2 \cdot x\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{-187}:\\
\;\;\;\;z \cdot \left(-9 \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;a \leq 5.4 \cdot 10^{-44}:\\
\;\;\;\;2 \cdot x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if a < -9.5999999999999999e53Initial program 96.0%
+-commutative96.0%
associate-+r-96.0%
*-commutative96.0%
cancel-sign-sub-inv96.0%
associate-*r*94.2%
distribute-lft-neg-in94.2%
*-commutative94.2%
cancel-sign-sub-inv94.2%
associate-+r-94.2%
associate-*l*94.1%
fma-define96.1%
cancel-sign-sub-inv96.1%
fma-define96.1%
distribute-lft-neg-in96.1%
distribute-rgt-neg-in96.1%
*-commutative96.1%
associate-*r*98.0%
associate-*l*98.0%
neg-mul-198.0%
associate-*r*98.0%
Simplified98.0%
Taylor expanded in a around inf 62.7%
if -9.5999999999999999e53 < a < -1.6e-15 or -1.92000000000000005e-78 < a < -2.90000000000000009e-204 or 1.5999999999999999e-187 < a < 5.3999999999999998e-44Initial program 95.2%
+-commutative95.2%
associate-+r-95.2%
*-commutative95.2%
cancel-sign-sub-inv95.2%
associate-*r*96.9%
distribute-lft-neg-in96.9%
*-commutative96.9%
cancel-sign-sub-inv96.9%
associate-+r-96.9%
associate-*l*95.5%
fma-define95.5%
cancel-sign-sub-inv95.5%
fma-define95.5%
distribute-lft-neg-in95.5%
distribute-rgt-neg-in95.5%
*-commutative95.5%
associate-*r*93.7%
associate-*l*93.7%
neg-mul-193.7%
associate-*r*93.7%
Simplified93.7%
Taylor expanded in t around 0 70.3%
Taylor expanded in x around inf 55.8%
if -1.6e-15 < a < -1.92000000000000005e-78Initial program 86.2%
+-commutative86.2%
associate-+r-86.2%
*-commutative86.2%
cancel-sign-sub-inv86.2%
associate-*r*92.6%
distribute-lft-neg-in92.6%
*-commutative92.6%
cancel-sign-sub-inv92.6%
associate-+r-92.6%
associate-*l*92.5%
fma-define92.5%
cancel-sign-sub-inv92.5%
fma-define92.5%
distribute-lft-neg-in92.5%
distribute-rgt-neg-in92.5%
*-commutative92.5%
associate-*r*86.1%
associate-*l*86.1%
neg-mul-186.1%
associate-*r*86.1%
Simplified86.1%
Taylor expanded in t around inf 58.7%
if -2.90000000000000009e-204 < a < 1.5999999999999999e-187Initial program 96.3%
+-commutative96.3%
associate-+r-96.3%
*-commutative96.3%
cancel-sign-sub-inv96.3%
associate-*r*90.5%
distribute-lft-neg-in90.5%
*-commutative90.5%
cancel-sign-sub-inv90.5%
associate-+r-90.5%
associate-*l*90.6%
fma-define90.6%
cancel-sign-sub-inv90.6%
fma-define90.6%
distribute-lft-neg-in90.6%
distribute-rgt-neg-in90.6%
*-commutative90.6%
associate-*r*96.3%
associate-*l*96.3%
neg-mul-196.3%
associate-*r*96.3%
Simplified96.3%
Taylor expanded in t around inf 49.9%
*-commutative49.9%
associate-*r*49.9%
associate-*l*50.0%
Simplified50.0%
associate-*r*49.9%
associate-*r*49.9%
metadata-eval49.9%
distribute-rgt-neg-in49.9%
*-commutative49.9%
associate-*l*45.5%
associate-*r*45.6%
*-commutative45.6%
associate-*r*45.6%
*-commutative45.6%
Applied egg-rr45.6%
*-commutative45.6%
*-commutative45.6%
associate-*r*48.2%
associate-*r*48.2%
distribute-lft-neg-in48.2%
*-commutative48.2%
associate-*r*48.3%
metadata-eval48.3%
Applied egg-rr48.3%
if 5.3999999999999998e-44 < a Initial program 94.8%
+-commutative94.8%
associate-+r-94.8%
*-commutative94.8%
cancel-sign-sub-inv94.8%
associate-*r*92.6%
distribute-lft-neg-in92.6%
*-commutative92.6%
cancel-sign-sub-inv92.6%
associate-+r-92.6%
associate-*l*92.5%
fma-define93.8%
cancel-sign-sub-inv93.8%
fma-define93.8%
distribute-lft-neg-in93.8%
distribute-rgt-neg-in93.8%
*-commutative93.8%
associate-*r*96.0%
associate-*l*96.0%
neg-mul-196.0%
associate-*r*96.0%
Simplified96.0%
Taylor expanded in t around 0 71.3%
Taylor expanded in b around inf 60.0%
Taylor expanded in b around inf 50.4%
*-commutative50.4%
associate-*r*50.4%
Simplified50.4%
Final simplification54.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= (* y 9.0) -2e+96) (* y (- (+ (* 2.0 (/ x y)) (* 27.0 (/ (* a b) y))) (* 9.0 (* t z)))) (+ (- (* 2.0 x) (* t (* (* y 9.0) z))) (* b (* 27.0 a)))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y * 9.0) <= -2e+96) {
tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (t * z)));
} else {
tmp = ((2.0 * x) - (t * ((y * 9.0) * z))) + (b * (27.0 * a));
}
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 * 9.0d0) <= (-2d+96)) then
tmp = y * (((2.0d0 * (x / y)) + (27.0d0 * ((a * b) / y))) - (9.0d0 * (t * z)))
else
tmp = ((2.0d0 * x) - (t * ((y * 9.0d0) * z))) + (b * (27.0d0 * a))
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 * 9.0) <= -2e+96) {
tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (t * z)));
} else {
tmp = ((2.0 * x) - (t * ((y * 9.0) * z))) + (b * (27.0 * a));
}
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 * 9.0) <= -2e+96: tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (t * z))) else: tmp = ((2.0 * x) - (t * ((y * 9.0) * z))) + (b * (27.0 * a)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(y * 9.0) <= -2e+96) tmp = Float64(y * Float64(Float64(Float64(2.0 * Float64(x / y)) + Float64(27.0 * Float64(Float64(a * b) / y))) - Float64(9.0 * Float64(t * z)))); else tmp = Float64(Float64(Float64(2.0 * x) - Float64(t * Float64(Float64(y * 9.0) * z))) + Float64(b * Float64(27.0 * a))); 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 * 9.0) <= -2e+96)
tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (t * z)));
else
tmp = ((2.0 * x) - (t * ((y * 9.0) * z))) + (b * (27.0 * a));
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[N[(y * 9.0), $MachinePrecision], -2e+96], N[(y * N[(N[(N[(2.0 * N[(x / y), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(N[(a * b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 * x), $MachinePrecision] - N[(t * N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(27.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;y \cdot 9 \leq -2 \cdot 10^{+96}:\\
\;\;\;\;y \cdot \left(\left(2 \cdot \frac{x}{y} + 27 \cdot \frac{a \cdot b}{y}\right) - 9 \cdot \left(t \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot x - t \cdot \left(\left(y \cdot 9\right) \cdot z\right)\right) + b \cdot \left(27 \cdot a\right)\\
\end{array}
\end{array}
if (*.f64 y #s(literal 9 binary64)) < -2.0000000000000001e96Initial program 82.8%
associate-+l-82.8%
*-commutative82.8%
*-commutative82.8%
associate-*l*82.8%
associate-+l-82.8%
associate-*l*82.8%
*-commutative82.8%
*-commutative82.8%
associate-*l*93.3%
associate-*l*93.3%
Simplified93.3%
Taylor expanded in y around inf 95.5%
if -2.0000000000000001e96 < (*.f64 y #s(literal 9 binary64)) Initial program 97.6%
Final simplification97.2%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (* y 9.0) z)))
(if (<= t_1 1e+298)
(+ (- (* 2.0 x) (* t t_1)) (* b (* 27.0 a)))
(- (* 2.0 x) (* 9.0 (* z (* y t)))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * 9.0) * z;
double tmp;
if (t_1 <= 1e+298) {
tmp = ((2.0 * x) - (t * t_1)) + (b * (27.0 * a));
} else {
tmp = (2.0 * x) - (9.0 * (z * (y * t)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (y * 9.0d0) * z
if (t_1 <= 1d+298) then
tmp = ((2.0d0 * x) - (t * t_1)) + (b * (27.0d0 * a))
else
tmp = (2.0d0 * x) - (9.0d0 * (z * (y * t)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * 9.0) * z;
double tmp;
if (t_1 <= 1e+298) {
tmp = ((2.0 * x) - (t * t_1)) + (b * (27.0 * a));
} else {
tmp = (2.0 * x) - (9.0 * (z * (y * t)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = (y * 9.0) * z tmp = 0 if t_1 <= 1e+298: tmp = ((2.0 * x) - (t * t_1)) + (b * (27.0 * a)) else: tmp = (2.0 * x) - (9.0 * (z * (y * t))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * 9.0) * z) tmp = 0.0 if (t_1 <= 1e+298) tmp = Float64(Float64(Float64(2.0 * x) - Float64(t * t_1)) + Float64(b * Float64(27.0 * a))); else tmp = Float64(Float64(2.0 * x) - Float64(9.0 * Float64(z * Float64(y * t)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (y * 9.0) * z;
tmp = 0.0;
if (t_1 <= 1e+298)
tmp = ((2.0 * x) - (t * t_1)) + (b * (27.0 * a));
else
tmp = (2.0 * x) - (9.0 * (z * (y * t)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+298], N[(N[(N[(2.0 * x), $MachinePrecision] - N[(t * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(b * N[(27.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * x), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \left(y \cdot 9\right) \cdot z\\
\mathbf{if}\;t\_1 \leq 10^{+298}:\\
\;\;\;\;\left(2 \cdot x - t \cdot t\_1\right) + b \cdot \left(27 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot x - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 y #s(literal 9 binary64)) z) < 9.9999999999999996e297Initial program 96.2%
if 9.9999999999999996e297 < (*.f64 (*.f64 y #s(literal 9 binary64)) z) Initial program 76.3%
+-commutative76.3%
associate-+r-76.3%
*-commutative76.3%
cancel-sign-sub-inv76.3%
associate-*r*93.8%
distribute-lft-neg-in93.8%
*-commutative93.8%
cancel-sign-sub-inv93.8%
associate-+r-93.8%
associate-*l*93.8%
fma-define100.0%
cancel-sign-sub-inv100.0%
fma-define100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
*-commutative100.0%
associate-*r*82.6%
associate-*l*82.5%
neg-mul-182.5%
associate-*r*82.5%
Simplified82.5%
fma-undefine76.2%
fma-undefine76.2%
associate-+r+76.2%
*-commutative76.2%
associate-*l*93.7%
*-commutative93.7%
associate-*r*93.8%
*-commutative93.8%
*-commutative93.8%
associate-*r*93.7%
associate-*l*93.7%
metadata-eval93.7%
distribute-lft-neg-in93.7%
*-commutative93.7%
distribute-rgt-neg-in93.7%
*-commutative93.7%
associate-+r+93.7%
sub-neg93.7%
Applied egg-rr93.7%
Taylor expanded in b around 0 82.6%
*-commutative82.6%
*-commutative82.6%
associate-*r*99.9%
*-commutative99.9%
Simplified99.9%
Final simplification96.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 (<= a -4.8e+54)
(* 27.0 (* a b))
(if (<= a -4e-20)
(* 2.0 x)
(if (<= a -5.7e-78)
(* -9.0 (* t (* y z)))
(if (<= a 4.2e-46) (* 2.0 x) (* 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 (a <= -4.8e+54) {
tmp = 27.0 * (a * b);
} else if (a <= -4e-20) {
tmp = 2.0 * x;
} else if (a <= -5.7e-78) {
tmp = -9.0 * (t * (y * z));
} else if (a <= 4.2e-46) {
tmp = 2.0 * x;
} else {
tmp = a * (27.0 * b);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-4.8d+54)) then
tmp = 27.0d0 * (a * b)
else if (a <= (-4d-20)) then
tmp = 2.0d0 * x
else if (a <= (-5.7d-78)) then
tmp = (-9.0d0) * (t * (y * z))
else if (a <= 4.2d-46) then
tmp = 2.0d0 * x
else
tmp = a * (27.0d0 * b)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -4.8e+54) {
tmp = 27.0 * (a * b);
} else if (a <= -4e-20) {
tmp = 2.0 * x;
} else if (a <= -5.7e-78) {
tmp = -9.0 * (t * (y * z));
} else if (a <= 4.2e-46) {
tmp = 2.0 * x;
} else {
tmp = a * (27.0 * b);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if a <= -4.8e+54: tmp = 27.0 * (a * b) elif a <= -4e-20: tmp = 2.0 * x elif a <= -5.7e-78: tmp = -9.0 * (t * (y * z)) elif a <= 4.2e-46: tmp = 2.0 * x else: tmp = a * (27.0 * b) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -4.8e+54) tmp = Float64(27.0 * Float64(a * b)); elseif (a <= -4e-20) tmp = Float64(2.0 * x); elseif (a <= -5.7e-78) tmp = Float64(-9.0 * Float64(t * Float64(y * z))); elseif (a <= 4.2e-46) tmp = Float64(2.0 * x); else tmp = Float64(a * Float64(27.0 * b)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (a <= -4.8e+54)
tmp = 27.0 * (a * b);
elseif (a <= -4e-20)
tmp = 2.0 * x;
elseif (a <= -5.7e-78)
tmp = -9.0 * (t * (y * z));
elseif (a <= 4.2e-46)
tmp = 2.0 * x;
else
tmp = a * (27.0 * b);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -4.8e+54], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4e-20], N[(2.0 * x), $MachinePrecision], If[LessEqual[a, -5.7e-78], N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.2e-46], N[(2.0 * x), $MachinePrecision], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.8 \cdot 10^{+54}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq -4 \cdot 10^{-20}:\\
\;\;\;\;2 \cdot x\\
\mathbf{elif}\;a \leq -5.7 \cdot 10^{-78}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{-46}:\\
\;\;\;\;2 \cdot x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if a < -4.79999999999999997e54Initial program 96.0%
+-commutative96.0%
associate-+r-96.0%
*-commutative96.0%
cancel-sign-sub-inv96.0%
associate-*r*94.2%
distribute-lft-neg-in94.2%
*-commutative94.2%
cancel-sign-sub-inv94.2%
associate-+r-94.2%
associate-*l*94.1%
fma-define96.1%
cancel-sign-sub-inv96.1%
fma-define96.1%
distribute-lft-neg-in96.1%
distribute-rgt-neg-in96.1%
*-commutative96.1%
associate-*r*98.0%
associate-*l*98.0%
neg-mul-198.0%
associate-*r*98.0%
Simplified98.0%
Taylor expanded in a around inf 62.7%
if -4.79999999999999997e54 < a < -3.99999999999999978e-20 or -5.6999999999999998e-78 < a < 4.19999999999999975e-46Initial program 95.7%
+-commutative95.7%
associate-+r-95.7%
*-commutative95.7%
cancel-sign-sub-inv95.7%
associate-*r*94.0%
distribute-lft-neg-in94.0%
*-commutative94.0%
cancel-sign-sub-inv94.0%
associate-+r-94.0%
associate-*l*93.2%
fma-define93.2%
cancel-sign-sub-inv93.2%
fma-define93.2%
distribute-lft-neg-in93.2%
distribute-rgt-neg-in93.2%
*-commutative93.2%
associate-*r*94.9%
associate-*l*94.9%
neg-mul-194.9%
associate-*r*94.9%
Simplified94.9%
Taylor expanded in t around 0 59.8%
Taylor expanded in x around inf 47.8%
if -3.99999999999999978e-20 < a < -5.6999999999999998e-78Initial program 86.2%
+-commutative86.2%
associate-+r-86.2%
*-commutative86.2%
cancel-sign-sub-inv86.2%
associate-*r*92.6%
distribute-lft-neg-in92.6%
*-commutative92.6%
cancel-sign-sub-inv92.6%
associate-+r-92.6%
associate-*l*92.5%
fma-define92.5%
cancel-sign-sub-inv92.5%
fma-define92.5%
distribute-lft-neg-in92.5%
distribute-rgt-neg-in92.5%
*-commutative92.5%
associate-*r*86.1%
associate-*l*86.1%
neg-mul-186.1%
associate-*r*86.1%
Simplified86.1%
Taylor expanded in t around inf 58.7%
if 4.19999999999999975e-46 < a Initial program 94.8%
+-commutative94.8%
associate-+r-94.8%
*-commutative94.8%
cancel-sign-sub-inv94.8%
associate-*r*92.6%
distribute-lft-neg-in92.6%
*-commutative92.6%
cancel-sign-sub-inv92.6%
associate-+r-92.6%
associate-*l*92.5%
fma-define93.8%
cancel-sign-sub-inv93.8%
fma-define93.8%
distribute-lft-neg-in93.8%
distribute-rgt-neg-in93.8%
*-commutative93.8%
associate-*r*96.0%
associate-*l*96.0%
neg-mul-196.0%
associate-*r*96.0%
Simplified96.0%
Taylor expanded in t around 0 71.3%
Taylor expanded in b around inf 60.0%
Taylor expanded in b around inf 50.4%
*-commutative50.4%
associate-*r*50.4%
Simplified50.4%
Final simplification52.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* 27.0 b))))
(if (<= z 9.5e-85)
(+ (- (* 2.0 x) (* (* y 9.0) (* t z))) t_1)
(+ t_1 (* z (- (* 2.0 (/ x z)) (* 9.0 (* y t))))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (27.0 * b);
double tmp;
if (z <= 9.5e-85) {
tmp = ((2.0 * x) - ((y * 9.0) * (t * z))) + t_1;
} else {
tmp = t_1 + (z * ((2.0 * (x / z)) - (9.0 * (y * t))));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * (27.0d0 * b)
if (z <= 9.5d-85) then
tmp = ((2.0d0 * x) - ((y * 9.0d0) * (t * z))) + t_1
else
tmp = t_1 + (z * ((2.0d0 * (x / z)) - (9.0d0 * (y * t))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (27.0 * b);
double tmp;
if (z <= 9.5e-85) {
tmp = ((2.0 * x) - ((y * 9.0) * (t * z))) + t_1;
} else {
tmp = t_1 + (z * ((2.0 * (x / z)) - (9.0 * (y * t))));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = a * (27.0 * b) tmp = 0 if z <= 9.5e-85: tmp = ((2.0 * x) - ((y * 9.0) * (t * z))) + t_1 else: tmp = t_1 + (z * ((2.0 * (x / z)) - (9.0 * (y * t)))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(27.0 * b)) tmp = 0.0 if (z <= 9.5e-85) tmp = Float64(Float64(Float64(2.0 * x) - Float64(Float64(y * 9.0) * Float64(t * z))) + t_1); else tmp = Float64(t_1 + Float64(z * Float64(Float64(2.0 * Float64(x / z)) - Float64(9.0 * Float64(y * t))))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = a * (27.0 * b);
tmp = 0.0;
if (z <= 9.5e-85)
tmp = ((2.0 * x) - ((y * 9.0) * (t * z))) + t_1;
else
tmp = t_1 + (z * ((2.0 * (x / z)) - (9.0 * (y * t))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 9.5e-85], N[(N[(N[(2.0 * x), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$1 + N[(z * N[(N[(2.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right)\\
\mathbf{if}\;z \leq 9.5 \cdot 10^{-85}:\\
\;\;\;\;\left(2 \cdot x - \left(y \cdot 9\right) \cdot \left(t \cdot z\right)\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 + z \cdot \left(2 \cdot \frac{x}{z} - 9 \cdot \left(y \cdot t\right)\right)\\
\end{array}
\end{array}
if z < 9.49999999999999964e-85Initial program 97.1%
associate-+l-97.1%
*-commutative97.1%
*-commutative97.1%
associate-*l*97.0%
associate-+l-97.0%
associate-*l*97.1%
*-commutative97.1%
*-commutative97.1%
associate-*l*94.4%
associate-*l*94.4%
Simplified94.4%
if 9.49999999999999964e-85 < z Initial program 90.5%
associate-+l-90.5%
*-commutative90.5%
*-commutative90.5%
associate-*l*90.4%
associate-+l-90.4%
associate-*l*90.5%
*-commutative90.5%
*-commutative90.5%
associate-*l*93.9%
associate-*l*92.6%
Simplified92.6%
Taylor expanded in z around inf 96.2%
Final simplification94.9%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* 27.0 (* a b))))
(if (<= z -2.55e-71)
(* y (- (* 27.0 (/ (* a b) y)) (* 9.0 (* t z))))
(if (<= z 1.4e-101) (+ (* 2.0 x) t_1) (- t_1 (* 9.0 (* t (* y z))))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 27.0 * (a * b);
double tmp;
if (z <= -2.55e-71) {
tmp = y * ((27.0 * ((a * b) / y)) - (9.0 * (t * z)));
} else if (z <= 1.4e-101) {
tmp = (2.0 * x) + t_1;
} else {
tmp = t_1 - (9.0 * (t * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = 27.0d0 * (a * b)
if (z <= (-2.55d-71)) then
tmp = y * ((27.0d0 * ((a * b) / y)) - (9.0d0 * (t * z)))
else if (z <= 1.4d-101) then
tmp = (2.0d0 * x) + t_1
else
tmp = t_1 - (9.0d0 * (t * (y * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 27.0 * (a * b);
double tmp;
if (z <= -2.55e-71) {
tmp = y * ((27.0 * ((a * b) / y)) - (9.0 * (t * z)));
} else if (z <= 1.4e-101) {
tmp = (2.0 * x) + t_1;
} else {
tmp = t_1 - (9.0 * (t * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = 27.0 * (a * b) tmp = 0 if z <= -2.55e-71: tmp = y * ((27.0 * ((a * b) / y)) - (9.0 * (t * z))) elif z <= 1.4e-101: tmp = (2.0 * x) + t_1 else: tmp = t_1 - (9.0 * (t * (y * z))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(27.0 * Float64(a * b)) tmp = 0.0 if (z <= -2.55e-71) tmp = Float64(y * Float64(Float64(27.0 * Float64(Float64(a * b) / y)) - Float64(9.0 * Float64(t * z)))); elseif (z <= 1.4e-101) tmp = Float64(Float64(2.0 * x) + t_1); else tmp = Float64(t_1 - Float64(9.0 * Float64(t * Float64(y * z)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = 27.0 * (a * b);
tmp = 0.0;
if (z <= -2.55e-71)
tmp = y * ((27.0 * ((a * b) / y)) - (9.0 * (t * z)));
elseif (z <= 1.4e-101)
tmp = (2.0 * x) + t_1;
else
tmp = t_1 - (9.0 * (t * (y * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.55e-71], N[(y * N[(N[(27.0 * N[(N[(a * b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e-101], N[(N[(2.0 * x), $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$1 - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;z \leq -2.55 \cdot 10^{-71}:\\
\;\;\;\;y \cdot \left(27 \cdot \frac{a \cdot b}{y} - 9 \cdot \left(t \cdot z\right)\right)\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-101}:\\
\;\;\;\;2 \cdot x + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -2.5500000000000001e-71Initial program 93.8%
associate-+l-93.8%
*-commutative93.8%
*-commutative93.8%
associate-*l*93.8%
associate-+l-93.8%
associate-*l*93.8%
*-commutative93.8%
*-commutative93.8%
associate-*l*89.2%
associate-*l*89.1%
Simplified89.1%
Taylor expanded in x around 0 72.9%
Taylor expanded in y around inf 66.9%
if -2.5500000000000001e-71 < z < 1.39999999999999995e-101Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-*r*87.7%
distribute-lft-neg-in87.7%
*-commutative87.7%
cancel-sign-sub-inv87.7%
associate-+r-87.7%
associate-*l*87.7%
fma-define87.7%
cancel-sign-sub-inv87.7%
fma-define87.7%
distribute-lft-neg-in87.7%
distribute-rgt-neg-in87.7%
*-commutative87.7%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around 0 82.0%
if 1.39999999999999995e-101 < z Initial program 90.7%
associate-+l-90.7%
*-commutative90.7%
*-commutative90.7%
associate-*l*90.7%
associate-+l-90.7%
associate-*l*90.7%
*-commutative90.7%
*-commutative90.7%
associate-*l*94.0%
associate-*l*92.8%
Simplified92.8%
Taylor expanded in x around 0 74.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 (* 27.0 (* a b))))
(if (<= z -8.4e-72)
(- (* 2.0 x) (* 9.0 (* z (* y t))))
(if (<= z 1.75e-104) (+ (* 2.0 x) t_1) (- t_1 (* 9.0 (* t (* y z))))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 27.0 * (a * b);
double tmp;
if (z <= -8.4e-72) {
tmp = (2.0 * x) - (9.0 * (z * (y * t)));
} else if (z <= 1.75e-104) {
tmp = (2.0 * x) + t_1;
} else {
tmp = t_1 - (9.0 * (t * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = 27.0d0 * (a * b)
if (z <= (-8.4d-72)) then
tmp = (2.0d0 * x) - (9.0d0 * (z * (y * t)))
else if (z <= 1.75d-104) then
tmp = (2.0d0 * x) + t_1
else
tmp = t_1 - (9.0d0 * (t * (y * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 27.0 * (a * b);
double tmp;
if (z <= -8.4e-72) {
tmp = (2.0 * x) - (9.0 * (z * (y * t)));
} else if (z <= 1.75e-104) {
tmp = (2.0 * x) + t_1;
} else {
tmp = t_1 - (9.0 * (t * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = 27.0 * (a * b) tmp = 0 if z <= -8.4e-72: tmp = (2.0 * x) - (9.0 * (z * (y * t))) elif z <= 1.75e-104: tmp = (2.0 * x) + t_1 else: tmp = t_1 - (9.0 * (t * (y * z))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(27.0 * Float64(a * b)) tmp = 0.0 if (z <= -8.4e-72) tmp = Float64(Float64(2.0 * x) - Float64(9.0 * Float64(z * Float64(y * t)))); elseif (z <= 1.75e-104) tmp = Float64(Float64(2.0 * x) + t_1); else tmp = Float64(t_1 - Float64(9.0 * Float64(t * Float64(y * z)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = 27.0 * (a * b);
tmp = 0.0;
if (z <= -8.4e-72)
tmp = (2.0 * x) - (9.0 * (z * (y * t)));
elseif (z <= 1.75e-104)
tmp = (2.0 * x) + t_1;
else
tmp = t_1 - (9.0 * (t * (y * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.4e-72], N[(N[(2.0 * x), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e-104], N[(N[(2.0 * x), $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$1 - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;z \leq -8.4 \cdot 10^{-72}:\\
\;\;\;\;2 \cdot x - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-104}:\\
\;\;\;\;2 \cdot x + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -8.4e-72Initial program 93.8%
+-commutative93.8%
associate-+r-93.8%
*-commutative93.8%
cancel-sign-sub-inv93.8%
associate-*r*96.1%
distribute-lft-neg-in96.1%
*-commutative96.1%
cancel-sign-sub-inv96.1%
associate-+r-96.1%
associate-*l*96.1%
fma-define98.5%
cancel-sign-sub-inv98.5%
fma-define98.5%
distribute-lft-neg-in98.5%
distribute-rgt-neg-in98.5%
*-commutative98.5%
associate-*r*96.3%
associate-*l*96.2%
neg-mul-196.2%
associate-*r*96.2%
Simplified96.2%
fma-undefine93.8%
fma-undefine93.8%
associate-+r+93.8%
*-commutative93.8%
associate-*l*89.1%
*-commutative89.1%
associate-*r*89.1%
*-commutative89.1%
*-commutative89.1%
associate-*r*89.1%
associate-*l*89.1%
metadata-eval89.1%
distribute-lft-neg-in89.1%
*-commutative89.1%
distribute-rgt-neg-in89.1%
*-commutative89.1%
associate-+r+89.1%
sub-neg89.1%
Applied egg-rr89.2%
Taylor expanded in b around 0 67.6%
*-commutative67.6%
*-commutative67.6%
associate-*r*68.7%
*-commutative68.7%
Simplified68.7%
if -8.4e-72 < z < 1.75000000000000014e-104Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-*r*87.7%
distribute-lft-neg-in87.7%
*-commutative87.7%
cancel-sign-sub-inv87.7%
associate-+r-87.7%
associate-*l*87.7%
fma-define87.7%
cancel-sign-sub-inv87.7%
fma-define87.7%
distribute-lft-neg-in87.7%
distribute-rgt-neg-in87.7%
*-commutative87.7%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around 0 82.0%
if 1.75000000000000014e-104 < z Initial program 90.7%
associate-+l-90.7%
*-commutative90.7%
*-commutative90.7%
associate-*l*90.7%
associate-+l-90.7%
associate-*l*90.7%
*-commutative90.7%
*-commutative90.7%
associate-*l*94.0%
associate-*l*92.8%
Simplified92.8%
Taylor expanded in x around 0 74.7%
Final simplification75.4%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (* 27.0 a))))
(if (<= z -1e+15)
(- (+ t_1 (* 2.0 x)) (* y (* 9.0 (* t z))))
(+ (- (* 2.0 x) (* t (* (* y 9.0) z))) t_1))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (27.0 * a);
double tmp;
if (z <= -1e+15) {
tmp = (t_1 + (2.0 * x)) - (y * (9.0 * (t * z)));
} else {
tmp = ((2.0 * x) - (t * ((y * 9.0) * z))) + t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (27.0d0 * a)
if (z <= (-1d+15)) then
tmp = (t_1 + (2.0d0 * x)) - (y * (9.0d0 * (t * z)))
else
tmp = ((2.0d0 * x) - (t * ((y * 9.0d0) * z))) + t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (27.0 * a);
double tmp;
if (z <= -1e+15) {
tmp = (t_1 + (2.0 * x)) - (y * (9.0 * (t * z)));
} else {
tmp = ((2.0 * x) - (t * ((y * 9.0) * z))) + t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = b * (27.0 * a) tmp = 0 if z <= -1e+15: tmp = (t_1 + (2.0 * x)) - (y * (9.0 * (t * z))) else: tmp = ((2.0 * x) - (t * ((y * 9.0) * z))) + t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(27.0 * a)) tmp = 0.0 if (z <= -1e+15) tmp = Float64(Float64(t_1 + Float64(2.0 * x)) - Float64(y * Float64(9.0 * Float64(t * z)))); else tmp = Float64(Float64(Float64(2.0 * x) - Float64(t * Float64(Float64(y * 9.0) * z))) + t_1); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = b * (27.0 * a);
tmp = 0.0;
if (z <= -1e+15)
tmp = (t_1 + (2.0 * x)) - (y * (9.0 * (t * z)));
else
tmp = ((2.0 * x) - (t * ((y * 9.0) * z))) + t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(27.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e+15], N[(N[(t$95$1 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision] - N[(y * N[(9.0 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 * x), $MachinePrecision] - N[(t * N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(27 \cdot a\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{+15}:\\
\;\;\;\;\left(t\_1 + 2 \cdot x\right) - y \cdot \left(9 \cdot \left(t \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot x - t \cdot \left(\left(y \cdot 9\right) \cdot z\right)\right) + t\_1\\
\end{array}
\end{array}
if z < -1e15Initial program 92.1%
+-commutative92.1%
associate-+r-92.1%
*-commutative92.1%
cancel-sign-sub-inv92.1%
associate-*r*95.0%
distribute-lft-neg-in95.0%
*-commutative95.0%
cancel-sign-sub-inv95.0%
associate-+r-95.0%
associate-*l*95.0%
fma-define98.2%
cancel-sign-sub-inv98.2%
fma-define98.2%
distribute-lft-neg-in98.2%
distribute-rgt-neg-in98.2%
*-commutative98.2%
associate-*r*95.3%
associate-*l*95.3%
neg-mul-195.3%
associate-*r*95.3%
Simplified95.3%
fma-undefine92.1%
fma-undefine92.1%
associate-+r+92.1%
*-commutative92.1%
associate-*l*86.1%
*-commutative86.1%
associate-*r*86.1%
*-commutative86.1%
*-commutative86.1%
associate-*r*86.1%
associate-*l*86.1%
metadata-eval86.1%
distribute-lft-neg-in86.1%
*-commutative86.1%
distribute-rgt-neg-in86.1%
*-commutative86.1%
associate-+r+86.1%
sub-neg86.1%
Applied egg-rr86.1%
if -1e15 < z Initial program 95.9%
Final simplification93.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z 1.9e+114) (+ (- (* 2.0 x) (* (* y 9.0) (* t z))) (* a (* 27.0 b))) (- (* 2.0 x) (* 9.0 (* z (* y t))))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.9e+114) {
tmp = ((2.0 * x) - ((y * 9.0) * (t * z))) + (a * (27.0 * b));
} else {
tmp = (2.0 * x) - (9.0 * (z * (y * t)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= 1.9d+114) then
tmp = ((2.0d0 * x) - ((y * 9.0d0) * (t * z))) + (a * (27.0d0 * b))
else
tmp = (2.0d0 * x) - (9.0d0 * (z * (y * t)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.9e+114) {
tmp = ((2.0 * x) - ((y * 9.0) * (t * z))) + (a * (27.0 * b));
} else {
tmp = (2.0 * x) - (9.0 * (z * (y * t)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= 1.9e+114: tmp = ((2.0 * x) - ((y * 9.0) * (t * z))) + (a * (27.0 * b)) else: tmp = (2.0 * x) - (9.0 * (z * (y * t))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 1.9e+114) tmp = Float64(Float64(Float64(2.0 * x) - Float64(Float64(y * 9.0) * Float64(t * z))) + Float64(a * Float64(27.0 * b))); else tmp = Float64(Float64(2.0 * x) - Float64(9.0 * Float64(z * Float64(y * t)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= 1.9e+114)
tmp = ((2.0 * x) - ((y * 9.0) * (t * z))) + (a * (27.0 * b));
else
tmp = (2.0 * x) - (9.0 * (z * (y * t)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 1.9e+114], N[(N[(N[(2.0 * x), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * x), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.9 \cdot 10^{+114}:\\
\;\;\;\;\left(2 \cdot x - \left(y \cdot 9\right) \cdot \left(t \cdot z\right)\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot x - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\end{array}
\end{array}
if z < 1.9e114Initial program 97.6%
associate-+l-97.6%
*-commutative97.6%
*-commutative97.6%
associate-*l*97.6%
associate-+l-97.6%
associate-*l*97.6%
*-commutative97.6%
*-commutative97.6%
associate-*l*95.4%
associate-*l*95.4%
Simplified95.4%
if 1.9e114 < z Initial program 80.3%
+-commutative80.3%
associate-+r-80.3%
*-commutative80.3%
cancel-sign-sub-inv80.3%
associate-*r*97.2%
distribute-lft-neg-in97.2%
*-commutative97.2%
cancel-sign-sub-inv97.2%
associate-+r-97.2%
associate-*l*94.7%
fma-define94.7%
cancel-sign-sub-inv94.7%
fma-define94.7%
distribute-lft-neg-in94.7%
distribute-rgt-neg-in94.7%
*-commutative94.7%
associate-*r*77.9%
associate-*l*77.9%
neg-mul-177.9%
associate-*r*77.9%
Simplified77.9%
fma-undefine77.9%
fma-undefine77.9%
associate-+r+77.9%
*-commutative77.9%
associate-*l*84.9%
*-commutative84.9%
associate-*r*84.9%
*-commutative84.9%
*-commutative84.9%
associate-*r*84.9%
associate-*l*84.9%
metadata-eval84.9%
distribute-lft-neg-in84.9%
*-commutative84.9%
distribute-rgt-neg-in84.9%
*-commutative84.9%
associate-+r+84.9%
sub-neg84.9%
Applied egg-rr87.4%
Taylor expanded in b around 0 55.4%
*-commutative55.4%
*-commutative55.4%
associate-*r*69.1%
*-commutative69.1%
Simplified69.1%
Final simplification91.4%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.1e-73) (not (<= z 9.8e+101))) (- (* 2.0 x) (* 9.0 (* z (* y t)))) (+ (* 2.0 x) (* 27.0 (* a b)))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.1e-73) || !(z <= 9.8e+101)) {
tmp = (2.0 * x) - (9.0 * (z * (y * t)));
} else {
tmp = (2.0 * x) + (27.0 * (a * b));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-4.1d-73)) .or. (.not. (z <= 9.8d+101))) then
tmp = (2.0d0 * x) - (9.0d0 * (z * (y * t)))
else
tmp = (2.0d0 * x) + (27.0d0 * (a * b))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.1e-73) || !(z <= 9.8e+101)) {
tmp = (2.0 * x) - (9.0 * (z * (y * t)));
} else {
tmp = (2.0 * x) + (27.0 * (a * b));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.1e-73) or not (z <= 9.8e+101): tmp = (2.0 * x) - (9.0 * (z * (y * t))) else: tmp = (2.0 * x) + (27.0 * (a * b)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.1e-73) || !(z <= 9.8e+101)) tmp = Float64(Float64(2.0 * x) - Float64(9.0 * Float64(z * Float64(y * t)))); else tmp = Float64(Float64(2.0 * x) + Float64(27.0 * Float64(a * b))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((z <= -4.1e-73) || ~((z <= 9.8e+101)))
tmp = (2.0 * x) - (9.0 * (z * (y * t)));
else
tmp = (2.0 * x) + (27.0 * (a * b));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.1e-73], N[Not[LessEqual[z, 9.8e+101]], $MachinePrecision]], N[(N[(2.0 * x), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * x), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{-73} \lor \neg \left(z \leq 9.8 \cdot 10^{+101}\right):\\
\;\;\;\;2 \cdot x - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot x + 27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if z < -4.10000000000000016e-73 or 9.79999999999999965e101 < z Initial program 89.6%
+-commutative89.6%
associate-+r-89.6%
*-commutative89.6%
cancel-sign-sub-inv89.6%
associate-*r*96.5%
distribute-lft-neg-in96.5%
*-commutative96.5%
cancel-sign-sub-inv96.5%
associate-+r-96.5%
associate-*l*95.7%
fma-define97.3%
cancel-sign-sub-inv97.3%
fma-define97.3%
distribute-lft-neg-in97.3%
distribute-rgt-neg-in97.3%
*-commutative97.3%
associate-*r*90.4%
associate-*l*90.4%
neg-mul-190.4%
associate-*r*90.4%
Simplified90.4%
fma-undefine88.8%
fma-undefine88.8%
associate-+r+88.8%
*-commutative88.8%
associate-*l*87.9%
*-commutative87.9%
associate-*r*87.9%
*-commutative87.9%
*-commutative87.9%
associate-*r*87.9%
associate-*l*87.9%
metadata-eval87.9%
distribute-lft-neg-in87.9%
*-commutative87.9%
distribute-rgt-neg-in87.9%
*-commutative87.9%
associate-+r+87.9%
sub-neg87.9%
Applied egg-rr88.8%
Taylor expanded in b around 0 63.4%
*-commutative63.4%
*-commutative63.4%
associate-*r*68.5%
*-commutative68.5%
Simplified68.5%
if -4.10000000000000016e-73 < z < 9.79999999999999965e101Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-*r*90.8%
distribute-lft-neg-in90.8%
*-commutative90.8%
cancel-sign-sub-inv90.8%
associate-+r-90.8%
associate-*l*90.8%
fma-define90.8%
cancel-sign-sub-inv90.8%
fma-define90.8%
distribute-lft-neg-in90.8%
distribute-rgt-neg-in90.8%
*-commutative90.8%
associate-*r*99.9%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around 0 78.2%
Final simplification73.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= z -3.7e+25)
(* y (* -9.0 (* t z)))
(if (<= z 9.8e+101)
(+ (* 2.0 x) (* 27.0 (* a b)))
(- (* 2.0 x) (* 9.0 (* t (* y z)))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.7e+25) {
tmp = y * (-9.0 * (t * z));
} else if (z <= 9.8e+101) {
tmp = (2.0 * x) + (27.0 * (a * b));
} else {
tmp = (2.0 * x) - (9.0 * (t * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-3.7d+25)) then
tmp = y * ((-9.0d0) * (t * z))
else if (z <= 9.8d+101) then
tmp = (2.0d0 * x) + (27.0d0 * (a * b))
else
tmp = (2.0d0 * x) - (9.0d0 * (t * (y * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.7e+25) {
tmp = y * (-9.0 * (t * z));
} else if (z <= 9.8e+101) {
tmp = (2.0 * x) + (27.0 * (a * b));
} else {
tmp = (2.0 * x) - (9.0 * (t * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -3.7e+25: tmp = y * (-9.0 * (t * z)) elif z <= 9.8e+101: tmp = (2.0 * x) + (27.0 * (a * b)) else: tmp = (2.0 * x) - (9.0 * (t * (y * z))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.7e+25) tmp = Float64(y * Float64(-9.0 * Float64(t * z))); elseif (z <= 9.8e+101) tmp = Float64(Float64(2.0 * x) + Float64(27.0 * Float64(a * b))); else tmp = Float64(Float64(2.0 * x) - Float64(9.0 * Float64(t * Float64(y * z)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -3.7e+25)
tmp = y * (-9.0 * (t * z));
elseif (z <= 9.8e+101)
tmp = (2.0 * x) + (27.0 * (a * b));
else
tmp = (2.0 * x) - (9.0 * (t * (y * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.7e+25], N[(y * N[(-9.0 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.8e+101], N[(N[(2.0 * x), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * x), $MachinePrecision] - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{+25}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(t \cdot z\right)\right)\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{+101}:\\
\;\;\;\;2 \cdot x + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot x - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -3.6999999999999999e25Initial program 92.0%
+-commutative92.0%
associate-+r-92.0%
*-commutative92.0%
cancel-sign-sub-inv92.0%
associate-*r*95.0%
distribute-lft-neg-in95.0%
*-commutative95.0%
cancel-sign-sub-inv95.0%
associate-+r-95.0%
associate-*l*95.0%
fma-define98.2%
cancel-sign-sub-inv98.2%
fma-define98.2%
distribute-lft-neg-in98.2%
distribute-rgt-neg-in98.2%
*-commutative98.2%
associate-*r*95.2%
associate-*l*95.2%
neg-mul-195.2%
associate-*r*95.2%
Simplified95.2%
Taylor expanded in t around inf 50.6%
*-commutative50.6%
associate-*r*50.6%
associate-*l*50.6%
Simplified50.6%
associate-*r*50.6%
associate-*r*50.6%
metadata-eval50.6%
distribute-rgt-neg-in50.6%
*-commutative50.6%
associate-*l*48.5%
associate-*r*48.5%
*-commutative48.5%
associate-*r*48.5%
*-commutative48.5%
Applied egg-rr48.5%
*-commutative48.5%
*-commutative48.5%
associate-*r*50.7%
associate-*r*50.7%
distribute-lft-neg-in50.7%
associate-*r*48.5%
associate-*r*48.5%
metadata-eval48.5%
Applied egg-rr48.5%
if -3.6999999999999999e25 < z < 9.79999999999999965e101Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-*r*92.0%
distribute-lft-neg-in92.0%
*-commutative92.0%
cancel-sign-sub-inv92.0%
associate-+r-92.0%
associate-*l*92.0%
fma-define92.0%
cancel-sign-sub-inv92.0%
fma-define92.0%
distribute-lft-neg-in92.0%
distribute-rgt-neg-in92.0%
*-commutative92.0%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around 0 76.6%
if 9.79999999999999965e101 < z Initial program 80.8%
associate-+l-80.8%
*-commutative80.8%
*-commutative80.8%
associate-*l*80.8%
associate-+l-80.8%
associate-*l*80.8%
*-commutative80.8%
*-commutative80.8%
associate-*l*87.7%
associate-*l*85.2%
Simplified85.2%
Taylor expanded in a around 0 54.1%
Final simplification66.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 -4.8e+24) (* y (* -9.0 (* t z))) (if (<= z 4.2e+118) (+ (* 2.0 x) (* 27.0 (* a b))) (* t (* y (* z -9.0))))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.8e+24) {
tmp = y * (-9.0 * (t * z));
} else if (z <= 4.2e+118) {
tmp = (2.0 * x) + (27.0 * (a * b));
} else {
tmp = 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.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-4.8d+24)) then
tmp = y * ((-9.0d0) * (t * z))
else if (z <= 4.2d+118) then
tmp = (2.0d0 * x) + (27.0d0 * (a * b))
else
tmp = t * (y * (z * (-9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.8e+24) {
tmp = y * (-9.0 * (t * z));
} else if (z <= 4.2e+118) {
tmp = (2.0 * x) + (27.0 * (a * b));
} else {
tmp = t * (y * (z * -9.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -4.8e+24: tmp = y * (-9.0 * (t * z)) elif z <= 4.2e+118: tmp = (2.0 * x) + (27.0 * (a * b)) else: tmp = t * (y * (z * -9.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -4.8e+24) tmp = Float64(y * Float64(-9.0 * Float64(t * z))); elseif (z <= 4.2e+118) tmp = Float64(Float64(2.0 * x) + Float64(27.0 * Float64(a * b))); else tmp = 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])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -4.8e+24)
tmp = y * (-9.0 * (t * z));
elseif (z <= 4.2e+118)
tmp = (2.0 * x) + (27.0 * (a * b));
else
tmp = 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. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.8e+24], N[(y * N[(-9.0 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e+118], N[(N[(2.0 * x), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+24}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(t \cdot z\right)\right)\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+118}:\\
\;\;\;\;2 \cdot x + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -4.8000000000000001e24Initial program 92.0%
+-commutative92.0%
associate-+r-92.0%
*-commutative92.0%
cancel-sign-sub-inv92.0%
associate-*r*95.0%
distribute-lft-neg-in95.0%
*-commutative95.0%
cancel-sign-sub-inv95.0%
associate-+r-95.0%
associate-*l*95.0%
fma-define98.2%
cancel-sign-sub-inv98.2%
fma-define98.2%
distribute-lft-neg-in98.2%
distribute-rgt-neg-in98.2%
*-commutative98.2%
associate-*r*95.2%
associate-*l*95.2%
neg-mul-195.2%
associate-*r*95.2%
Simplified95.2%
Taylor expanded in t around inf 50.6%
*-commutative50.6%
associate-*r*50.6%
associate-*l*50.6%
Simplified50.6%
associate-*r*50.6%
associate-*r*50.6%
metadata-eval50.6%
distribute-rgt-neg-in50.6%
*-commutative50.6%
associate-*l*48.5%
associate-*r*48.5%
*-commutative48.5%
associate-*r*48.5%
*-commutative48.5%
Applied egg-rr48.5%
*-commutative48.5%
*-commutative48.5%
associate-*r*50.7%
associate-*r*50.7%
distribute-lft-neg-in50.7%
associate-*r*48.5%
associate-*r*48.5%
metadata-eval48.5%
Applied egg-rr48.5%
if -4.8000000000000001e24 < z < 4.2e118Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-*r*92.0%
distribute-lft-neg-in92.0%
*-commutative92.0%
cancel-sign-sub-inv92.0%
associate-+r-92.0%
associate-*l*92.0%
fma-define92.0%
cancel-sign-sub-inv92.0%
fma-define92.0%
distribute-lft-neg-in92.0%
distribute-rgt-neg-in92.0%
*-commutative92.0%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around 0 76.8%
if 4.2e118 < z Initial program 80.3%
+-commutative80.3%
associate-+r-80.3%
*-commutative80.3%
cancel-sign-sub-inv80.3%
associate-*r*97.2%
distribute-lft-neg-in97.2%
*-commutative97.2%
cancel-sign-sub-inv97.2%
associate-+r-97.2%
associate-*l*94.7%
fma-define94.7%
cancel-sign-sub-inv94.7%
fma-define94.7%
distribute-lft-neg-in94.7%
distribute-rgt-neg-in94.7%
*-commutative94.7%
associate-*r*77.9%
associate-*l*77.9%
neg-mul-177.9%
associate-*r*77.9%
Simplified77.9%
Taylor expanded in t around inf 46.3%
*-commutative46.3%
associate-*r*46.3%
associate-*l*46.3%
Simplified46.3%
Final simplification65.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 (or (<= a -1.45e+56) (not (<= a 1.3e-52))) (* 27.0 (* a b)) (* 2.0 x)))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.45e+56) || !(a <= 1.3e-52)) {
tmp = 27.0 * (a * b);
} else {
tmp = 2.0 * x;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-1.45d+56)) .or. (.not. (a <= 1.3d-52))) then
tmp = 27.0d0 * (a * b)
else
tmp = 2.0d0 * x
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.45e+56) || !(a <= 1.3e-52)) {
tmp = 27.0 * (a * b);
} else {
tmp = 2.0 * x;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.45e+56) or not (a <= 1.3e-52): tmp = 27.0 * (a * b) else: tmp = 2.0 * x return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.45e+56) || !(a <= 1.3e-52)) tmp = Float64(27.0 * Float64(a * b)); else tmp = Float64(2.0 * x); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((a <= -1.45e+56) || ~((a <= 1.3e-52)))
tmp = 27.0 * (a * b);
else
tmp = 2.0 * x;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.45e+56], N[Not[LessEqual[a, 1.3e-52]], $MachinePrecision]], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], N[(2.0 * x), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.45 \cdot 10^{+56} \lor \neg \left(a \leq 1.3 \cdot 10^{-52}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot x\\
\end{array}
\end{array}
if a < -1.45000000000000004e56 or 1.2999999999999999e-52 < a Initial program 95.3%
+-commutative95.3%
associate-+r-95.3%
*-commutative95.3%
cancel-sign-sub-inv95.3%
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-define94.7%
cancel-sign-sub-inv94.7%
fma-define94.7%
distribute-lft-neg-in94.7%
distribute-rgt-neg-in94.7%
*-commutative94.7%
associate-*r*96.8%
associate-*l*96.8%
neg-mul-196.8%
associate-*r*96.8%
Simplified96.8%
Taylor expanded in a around inf 55.5%
if -1.45000000000000004e56 < a < 1.2999999999999999e-52Initial program 94.6%
+-commutative94.6%
associate-+r-94.6%
*-commutative94.6%
cancel-sign-sub-inv94.6%
associate-*r*93.8%
distribute-lft-neg-in93.8%
*-commutative93.8%
cancel-sign-sub-inv93.8%
associate-+r-93.8%
associate-*l*93.1%
fma-define93.1%
cancel-sign-sub-inv93.1%
fma-define93.1%
distribute-lft-neg-in93.1%
distribute-rgt-neg-in93.1%
*-commutative93.1%
associate-*r*93.9%
associate-*l*93.9%
neg-mul-193.9%
associate-*r*93.9%
Simplified93.9%
Taylor expanded in t around 0 57.0%
Taylor expanded in x around inf 44.4%
Final simplification50.0%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= a -2.7e+55) (* 27.0 (* a b)) (if (<= a 6.4e-44) (* 2.0 x) (* 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 (a <= -2.7e+55) {
tmp = 27.0 * (a * b);
} else if (a <= 6.4e-44) {
tmp = 2.0 * x;
} else {
tmp = a * (27.0 * b);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-2.7d+55)) then
tmp = 27.0d0 * (a * b)
else if (a <= 6.4d-44) then
tmp = 2.0d0 * x
else
tmp = a * (27.0d0 * b)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -2.7e+55) {
tmp = 27.0 * (a * b);
} else if (a <= 6.4e-44) {
tmp = 2.0 * x;
} else {
tmp = a * (27.0 * b);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if a <= -2.7e+55: tmp = 27.0 * (a * b) elif a <= 6.4e-44: tmp = 2.0 * x else: tmp = a * (27.0 * b) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -2.7e+55) tmp = Float64(27.0 * Float64(a * b)); elseif (a <= 6.4e-44) tmp = Float64(2.0 * x); else tmp = Float64(a * Float64(27.0 * b)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (a <= -2.7e+55)
tmp = 27.0 * (a * b);
elseif (a <= 6.4e-44)
tmp = 2.0 * x;
else
tmp = a * (27.0 * b);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -2.7e+55], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.4e-44], N[(2.0 * x), $MachinePrecision], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.7 \cdot 10^{+55}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq 6.4 \cdot 10^{-44}:\\
\;\;\;\;2 \cdot x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if a < -2.69999999999999977e55Initial program 96.0%
+-commutative96.0%
associate-+r-96.0%
*-commutative96.0%
cancel-sign-sub-inv96.0%
associate-*r*94.2%
distribute-lft-neg-in94.2%
*-commutative94.2%
cancel-sign-sub-inv94.2%
associate-+r-94.2%
associate-*l*94.1%
fma-define96.1%
cancel-sign-sub-inv96.1%
fma-define96.1%
distribute-lft-neg-in96.1%
distribute-rgt-neg-in96.1%
*-commutative96.1%
associate-*r*98.0%
associate-*l*98.0%
neg-mul-198.0%
associate-*r*98.0%
Simplified98.0%
Taylor expanded in a around inf 62.7%
if -2.69999999999999977e55 < a < 6.3999999999999999e-44Initial program 94.6%
+-commutative94.6%
associate-+r-94.6%
*-commutative94.6%
cancel-sign-sub-inv94.6%
associate-*r*93.9%
distribute-lft-neg-in93.9%
*-commutative93.9%
cancel-sign-sub-inv93.9%
associate-+r-93.9%
associate-*l*93.2%
fma-define93.2%
cancel-sign-sub-inv93.2%
fma-define93.2%
distribute-lft-neg-in93.2%
distribute-rgt-neg-in93.2%
*-commutative93.2%
associate-*r*93.9%
associate-*l*93.9%
neg-mul-193.9%
associate-*r*93.9%
Simplified93.9%
Taylor expanded in t around 0 57.3%
Taylor expanded in x around inf 44.1%
if 6.3999999999999999e-44 < a Initial program 94.8%
+-commutative94.8%
associate-+r-94.8%
*-commutative94.8%
cancel-sign-sub-inv94.8%
associate-*r*92.6%
distribute-lft-neg-in92.6%
*-commutative92.6%
cancel-sign-sub-inv92.6%
associate-+r-92.6%
associate-*l*92.5%
fma-define93.8%
cancel-sign-sub-inv93.8%
fma-define93.8%
distribute-lft-neg-in93.8%
distribute-rgt-neg-in93.8%
*-commutative93.8%
associate-*r*96.0%
associate-*l*96.0%
neg-mul-196.0%
associate-*r*96.0%
Simplified96.0%
Taylor expanded in t around 0 71.3%
Taylor expanded in b around inf 60.0%
Taylor expanded in b around inf 50.4%
*-commutative50.4%
associate-*r*50.4%
Simplified50.4%
Final simplification49.7%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= a -5e+54) (* 27.0 (* a b)) (if (<= a 1.55e-44) (* 2.0 x) (* b (* 27.0 a)))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -5e+54) {
tmp = 27.0 * (a * b);
} else if (a <= 1.55e-44) {
tmp = 2.0 * x;
} else {
tmp = b * (27.0 * a);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-5d+54)) then
tmp = 27.0d0 * (a * b)
else if (a <= 1.55d-44) then
tmp = 2.0d0 * x
else
tmp = b * (27.0d0 * a)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -5e+54) {
tmp = 27.0 * (a * b);
} else if (a <= 1.55e-44) {
tmp = 2.0 * x;
} else {
tmp = b * (27.0 * a);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if a <= -5e+54: tmp = 27.0 * (a * b) elif a <= 1.55e-44: tmp = 2.0 * x else: tmp = b * (27.0 * a) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -5e+54) tmp = Float64(27.0 * Float64(a * b)); elseif (a <= 1.55e-44) tmp = Float64(2.0 * x); else tmp = Float64(b * Float64(27.0 * a)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (a <= -5e+54)
tmp = 27.0 * (a * b);
elseif (a <= 1.55e-44)
tmp = 2.0 * x;
else
tmp = b * (27.0 * a);
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[a, -5e+54], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.55e-44], N[(2.0 * x), $MachinePrecision], N[(b * N[(27.0 * a), $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}\;a \leq -5 \cdot 10^{+54}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{-44}:\\
\;\;\;\;2 \cdot x\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(27 \cdot a\right)\\
\end{array}
\end{array}
if a < -5.00000000000000005e54Initial program 96.0%
+-commutative96.0%
associate-+r-96.0%
*-commutative96.0%
cancel-sign-sub-inv96.0%
associate-*r*94.2%
distribute-lft-neg-in94.2%
*-commutative94.2%
cancel-sign-sub-inv94.2%
associate-+r-94.2%
associate-*l*94.1%
fma-define96.1%
cancel-sign-sub-inv96.1%
fma-define96.1%
distribute-lft-neg-in96.1%
distribute-rgt-neg-in96.1%
*-commutative96.1%
associate-*r*98.0%
associate-*l*98.0%
neg-mul-198.0%
associate-*r*98.0%
Simplified98.0%
Taylor expanded in a around inf 62.7%
if -5.00000000000000005e54 < a < 1.54999999999999992e-44Initial program 94.6%
+-commutative94.6%
associate-+r-94.6%
*-commutative94.6%
cancel-sign-sub-inv94.6%
associate-*r*93.9%
distribute-lft-neg-in93.9%
*-commutative93.9%
cancel-sign-sub-inv93.9%
associate-+r-93.9%
associate-*l*93.2%
fma-define93.2%
cancel-sign-sub-inv93.2%
fma-define93.2%
distribute-lft-neg-in93.2%
distribute-rgt-neg-in93.2%
*-commutative93.2%
associate-*r*93.9%
associate-*l*93.9%
neg-mul-193.9%
associate-*r*93.9%
Simplified93.9%
Taylor expanded in t around 0 57.3%
Taylor expanded in x around inf 44.1%
if 1.54999999999999992e-44 < a Initial program 94.8%
+-commutative94.8%
associate-+r-94.8%
*-commutative94.8%
cancel-sign-sub-inv94.8%
associate-*r*92.6%
distribute-lft-neg-in92.6%
*-commutative92.6%
cancel-sign-sub-inv92.6%
associate-+r-92.6%
associate-*l*92.5%
fma-define93.8%
cancel-sign-sub-inv93.8%
fma-define93.8%
distribute-lft-neg-in93.8%
distribute-rgt-neg-in93.8%
*-commutative93.8%
associate-*r*96.0%
associate-*l*96.0%
neg-mul-196.0%
associate-*r*96.0%
Simplified96.0%
Taylor expanded in t around 0 71.3%
Taylor expanded in b around inf 60.0%
Taylor expanded in x around 0 50.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (* 2.0 x))
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 2.0 * x;
}
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 = 2.0d0 * x
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 2.0 * x;
}
[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 2.0 * x
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(2.0 * x) 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 = 2.0 * x;
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[(2.0 * x), $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])\\
\\
2 \cdot x
\end{array}
Initial program 95.0%
+-commutative95.0%
associate-+r-95.0%
*-commutative95.0%
cancel-sign-sub-inv95.0%
associate-*r*93.5%
distribute-lft-neg-in93.5%
*-commutative93.5%
cancel-sign-sub-inv93.5%
associate-+r-93.5%
associate-*l*93.1%
fma-define93.9%
cancel-sign-sub-inv93.9%
fma-define93.9%
distribute-lft-neg-in93.9%
distribute-rgt-neg-in93.9%
*-commutative93.9%
associate-*r*95.4%
associate-*l*95.3%
neg-mul-195.3%
associate-*r*95.3%
Simplified95.3%
Taylor expanded in t around 0 65.0%
Taylor expanded in x around inf 31.6%
(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 2024144
(FPCore (x y z t a b)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, A"
:precision binary64
:alt
(! :herbie-platform default (if (< y 7590524218811189/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x 2) (* (* (* y 9) z) t)) (* a (* 27 b))) (+ (- (* x 2) (* 9 (* y (* t z)))) (* (* a 27) b))))
(+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))