
(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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= t 5e+173) (+ (- (* x 2.0) (* (* y 9.0) (* t z))) (* 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+173) {
tmp = ((x * 2.0) - ((y * 9.0) * (t * z))) + (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+173) tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(t * z))) + 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+173], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(t * z), $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^{+173}:\\
\;\;\;\;\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(t \cdot z\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.00000000000000034e173Initial program 95.1%
associate-+l-95.1%
*-commutative95.1%
*-commutative95.1%
associate-*l*95.1%
associate-+l-95.1%
associate-*l*95.1%
*-commutative95.1%
*-commutative95.1%
associate-*l*95.7%
associate-*l*95.7%
Simplified95.7%
if 5.00000000000000034e173 < t Initial program 94.3%
+-commutative94.3%
associate-+r-94.3%
*-commutative94.3%
cancel-sign-sub-inv94.3%
associate-*r*78.3%
distribute-lft-neg-in78.3%
*-commutative78.3%
cancel-sign-sub-inv78.3%
associate-+r-78.3%
associate-*l*78.3%
fma-define83.9%
cancel-sign-sub-inv83.9%
fma-define83.9%
distribute-lft-neg-in83.9%
distribute-rgt-neg-in83.9%
*-commutative83.9%
associate-*r*99.9%
associate-*l*99.9%
neg-mul-199.9%
associate-*r*99.9%
Simplified99.9%
Final simplification96.3%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (* a 27.0))))
(if (<= z -1.12e+57)
(* -9.0 (* z (* t y)))
(if (<= z -5e-6)
t_1
(if (<= z -7.5e-116)
(* -9.0 (* t (* y z)))
(if (<= z 6.3e-293)
t_1
(if (<= z 1.6e-207)
(* x 2.0)
(if (<= z 1.85e-73)
(* a (* 27.0 b))
(* t (* -9.0 (* y z)))))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a * 27.0);
double tmp;
if (z <= -1.12e+57) {
tmp = -9.0 * (z * (t * y));
} else if (z <= -5e-6) {
tmp = t_1;
} else if (z <= -7.5e-116) {
tmp = -9.0 * (t * (y * z));
} else if (z <= 6.3e-293) {
tmp = t_1;
} else if (z <= 1.6e-207) {
tmp = x * 2.0;
} else if (z <= 1.85e-73) {
tmp = a * (27.0 * b);
} else {
tmp = t * (-9.0 * (y * z));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a * 27.0d0)
if (z <= (-1.12d+57)) then
tmp = (-9.0d0) * (z * (t * y))
else if (z <= (-5d-6)) then
tmp = t_1
else if (z <= (-7.5d-116)) then
tmp = (-9.0d0) * (t * (y * z))
else if (z <= 6.3d-293) then
tmp = t_1
else if (z <= 1.6d-207) then
tmp = x * 2.0d0
else if (z <= 1.85d-73) then
tmp = a * (27.0d0 * b)
else
tmp = t * ((-9.0d0) * (y * z))
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 = b * (a * 27.0);
double tmp;
if (z <= -1.12e+57) {
tmp = -9.0 * (z * (t * y));
} else if (z <= -5e-6) {
tmp = t_1;
} else if (z <= -7.5e-116) {
tmp = -9.0 * (t * (y * z));
} else if (z <= 6.3e-293) {
tmp = t_1;
} else if (z <= 1.6e-207) {
tmp = x * 2.0;
} else if (z <= 1.85e-73) {
tmp = a * (27.0 * b);
} else {
tmp = t * (-9.0 * (y * z));
}
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 = b * (a * 27.0) tmp = 0 if z <= -1.12e+57: tmp = -9.0 * (z * (t * y)) elif z <= -5e-6: tmp = t_1 elif z <= -7.5e-116: tmp = -9.0 * (t * (y * z)) elif z <= 6.3e-293: tmp = t_1 elif z <= 1.6e-207: tmp = x * 2.0 elif z <= 1.85e-73: tmp = a * (27.0 * b) else: tmp = t * (-9.0 * (y * z)) 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(b * Float64(a * 27.0)) tmp = 0.0 if (z <= -1.12e+57) tmp = Float64(-9.0 * Float64(z * Float64(t * y))); elseif (z <= -5e-6) tmp = t_1; elseif (z <= -7.5e-116) tmp = Float64(-9.0 * Float64(t * Float64(y * z))); elseif (z <= 6.3e-293) tmp = t_1; elseif (z <= 1.6e-207) tmp = Float64(x * 2.0); elseif (z <= 1.85e-73) tmp = Float64(a * Float64(27.0 * b)); else tmp = Float64(t * Float64(-9.0 * Float64(y * z))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = b * (a * 27.0);
tmp = 0.0;
if (z <= -1.12e+57)
tmp = -9.0 * (z * (t * y));
elseif (z <= -5e-6)
tmp = t_1;
elseif (z <= -7.5e-116)
tmp = -9.0 * (t * (y * z));
elseif (z <= 6.3e-293)
tmp = t_1;
elseif (z <= 1.6e-207)
tmp = x * 2.0;
elseif (z <= 1.85e-73)
tmp = a * (27.0 * b);
else
tmp = t * (-9.0 * (y * z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.12e+57], N[(-9.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5e-6], t$95$1, If[LessEqual[z, -7.5e-116], N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.3e-293], t$95$1, If[LessEqual[z, 1.6e-207], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 1.85e-73], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], N[(t * N[(-9.0 * N[(y * z), $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 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;z \leq -1.12 \cdot 10^{+57}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-116}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{elif}\;z \leq 6.3 \cdot 10^{-293}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-207}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-73}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -1.12000000000000003e57Initial program 92.1%
associate-+l-92.1%
*-commutative92.1%
*-commutative92.1%
associate-*l*92.1%
associate-+l-92.1%
associate-*l*92.1%
*-commutative92.1%
*-commutative92.1%
associate-*l*92.0%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in t around inf 88.3%
Taylor expanded in t around inf 61.8%
associate-*r*63.6%
*-commutative63.6%
Simplified63.6%
if -1.12000000000000003e57 < z < -5.00000000000000041e-6 or -7.5000000000000004e-116 < z < 6.29999999999999988e-293Initial program 98.2%
associate-+l-98.2%
*-commutative98.2%
*-commutative98.2%
associate-*l*98.1%
associate-+l-98.1%
associate-*l*98.2%
*-commutative98.2%
*-commutative98.2%
associate-*l*97.2%
associate-*l*97.2%
Simplified97.2%
Taylor expanded in a around inf 51.6%
associate-*r*51.7%
Simplified51.7%
if -5.00000000000000041e-6 < z < -7.5000000000000004e-116Initial program 99.8%
associate-+l-99.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*99.8%
associate-+l-99.8%
associate-*l*99.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*99.7%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in y around inf 29.8%
if 6.29999999999999988e-293 < z < 1.6000000000000002e-207Initial program 99.7%
associate-+l-99.7%
*-commutative99.7%
*-commutative99.7%
associate-*l*99.7%
associate-+l-99.7%
associate-*l*99.7%
*-commutative99.7%
*-commutative99.7%
associate-*l*99.7%
associate-*l*99.6%
Simplified99.6%
Taylor expanded in x around inf 29.2%
if 1.6000000000000002e-207 < z < 1.85e-73Initial program 99.8%
associate-+l-99.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*99.8%
associate-+l-99.8%
associate-*l*99.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*99.9%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in a around inf 49.1%
associate-*r*49.1%
*-commutative49.1%
associate-*r*49.1%
Simplified49.1%
if 1.85e-73 < z Initial program 90.2%
associate-+l-90.2%
*-commutative90.2%
*-commutative90.2%
associate-*l*90.1%
associate-+l-90.1%
associate-*l*90.2%
*-commutative90.2%
*-commutative90.2%
associate-*l*90.1%
associate-*l*90.1%
Simplified90.1%
+-commutative90.1%
associate-+r-90.1%
associate-*r*90.1%
*-commutative90.1%
associate-*l*90.1%
associate-*l*90.0%
associate-*r*90.0%
Applied egg-rr90.0%
Taylor expanded in y around inf 51.3%
*-commutative51.3%
associate-*l*51.3%
associate-*l*51.3%
Simplified51.3%
Taylor expanded in y around 0 51.3%
Final simplification49.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
(let* ((t_1 (* b (* a 27.0))) (t_2 (* -9.0 (* t (* y z)))))
(if (<= z -1.3e+57)
(* -9.0 (* z (* t y)))
(if (<= z -5.3e-6)
t_1
(if (<= z -2.4e-116)
t_2
(if (<= z 4.4e-293)
t_1
(if (<= z 3e-207)
(* x 2.0)
(if (<= z 8e-68) (* a (* 27.0 b)) 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 = b * (a * 27.0);
double t_2 = -9.0 * (t * (y * z));
double tmp;
if (z <= -1.3e+57) {
tmp = -9.0 * (z * (t * y));
} else if (z <= -5.3e-6) {
tmp = t_1;
} else if (z <= -2.4e-116) {
tmp = t_2;
} else if (z <= 4.4e-293) {
tmp = t_1;
} else if (z <= 3e-207) {
tmp = x * 2.0;
} else if (z <= 8e-68) {
tmp = a * (27.0 * b);
} 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 = b * (a * 27.0d0)
t_2 = (-9.0d0) * (t * (y * z))
if (z <= (-1.3d+57)) then
tmp = (-9.0d0) * (z * (t * y))
else if (z <= (-5.3d-6)) then
tmp = t_1
else if (z <= (-2.4d-116)) then
tmp = t_2
else if (z <= 4.4d-293) then
tmp = t_1
else if (z <= 3d-207) then
tmp = x * 2.0d0
else if (z <= 8d-68) then
tmp = a * (27.0d0 * b)
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 = b * (a * 27.0);
double t_2 = -9.0 * (t * (y * z));
double tmp;
if (z <= -1.3e+57) {
tmp = -9.0 * (z * (t * y));
} else if (z <= -5.3e-6) {
tmp = t_1;
} else if (z <= -2.4e-116) {
tmp = t_2;
} else if (z <= 4.4e-293) {
tmp = t_1;
} else if (z <= 3e-207) {
tmp = x * 2.0;
} else if (z <= 8e-68) {
tmp = a * (27.0 * b);
} 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 = b * (a * 27.0) t_2 = -9.0 * (t * (y * z)) tmp = 0 if z <= -1.3e+57: tmp = -9.0 * (z * (t * y)) elif z <= -5.3e-6: tmp = t_1 elif z <= -2.4e-116: tmp = t_2 elif z <= 4.4e-293: tmp = t_1 elif z <= 3e-207: tmp = x * 2.0 elif z <= 8e-68: tmp = a * (27.0 * b) 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(b * Float64(a * 27.0)) t_2 = Float64(-9.0 * Float64(t * Float64(y * z))) tmp = 0.0 if (z <= -1.3e+57) tmp = Float64(-9.0 * Float64(z * Float64(t * y))); elseif (z <= -5.3e-6) tmp = t_1; elseif (z <= -2.4e-116) tmp = t_2; elseif (z <= 4.4e-293) tmp = t_1; elseif (z <= 3e-207) tmp = Float64(x * 2.0); elseif (z <= 8e-68) tmp = Float64(a * Float64(27.0 * b)); 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 = b * (a * 27.0);
t_2 = -9.0 * (t * (y * z));
tmp = 0.0;
if (z <= -1.3e+57)
tmp = -9.0 * (z * (t * y));
elseif (z <= -5.3e-6)
tmp = t_1;
elseif (z <= -2.4e-116)
tmp = t_2;
elseif (z <= 4.4e-293)
tmp = t_1;
elseif (z <= 3e-207)
tmp = x * 2.0;
elseif (z <= 8e-68)
tmp = a * (27.0 * b);
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[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e+57], N[(-9.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.3e-6], t$95$1, If[LessEqual[z, -2.4e-116], t$95$2, If[LessEqual[z, 4.4e-293], t$95$1, If[LessEqual[z, 3e-207], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 8e-68], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], 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 := b \cdot \left(a \cdot 27\right)\\
t_2 := -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+57}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\
\mathbf{elif}\;z \leq -5.3 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-116}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-293}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-207}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-68}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.3e57Initial program 92.1%
associate-+l-92.1%
*-commutative92.1%
*-commutative92.1%
associate-*l*92.1%
associate-+l-92.1%
associate-*l*92.1%
*-commutative92.1%
*-commutative92.1%
associate-*l*92.0%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in t around inf 88.3%
Taylor expanded in t around inf 61.8%
associate-*r*63.6%
*-commutative63.6%
Simplified63.6%
if -1.3e57 < z < -5.3000000000000001e-6 or -2.39999999999999993e-116 < z < 4.4e-293Initial program 98.2%
associate-+l-98.2%
*-commutative98.2%
*-commutative98.2%
associate-*l*98.1%
associate-+l-98.1%
associate-*l*98.2%
*-commutative98.2%
*-commutative98.2%
associate-*l*97.2%
associate-*l*97.2%
Simplified97.2%
Taylor expanded in a around inf 51.6%
associate-*r*51.7%
Simplified51.7%
if -5.3000000000000001e-6 < z < -2.39999999999999993e-116 or 8.00000000000000053e-68 < z Initial program 91.9%
associate-+l-91.9%
*-commutative91.9%
*-commutative91.9%
associate-*l*91.9%
associate-+l-91.9%
associate-*l*91.9%
*-commutative91.9%
*-commutative91.9%
associate-*l*91.9%
associate-*l*91.9%
Simplified91.9%
Taylor expanded in y around inf 47.3%
if 4.4e-293 < z < 2.9999999999999999e-207Initial program 99.7%
associate-+l-99.7%
*-commutative99.7%
*-commutative99.7%
associate-*l*99.7%
associate-+l-99.7%
associate-*l*99.7%
*-commutative99.7%
*-commutative99.7%
associate-*l*99.7%
associate-*l*99.6%
Simplified99.6%
Taylor expanded in x around inf 29.2%
if 2.9999999999999999e-207 < z < 8.00000000000000053e-68Initial program 99.8%
associate-+l-99.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*99.8%
associate-+l-99.8%
associate-*l*99.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*99.9%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in a around inf 49.1%
associate-*r*49.1%
*-commutative49.1%
associate-*r*49.1%
Simplified49.1%
Final simplification49.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
(let* ((t_1 (* b (* a 27.0))) (t_2 (* -9.0 (* t (* y z)))))
(if (<= t -2.5e-31)
t_2
(if (<= t 7.6e-161)
t_1
(if (<= t 5.2e-125)
(* x 2.0)
(if (<= t 1.05e-57) t_1 (if (<= t 5.9e+91) (* x 2.0) 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 = b * (a * 27.0);
double t_2 = -9.0 * (t * (y * z));
double tmp;
if (t <= -2.5e-31) {
tmp = t_2;
} else if (t <= 7.6e-161) {
tmp = t_1;
} else if (t <= 5.2e-125) {
tmp = x * 2.0;
} else if (t <= 1.05e-57) {
tmp = t_1;
} else if (t <= 5.9e+91) {
tmp = x * 2.0;
} 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 = b * (a * 27.0d0)
t_2 = (-9.0d0) * (t * (y * z))
if (t <= (-2.5d-31)) then
tmp = t_2
else if (t <= 7.6d-161) then
tmp = t_1
else if (t <= 5.2d-125) then
tmp = x * 2.0d0
else if (t <= 1.05d-57) then
tmp = t_1
else if (t <= 5.9d+91) then
tmp = x * 2.0d0
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 = b * (a * 27.0);
double t_2 = -9.0 * (t * (y * z));
double tmp;
if (t <= -2.5e-31) {
tmp = t_2;
} else if (t <= 7.6e-161) {
tmp = t_1;
} else if (t <= 5.2e-125) {
tmp = x * 2.0;
} else if (t <= 1.05e-57) {
tmp = t_1;
} else if (t <= 5.9e+91) {
tmp = x * 2.0;
} 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 = b * (a * 27.0) t_2 = -9.0 * (t * (y * z)) tmp = 0 if t <= -2.5e-31: tmp = t_2 elif t <= 7.6e-161: tmp = t_1 elif t <= 5.2e-125: tmp = x * 2.0 elif t <= 1.05e-57: tmp = t_1 elif t <= 5.9e+91: tmp = x * 2.0 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(b * Float64(a * 27.0)) t_2 = Float64(-9.0 * Float64(t * Float64(y * z))) tmp = 0.0 if (t <= -2.5e-31) tmp = t_2; elseif (t <= 7.6e-161) tmp = t_1; elseif (t <= 5.2e-125) tmp = Float64(x * 2.0); elseif (t <= 1.05e-57) tmp = t_1; elseif (t <= 5.9e+91) tmp = Float64(x * 2.0); 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 = b * (a * 27.0);
t_2 = -9.0 * (t * (y * z));
tmp = 0.0;
if (t <= -2.5e-31)
tmp = t_2;
elseif (t <= 7.6e-161)
tmp = t_1;
elseif (t <= 5.2e-125)
tmp = x * 2.0;
elseif (t <= 1.05e-57)
tmp = t_1;
elseif (t <= 5.9e+91)
tmp = x * 2.0;
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[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.5e-31], t$95$2, If[LessEqual[t, 7.6e-161], t$95$1, If[LessEqual[t, 5.2e-125], N[(x * 2.0), $MachinePrecision], If[LessEqual[t, 1.05e-57], t$95$1, If[LessEqual[t, 5.9e+91], N[(x * 2.0), $MachinePrecision], 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 := b \cdot \left(a \cdot 27\right)\\
t_2 := -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;t \leq -2.5 \cdot 10^{-31}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 7.6 \cdot 10^{-161}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-125}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-57}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.9 \cdot 10^{+91}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2.5e-31 or 5.9000000000000002e91 < t Initial program 96.9%
associate-+l-96.9%
*-commutative96.9%
*-commutative96.9%
associate-*l*96.9%
associate-+l-96.9%
associate-*l*96.9%
*-commutative96.9%
*-commutative96.9%
associate-*l*89.6%
associate-*l*89.6%
Simplified89.6%
Taylor expanded in y around inf 58.9%
if -2.5e-31 < t < 7.6000000000000003e-161 or 5.20000000000000011e-125 < t < 1.05e-57Initial program 94.1%
associate-+l-94.1%
*-commutative94.1%
*-commutative94.1%
associate-*l*94.1%
associate-+l-94.1%
associate-*l*94.1%
*-commutative94.1%
*-commutative94.1%
associate-*l*98.4%
associate-*l*98.4%
Simplified98.4%
Taylor expanded in a around inf 48.7%
associate-*r*48.7%
Simplified48.7%
if 7.6000000000000003e-161 < t < 5.20000000000000011e-125 or 1.05e-57 < t < 5.9000000000000002e91Initial program 93.0%
associate-+l-93.0%
*-commutative93.0%
*-commutative93.0%
associate-*l*93.0%
associate-+l-93.0%
associate-*l*93.0%
*-commutative93.0%
*-commutative93.0%
associate-*l*98.0%
associate-*l*98.0%
Simplified98.0%
Taylor expanded in x around inf 43.5%
Final simplification51.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 (<= z -1.02e+57)
(and (not (<= z -3.7e-6))
(or (<= z -1.25e-113) (not (<= z 2.7e-68)))))
(+ (* x 2.0) (* -9.0 (* z (* t y))))
(+ (* x 2.0) (* 27.0 (* a b)))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.02e+57) || (!(z <= -3.7e-6) && ((z <= -1.25e-113) || !(z <= 2.7e-68)))) {
tmp = (x * 2.0) + (-9.0 * (z * (t * y)));
} else {
tmp = (x * 2.0) + (27.0 * (a * b));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.02d+57)) .or. (.not. (z <= (-3.7d-6))) .and. (z <= (-1.25d-113)) .or. (.not. (z <= 2.7d-68))) then
tmp = (x * 2.0d0) + ((-9.0d0) * (z * (t * y)))
else
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.02e+57) || (!(z <= -3.7e-6) && ((z <= -1.25e-113) || !(z <= 2.7e-68)))) {
tmp = (x * 2.0) + (-9.0 * (z * (t * y)));
} else {
tmp = (x * 2.0) + (27.0 * (a * b));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.02e+57) or (not (z <= -3.7e-6) and ((z <= -1.25e-113) or not (z <= 2.7e-68))): tmp = (x * 2.0) + (-9.0 * (z * (t * y))) else: tmp = (x * 2.0) + (27.0 * (a * b)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.02e+57) || (!(z <= -3.7e-6) && ((z <= -1.25e-113) || !(z <= 2.7e-68)))) tmp = Float64(Float64(x * 2.0) + Float64(-9.0 * Float64(z * Float64(t * y)))); else tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((z <= -1.02e+57) || (~((z <= -3.7e-6)) && ((z <= -1.25e-113) || ~((z <= 2.7e-68)))))
tmp = (x * 2.0) + (-9.0 * (z * (t * y)));
else
tmp = (x * 2.0) + (27.0 * (a * b));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.02e+57], And[N[Not[LessEqual[z, -3.7e-6]], $MachinePrecision], Or[LessEqual[z, -1.25e-113], N[Not[LessEqual[z, 2.7e-68]], $MachinePrecision]]]], N[(N[(x * 2.0), $MachinePrecision] + N[(-9.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{+57} \lor \neg \left(z \leq -3.7 \cdot 10^{-6}\right) \land \left(z \leq -1.25 \cdot 10^{-113} \lor \neg \left(z \leq 2.7 \cdot 10^{-68}\right)\right):\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if z < -1.02e57 or -3.7000000000000002e-6 < z < -1.2499999999999999e-113 or 2.7000000000000002e-68 < z Initial program 91.9%
associate-+l-91.9%
*-commutative91.9%
*-commutative91.9%
associate-*l*91.9%
associate-+l-91.9%
associate-*l*91.9%
*-commutative91.9%
*-commutative91.9%
associate-*l*91.8%
associate-*l*91.8%
Simplified91.8%
Taylor expanded in a around 0 72.1%
cancel-sign-sub-inv72.1%
*-commutative72.1%
metadata-eval72.1%
associate-*r*76.0%
*-commutative76.0%
Applied egg-rr76.0%
if -1.02e57 < z < -3.7000000000000002e-6 or -1.2499999999999999e-113 < z < 2.7000000000000002e-68Initial program 99.0%
associate-+l-99.0%
*-commutative99.0%
*-commutative99.0%
associate-*l*99.0%
associate-+l-99.0%
associate-*l*99.0%
*-commutative99.0%
*-commutative99.0%
associate-*l*98.6%
associate-*l*98.5%
Simplified98.5%
Taylor expanded in y around 0 83.5%
Final simplification79.3%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.02e+57)
(+ (* x 2.0) (* -9.0 (* z (* t y))))
(if (or (<= z -5.3e-6) (and (not (<= z -4.2e-114)) (<= z 1.32e-70)))
(+ (* x 2.0) (* 27.0 (* a b)))
(- (* x 2.0) (* 9.0 (* t (* y z)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.02e+57) {
tmp = (x * 2.0) + (-9.0 * (z * (t * y)));
} else if ((z <= -5.3e-6) || (!(z <= -4.2e-114) && (z <= 1.32e-70))) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.02d+57)) then
tmp = (x * 2.0d0) + ((-9.0d0) * (z * (t * y)))
else if ((z <= (-5.3d-6)) .or. (.not. (z <= (-4.2d-114))) .and. (z <= 1.32d-70)) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = (x * 2.0d0) - (9.0d0 * (t * (y * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.02e+57) {
tmp = (x * 2.0) + (-9.0 * (z * (t * y)));
} else if ((z <= -5.3e-6) || (!(z <= -4.2e-114) && (z <= 1.32e-70))) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -1.02e+57: tmp = (x * 2.0) + (-9.0 * (z * (t * y))) elif (z <= -5.3e-6) or (not (z <= -4.2e-114) and (z <= 1.32e-70)): tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = (x * 2.0) - (9.0 * (t * (y * z))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.02e+57) tmp = Float64(Float64(x * 2.0) + Float64(-9.0 * Float64(z * Float64(t * y)))); elseif ((z <= -5.3e-6) || (!(z <= -4.2e-114) && (z <= 1.32e-70))) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(y * z)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -1.02e+57)
tmp = (x * 2.0) + (-9.0 * (z * (t * y)));
elseif ((z <= -5.3e-6) || (~((z <= -4.2e-114)) && (z <= 1.32e-70)))
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.02e+57], N[(N[(x * 2.0), $MachinePrecision] + N[(-9.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -5.3e-6], And[N[Not[LessEqual[z, -4.2e-114]], $MachinePrecision], LessEqual[z, 1.32e-70]]], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{+57}:\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\
\mathbf{elif}\;z \leq -5.3 \cdot 10^{-6} \lor \neg \left(z \leq -4.2 \cdot 10^{-114}\right) \land z \leq 1.32 \cdot 10^{-70}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -1.02e57Initial program 92.1%
associate-+l-92.1%
*-commutative92.1%
*-commutative92.1%
associate-*l*92.1%
associate-+l-92.1%
associate-*l*92.1%
*-commutative92.1%
*-commutative92.1%
associate-*l*92.0%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in a around 0 75.6%
cancel-sign-sub-inv75.6%
*-commutative75.6%
metadata-eval75.6%
associate-*r*79.4%
*-commutative79.4%
Applied egg-rr79.4%
if -1.02e57 < z < -5.3000000000000001e-6 or -4.19999999999999985e-114 < z < 1.3200000000000001e-70Initial program 99.0%
associate-+l-99.0%
*-commutative99.0%
*-commutative99.0%
associate-*l*99.0%
associate-+l-99.0%
associate-*l*99.0%
*-commutative99.0%
*-commutative99.0%
associate-*l*98.6%
associate-*l*98.5%
Simplified98.5%
Taylor expanded in y around 0 83.5%
if -5.3000000000000001e-6 < z < -4.19999999999999985e-114 or 1.3200000000000001e-70 < z Initial program 91.8%
associate-+l-91.8%
*-commutative91.8%
*-commutative91.8%
associate-*l*91.7%
associate-+l-91.7%
associate-*l*91.8%
*-commutative91.8%
*-commutative91.8%
associate-*l*91.7%
associate-*l*91.7%
Simplified91.7%
Taylor expanded in a around 0 70.2%
Final simplification77.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.12e+57)
(* -9.0 (* z (* t y)))
(if (or (<= z -7.4e-27) (and (not (<= z -4.4e-113)) (<= z 4.9e+33)))
(+ (* x 2.0) (* 27.0 (* a b)))
(* -9.0 (* t (* y z))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.12e+57) {
tmp = -9.0 * (z * (t * y));
} else if ((z <= -7.4e-27) || (!(z <= -4.4e-113) && (z <= 4.9e+33))) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = -9.0 * (t * (y * z));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.12d+57)) then
tmp = (-9.0d0) * (z * (t * y))
else if ((z <= (-7.4d-27)) .or. (.not. (z <= (-4.4d-113))) .and. (z <= 4.9d+33)) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = (-9.0d0) * (t * (y * z))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.12e+57) {
tmp = -9.0 * (z * (t * y));
} else if ((z <= -7.4e-27) || (!(z <= -4.4e-113) && (z <= 4.9e+33))) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = -9.0 * (t * (y * z));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -1.12e+57: tmp = -9.0 * (z * (t * y)) elif (z <= -7.4e-27) or (not (z <= -4.4e-113) and (z <= 4.9e+33)): tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = -9.0 * (t * (y * z)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.12e+57) tmp = Float64(-9.0 * Float64(z * Float64(t * y))); elseif ((z <= -7.4e-27) || (!(z <= -4.4e-113) && (z <= 4.9e+33))) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(-9.0 * Float64(t * Float64(y * z))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -1.12e+57)
tmp = -9.0 * (z * (t * y));
elseif ((z <= -7.4e-27) || (~((z <= -4.4e-113)) && (z <= 4.9e+33)))
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = -9.0 * (t * (y * z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.12e+57], N[(-9.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -7.4e-27], And[N[Not[LessEqual[z, -4.4e-113]], $MachinePrecision], LessEqual[z, 4.9e+33]]], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.12 \cdot 10^{+57}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\
\mathbf{elif}\;z \leq -7.4 \cdot 10^{-27} \lor \neg \left(z \leq -4.4 \cdot 10^{-113}\right) \land z \leq 4.9 \cdot 10^{+33}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -1.12000000000000003e57Initial program 92.1%
associate-+l-92.1%
*-commutative92.1%
*-commutative92.1%
associate-*l*92.1%
associate-+l-92.1%
associate-*l*92.1%
*-commutative92.1%
*-commutative92.1%
associate-*l*92.0%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in t around inf 88.3%
Taylor expanded in t around inf 61.8%
associate-*r*63.6%
*-commutative63.6%
Simplified63.6%
if -1.12000000000000003e57 < z < -7.40000000000000057e-27 or -4.40000000000000008e-113 < z < 4.90000000000000014e33Initial program 99.1%
associate-+l-99.1%
*-commutative99.1%
*-commutative99.1%
associate-*l*99.1%
associate-+l-99.1%
associate-*l*99.1%
*-commutative99.1%
*-commutative99.1%
associate-*l*98.7%
associate-*l*98.7%
Simplified98.7%
Taylor expanded in y around 0 78.4%
if -7.40000000000000057e-27 < z < -4.40000000000000008e-113 or 4.90000000000000014e33 < z Initial program 89.4%
associate-+l-89.4%
*-commutative89.4%
*-commutative89.4%
associate-*l*89.4%
associate-+l-89.4%
associate-*l*89.4%
*-commutative89.4%
*-commutative89.4%
associate-*l*89.3%
associate-*l*89.3%
Simplified89.3%
Taylor expanded in y around inf 45.9%
Final simplification66.3%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z 5e-60) (+ (- (* x 2.0) (* (* y 9.0) (* t z))) (* a (* 27.0 b))) (* t (- (+ (* 2.0 (/ x t)) (* 27.0 (/ (* a b) t))) (* 9.0 (* y z))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 5e-60) {
tmp = ((x * 2.0) - ((y * 9.0) * (t * z))) + (a * (27.0 * b));
} else {
tmp = t * (((2.0 * (x / t)) + (27.0 * ((a * b) / t))) - (9.0 * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= 5d-60) then
tmp = ((x * 2.0d0) - ((y * 9.0d0) * (t * z))) + (a * (27.0d0 * b))
else
tmp = t * (((2.0d0 * (x / t)) + (27.0d0 * ((a * b) / t))) - (9.0d0 * (y * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 5e-60) {
tmp = ((x * 2.0) - ((y * 9.0) * (t * z))) + (a * (27.0 * b));
} else {
tmp = t * (((2.0 * (x / t)) + (27.0 * ((a * b) / t))) - (9.0 * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= 5e-60: tmp = ((x * 2.0) - ((y * 9.0) * (t * z))) + (a * (27.0 * b)) else: tmp = t * (((2.0 * (x / t)) + (27.0 * ((a * b) / t))) - (9.0 * (y * z))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 5e-60) tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(t * z))) + Float64(a * Float64(27.0 * b))); else tmp = Float64(t * Float64(Float64(Float64(2.0 * Float64(x / t)) + Float64(27.0 * Float64(Float64(a * b) / t))) - Float64(9.0 * Float64(y * z)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= 5e-60)
tmp = ((x * 2.0) - ((y * 9.0) * (t * z))) + (a * (27.0 * b));
else
tmp = t * (((2.0 * (x / t)) + (27.0 * ((a * b) / t))) - (9.0 * (y * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 5e-60], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(N[(2.0 * N[(x / t), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(N[(a * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(y * z), $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 5 \cdot 10^{-60}:\\
\;\;\;\;\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(t \cdot z\right)\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\left(2 \cdot \frac{x}{t} + 27 \cdot \frac{a \cdot b}{t}\right) - 9 \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < 5.0000000000000001e-60Initial program 97.3%
associate-+l-97.3%
*-commutative97.3%
*-commutative97.3%
associate-*l*97.2%
associate-+l-97.2%
associate-*l*97.3%
*-commutative97.3%
*-commutative97.3%
associate-*l*96.9%
associate-*l*96.9%
Simplified96.9%
if 5.0000000000000001e-60 < z Initial program 89.3%
associate-+l-89.3%
*-commutative89.3%
*-commutative89.3%
associate-*l*89.3%
associate-+l-89.3%
associate-*l*89.3%
*-commutative89.3%
*-commutative89.3%
associate-*l*89.3%
associate-*l*89.3%
Simplified89.3%
Taylor expanded in t around inf 86.8%
Final simplification94.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 (<= z -4.3e-113)
(+ (* a (* 27.0 b)) (* z (* t (* y -9.0))))
(if (<= z 4.5e-74)
(+ (* x 2.0) (* 27.0 (* a b)))
(* t (- (* 27.0 (* a (/ b t))) (* 9.0 (* y z)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.3e-113) {
tmp = (a * (27.0 * b)) + (z * (t * (y * -9.0)));
} else if (z <= 4.5e-74) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = t * ((27.0 * (a * (b / t))) - (9.0 * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-4.3d-113)) then
tmp = (a * (27.0d0 * b)) + (z * (t * (y * (-9.0d0))))
else if (z <= 4.5d-74) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = t * ((27.0d0 * (a * (b / t))) - (9.0d0 * (y * z)))
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 <= -4.3e-113) {
tmp = (a * (27.0 * b)) + (z * (t * (y * -9.0)));
} else if (z <= 4.5e-74) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = t * ((27.0 * (a * (b / t))) - (9.0 * (y * z)));
}
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 <= -4.3e-113: tmp = (a * (27.0 * b)) + (z * (t * (y * -9.0))) elif z <= 4.5e-74: tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = t * ((27.0 * (a * (b / t))) - (9.0 * (y * z))) 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 <= -4.3e-113) tmp = Float64(Float64(a * Float64(27.0 * b)) + Float64(z * Float64(t * Float64(y * -9.0)))); elseif (z <= 4.5e-74) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(t * Float64(Float64(27.0 * Float64(a * Float64(b / t))) - Float64(9.0 * Float64(y * z)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -4.3e-113)
tmp = (a * (27.0 * b)) + (z * (t * (y * -9.0)));
elseif (z <= 4.5e-74)
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = t * ((27.0 * (a * (b / t))) - (9.0 * (y * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.3e-113], N[(N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(z * N[(t * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e-74], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(27.0 * N[(a * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{-113}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right) + z \cdot \left(t \cdot \left(y \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-74}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(27 \cdot \left(a \cdot \frac{b}{t}\right) - 9 \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -4.3e-113Initial program 94.0%
associate-+l-94.0%
*-commutative94.0%
*-commutative94.0%
associate-*l*94.0%
associate-+l-94.0%
associate-*l*94.0%
*-commutative94.0%
*-commutative94.0%
associate-*l*95.0%
associate-*l*95.1%
Simplified95.1%
Taylor expanded in z around inf 95.0%
Taylor expanded in x around 0 79.6%
associate-*r*79.6%
*-commutative79.6%
associate-*l*79.6%
*-commutative79.6%
Simplified79.6%
if -4.3e-113 < z < 4.4999999999999999e-74Initial program 99.9%
associate-+l-99.9%
*-commutative99.9%
*-commutative99.9%
associate-*l*99.8%
associate-+l-99.8%
associate-*l*99.9%
*-commutative99.9%
*-commutative99.9%
associate-*l*98.4%
associate-*l*98.3%
Simplified98.3%
Taylor expanded in y around 0 82.7%
if 4.4999999999999999e-74 < z Initial program 90.3%
associate-+l-90.3%
*-commutative90.3%
*-commutative90.3%
associate-*l*90.2%
associate-+l-90.2%
associate-*l*90.3%
*-commutative90.3%
*-commutative90.3%
associate-*l*90.2%
associate-*l*90.2%
Simplified90.2%
Taylor expanded in t around inf 86.7%
Taylor expanded in x around 0 64.2%
associate-*r/64.3%
Simplified64.3%
Final simplification76.0%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z 4.9e+65) (+ (- (* x 2.0) (* (* y 9.0) (* t z))) (* a (* 27.0 b))) (* t (- (* 27.0 (* a (/ b t))) (* 9.0 (* y z))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 4.9e+65) {
tmp = ((x * 2.0) - ((y * 9.0) * (t * z))) + (a * (27.0 * b));
} else {
tmp = t * ((27.0 * (a * (b / t))) - (9.0 * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= 4.9d+65) then
tmp = ((x * 2.0d0) - ((y * 9.0d0) * (t * z))) + (a * (27.0d0 * b))
else
tmp = t * ((27.0d0 * (a * (b / t))) - (9.0d0 * (y * z)))
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 <= 4.9e+65) {
tmp = ((x * 2.0) - ((y * 9.0) * (t * z))) + (a * (27.0 * b));
} else {
tmp = t * ((27.0 * (a * (b / t))) - (9.0 * (y * z)));
}
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 <= 4.9e+65: tmp = ((x * 2.0) - ((y * 9.0) * (t * z))) + (a * (27.0 * b)) else: tmp = t * ((27.0 * (a * (b / t))) - (9.0 * (y * z))) 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 <= 4.9e+65) tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(t * z))) + Float64(a * Float64(27.0 * b))); else tmp = Float64(t * Float64(Float64(27.0 * Float64(a * Float64(b / t))) - Float64(9.0 * Float64(y * z)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= 4.9e+65)
tmp = ((x * 2.0) - ((y * 9.0) * (t * z))) + (a * (27.0 * b));
else
tmp = t * ((27.0 * (a * (b / t))) - (9.0 * (y * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 4.9e+65], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(27.0 * N[(a * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 4.9 \cdot 10^{+65}:\\
\;\;\;\;\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(t \cdot z\right)\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(27 \cdot \left(a \cdot \frac{b}{t}\right) - 9 \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < 4.89999999999999956e65Initial program 97.5%
associate-+l-97.5%
*-commutative97.5%
*-commutative97.5%
associate-*l*97.4%
associate-+l-97.4%
associate-*l*97.5%
*-commutative97.5%
*-commutative97.5%
associate-*l*97.2%
associate-*l*97.2%
Simplified97.2%
if 4.89999999999999956e65 < z Initial program 85.9%
associate-+l-85.9%
*-commutative85.9%
*-commutative85.9%
associate-*l*86.0%
associate-+l-86.0%
associate-*l*85.9%
*-commutative85.9%
*-commutative85.9%
associate-*l*85.9%
associate-*l*85.9%
Simplified85.9%
Taylor expanded in t around inf 84.3%
Taylor expanded in x around 0 62.7%
associate-*r/62.8%
Simplified62.8%
Final simplification89.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z -7.4e+101) (+ (* x 2.0) (* -9.0 (* z (* t y)))) (+ (- (* x 2.0) (* t (* 9.0 (* y z)))) (* b (* a 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -7.4e+101) {
tmp = (x * 2.0) + (-9.0 * (z * (t * y)));
} else {
tmp = ((x * 2.0) - (t * (9.0 * (y * z)))) + (b * (a * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-7.4d+101)) then
tmp = (x * 2.0d0) + ((-9.0d0) * (z * (t * y)))
else
tmp = ((x * 2.0d0) - (t * (9.0d0 * (y * z)))) + (b * (a * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -7.4e+101) {
tmp = (x * 2.0) + (-9.0 * (z * (t * y)));
} else {
tmp = ((x * 2.0) - (t * (9.0 * (y * z)))) + (b * (a * 27.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -7.4e+101: tmp = (x * 2.0) + (-9.0 * (z * (t * y))) else: tmp = ((x * 2.0) - (t * (9.0 * (y * z)))) + (b * (a * 27.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -7.4e+101) tmp = Float64(Float64(x * 2.0) + Float64(-9.0 * Float64(z * Float64(t * y)))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(t * Float64(9.0 * Float64(y * z)))) + Float64(b * Float64(a * 27.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -7.4e+101)
tmp = (x * 2.0) + (-9.0 * (z * (t * y)));
else
tmp = ((x * 2.0) - (t * (9.0 * (y * z)))) + (b * (a * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -7.4e+101], N[(N[(x * 2.0), $MachinePrecision] + N[(-9.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.4 \cdot 10^{+101}:\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - t \cdot \left(9 \cdot \left(y \cdot z\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if z < -7.3999999999999995e101Initial program 88.7%
associate-+l-88.7%
*-commutative88.7%
*-commutative88.7%
associate-*l*88.7%
associate-+l-88.7%
associate-*l*88.7%
*-commutative88.7%
*-commutative88.7%
associate-*l*91.4%
associate-*l*91.4%
Simplified91.4%
Taylor expanded in a around 0 79.4%
cancel-sign-sub-inv79.4%
*-commutative79.4%
metadata-eval79.4%
associate-*r*84.7%
*-commutative84.7%
Applied egg-rr84.7%
if -7.3999999999999995e101 < z Initial program 96.0%
Taylor expanded in y around 0 95.9%
Final simplification94.4%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= z -2.9e-113)
(+ (* a (* 27.0 b)) (* z (* t (* y -9.0))))
(if (<= z 6.5e-70)
(+ (* x 2.0) (* 27.0 (* a b)))
(- (* x 2.0) (* 9.0 (* t (* y z)))))))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.9e-113) {
tmp = (a * (27.0 * b)) + (z * (t * (y * -9.0)));
} else if (z <= 6.5e-70) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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.9d-113)) then
tmp = (a * (27.0d0 * b)) + (z * (t * (y * (-9.0d0))))
else if (z <= 6.5d-70) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = (x * 2.0d0) - (9.0d0 * (t * (y * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.9e-113) {
tmp = (a * (27.0 * b)) + (z * (t * (y * -9.0)));
} else if (z <= 6.5e-70) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -2.9e-113: tmp = (a * (27.0 * b)) + (z * (t * (y * -9.0))) elif z <= 6.5e-70: tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = (x * 2.0) - (9.0 * (t * (y * z))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.9e-113) tmp = Float64(Float64(a * Float64(27.0 * b)) + Float64(z * Float64(t * Float64(y * -9.0)))); elseif (z <= 6.5e-70) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(y * z)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -2.9e-113)
tmp = (a * (27.0 * b)) + (z * (t * (y * -9.0)));
elseif (z <= 6.5e-70)
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.9e-113], N[(N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(z * N[(t * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e-70], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{-113}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right) + z \cdot \left(t \cdot \left(y \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-70}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -2.90000000000000004e-113Initial program 94.0%
associate-+l-94.0%
*-commutative94.0%
*-commutative94.0%
associate-*l*94.0%
associate-+l-94.0%
associate-*l*94.0%
*-commutative94.0%
*-commutative94.0%
associate-*l*95.0%
associate-*l*95.1%
Simplified95.1%
Taylor expanded in z around inf 95.0%
Taylor expanded in x around 0 79.6%
associate-*r*79.6%
*-commutative79.6%
associate-*l*79.6%
*-commutative79.6%
Simplified79.6%
if -2.90000000000000004e-113 < z < 6.5000000000000005e-70Initial program 99.9%
associate-+l-99.9%
*-commutative99.9%
*-commutative99.9%
associate-*l*99.8%
associate-+l-99.8%
associate-*l*99.9%
*-commutative99.9%
*-commutative99.9%
associate-*l*98.4%
associate-*l*98.3%
Simplified98.3%
Taylor expanded in y around 0 82.9%
if 6.5000000000000005e-70 < z Initial program 90.2%
associate-+l-90.2%
*-commutative90.2%
*-commutative90.2%
associate-*l*90.1%
associate-+l-90.1%
associate-*l*90.2%
*-commutative90.2%
*-commutative90.2%
associate-*l*90.1%
associate-*l*90.1%
Simplified90.1%
Taylor expanded in a around 0 74.0%
Final simplification79.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 -2.8e-113)
(+ (* a (* 27.0 b)) (* z (* -9.0 (* t y))))
(if (<= z 1.7e-70)
(+ (* x 2.0) (* 27.0 (* a b)))
(- (* x 2.0) (* 9.0 (* t (* y z)))))))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.8e-113) {
tmp = (a * (27.0 * b)) + (z * (-9.0 * (t * y)));
} else if (z <= 1.7e-70) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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.8d-113)) then
tmp = (a * (27.0d0 * b)) + (z * ((-9.0d0) * (t * y)))
else if (z <= 1.7d-70) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = (x * 2.0d0) - (9.0d0 * (t * (y * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.8e-113) {
tmp = (a * (27.0 * b)) + (z * (-9.0 * (t * y)));
} else if (z <= 1.7e-70) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -2.8e-113: tmp = (a * (27.0 * b)) + (z * (-9.0 * (t * y))) elif z <= 1.7e-70: tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = (x * 2.0) - (9.0 * (t * (y * z))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.8e-113) tmp = Float64(Float64(a * Float64(27.0 * b)) + Float64(z * Float64(-9.0 * Float64(t * y)))); elseif (z <= 1.7e-70) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(y * z)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -2.8e-113)
tmp = (a * (27.0 * b)) + (z * (-9.0 * (t * y)));
elseif (z <= 1.7e-70)
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.8e-113], N[(N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(z * N[(-9.0 * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e-70], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{-113}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right) + z \cdot \left(-9 \cdot \left(t \cdot y\right)\right)\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-70}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -2.8e-113Initial program 94.0%
associate-+l-94.0%
*-commutative94.0%
*-commutative94.0%
associate-*l*94.0%
associate-+l-94.0%
associate-*l*94.0%
*-commutative94.0%
*-commutative94.0%
associate-*l*95.0%
associate-*l*95.1%
Simplified95.1%
Taylor expanded in z around inf 95.0%
Taylor expanded in x around 0 79.6%
if -2.8e-113 < z < 1.69999999999999998e-70Initial program 99.9%
associate-+l-99.9%
*-commutative99.9%
*-commutative99.9%
associate-*l*99.8%
associate-+l-99.8%
associate-*l*99.9%
*-commutative99.9%
*-commutative99.9%
associate-*l*98.4%
associate-*l*98.3%
Simplified98.3%
Taylor expanded in y around 0 82.9%
if 1.69999999999999998e-70 < z Initial program 90.2%
associate-+l-90.2%
*-commutative90.2%
*-commutative90.2%
associate-*l*90.1%
associate-+l-90.1%
associate-*l*90.2%
*-commutative90.2%
*-commutative90.2%
associate-*l*90.1%
associate-*l*90.1%
Simplified90.1%
Taylor expanded in a around 0 74.0%
Final simplification79.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 (<= x -2.5e+115) (not (<= x 3.2e-40))) (* x 2.0) (* b (* a 27.0))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -2.5e+115) || !(x <= 3.2e-40)) {
tmp = x * 2.0;
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((x <= (-2.5d+115)) .or. (.not. (x <= 3.2d-40))) then
tmp = x * 2.0d0
else
tmp = b * (a * 27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -2.5e+115) || !(x <= 3.2e-40)) {
tmp = x * 2.0;
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (x <= -2.5e+115) or not (x <= 3.2e-40): tmp = x * 2.0 else: tmp = b * (a * 27.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((x <= -2.5e+115) || !(x <= 3.2e-40)) tmp = Float64(x * 2.0); else tmp = Float64(b * Float64(a * 27.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((x <= -2.5e+115) || ~((x <= 3.2e-40)))
tmp = x * 2.0;
else
tmp = b * (a * 27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -2.5e+115], N[Not[LessEqual[x, 3.2e-40]], $MachinePrecision]], N[(x * 2.0), $MachinePrecision], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \cdot 10^{+115} \lor \neg \left(x \leq 3.2 \cdot 10^{-40}\right):\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if x < -2.50000000000000004e115 or 3.20000000000000002e-40 < x Initial program 96.5%
associate-+l-96.5%
*-commutative96.5%
*-commutative96.5%
associate-*l*96.5%
associate-+l-96.5%
associate-*l*96.5%
*-commutative96.5%
*-commutative96.5%
associate-*l*97.3%
associate-*l*97.3%
Simplified97.3%
Taylor expanded in x around inf 46.4%
if -2.50000000000000004e115 < x < 3.20000000000000002e-40Initial program 93.9%
associate-+l-93.9%
*-commutative93.9%
*-commutative93.9%
associate-*l*93.9%
associate-+l-93.9%
associate-*l*93.9%
*-commutative93.9%
*-commutative93.9%
associate-*l*93.0%
associate-*l*92.9%
Simplified92.9%
Taylor expanded in a around inf 48.9%
associate-*r*49.0%
Simplified49.0%
Final simplification47.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 (or (<= x -2.3e+115) (not (<= x 1.45e-40))) (* x 2.0) (* a (* 27.0 b))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -2.3e+115) || !(x <= 1.45e-40)) {
tmp = x * 2.0;
} else {
tmp = a * (27.0 * b);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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.3d+115)) .or. (.not. (x <= 1.45d-40))) then
tmp = x * 2.0d0
else
tmp = a * (27.0d0 * b)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -2.3e+115) || !(x <= 1.45e-40)) {
tmp = x * 2.0;
} else {
tmp = a * (27.0 * b);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (x <= -2.3e+115) or not (x <= 1.45e-40): tmp = x * 2.0 else: tmp = a * (27.0 * b) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((x <= -2.3e+115) || !(x <= 1.45e-40)) tmp = Float64(x * 2.0); else tmp = Float64(a * Float64(27.0 * b)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((x <= -2.3e+115) || ~((x <= 1.45e-40)))
tmp = x * 2.0;
else
tmp = a * (27.0 * b);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -2.3e+115], N[Not[LessEqual[x, 1.45e-40]], $MachinePrecision]], N[(x * 2.0), $MachinePrecision], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{+115} \lor \neg \left(x \leq 1.45 \cdot 10^{-40}\right):\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if x < -2.30000000000000004e115 or 1.4499999999999999e-40 < x Initial program 96.5%
associate-+l-96.5%
*-commutative96.5%
*-commutative96.5%
associate-*l*96.5%
associate-+l-96.5%
associate-*l*96.5%
*-commutative96.5%
*-commutative96.5%
associate-*l*97.3%
associate-*l*97.3%
Simplified97.3%
Taylor expanded in x around inf 46.4%
if -2.30000000000000004e115 < x < 1.4499999999999999e-40Initial program 93.9%
associate-+l-93.9%
*-commutative93.9%
*-commutative93.9%
associate-*l*93.9%
associate-+l-93.9%
associate-*l*93.9%
*-commutative93.9%
*-commutative93.9%
associate-*l*93.0%
associate-*l*92.9%
Simplified92.9%
Taylor expanded in a around inf 48.9%
associate-*r*49.0%
*-commutative49.0%
associate-*r*48.9%
Simplified48.9%
Final simplification47.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 (or (<= x -4.5e+115) (not (<= x 2.3e-41))) (* x 2.0) (* 27.0 (* a b))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -4.5e+115) || !(x <= 2.3e-41)) {
tmp = x * 2.0;
} else {
tmp = 27.0 * (a * b);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((x <= (-4.5d+115)) .or. (.not. (x <= 2.3d-41))) then
tmp = x * 2.0d0
else
tmp = 27.0d0 * (a * b)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -4.5e+115) || !(x <= 2.3e-41)) {
tmp = x * 2.0;
} else {
tmp = 27.0 * (a * b);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (x <= -4.5e+115) or not (x <= 2.3e-41): tmp = x * 2.0 else: tmp = 27.0 * (a * b) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((x <= -4.5e+115) || !(x <= 2.3e-41)) tmp = Float64(x * 2.0); else tmp = Float64(27.0 * Float64(a * b)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((x <= -4.5e+115) || ~((x <= 2.3e-41)))
tmp = x * 2.0;
else
tmp = 27.0 * (a * b);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -4.5e+115], N[Not[LessEqual[x, 2.3e-41]], $MachinePrecision]], N[(x * 2.0), $MachinePrecision], N[(27.0 * N[(a * b), $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 -4.5 \cdot 10^{+115} \lor \neg \left(x \leq 2.3 \cdot 10^{-41}\right):\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if x < -4.49999999999999963e115 or 2.3000000000000001e-41 < x Initial program 96.5%
associate-+l-96.5%
*-commutative96.5%
*-commutative96.5%
associate-*l*96.5%
associate-+l-96.5%
associate-*l*96.5%
*-commutative96.5%
*-commutative96.5%
associate-*l*97.3%
associate-*l*97.3%
Simplified97.3%
Taylor expanded in x around inf 46.4%
if -4.49999999999999963e115 < x < 2.3000000000000001e-41Initial program 93.9%
associate-+l-93.9%
*-commutative93.9%
*-commutative93.9%
associate-*l*93.9%
associate-+l-93.9%
associate-*l*93.9%
*-commutative93.9%
*-commutative93.9%
associate-*l*93.0%
associate-*l*92.9%
Simplified92.9%
Taylor expanded in a around inf 48.9%
Final simplification47.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 (* x 2.0))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * 2.0d0
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): return x * 2.0
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(x * 2.0) end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
tmp = x * 2.0;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := N[(x * 2.0), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
x \cdot 2
\end{array}
Initial program 95.0%
associate-+l-95.0%
*-commutative95.0%
*-commutative95.0%
associate-*l*95.0%
associate-+l-95.0%
associate-*l*95.0%
*-commutative95.0%
*-commutative95.0%
associate-*l*94.8%
associate-*l*94.8%
Simplified94.8%
Taylor expanded in x around inf 26.8%
Final simplification26.8%
(FPCore (x y z t a b) :precision binary64 (if (< y 7.590524218811189e-161) (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* a (* 27.0 b))) (+ (- (* x 2.0) (* 9.0 (* y (* t z)))) (* (* a 27.0) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y < 7.590524218811189e-161) {
tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
} else {
tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y < 7.590524218811189d-161) then
tmp = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + (a * (27.0d0 * b))
else
tmp = ((x * 2.0d0) - (9.0d0 * (y * (t * z)))) + ((a * 27.0d0) * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y < 7.590524218811189e-161) {
tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
} else {
tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y < 7.590524218811189e-161: tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b)) else: tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y < 7.590524218811189e-161) tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(a * Float64(27.0 * b))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(9.0 * Float64(y * Float64(t * z)))) + Float64(Float64(a * 27.0) * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y < 7.590524218811189e-161) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b)); else tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Less[y, 7.590524218811189e-161], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y < 7.590524218811189 \cdot 10^{-161}:\\
\;\;\;\;\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - 9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right) + \left(a \cdot 27\right) \cdot b\\
\end{array}
\end{array}
herbie shell --seed 2024086
(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)))