
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z 1e-116) (fma a (* 27.0 b) (fma x 2.0 (* y (* z (* t -9.0))))) (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);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1e-116) {
tmp = fma(a, (27.0 * b), fma(x, 2.0, (y * (z * (t * -9.0)))));
} 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]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 1e-116) tmp = fma(a, Float64(27.0 * b), fma(x, 2.0, Float64(y * Float64(z * Float64(t * -9.0))))); 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. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 1e-116], N[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 10^{-116}:\\
\;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\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 z < 9.9999999999999999e-117Initial program 95.6%
+-commutative95.6%
associate-+r-95.6%
*-commutative95.6%
cancel-sign-sub-inv95.6%
associate-*r*92.5%
distribute-lft-neg-in92.5%
*-commutative92.5%
cancel-sign-sub-inv92.5%
associate-+r-92.5%
associate-*l*92.5%
fma-define93.8%
fma-neg93.8%
associate-*l*95.0%
distribute-rgt-neg-in95.0%
*-commutative95.0%
associate-*l*95.0%
*-commutative95.0%
distribute-lft-neg-in95.0%
associate-*r*95.0%
Simplified95.0%
if 9.9999999999999999e-117 < z Initial program 91.9%
+-commutative91.9%
associate-+r-91.9%
*-commutative91.9%
cancel-sign-sub-inv91.9%
associate-*r*95.8%
distribute-lft-neg-in95.8%
*-commutative95.8%
cancel-sign-sub-inv95.8%
associate-+r-95.8%
associate-*l*96.7%
fma-define98.8%
cancel-sign-sub-inv98.8%
fma-define98.8%
distribute-lft-neg-in98.8%
distribute-rgt-neg-in98.8%
*-commutative98.8%
associate-*r*94.9%
associate-*l*94.9%
neg-mul-194.9%
associate-*r*94.9%
Simplified94.9%
Final simplification95.0%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= t 5e-192) (+ (- (* x 2.0) (* 9.0 (* z (* y t)))) (* a (* 27.0 b))) (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);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 5e-192) {
tmp = ((x * 2.0) - (9.0 * (z * (y * t)))) + (a * (27.0 * b));
} 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]) function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 5e-192) tmp = Float64(Float64(Float64(x * 2.0) - Float64(9.0 * Float64(z * Float64(y * t)))) + Float64(a * Float64(27.0 * b))); 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. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 5e-192], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 5 \cdot 10^{-192}:\\
\;\;\;\;\left(x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right) + a \cdot \left(27 \cdot b\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 t < 5.0000000000000001e-192Initial program 91.3%
sub-neg91.3%
sub-neg91.3%
associate-*l*90.6%
associate-*l*91.3%
Simplified91.3%
Taylor expanded in y around 0 92.0%
associate-*r*96.4%
Simplified96.4%
if 5.0000000000000001e-192 < t Initial program 98.0%
+-commutative98.0%
associate-+r-98.0%
*-commutative98.0%
cancel-sign-sub-inv98.0%
associate-*r*91.0%
distribute-lft-neg-in91.0%
*-commutative91.0%
cancel-sign-sub-inv91.0%
associate-+r-91.0%
associate-*l*91.0%
fma-define92.8%
cancel-sign-sub-inv92.8%
fma-define92.8%
distribute-lft-neg-in92.8%
distribute-rgt-neg-in92.8%
*-commutative92.8%
associate-*r*99.9%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Final simplification97.9%
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 (<= x -2e+110)
(* x 2.0)
(if (<= x -6.6e-59)
(* b (* a 27.0))
(if (<= x -1.05e-140)
(* -9.0 (* z (* y t)))
(if (<= x -3.2e-157)
(* 27.0 (* a b))
(if (or (<= x 1.55e-11) (and (not (<= x 9.4e+36)) (<= x 3.4e+105)))
(* -9.0 (* t (* z y)))
(* x 2.0)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2e+110) {
tmp = x * 2.0;
} else if (x <= -6.6e-59) {
tmp = b * (a * 27.0);
} else if (x <= -1.05e-140) {
tmp = -9.0 * (z * (y * t));
} else if (x <= -3.2e-157) {
tmp = 27.0 * (a * b);
} else if ((x <= 1.55e-11) || (!(x <= 9.4e+36) && (x <= 3.4e+105))) {
tmp = -9.0 * (t * (z * y));
} else {
tmp = x * 2.0;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-2d+110)) then
tmp = x * 2.0d0
else if (x <= (-6.6d-59)) then
tmp = b * (a * 27.0d0)
else if (x <= (-1.05d-140)) then
tmp = (-9.0d0) * (z * (y * t))
else if (x <= (-3.2d-157)) then
tmp = 27.0d0 * (a * b)
else if ((x <= 1.55d-11) .or. (.not. (x <= 9.4d+36)) .and. (x <= 3.4d+105)) then
tmp = (-9.0d0) * (t * (z * y))
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2e+110) {
tmp = x * 2.0;
} else if (x <= -6.6e-59) {
tmp = b * (a * 27.0);
} else if (x <= -1.05e-140) {
tmp = -9.0 * (z * (y * t));
} else if (x <= -3.2e-157) {
tmp = 27.0 * (a * b);
} else if ((x <= 1.55e-11) || (!(x <= 9.4e+36) && (x <= 3.4e+105))) {
tmp = -9.0 * (t * (z * y));
} else {
tmp = x * 2.0;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if x <= -2e+110: tmp = x * 2.0 elif x <= -6.6e-59: tmp = b * (a * 27.0) elif x <= -1.05e-140: tmp = -9.0 * (z * (y * t)) elif x <= -3.2e-157: tmp = 27.0 * (a * b) elif (x <= 1.55e-11) or (not (x <= 9.4e+36) and (x <= 3.4e+105)): tmp = -9.0 * (t * (z * y)) else: tmp = x * 2.0 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2e+110) tmp = Float64(x * 2.0); elseif (x <= -6.6e-59) tmp = Float64(b * Float64(a * 27.0)); elseif (x <= -1.05e-140) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (x <= -3.2e-157) tmp = Float64(27.0 * Float64(a * b)); elseif ((x <= 1.55e-11) || (!(x <= 9.4e+36) && (x <= 3.4e+105))) tmp = Float64(-9.0 * Float64(t * Float64(z * y))); else tmp = Float64(x * 2.0); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (x <= -2e+110)
tmp = x * 2.0;
elseif (x <= -6.6e-59)
tmp = b * (a * 27.0);
elseif (x <= -1.05e-140)
tmp = -9.0 * (z * (y * t));
elseif (x <= -3.2e-157)
tmp = 27.0 * (a * b);
elseif ((x <= 1.55e-11) || (~((x <= 9.4e+36)) && (x <= 3.4e+105)))
tmp = -9.0 * (t * (z * y));
else
tmp = x * 2.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2e+110], N[(x * 2.0), $MachinePrecision], If[LessEqual[x, -6.6e-59], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.05e-140], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.2e-157], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 1.55e-11], And[N[Not[LessEqual[x, 9.4e+36]], $MachinePrecision], LessEqual[x, 3.4e+105]]], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * 2.0), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+110}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -6.6 \cdot 10^{-59}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{elif}\;x \leq -1.05 \cdot 10^{-140}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;x \leq -3.2 \cdot 10^{-157}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;x \leq 1.55 \cdot 10^{-11} \lor \neg \left(x \leq 9.4 \cdot 10^{+36}\right) \land x \leq 3.4 \cdot 10^{+105}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if x < -2e110 or 1.55000000000000014e-11 < x < 9.39999999999999978e36 or 3.3999999999999999e105 < x Initial program 95.0%
sub-neg95.0%
sub-neg95.0%
associate-*l*91.0%
associate-*l*91.0%
Simplified91.0%
Taylor expanded in x around inf 67.6%
if -2e110 < x < -6.59999999999999964e-59Initial program 92.5%
sub-neg92.5%
sub-neg92.5%
associate-*l*97.3%
associate-*l*97.3%
Simplified97.3%
Taylor expanded in a around inf 51.9%
associate-*r*51.9%
Simplified51.9%
if -6.59999999999999964e-59 < x < -1.05000000000000009e-140Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*95.3%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in y around inf 55.9%
pow155.9%
*-commutative55.9%
associate-*l*59.5%
Applied egg-rr59.5%
unpow159.5%
associate-*r*55.9%
*-commutative55.9%
associate-*r*45.9%
Simplified45.9%
if -1.05000000000000009e-140 < x < -3.20000000000000021e-157Initial program 99.6%
sub-neg99.6%
sub-neg99.6%
associate-*l*99.6%
associate-*l*99.2%
Simplified99.2%
Taylor expanded in a around inf 99.6%
if -3.20000000000000021e-157 < x < 1.55000000000000014e-11 or 9.39999999999999978e36 < x < 3.3999999999999999e105Initial program 92.8%
sub-neg92.8%
sub-neg92.8%
associate-*l*90.7%
associate-*l*91.7%
Simplified91.7%
Taylor expanded in y around inf 60.0%
Final simplification61.2%
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 (<= x -5.5e+109)
(* x 2.0)
(if (<= x -9e-59)
(* b (* a 27.0))
(if (<= x -1.35e-141)
(* -9.0 (* z (* y t)))
(if (<= x -1.4e-158)
(* 27.0 (* a b))
(if (<= x 6.8e-16)
(* -9.0 (* t (* z y)))
(if (or (<= x 4.3e+38) (not (<= x 3.2e+105)))
(* x 2.0)
(* t (* -9.0 (* z y))))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -5.5e+109) {
tmp = x * 2.0;
} else if (x <= -9e-59) {
tmp = b * (a * 27.0);
} else if (x <= -1.35e-141) {
tmp = -9.0 * (z * (y * t));
} else if (x <= -1.4e-158) {
tmp = 27.0 * (a * b);
} else if (x <= 6.8e-16) {
tmp = -9.0 * (t * (z * y));
} else if ((x <= 4.3e+38) || !(x <= 3.2e+105)) {
tmp = x * 2.0;
} else {
tmp = t * (-9.0 * (z * y));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-5.5d+109)) then
tmp = x * 2.0d0
else if (x <= (-9d-59)) then
tmp = b * (a * 27.0d0)
else if (x <= (-1.35d-141)) then
tmp = (-9.0d0) * (z * (y * t))
else if (x <= (-1.4d-158)) then
tmp = 27.0d0 * (a * b)
else if (x <= 6.8d-16) then
tmp = (-9.0d0) * (t * (z * y))
else if ((x <= 4.3d+38) .or. (.not. (x <= 3.2d+105))) then
tmp = x * 2.0d0
else
tmp = t * ((-9.0d0) * (z * y))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -5.5e+109) {
tmp = x * 2.0;
} else if (x <= -9e-59) {
tmp = b * (a * 27.0);
} else if (x <= -1.35e-141) {
tmp = -9.0 * (z * (y * t));
} else if (x <= -1.4e-158) {
tmp = 27.0 * (a * b);
} else if (x <= 6.8e-16) {
tmp = -9.0 * (t * (z * y));
} else if ((x <= 4.3e+38) || !(x <= 3.2e+105)) {
tmp = x * 2.0;
} else {
tmp = t * (-9.0 * (z * y));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if x <= -5.5e+109: tmp = x * 2.0 elif x <= -9e-59: tmp = b * (a * 27.0) elif x <= -1.35e-141: tmp = -9.0 * (z * (y * t)) elif x <= -1.4e-158: tmp = 27.0 * (a * b) elif x <= 6.8e-16: tmp = -9.0 * (t * (z * y)) elif (x <= 4.3e+38) or not (x <= 3.2e+105): tmp = x * 2.0 else: tmp = t * (-9.0 * (z * y)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -5.5e+109) tmp = Float64(x * 2.0); elseif (x <= -9e-59) tmp = Float64(b * Float64(a * 27.0)); elseif (x <= -1.35e-141) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (x <= -1.4e-158) tmp = Float64(27.0 * Float64(a * b)); elseif (x <= 6.8e-16) tmp = Float64(-9.0 * Float64(t * Float64(z * y))); elseif ((x <= 4.3e+38) || !(x <= 3.2e+105)) tmp = Float64(x * 2.0); else tmp = Float64(t * Float64(-9.0 * Float64(z * y))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (x <= -5.5e+109)
tmp = x * 2.0;
elseif (x <= -9e-59)
tmp = b * (a * 27.0);
elseif (x <= -1.35e-141)
tmp = -9.0 * (z * (y * t));
elseif (x <= -1.4e-158)
tmp = 27.0 * (a * b);
elseif (x <= 6.8e-16)
tmp = -9.0 * (t * (z * y));
elseif ((x <= 4.3e+38) || ~((x <= 3.2e+105)))
tmp = x * 2.0;
else
tmp = t * (-9.0 * (z * y));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -5.5e+109], N[(x * 2.0), $MachinePrecision], If[LessEqual[x, -9e-59], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.35e-141], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.4e-158], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.8e-16], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 4.3e+38], N[Not[LessEqual[x, 3.2e+105]], $MachinePrecision]], N[(x * 2.0), $MachinePrecision], N[(t * N[(-9.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{+109}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -9 \cdot 10^{-59}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{-141}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;x \leq -1.4 \cdot 10^{-158}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;x \leq 6.8 \cdot 10^{-16}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{elif}\;x \leq 4.3 \cdot 10^{+38} \lor \neg \left(x \leq 3.2 \cdot 10^{+105}\right):\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-9 \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if x < -5.4999999999999998e109 or 6.8e-16 < x < 4.2999999999999997e38 or 3.2e105 < x Initial program 95.0%
sub-neg95.0%
sub-neg95.0%
associate-*l*91.0%
associate-*l*91.0%
Simplified91.0%
Taylor expanded in x around inf 67.6%
if -5.4999999999999998e109 < x < -9.00000000000000023e-59Initial program 92.5%
sub-neg92.5%
sub-neg92.5%
associate-*l*97.3%
associate-*l*97.3%
Simplified97.3%
Taylor expanded in a around inf 51.9%
associate-*r*51.9%
Simplified51.9%
if -9.00000000000000023e-59 < x < -1.3500000000000001e-141Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*95.3%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in y around inf 55.9%
pow155.9%
*-commutative55.9%
associate-*l*59.5%
Applied egg-rr59.5%
unpow159.5%
associate-*r*55.9%
*-commutative55.9%
associate-*r*45.9%
Simplified45.9%
if -1.3500000000000001e-141 < x < -1.40000000000000001e-158Initial program 99.6%
sub-neg99.6%
sub-neg99.6%
associate-*l*99.6%
associate-*l*99.2%
Simplified99.2%
Taylor expanded in a around inf 99.6%
if -1.40000000000000001e-158 < x < 6.8e-16Initial program 91.0%
sub-neg91.0%
sub-neg91.0%
associate-*l*89.7%
associate-*l*90.9%
Simplified90.9%
Taylor expanded in y around inf 60.3%
if 4.2999999999999997e38 < x < 3.2e105Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*94.8%
associate-*l*94.8%
Simplified94.8%
+-commutative94.8%
associate-+r-94.8%
associate-*r*94.8%
*-commutative94.8%
associate-*l*94.8%
associate-*l*94.7%
associate-*r*94.8%
Applied egg-rr94.8%
Taylor expanded in y around 0 99.8%
associate-*r*90.0%
associate-*r*89.9%
metadata-eval89.9%
distribute-lft-neg-in89.9%
*-commutative89.9%
distribute-lft-neg-in89.9%
metadata-eval89.9%
associate-*r*89.8%
*-commutative89.8%
associate-*l*89.9%
Simplified89.9%
Taylor expanded in z around inf 58.7%
*-commutative58.7%
*-commutative58.7%
associate-*r*58.8%
*-commutative58.8%
*-commutative58.8%
Simplified58.8%
Final simplification61.2%
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 (<= x -2.35e+111)
(* x 2.0)
(if (<= x -5.5e-59)
(* b (* a 27.0))
(if (<= x -9.5e-142)
(* -9.0 (* z (* y t)))
(if (<= x -1.6e-159)
(* 27.0 (* a b))
(if (<= x 3.7e-14)
(* -9.0 (* t (* z y)))
(if (or (<= x 4.05e+37) (not (<= x 6.2e+105)))
(* x 2.0)
(* t (* y (* z -9.0))))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.35e+111) {
tmp = x * 2.0;
} else if (x <= -5.5e-59) {
tmp = b * (a * 27.0);
} else if (x <= -9.5e-142) {
tmp = -9.0 * (z * (y * t));
} else if (x <= -1.6e-159) {
tmp = 27.0 * (a * b);
} else if (x <= 3.7e-14) {
tmp = -9.0 * (t * (z * y));
} else if ((x <= 4.05e+37) || !(x <= 6.2e+105)) {
tmp = x * 2.0;
} 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.
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 (x <= (-2.35d+111)) then
tmp = x * 2.0d0
else if (x <= (-5.5d-59)) then
tmp = b * (a * 27.0d0)
else if (x <= (-9.5d-142)) then
tmp = (-9.0d0) * (z * (y * t))
else if (x <= (-1.6d-159)) then
tmp = 27.0d0 * (a * b)
else if (x <= 3.7d-14) then
tmp = (-9.0d0) * (t * (z * y))
else if ((x <= 4.05d+37) .or. (.not. (x <= 6.2d+105))) then
tmp = x * 2.0d0
else
tmp = t * (y * (z * (-9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.35e+111) {
tmp = x * 2.0;
} else if (x <= -5.5e-59) {
tmp = b * (a * 27.0);
} else if (x <= -9.5e-142) {
tmp = -9.0 * (z * (y * t));
} else if (x <= -1.6e-159) {
tmp = 27.0 * (a * b);
} else if (x <= 3.7e-14) {
tmp = -9.0 * (t * (z * y));
} else if ((x <= 4.05e+37) || !(x <= 6.2e+105)) {
tmp = x * 2.0;
} else {
tmp = t * (y * (z * -9.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if x <= -2.35e+111: tmp = x * 2.0 elif x <= -5.5e-59: tmp = b * (a * 27.0) elif x <= -9.5e-142: tmp = -9.0 * (z * (y * t)) elif x <= -1.6e-159: tmp = 27.0 * (a * b) elif x <= 3.7e-14: tmp = -9.0 * (t * (z * y)) elif (x <= 4.05e+37) or not (x <= 6.2e+105): tmp = x * 2.0 else: tmp = t * (y * (z * -9.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.35e+111) tmp = Float64(x * 2.0); elseif (x <= -5.5e-59) tmp = Float64(b * Float64(a * 27.0)); elseif (x <= -9.5e-142) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (x <= -1.6e-159) tmp = Float64(27.0 * Float64(a * b)); elseif (x <= 3.7e-14) tmp = Float64(-9.0 * Float64(t * Float64(z * y))); elseif ((x <= 4.05e+37) || !(x <= 6.2e+105)) tmp = Float64(x * 2.0); 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])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (x <= -2.35e+111)
tmp = x * 2.0;
elseif (x <= -5.5e-59)
tmp = b * (a * 27.0);
elseif (x <= -9.5e-142)
tmp = -9.0 * (z * (y * t));
elseif (x <= -1.6e-159)
tmp = 27.0 * (a * b);
elseif (x <= 3.7e-14)
tmp = -9.0 * (t * (z * y));
elseif ((x <= 4.05e+37) || ~((x <= 6.2e+105)))
tmp = x * 2.0;
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. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.35e+111], N[(x * 2.0), $MachinePrecision], If[LessEqual[x, -5.5e-59], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -9.5e-142], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.6e-159], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.7e-14], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 4.05e+37], N[Not[LessEqual[x, 6.2e+105]], $MachinePrecision]], N[(x * 2.0), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.35 \cdot 10^{+111}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -5.5 \cdot 10^{-59}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{elif}\;x \leq -9.5 \cdot 10^{-142}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;x \leq -1.6 \cdot 10^{-159}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{-14}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{elif}\;x \leq 4.05 \cdot 10^{+37} \lor \neg \left(x \leq 6.2 \cdot 10^{+105}\right):\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\end{array}
\end{array}
if x < -2.35000000000000004e111 or 3.70000000000000001e-14 < x < 4.05000000000000003e37 or 6.20000000000000008e105 < x Initial program 95.0%
sub-neg95.0%
sub-neg95.0%
associate-*l*91.0%
associate-*l*91.0%
Simplified91.0%
Taylor expanded in x around inf 67.6%
if -2.35000000000000004e111 < x < -5.50000000000000014e-59Initial program 92.5%
sub-neg92.5%
sub-neg92.5%
associate-*l*97.3%
associate-*l*97.3%
Simplified97.3%
Taylor expanded in a around inf 51.9%
associate-*r*51.9%
Simplified51.9%
if -5.50000000000000014e-59 < x < -9.49999999999999967e-142Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*95.3%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in y around inf 55.9%
pow155.9%
*-commutative55.9%
associate-*l*59.5%
Applied egg-rr59.5%
unpow159.5%
associate-*r*55.9%
*-commutative55.9%
associate-*r*45.9%
Simplified45.9%
if -9.49999999999999967e-142 < x < -1.6e-159Initial program 99.6%
sub-neg99.6%
sub-neg99.6%
associate-*l*99.6%
associate-*l*99.2%
Simplified99.2%
Taylor expanded in a around inf 99.6%
if -1.6e-159 < x < 3.70000000000000001e-14Initial program 91.0%
sub-neg91.0%
sub-neg91.0%
associate-*l*89.7%
associate-*l*90.9%
Simplified90.9%
Taylor expanded in y around inf 60.3%
if 4.05000000000000003e37 < x < 6.20000000000000008e105Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*94.8%
associate-*l*94.8%
Simplified94.8%
Taylor expanded in a around 0 79.1%
Taylor expanded in t around inf 74.1%
Taylor expanded in x around 0 58.8%
*-commutative58.8%
associate-*l*58.8%
Simplified58.8%
Final simplification61.2%
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 (<= x -3.2e+110)
(* x 2.0)
(if (<= x -8.5e-59)
(* b (* a 27.0))
(if (<= x -6.4e-141)
(* -9.0 (* z (* y t)))
(if (<= x -1.65e-158)
(* 27.0 (* a b))
(if (<= x 3.2e-14)
(* y (* -9.0 (* z t)))
(if (or (<= x 1.2e+38) (not (<= x 2.5e+105)))
(* x 2.0)
(* t (* y (* z -9.0))))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -3.2e+110) {
tmp = x * 2.0;
} else if (x <= -8.5e-59) {
tmp = b * (a * 27.0);
} else if (x <= -6.4e-141) {
tmp = -9.0 * (z * (y * t));
} else if (x <= -1.65e-158) {
tmp = 27.0 * (a * b);
} else if (x <= 3.2e-14) {
tmp = y * (-9.0 * (z * t));
} else if ((x <= 1.2e+38) || !(x <= 2.5e+105)) {
tmp = x * 2.0;
} 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.
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 (x <= (-3.2d+110)) then
tmp = x * 2.0d0
else if (x <= (-8.5d-59)) then
tmp = b * (a * 27.0d0)
else if (x <= (-6.4d-141)) then
tmp = (-9.0d0) * (z * (y * t))
else if (x <= (-1.65d-158)) then
tmp = 27.0d0 * (a * b)
else if (x <= 3.2d-14) then
tmp = y * ((-9.0d0) * (z * t))
else if ((x <= 1.2d+38) .or. (.not. (x <= 2.5d+105))) then
tmp = x * 2.0d0
else
tmp = t * (y * (z * (-9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -3.2e+110) {
tmp = x * 2.0;
} else if (x <= -8.5e-59) {
tmp = b * (a * 27.0);
} else if (x <= -6.4e-141) {
tmp = -9.0 * (z * (y * t));
} else if (x <= -1.65e-158) {
tmp = 27.0 * (a * b);
} else if (x <= 3.2e-14) {
tmp = y * (-9.0 * (z * t));
} else if ((x <= 1.2e+38) || !(x <= 2.5e+105)) {
tmp = x * 2.0;
} else {
tmp = t * (y * (z * -9.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if x <= -3.2e+110: tmp = x * 2.0 elif x <= -8.5e-59: tmp = b * (a * 27.0) elif x <= -6.4e-141: tmp = -9.0 * (z * (y * t)) elif x <= -1.65e-158: tmp = 27.0 * (a * b) elif x <= 3.2e-14: tmp = y * (-9.0 * (z * t)) elif (x <= 1.2e+38) or not (x <= 2.5e+105): tmp = x * 2.0 else: tmp = t * (y * (z * -9.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -3.2e+110) tmp = Float64(x * 2.0); elseif (x <= -8.5e-59) tmp = Float64(b * Float64(a * 27.0)); elseif (x <= -6.4e-141) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (x <= -1.65e-158) tmp = Float64(27.0 * Float64(a * b)); elseif (x <= 3.2e-14) tmp = Float64(y * Float64(-9.0 * Float64(z * t))); elseif ((x <= 1.2e+38) || !(x <= 2.5e+105)) tmp = Float64(x * 2.0); 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])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (x <= -3.2e+110)
tmp = x * 2.0;
elseif (x <= -8.5e-59)
tmp = b * (a * 27.0);
elseif (x <= -6.4e-141)
tmp = -9.0 * (z * (y * t));
elseif (x <= -1.65e-158)
tmp = 27.0 * (a * b);
elseif (x <= 3.2e-14)
tmp = y * (-9.0 * (z * t));
elseif ((x <= 1.2e+38) || ~((x <= 2.5e+105)))
tmp = x * 2.0;
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. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -3.2e+110], N[(x * 2.0), $MachinePrecision], If[LessEqual[x, -8.5e-59], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.4e-141], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.65e-158], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.2e-14], N[(y * N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 1.2e+38], N[Not[LessEqual[x, 2.5e+105]], $MachinePrecision]], N[(x * 2.0), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.2 \cdot 10^{+110}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -8.5 \cdot 10^{-59}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{elif}\;x \leq -6.4 \cdot 10^{-141}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;x \leq -1.65 \cdot 10^{-158}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{-14}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{+38} \lor \neg \left(x \leq 2.5 \cdot 10^{+105}\right):\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\end{array}
\end{array}
if x < -3.19999999999999994e110 or 3.2000000000000002e-14 < x < 1.20000000000000009e38 or 2.50000000000000023e105 < x Initial program 95.0%
sub-neg95.0%
sub-neg95.0%
associate-*l*91.0%
associate-*l*91.0%
Simplified91.0%
Taylor expanded in x around inf 67.6%
if -3.19999999999999994e110 < x < -8.49999999999999933e-59Initial program 92.5%
sub-neg92.5%
sub-neg92.5%
associate-*l*97.3%
associate-*l*97.3%
Simplified97.3%
Taylor expanded in a around inf 51.9%
associate-*r*51.9%
Simplified51.9%
if -8.49999999999999933e-59 < x < -6.4000000000000003e-141Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*95.3%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in y around inf 55.9%
pow155.9%
*-commutative55.9%
associate-*l*59.5%
Applied egg-rr59.5%
unpow159.5%
associate-*r*55.9%
*-commutative55.9%
associate-*r*45.9%
Simplified45.9%
if -6.4000000000000003e-141 < x < -1.6500000000000001e-158Initial program 99.6%
sub-neg99.6%
sub-neg99.6%
associate-*l*99.6%
associate-*l*99.2%
Simplified99.2%
Taylor expanded in a around inf 99.6%
if -1.6500000000000001e-158 < x < 3.2000000000000002e-14Initial program 91.0%
sub-neg91.0%
sub-neg91.0%
associate-*l*89.7%
associate-*l*90.9%
Simplified90.9%
Taylor expanded in a around 0 65.2%
Taylor expanded in y around inf 62.7%
Taylor expanded in x around 0 57.8%
if 1.20000000000000009e38 < x < 2.50000000000000023e105Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*94.8%
associate-*l*94.8%
Simplified94.8%
Taylor expanded in a around 0 79.1%
Taylor expanded in t around inf 74.1%
Taylor expanded in x around 0 58.8%
*-commutative58.8%
associate-*l*58.8%
Simplified58.8%
Final simplification60.5%
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 (<= x -1.6e+111)
(* x 2.0)
(if (<= x -7e-59)
(* b (* a 27.0))
(if (<= x -4.1e-141)
(* z (* y (* t -9.0)))
(if (<= x -3.1e-158)
(* 27.0 (* a b))
(if (<= x 1.05e-12)
(* y (* -9.0 (* z t)))
(if (or (<= x 8e+38) (not (<= x 3.4e+105)))
(* x 2.0)
(* t (* y (* z -9.0))))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.6e+111) {
tmp = x * 2.0;
} else if (x <= -7e-59) {
tmp = b * (a * 27.0);
} else if (x <= -4.1e-141) {
tmp = z * (y * (t * -9.0));
} else if (x <= -3.1e-158) {
tmp = 27.0 * (a * b);
} else if (x <= 1.05e-12) {
tmp = y * (-9.0 * (z * t));
} else if ((x <= 8e+38) || !(x <= 3.4e+105)) {
tmp = x * 2.0;
} 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.
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 (x <= (-1.6d+111)) then
tmp = x * 2.0d0
else if (x <= (-7d-59)) then
tmp = b * (a * 27.0d0)
else if (x <= (-4.1d-141)) then
tmp = z * (y * (t * (-9.0d0)))
else if (x <= (-3.1d-158)) then
tmp = 27.0d0 * (a * b)
else if (x <= 1.05d-12) then
tmp = y * ((-9.0d0) * (z * t))
else if ((x <= 8d+38) .or. (.not. (x <= 3.4d+105))) then
tmp = x * 2.0d0
else
tmp = t * (y * (z * (-9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.6e+111) {
tmp = x * 2.0;
} else if (x <= -7e-59) {
tmp = b * (a * 27.0);
} else if (x <= -4.1e-141) {
tmp = z * (y * (t * -9.0));
} else if (x <= -3.1e-158) {
tmp = 27.0 * (a * b);
} else if (x <= 1.05e-12) {
tmp = y * (-9.0 * (z * t));
} else if ((x <= 8e+38) || !(x <= 3.4e+105)) {
tmp = x * 2.0;
} else {
tmp = t * (y * (z * -9.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if x <= -1.6e+111: tmp = x * 2.0 elif x <= -7e-59: tmp = b * (a * 27.0) elif x <= -4.1e-141: tmp = z * (y * (t * -9.0)) elif x <= -3.1e-158: tmp = 27.0 * (a * b) elif x <= 1.05e-12: tmp = y * (-9.0 * (z * t)) elif (x <= 8e+38) or not (x <= 3.4e+105): tmp = x * 2.0 else: tmp = t * (y * (z * -9.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.6e+111) tmp = Float64(x * 2.0); elseif (x <= -7e-59) tmp = Float64(b * Float64(a * 27.0)); elseif (x <= -4.1e-141) tmp = Float64(z * Float64(y * Float64(t * -9.0))); elseif (x <= -3.1e-158) tmp = Float64(27.0 * Float64(a * b)); elseif (x <= 1.05e-12) tmp = Float64(y * Float64(-9.0 * Float64(z * t))); elseif ((x <= 8e+38) || !(x <= 3.4e+105)) tmp = Float64(x * 2.0); 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])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (x <= -1.6e+111)
tmp = x * 2.0;
elseif (x <= -7e-59)
tmp = b * (a * 27.0);
elseif (x <= -4.1e-141)
tmp = z * (y * (t * -9.0));
elseif (x <= -3.1e-158)
tmp = 27.0 * (a * b);
elseif (x <= 1.05e-12)
tmp = y * (-9.0 * (z * t));
elseif ((x <= 8e+38) || ~((x <= 3.4e+105)))
tmp = x * 2.0;
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. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.6e+111], N[(x * 2.0), $MachinePrecision], If[LessEqual[x, -7e-59], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.1e-141], N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.1e-158], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e-12], N[(y * N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 8e+38], N[Not[LessEqual[x, 3.4e+105]], $MachinePrecision]], N[(x * 2.0), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.6 \cdot 10^{+111}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -7 \cdot 10^{-59}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{elif}\;x \leq -4.1 \cdot 10^{-141}:\\
\;\;\;\;z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;x \leq -3.1 \cdot 10^{-158}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{-12}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;x \leq 8 \cdot 10^{+38} \lor \neg \left(x \leq 3.4 \cdot 10^{+105}\right):\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\end{array}
\end{array}
if x < -1.6e111 or 1.04999999999999997e-12 < x < 7.99999999999999982e38 or 3.3999999999999999e105 < x Initial program 95.0%
sub-neg95.0%
sub-neg95.0%
associate-*l*91.0%
associate-*l*91.0%
Simplified91.0%
Taylor expanded in x around inf 67.6%
if -1.6e111 < x < -7.0000000000000002e-59Initial program 92.5%
sub-neg92.5%
sub-neg92.5%
associate-*l*97.3%
associate-*l*97.3%
Simplified97.3%
Taylor expanded in a around inf 51.9%
associate-*r*51.9%
Simplified51.9%
if -7.0000000000000002e-59 < x < -4.10000000000000002e-141Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*95.3%
associate-*l*95.3%
Simplified95.3%
+-commutative95.3%
associate-+r-95.3%
associate-*r*95.3%
*-commutative95.3%
associate-*l*95.4%
associate-*l*95.5%
associate-*r*95.5%
Applied egg-rr95.5%
Taylor expanded in y around 0 99.8%
associate-*r*89.9%
associate-*r*90.1%
metadata-eval90.1%
distribute-lft-neg-in90.1%
*-commutative90.1%
distribute-lft-neg-in90.1%
metadata-eval90.1%
associate-*r*90.1%
*-commutative90.1%
associate-*l*90.1%
Simplified90.1%
Taylor expanded in z around inf 55.9%
associate-*r*56.0%
*-commutative56.0%
*-commutative56.0%
*-commutative56.0%
associate-*r*46.0%
Simplified46.0%
if -4.10000000000000002e-141 < x < -3.10000000000000018e-158Initial program 99.6%
sub-neg99.6%
sub-neg99.6%
associate-*l*99.6%
associate-*l*99.2%
Simplified99.2%
Taylor expanded in a around inf 99.6%
if -3.10000000000000018e-158 < x < 1.04999999999999997e-12Initial program 91.0%
sub-neg91.0%
sub-neg91.0%
associate-*l*89.7%
associate-*l*90.9%
Simplified90.9%
Taylor expanded in a around 0 65.2%
Taylor expanded in y around inf 62.7%
Taylor expanded in x around 0 57.8%
if 7.99999999999999982e38 < x < 3.3999999999999999e105Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*94.8%
associate-*l*94.8%
Simplified94.8%
Taylor expanded in a around 0 79.1%
Taylor expanded in t around inf 74.1%
Taylor expanded in x around 0 58.8%
*-commutative58.8%
associate-*l*58.8%
Simplified58.8%
Final simplification60.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* 27.0 (* a b)) (* x 2.0)))
(t_2 (+ (* z (* -9.0 (* y t))) (* x 2.0))))
(if (<= z -6.6e-168)
t_2
(if (<= z -2.9e-230)
t_1
(if (<= z -2.35e-269)
t_2
(if (<= z -3.6e-270)
(* y (* -9.0 (* z t)))
(if (<= z 1.2e-168) t_1 t_2)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (27.0 * (a * b)) + (x * 2.0);
double t_2 = (z * (-9.0 * (y * t))) + (x * 2.0);
double tmp;
if (z <= -6.6e-168) {
tmp = t_2;
} else if (z <= -2.9e-230) {
tmp = t_1;
} else if (z <= -2.35e-269) {
tmp = t_2;
} else if (z <= -3.6e-270) {
tmp = y * (-9.0 * (z * t));
} else if (z <= 1.2e-168) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (27.0d0 * (a * b)) + (x * 2.0d0)
t_2 = (z * ((-9.0d0) * (y * t))) + (x * 2.0d0)
if (z <= (-6.6d-168)) then
tmp = t_2
else if (z <= (-2.9d-230)) then
tmp = t_1
else if (z <= (-2.35d-269)) then
tmp = t_2
else if (z <= (-3.6d-270)) then
tmp = y * ((-9.0d0) * (z * t))
else if (z <= 1.2d-168) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (27.0 * (a * b)) + (x * 2.0);
double t_2 = (z * (-9.0 * (y * t))) + (x * 2.0);
double tmp;
if (z <= -6.6e-168) {
tmp = t_2;
} else if (z <= -2.9e-230) {
tmp = t_1;
} else if (z <= -2.35e-269) {
tmp = t_2;
} else if (z <= -3.6e-270) {
tmp = y * (-9.0 * (z * t));
} else if (z <= 1.2e-168) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = (27.0 * (a * b)) + (x * 2.0) t_2 = (z * (-9.0 * (y * t))) + (x * 2.0) tmp = 0 if z <= -6.6e-168: tmp = t_2 elif z <= -2.9e-230: tmp = t_1 elif z <= -2.35e-269: tmp = t_2 elif z <= -3.6e-270: tmp = y * (-9.0 * (z * t)) elif z <= 1.2e-168: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)) t_2 = Float64(Float64(z * Float64(-9.0 * Float64(y * t))) + Float64(x * 2.0)) tmp = 0.0 if (z <= -6.6e-168) tmp = t_2; elseif (z <= -2.9e-230) tmp = t_1; elseif (z <= -2.35e-269) tmp = t_2; elseif (z <= -3.6e-270) tmp = Float64(y * Float64(-9.0 * Float64(z * t))); elseif (z <= 1.2e-168) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (27.0 * (a * b)) + (x * 2.0);
t_2 = (z * (-9.0 * (y * t))) + (x * 2.0);
tmp = 0.0;
if (z <= -6.6e-168)
tmp = t_2;
elseif (z <= -2.9e-230)
tmp = t_1;
elseif (z <= -2.35e-269)
tmp = t_2;
elseif (z <= -3.6e-270)
tmp = y * (-9.0 * (z * t));
elseif (z <= 1.2e-168)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * N[(-9.0 * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.6e-168], t$95$2, If[LessEqual[z, -2.9e-230], t$95$1, If[LessEqual[z, -2.35e-269], t$95$2, If[LessEqual[z, -3.6e-270], N[(y * N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e-168], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(a \cdot b\right) + x \cdot 2\\
t_2 := z \cdot \left(-9 \cdot \left(y \cdot t\right)\right) + x \cdot 2\\
\mathbf{if}\;z \leq -6.6 \cdot 10^{-168}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-230}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.35 \cdot 10^{-269}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-270}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-168}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -6.6000000000000003e-168 or -2.90000000000000005e-230 < z < -2.3499999999999999e-269 or 1.2e-168 < z Initial program 92.7%
sub-neg92.7%
sub-neg92.7%
associate-*l*90.8%
associate-*l*91.2%
Simplified91.2%
Taylor expanded in a around 0 72.6%
cancel-sign-sub-inv72.6%
*-commutative72.6%
metadata-eval72.6%
+-commutative72.6%
associate-*r*72.5%
associate-*r*73.9%
*-commutative73.9%
Applied egg-rr73.9%
Taylor expanded in t around 0 73.9%
if -6.6000000000000003e-168 < z < -2.90000000000000005e-230 or -3.5999999999999998e-270 < z < 1.2e-168Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*98.2%
associate-*l*98.2%
Simplified98.2%
Taylor expanded in y around 0 90.9%
if -2.3499999999999999e-269 < z < -3.5999999999999998e-270Initial program 99.2%
sub-neg99.2%
sub-neg99.2%
associate-*l*99.2%
associate-*l*99.2%
Simplified99.2%
Taylor expanded in a around 0 98.4%
Taylor expanded in y around inf 100.0%
Taylor expanded in x around 0 100.0%
Final simplification77.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* z (* -9.0 (* y t))) (* x 2.0)))
(t_2 (+ (* 27.0 (* a b)) (* x 2.0))))
(if (<= z -6.2e-168)
(+ (* x 2.0) (* z (* y (* t -9.0))))
(if (<= z -2.9e-230)
t_2
(if (<= z -2.35e-269)
t_1
(if (<= z -3.6e-270)
(* y (* -9.0 (* z t)))
(if (<= z 1.06e-175) t_2 t_1)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * (-9.0 * (y * t))) + (x * 2.0);
double t_2 = (27.0 * (a * b)) + (x * 2.0);
double tmp;
if (z <= -6.2e-168) {
tmp = (x * 2.0) + (z * (y * (t * -9.0)));
} else if (z <= -2.9e-230) {
tmp = t_2;
} else if (z <= -2.35e-269) {
tmp = t_1;
} else if (z <= -3.6e-270) {
tmp = y * (-9.0 * (z * t));
} else if (z <= 1.06e-175) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z * ((-9.0d0) * (y * t))) + (x * 2.0d0)
t_2 = (27.0d0 * (a * b)) + (x * 2.0d0)
if (z <= (-6.2d-168)) then
tmp = (x * 2.0d0) + (z * (y * (t * (-9.0d0))))
else if (z <= (-2.9d-230)) then
tmp = t_2
else if (z <= (-2.35d-269)) then
tmp = t_1
else if (z <= (-3.6d-270)) then
tmp = y * ((-9.0d0) * (z * t))
else if (z <= 1.06d-175) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * (-9.0 * (y * t))) + (x * 2.0);
double t_2 = (27.0 * (a * b)) + (x * 2.0);
double tmp;
if (z <= -6.2e-168) {
tmp = (x * 2.0) + (z * (y * (t * -9.0)));
} else if (z <= -2.9e-230) {
tmp = t_2;
} else if (z <= -2.35e-269) {
tmp = t_1;
} else if (z <= -3.6e-270) {
tmp = y * (-9.0 * (z * t));
} else if (z <= 1.06e-175) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = (z * (-9.0 * (y * t))) + (x * 2.0) t_2 = (27.0 * (a * b)) + (x * 2.0) tmp = 0 if z <= -6.2e-168: tmp = (x * 2.0) + (z * (y * (t * -9.0))) elif z <= -2.9e-230: tmp = t_2 elif z <= -2.35e-269: tmp = t_1 elif z <= -3.6e-270: tmp = y * (-9.0 * (z * t)) elif z <= 1.06e-175: tmp = t_2 else: tmp = t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(-9.0 * Float64(y * t))) + Float64(x * 2.0)) t_2 = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)) tmp = 0.0 if (z <= -6.2e-168) tmp = Float64(Float64(x * 2.0) + Float64(z * Float64(y * Float64(t * -9.0)))); elseif (z <= -2.9e-230) tmp = t_2; elseif (z <= -2.35e-269) tmp = t_1; elseif (z <= -3.6e-270) tmp = Float64(y * Float64(-9.0 * Float64(z * t))); elseif (z <= 1.06e-175) tmp = t_2; else tmp = t_1; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (z * (-9.0 * (y * t))) + (x * 2.0);
t_2 = (27.0 * (a * b)) + (x * 2.0);
tmp = 0.0;
if (z <= -6.2e-168)
tmp = (x * 2.0) + (z * (y * (t * -9.0)));
elseif (z <= -2.9e-230)
tmp = t_2;
elseif (z <= -2.35e-269)
tmp = t_1;
elseif (z <= -3.6e-270)
tmp = y * (-9.0 * (z * t));
elseif (z <= 1.06e-175)
tmp = t_2;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(-9.0 * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.2e-168], N[(N[(x * 2.0), $MachinePrecision] + N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.9e-230], t$95$2, If[LessEqual[z, -2.35e-269], t$95$1, If[LessEqual[z, -3.6e-270], N[(y * N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.06e-175], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := z \cdot \left(-9 \cdot \left(y \cdot t\right)\right) + x \cdot 2\\
t_2 := 27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{-168}:\\
\;\;\;\;x \cdot 2 + z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-230}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.35 \cdot 10^{-269}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-270}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;z \leq 1.06 \cdot 10^{-175}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.2e-168Initial program 92.7%
sub-neg92.7%
sub-neg92.7%
associate-*l*90.5%
associate-*l*90.4%
Simplified90.4%
Taylor expanded in a around 0 68.9%
cancel-sign-sub-inv68.9%
*-commutative68.9%
metadata-eval68.9%
+-commutative68.9%
associate-*r*68.9%
associate-*r*69.9%
*-commutative69.9%
Applied egg-rr69.9%
if -6.2e-168 < z < -2.90000000000000005e-230 or -3.5999999999999998e-270 < z < 1.06000000000000002e-175Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*98.1%
associate-*l*98.2%
Simplified98.2%
Taylor expanded in y around 0 90.7%
if -2.90000000000000005e-230 < z < -2.3499999999999999e-269 or 1.06000000000000002e-175 < z Initial program 92.8%
sub-neg92.8%
sub-neg92.8%
associate-*l*91.1%
associate-*l*91.9%
Simplified91.9%
Taylor expanded in a around 0 75.9%
cancel-sign-sub-inv75.9%
*-commutative75.9%
metadata-eval75.9%
+-commutative75.9%
associate-*r*75.9%
associate-*r*77.6%
*-commutative77.6%
Applied egg-rr77.6%
Taylor expanded in t around 0 77.7%
if -2.3499999999999999e-269 < z < -3.5999999999999998e-270Initial program 99.2%
sub-neg99.2%
sub-neg99.2%
associate-*l*99.2%
associate-*l*99.2%
Simplified99.2%
Taylor expanded in a around 0 98.4%
Taylor expanded in y around inf 100.0%
Taylor expanded in x around 0 100.0%
Final simplification77.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= x -1.25e+110)
(* x 2.0)
(if (<= x -4.6e-71)
(* b (* a 27.0))
(if (or (<= x 4.2e-11) (and (not (<= x 1.35e+37)) (<= x 2.5e+105)))
(* -9.0 (* t (* z y)))
(* x 2.0)))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.25e+110) {
tmp = x * 2.0;
} else if (x <= -4.6e-71) {
tmp = b * (a * 27.0);
} else if ((x <= 4.2e-11) || (!(x <= 1.35e+37) && (x <= 2.5e+105))) {
tmp = -9.0 * (t * (z * y));
} else {
tmp = x * 2.0;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-1.25d+110)) then
tmp = x * 2.0d0
else if (x <= (-4.6d-71)) then
tmp = b * (a * 27.0d0)
else if ((x <= 4.2d-11) .or. (.not. (x <= 1.35d+37)) .and. (x <= 2.5d+105)) then
tmp = (-9.0d0) * (t * (z * y))
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.25e+110) {
tmp = x * 2.0;
} else if (x <= -4.6e-71) {
tmp = b * (a * 27.0);
} else if ((x <= 4.2e-11) || (!(x <= 1.35e+37) && (x <= 2.5e+105))) {
tmp = -9.0 * (t * (z * y));
} else {
tmp = x * 2.0;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if x <= -1.25e+110: tmp = x * 2.0 elif x <= -4.6e-71: tmp = b * (a * 27.0) elif (x <= 4.2e-11) or (not (x <= 1.35e+37) and (x <= 2.5e+105)): tmp = -9.0 * (t * (z * y)) else: tmp = x * 2.0 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.25e+110) tmp = Float64(x * 2.0); elseif (x <= -4.6e-71) tmp = Float64(b * Float64(a * 27.0)); elseif ((x <= 4.2e-11) || (!(x <= 1.35e+37) && (x <= 2.5e+105))) tmp = Float64(-9.0 * Float64(t * Float64(z * y))); else tmp = Float64(x * 2.0); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (x <= -1.25e+110)
tmp = x * 2.0;
elseif (x <= -4.6e-71)
tmp = b * (a * 27.0);
elseif ((x <= 4.2e-11) || (~((x <= 1.35e+37)) && (x <= 2.5e+105)))
tmp = -9.0 * (t * (z * y));
else
tmp = x * 2.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.25e+110], N[(x * 2.0), $MachinePrecision], If[LessEqual[x, -4.6e-71], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 4.2e-11], And[N[Not[LessEqual[x, 1.35e+37]], $MachinePrecision], LessEqual[x, 2.5e+105]]], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * 2.0), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.25 \cdot 10^{+110}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -4.6 \cdot 10^{-71}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{-11} \lor \neg \left(x \leq 1.35 \cdot 10^{+37}\right) \land x \leq 2.5 \cdot 10^{+105}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if x < -1.24999999999999995e110 or 4.1999999999999997e-11 < x < 1.34999999999999993e37 or 2.50000000000000023e105 < x Initial program 95.0%
sub-neg95.0%
sub-neg95.0%
associate-*l*91.0%
associate-*l*91.0%
Simplified91.0%
Taylor expanded in x around inf 67.6%
if -1.24999999999999995e110 < x < -4.5999999999999997e-71Initial program 92.9%
sub-neg92.9%
sub-neg92.9%
associate-*l*97.5%
associate-*l*97.5%
Simplified97.5%
Taylor expanded in a around inf 50.7%
associate-*r*50.7%
Simplified50.7%
if -4.5999999999999997e-71 < x < 4.1999999999999997e-11 or 1.34999999999999993e37 < x < 2.50000000000000023e105Initial program 94.0%
sub-neg94.0%
sub-neg94.0%
associate-*l*91.5%
associate-*l*92.3%
Simplified92.3%
Taylor expanded in y around inf 58.0%
Final simplification60.4%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* 27.0 (* a b)) (* x 2.0))))
(if (<= y -9.6e+105)
(* y (- (* 2.0 (/ x y)) (* 9.0 (* z t))))
(if (<= y -5.2e+93)
t_1
(if (<= y -2000000.0)
(- (* x 2.0) (* 9.0 (* t (* z y))))
(if (<= y 9.4e-259) t_1 (+ (* z (* -9.0 (* y t))) (* x 2.0))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (27.0 * (a * b)) + (x * 2.0);
double tmp;
if (y <= -9.6e+105) {
tmp = y * ((2.0 * (x / y)) - (9.0 * (z * t)));
} else if (y <= -5.2e+93) {
tmp = t_1;
} else if (y <= -2000000.0) {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
} else if (y <= 9.4e-259) {
tmp = t_1;
} else {
tmp = (z * (-9.0 * (y * t))) + (x * 2.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (27.0d0 * (a * b)) + (x * 2.0d0)
if (y <= (-9.6d+105)) then
tmp = y * ((2.0d0 * (x / y)) - (9.0d0 * (z * t)))
else if (y <= (-5.2d+93)) then
tmp = t_1
else if (y <= (-2000000.0d0)) then
tmp = (x * 2.0d0) - (9.0d0 * (t * (z * y)))
else if (y <= 9.4d-259) then
tmp = t_1
else
tmp = (z * ((-9.0d0) * (y * t))) + (x * 2.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (27.0 * (a * b)) + (x * 2.0);
double tmp;
if (y <= -9.6e+105) {
tmp = y * ((2.0 * (x / y)) - (9.0 * (z * t)));
} else if (y <= -5.2e+93) {
tmp = t_1;
} else if (y <= -2000000.0) {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
} else if (y <= 9.4e-259) {
tmp = t_1;
} else {
tmp = (z * (-9.0 * (y * t))) + (x * 2.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = (27.0 * (a * b)) + (x * 2.0) tmp = 0 if y <= -9.6e+105: tmp = y * ((2.0 * (x / y)) - (9.0 * (z * t))) elif y <= -5.2e+93: tmp = t_1 elif y <= -2000000.0: tmp = (x * 2.0) - (9.0 * (t * (z * y))) elif y <= 9.4e-259: tmp = t_1 else: tmp = (z * (-9.0 * (y * t))) + (x * 2.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)) tmp = 0.0 if (y <= -9.6e+105) tmp = Float64(y * Float64(Float64(2.0 * Float64(x / y)) - Float64(9.0 * Float64(z * t)))); elseif (y <= -5.2e+93) tmp = t_1; elseif (y <= -2000000.0) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(z * y)))); elseif (y <= 9.4e-259) tmp = t_1; else tmp = Float64(Float64(z * Float64(-9.0 * Float64(y * t))) + Float64(x * 2.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (27.0 * (a * b)) + (x * 2.0);
tmp = 0.0;
if (y <= -9.6e+105)
tmp = y * ((2.0 * (x / y)) - (9.0 * (z * t)));
elseif (y <= -5.2e+93)
tmp = t_1;
elseif (y <= -2000000.0)
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
elseif (y <= 9.4e-259)
tmp = t_1;
else
tmp = (z * (-9.0 * (y * t))) + (x * 2.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.6e+105], N[(y * N[(N[(2.0 * N[(x / y), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.2e+93], t$95$1, If[LessEqual[y, -2000000.0], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.4e-259], t$95$1, N[(N[(z * N[(-9.0 * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{if}\;y \leq -9.6 \cdot 10^{+105}:\\
\;\;\;\;y \cdot \left(2 \cdot \frac{x}{y} - 9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{+93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2000000:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{elif}\;y \leq 9.4 \cdot 10^{-259}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-9 \cdot \left(y \cdot t\right)\right) + x \cdot 2\\
\end{array}
\end{array}
if y < -9.599999999999999e105Initial program 89.9%
sub-neg89.9%
sub-neg89.9%
associate-*l*92.6%
associate-*l*92.6%
Simplified92.6%
Taylor expanded in a around 0 85.6%
Taylor expanded in y around inf 87.5%
if -9.599999999999999e105 < y < -5.19999999999999999e93 or -2e6 < y < 9.39999999999999996e-259Initial program 98.8%
sub-neg98.8%
sub-neg98.8%
associate-*l*89.2%
associate-*l*90.2%
Simplified90.2%
Taylor expanded in y around 0 77.7%
if -5.19999999999999999e93 < y < -2e6Initial program 99.9%
sub-neg99.9%
sub-neg99.9%
associate-*l*99.9%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in a around 0 92.9%
if 9.39999999999999996e-259 < y Initial program 91.3%
sub-neg91.3%
sub-neg91.3%
associate-*l*93.8%
associate-*l*93.8%
Simplified93.8%
Taylor expanded in a around 0 68.2%
cancel-sign-sub-inv68.2%
*-commutative68.2%
metadata-eval68.2%
+-commutative68.2%
associate-*r*68.1%
associate-*r*68.0%
*-commutative68.0%
Applied egg-rr68.0%
Taylor expanded in t around 0 68.1%
Final simplification75.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* 27.0 (* a b)) (* x 2.0))))
(if (<= z -6.5e-5)
(* z (* y (* t -9.0)))
(if (<= z -1.25e-122)
t_1
(if (<= z -6.6e-168)
(* -9.0 (* t (* z y)))
(if (<= z 5.2e-24) t_1 (* t (* y (* z -9.0)))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (27.0 * (a * b)) + (x * 2.0);
double tmp;
if (z <= -6.5e-5) {
tmp = z * (y * (t * -9.0));
} else if (z <= -1.25e-122) {
tmp = t_1;
} else if (z <= -6.6e-168) {
tmp = -9.0 * (t * (z * y));
} else if (z <= 5.2e-24) {
tmp = t_1;
} 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.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (27.0d0 * (a * b)) + (x * 2.0d0)
if (z <= (-6.5d-5)) then
tmp = z * (y * (t * (-9.0d0)))
else if (z <= (-1.25d-122)) then
tmp = t_1
else if (z <= (-6.6d-168)) then
tmp = (-9.0d0) * (t * (z * y))
else if (z <= 5.2d-24) then
tmp = t_1
else
tmp = t * (y * (z * (-9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (27.0 * (a * b)) + (x * 2.0);
double tmp;
if (z <= -6.5e-5) {
tmp = z * (y * (t * -9.0));
} else if (z <= -1.25e-122) {
tmp = t_1;
} else if (z <= -6.6e-168) {
tmp = -9.0 * (t * (z * y));
} else if (z <= 5.2e-24) {
tmp = t_1;
} else {
tmp = t * (y * (z * -9.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = (27.0 * (a * b)) + (x * 2.0) tmp = 0 if z <= -6.5e-5: tmp = z * (y * (t * -9.0)) elif z <= -1.25e-122: tmp = t_1 elif z <= -6.6e-168: tmp = -9.0 * (t * (z * y)) elif z <= 5.2e-24: tmp = t_1 else: tmp = t * (y * (z * -9.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)) tmp = 0.0 if (z <= -6.5e-5) tmp = Float64(z * Float64(y * Float64(t * -9.0))); elseif (z <= -1.25e-122) tmp = t_1; elseif (z <= -6.6e-168) tmp = Float64(-9.0 * Float64(t * Float64(z * y))); elseif (z <= 5.2e-24) tmp = t_1; 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])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (27.0 * (a * b)) + (x * 2.0);
tmp = 0.0;
if (z <= -6.5e-5)
tmp = z * (y * (t * -9.0));
elseif (z <= -1.25e-122)
tmp = t_1;
elseif (z <= -6.6e-168)
tmp = -9.0 * (t * (z * y));
elseif (z <= 5.2e-24)
tmp = t_1;
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.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.5e-5], N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.25e-122], t$95$1, If[LessEqual[z, -6.6e-168], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e-24], t$95$1, 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])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{-5}:\\
\;\;\;\;z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{-122}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6.6 \cdot 10^{-168}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -6.49999999999999943e-5Initial program 90.2%
sub-neg90.2%
sub-neg90.2%
associate-*l*86.6%
associate-*l*86.6%
Simplified86.6%
+-commutative86.6%
associate-+r-86.6%
associate-*r*86.6%
*-commutative86.6%
associate-*l*86.6%
associate-*l*86.5%
associate-*r*86.5%
Applied egg-rr86.5%
Taylor expanded in y around 0 90.2%
associate-*r*98.1%
associate-*r*98.0%
metadata-eval98.0%
distribute-lft-neg-in98.0%
*-commutative98.0%
distribute-lft-neg-in98.0%
metadata-eval98.0%
associate-*r*98.0%
*-commutative98.0%
associate-*l*98.0%
Simplified98.0%
Taylor expanded in z around inf 48.5%
associate-*r*48.5%
*-commutative48.5%
*-commutative48.5%
*-commutative48.5%
associate-*r*53.2%
Simplified53.2%
if -6.49999999999999943e-5 < z < -1.25e-122 or -6.6000000000000003e-168 < z < 5.2e-24Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*99.0%
associate-*l*99.0%
Simplified99.0%
Taylor expanded in y around 0 80.6%
if -1.25e-122 < z < -6.6000000000000003e-168Initial program 90.9%
sub-neg90.9%
sub-neg90.9%
associate-*l*90.8%
associate-*l*90.8%
Simplified90.8%
Taylor expanded in y around inf 47.3%
if 5.2e-24 < z Initial program 90.5%
sub-neg90.5%
sub-neg90.5%
associate-*l*88.2%
associate-*l*89.3%
Simplified89.3%
Taylor expanded in a around 0 75.1%
Taylor expanded in t around inf 64.7%
Taylor expanded in x around 0 56.3%
*-commutative56.3%
associate-*l*56.4%
Simplified56.4%
Final simplification65.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z 7.4e-91) (+ (* a (* 27.0 b)) (- (* x 2.0) (* (* y 9.0) (* z t)))) (* t (- (+ (* 2.0 (/ x t)) (* 27.0 (/ (* a b) t))) (* 9.0 (* z y))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 7.4e-91) {
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t)));
} else {
tmp = t * (((2.0 * (x / t)) + (27.0 * ((a * b) / t))) - (9.0 * (z * y)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= 7.4d-91) then
tmp = (a * (27.0d0 * b)) + ((x * 2.0d0) - ((y * 9.0d0) * (z * t)))
else
tmp = t * (((2.0d0 * (x / t)) + (27.0d0 * ((a * b) / t))) - (9.0d0 * (z * y)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 7.4e-91) {
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t)));
} else {
tmp = t * (((2.0 * (x / t)) + (27.0 * ((a * b) / t))) - (9.0 * (z * y)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= 7.4e-91: tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t))) else: tmp = t * (((2.0 * (x / t)) + (27.0 * ((a * b) / t))) - (9.0 * (z * y))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 7.4e-91) tmp = Float64(Float64(a * Float64(27.0 * b)) + Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(z * t)))); else tmp = Float64(t * Float64(Float64(Float64(2.0 * Float64(x / t)) + Float64(27.0 * Float64(Float64(a * b) / t))) - Float64(9.0 * Float64(z * y)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= 7.4e-91)
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t)));
else
tmp = t * (((2.0 * (x / t)) + (27.0 * ((a * b) / t))) - (9.0 * (z * y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 7.4e-91], N[(N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(N[(2.0 * N[(x / t), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(N[(a * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 7.4 \cdot 10^{-91}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right) + \left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\left(2 \cdot \frac{x}{t} + 27 \cdot \frac{a \cdot b}{t}\right) - 9 \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if z < 7.4000000000000004e-91Initial program 95.7%
sub-neg95.7%
sub-neg95.7%
associate-*l*93.9%
associate-*l*93.9%
Simplified93.9%
if 7.4000000000000004e-91 < z Initial program 91.5%
sub-neg91.5%
sub-neg91.5%
associate-*l*89.5%
associate-*l*90.5%
Simplified90.5%
Taylor expanded in t around inf 77.0%
Final simplification87.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= (* y 9.0) -400000.0) (+ (* a (* 27.0 b)) (- (* x 2.0) (* (* y 9.0) (* z t)))) (- (+ (* 27.0 (* a b)) (* x 2.0)) (* z (* t (* y 9.0))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y * 9.0) <= -400000.0) {
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t)));
} else {
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (z * (t * (y * 9.0)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y * 9.0d0) <= (-400000.0d0)) then
tmp = (a * (27.0d0 * b)) + ((x * 2.0d0) - ((y * 9.0d0) * (z * t)))
else
tmp = ((27.0d0 * (a * b)) + (x * 2.0d0)) - (z * (t * (y * 9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y * 9.0) <= -400000.0) {
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t)));
} else {
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (z * (t * (y * 9.0)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (y * 9.0) <= -400000.0: tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t))) else: tmp = ((27.0 * (a * b)) + (x * 2.0)) - (z * (t * (y * 9.0))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(y * 9.0) <= -400000.0) tmp = Float64(Float64(a * Float64(27.0 * b)) + Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(z * t)))); else tmp = Float64(Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)) - Float64(z * Float64(t * Float64(y * 9.0)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((y * 9.0) <= -400000.0)
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t)));
else
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (z * (t * (y * 9.0)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(y * 9.0), $MachinePrecision], -400000.0], N[(N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] - N[(z * N[(t * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;y \cdot 9 \leq -400000:\\
\;\;\;\;a \cdot \left(27 \cdot b\right) + \left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(27 \cdot \left(a \cdot b\right) + x \cdot 2\right) - z \cdot \left(t \cdot \left(y \cdot 9\right)\right)\\
\end{array}
\end{array}
if (*.f64 y #s(literal 9 binary64)) < -4e5Initial program 93.2%
sub-neg93.2%
sub-neg93.2%
associate-*l*95.0%
associate-*l*94.9%
Simplified94.9%
if -4e5 < (*.f64 y #s(literal 9 binary64)) Initial program 94.5%
sub-neg94.5%
sub-neg94.5%
associate-*l*91.5%
associate-*l*92.0%
Simplified92.0%
+-commutative92.0%
associate-+r-92.0%
associate-*r*91.5%
*-commutative91.5%
associate-*l*92.0%
associate-*l*92.0%
associate-*r*92.1%
Applied egg-rr92.1%
Taylor expanded in y around 0 95.0%
associate-*r*95.9%
associate-*r*95.9%
metadata-eval95.9%
distribute-lft-neg-in95.9%
*-commutative95.9%
distribute-lft-neg-in95.9%
metadata-eval95.9%
associate-*r*95.9%
*-commutative95.9%
associate-*l*95.9%
Simplified95.9%
Final simplification95.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= t 9e+243) (+ (- (* x 2.0) (* 9.0 (* z (* y t)))) (* a (* 27.0 b))) (- (* x 2.0) (* 9.0 (* t (* z y))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 9e+243) {
tmp = ((x * 2.0) - (9.0 * (z * (y * t)))) + (a * (27.0 * b));
} else {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= 9d+243) then
tmp = ((x * 2.0d0) - (9.0d0 * (z * (y * t)))) + (a * (27.0d0 * b))
else
tmp = (x * 2.0d0) - (9.0d0 * (t * (z * y)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 9e+243) {
tmp = ((x * 2.0) - (9.0 * (z * (y * t)))) + (a * (27.0 * b));
} else {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if t <= 9e+243: tmp = ((x * 2.0) - (9.0 * (z * (y * t)))) + (a * (27.0 * b)) else: tmp = (x * 2.0) - (9.0 * (t * (z * y))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 9e+243) tmp = Float64(Float64(Float64(x * 2.0) - Float64(9.0 * Float64(z * Float64(y * t)))) + Float64(a * Float64(27.0 * b))); else tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(z * y)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (t <= 9e+243)
tmp = ((x * 2.0) - (9.0 * (z * (y * t)))) + (a * (27.0 * b));
else
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 9e+243], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 9 \cdot 10^{+243}:\\
\;\;\;\;\left(x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if t < 8.9999999999999999e243Initial program 93.8%
sub-neg93.8%
sub-neg93.8%
associate-*l*93.0%
associate-*l*93.3%
Simplified93.3%
Taylor expanded in y around 0 94.1%
associate-*r*95.3%
Simplified95.3%
if 8.9999999999999999e243 < t Initial program 100.0%
sub-neg100.0%
sub-neg100.0%
associate-*l*84.0%
associate-*l*84.0%
Simplified84.0%
Taylor expanded in a around 0 99.7%
Final simplification95.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z 2.4e+30) (+ (* a (* 27.0 b)) (- (* x 2.0) (* (* y 9.0) (* z t)))) (+ (* z (* -9.0 (* y t))) (* x 2.0))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 2.4e+30) {
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t)));
} else {
tmp = (z * (-9.0 * (y * t))) + (x * 2.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= 2.4d+30) then
tmp = (a * (27.0d0 * b)) + ((x * 2.0d0) - ((y * 9.0d0) * (z * t)))
else
tmp = (z * ((-9.0d0) * (y * t))) + (x * 2.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 2.4e+30) {
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t)));
} else {
tmp = (z * (-9.0 * (y * t))) + (x * 2.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= 2.4e+30: tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t))) else: tmp = (z * (-9.0 * (y * t))) + (x * 2.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 2.4e+30) tmp = Float64(Float64(a * Float64(27.0 * b)) + Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(z * t)))); else tmp = Float64(Float64(z * Float64(-9.0 * Float64(y * t))) + Float64(x * 2.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= 2.4e+30)
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t)));
else
tmp = (z * (-9.0 * (y * t))) + (x * 2.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 2.4e+30], N[(N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(-9.0 * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2.4 \cdot 10^{+30}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right) + \left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-9 \cdot \left(y \cdot t\right)\right) + x \cdot 2\\
\end{array}
\end{array}
if z < 2.3999999999999999e30Initial program 95.7%
sub-neg95.7%
sub-neg95.7%
associate-*l*94.1%
associate-*l*94.6%
Simplified94.6%
if 2.3999999999999999e30 < z Initial program 90.4%
sub-neg90.4%
sub-neg90.4%
associate-*l*87.9%
associate-*l*87.9%
Simplified87.9%
Taylor expanded in a around 0 78.3%
cancel-sign-sub-inv78.3%
*-commutative78.3%
metadata-eval78.3%
+-commutative78.3%
associate-*r*78.3%
associate-*r*80.9%
*-commutative80.9%
Applied egg-rr80.9%
Taylor expanded in t around 0 81.0%
Final simplification90.7%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= a -8.2e+144) (not (<= a 2.5e-108))) (+ (* 27.0 (* a b)) (* x 2.0)) (- (* x 2.0) (* 9.0 (* t (* z y))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -8.2e+144) || !(a <= 2.5e-108)) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-8.2d+144)) .or. (.not. (a <= 2.5d-108))) then
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
else
tmp = (x * 2.0d0) - (9.0d0 * (t * (z * y)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -8.2e+144) || !(a <= 2.5e-108)) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (a <= -8.2e+144) or not (a <= 2.5e-108): tmp = (27.0 * (a * b)) + (x * 2.0) else: tmp = (x * 2.0) - (9.0 * (t * (z * y))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -8.2e+144) || !(a <= 2.5e-108)) tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)); else tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(z * y)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((a <= -8.2e+144) || ~((a <= 2.5e-108)))
tmp = (27.0 * (a * b)) + (x * 2.0);
else
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -8.2e+144], N[Not[LessEqual[a, 2.5e-108]], $MachinePrecision]], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.2 \cdot 10^{+144} \lor \neg \left(a \leq 2.5 \cdot 10^{-108}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if a < -8.20000000000000002e144 or 2.5e-108 < a Initial program 91.6%
sub-neg91.6%
sub-neg91.6%
associate-*l*88.8%
associate-*l*89.7%
Simplified89.7%
Taylor expanded in y around 0 67.8%
if -8.20000000000000002e144 < a < 2.5e-108Initial program 96.0%
sub-neg96.0%
sub-neg96.0%
associate-*l*94.8%
associate-*l*94.8%
Simplified94.8%
Taylor expanded in a around 0 82.8%
Final simplification76.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* 27.0 (* a b))) (t_2 (* 9.0 (* t (* z y)))))
(if (<= a -6.2e+119)
(- t_1 t_2)
(if (<= a 1.46e-105) (- (* x 2.0) t_2) (+ t_1 (* x 2.0))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 27.0 * (a * b);
double t_2 = 9.0 * (t * (z * y));
double tmp;
if (a <= -6.2e+119) {
tmp = t_1 - t_2;
} else if (a <= 1.46e-105) {
tmp = (x * 2.0) - t_2;
} else {
tmp = t_1 + (x * 2.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 27.0d0 * (a * b)
t_2 = 9.0d0 * (t * (z * y))
if (a <= (-6.2d+119)) then
tmp = t_1 - t_2
else if (a <= 1.46d-105) then
tmp = (x * 2.0d0) - t_2
else
tmp = t_1 + (x * 2.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 27.0 * (a * b);
double t_2 = 9.0 * (t * (z * y));
double tmp;
if (a <= -6.2e+119) {
tmp = t_1 - t_2;
} else if (a <= 1.46e-105) {
tmp = (x * 2.0) - t_2;
} else {
tmp = t_1 + (x * 2.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = 27.0 * (a * b) t_2 = 9.0 * (t * (z * y)) tmp = 0 if a <= -6.2e+119: tmp = t_1 - t_2 elif a <= 1.46e-105: tmp = (x * 2.0) - t_2 else: tmp = t_1 + (x * 2.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(27.0 * Float64(a * b)) t_2 = Float64(9.0 * Float64(t * Float64(z * y))) tmp = 0.0 if (a <= -6.2e+119) tmp = Float64(t_1 - t_2); elseif (a <= 1.46e-105) tmp = Float64(Float64(x * 2.0) - t_2); else tmp = Float64(t_1 + Float64(x * 2.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = 27.0 * (a * b);
t_2 = 9.0 * (t * (z * y));
tmp = 0.0;
if (a <= -6.2e+119)
tmp = t_1 - t_2;
elseif (a <= 1.46e-105)
tmp = (x * 2.0) - t_2;
else
tmp = t_1 + (x * 2.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.2e+119], N[(t$95$1 - t$95$2), $MachinePrecision], If[LessEqual[a, 1.46e-105], N[(N[(x * 2.0), $MachinePrecision] - t$95$2), $MachinePrecision], N[(t$95$1 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(a \cdot b\right)\\
t_2 := 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{if}\;a \leq -6.2 \cdot 10^{+119}:\\
\;\;\;\;t\_1 - t\_2\\
\mathbf{elif}\;a \leq 1.46 \cdot 10^{-105}:\\
\;\;\;\;x \cdot 2 - t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1 + x \cdot 2\\
\end{array}
\end{array}
if a < -6.1999999999999999e119Initial program 85.1%
sub-neg85.1%
sub-neg85.1%
associate-*l*88.2%
associate-*l*91.0%
Simplified91.0%
Taylor expanded in x around 0 78.8%
if -6.1999999999999999e119 < a < 1.45999999999999998e-105Initial program 96.5%
sub-neg96.5%
sub-neg96.5%
associate-*l*95.2%
associate-*l*95.2%
Simplified95.2%
Taylor expanded in a around 0 84.5%
if 1.45999999999999998e-105 < a Initial program 93.9%
sub-neg93.9%
sub-neg93.9%
associate-*l*89.0%
associate-*l*89.0%
Simplified89.0%
Taylor expanded in y around 0 66.8%
Final simplification78.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.9e+110) (not (<= a 9e-60))) (* 27.0 (* a b)) (* x 2.0)))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.9e+110) || !(a <= 9e-60)) {
tmp = 27.0 * (a * b);
} else {
tmp = x * 2.0;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-1.9d+110)) .or. (.not. (a <= 9d-60))) then
tmp = 27.0d0 * (a * b)
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.9e+110) || !(a <= 9e-60)) {
tmp = 27.0 * (a * b);
} else {
tmp = x * 2.0;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.9e+110) or not (a <= 9e-60): tmp = 27.0 * (a * b) else: tmp = x * 2.0 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.9e+110) || !(a <= 9e-60)) tmp = Float64(27.0 * Float64(a * b)); else tmp = Float64(x * 2.0); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((a <= -1.9e+110) || ~((a <= 9e-60)))
tmp = 27.0 * (a * b);
else
tmp = x * 2.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.9e+110], N[Not[LessEqual[a, 9e-60]], $MachinePrecision]], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], N[(x * 2.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{+110} \lor \neg \left(a \leq 9 \cdot 10^{-60}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if a < -1.89999999999999994e110 or 9.00000000000000001e-60 < a Initial program 90.5%
sub-neg90.5%
sub-neg90.5%
associate-*l*88.6%
associate-*l*89.5%
Simplified89.5%
Taylor expanded in a around inf 47.0%
if -1.89999999999999994e110 < a < 9.00000000000000001e-60Initial program 96.7%
sub-neg96.7%
sub-neg96.7%
associate-*l*94.8%
associate-*l*94.8%
Simplified94.8%
Taylor expanded in x around inf 43.7%
Final simplification45.0%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (* x 2.0))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * 2.0d0
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): return x * 2.0
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(x * 2.0) end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
tmp = x * 2.0;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := N[(x * 2.0), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
x \cdot 2
\end{array}
Initial program 94.2%
sub-neg94.2%
sub-neg94.2%
associate-*l*92.3%
associate-*l*92.7%
Simplified92.7%
Taylor expanded in x around inf 35.2%
Final simplification35.2%
(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 2024079
(FPCore (x y z t a b)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, A"
:precision binary64
:alt
(if (< y 7.590524218811189e-161) (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* a (* 27.0 b))) (+ (- (* x 2.0) (* 9.0 (* y (* t z)))) (* (* a 27.0) b)))
(+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))