
(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. 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.16e-158) (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);
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.16e-158) {
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]) 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.16e-158) 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. 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.16e-158], 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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.16 \cdot 10^{-158}:\\
\;\;\;\;\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 < 1.15999999999999996e-158Initial program 97.3%
+-commutative97.3%
associate-+r-97.3%
*-commutative97.3%
cancel-sign-sub-inv97.3%
associate-*r*95.4%
distribute-lft-neg-in95.4%
*-commutative95.4%
cancel-sign-sub-inv95.4%
associate-+r-95.4%
associate-*l*95.4%
fma-define96.0%
fma-neg96.0%
associate-*l*92.4%
distribute-rgt-neg-in92.4%
*-commutative92.4%
associate-*l*92.4%
*-commutative92.4%
distribute-lft-neg-in92.4%
associate-*r*92.4%
Simplified92.4%
if 1.15999999999999996e-158 < z Initial program 95.2%
+-commutative95.2%
associate-+r-95.2%
*-commutative95.2%
cancel-sign-sub-inv95.2%
associate-*r*98.4%
distribute-lft-neg-in98.4%
*-commutative98.4%
cancel-sign-sub-inv98.4%
associate-+r-98.4%
associate-*l*98.5%
fma-define99.5%
cancel-sign-sub-inv99.5%
fma-define99.5%
distribute-lft-neg-in99.5%
distribute-rgt-neg-in99.5%
*-commutative99.5%
associate-*r*96.3%
associate-*l*96.2%
neg-mul-196.2%
associate-*r*96.2%
Simplified96.2%
Final simplification93.9%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z 2.5e-147) (- (+ (* 27.0 (* a b)) (* x 2.0)) (* y (* t (* z 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);
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.5e-147) {
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (t * (z * 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]) 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.5e-147) tmp = Float64(Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)) - Float64(y * Float64(t * Float64(z * 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. 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.5e-147], N[(N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] - N[(y * N[(t * N[(z * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2.5 \cdot 10^{-147}:\\
\;\;\;\;\left(27 \cdot \left(a \cdot b\right) + x \cdot 2\right) - y \cdot \left(t \cdot \left(z \cdot 9\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\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 < 2.50000000000000007e-147Initial program 97.3%
sub-neg97.3%
sub-neg97.3%
associate-*l*91.9%
associate-*l*91.9%
Simplified91.9%
+-commutative91.9%
associate-+r-91.9%
associate-*r*91.9%
*-commutative91.9%
associate-*l*92.0%
associate-*l*92.0%
associate-*r*91.9%
Applied egg-rr91.9%
if 2.50000000000000007e-147 < z Initial program 95.1%
+-commutative95.1%
associate-+r-95.1%
*-commutative95.1%
cancel-sign-sub-inv95.1%
associate-*r*98.4%
distribute-lft-neg-in98.4%
*-commutative98.4%
cancel-sign-sub-inv98.4%
associate-+r-98.4%
associate-*l*98.5%
fma-define99.5%
cancel-sign-sub-inv99.5%
fma-define99.5%
distribute-lft-neg-in99.5%
distribute-rgt-neg-in99.5%
*-commutative99.5%
associate-*r*96.2%
associate-*l*96.1%
neg-mul-196.1%
associate-*r*96.1%
Simplified96.1%
Final simplification93.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= x -1.55e+58)
(* x 2.0)
(if (<= x -2.4e-60)
(* 27.0 (* a b))
(if (<= x -2.8e-224)
(* t (* y (* z -9.0)))
(if (<= x 7.5e-202)
(* a (* 27.0 b))
(if (<= x 6e+67) (* y (* -9.0 (* z t))) (* x 2.0)))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.55e+58) {
tmp = x * 2.0;
} else if (x <= -2.4e-60) {
tmp = 27.0 * (a * b);
} else if (x <= -2.8e-224) {
tmp = t * (y * (z * -9.0));
} else if (x <= 7.5e-202) {
tmp = a * (27.0 * b);
} else if (x <= 6e+67) {
tmp = y * (-9.0 * (z * t));
} else {
tmp = x * 2.0;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-1.55d+58)) then
tmp = x * 2.0d0
else if (x <= (-2.4d-60)) then
tmp = 27.0d0 * (a * b)
else if (x <= (-2.8d-224)) then
tmp = t * (y * (z * (-9.0d0)))
else if (x <= 7.5d-202) then
tmp = a * (27.0d0 * b)
else if (x <= 6d+67) then
tmp = y * ((-9.0d0) * (z * t))
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.55e+58) {
tmp = x * 2.0;
} else if (x <= -2.4e-60) {
tmp = 27.0 * (a * b);
} else if (x <= -2.8e-224) {
tmp = t * (y * (z * -9.0));
} else if (x <= 7.5e-202) {
tmp = a * (27.0 * b);
} else if (x <= 6e+67) {
tmp = y * (-9.0 * (z * t));
} else {
tmp = x * 2.0;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if x <= -1.55e+58: tmp = x * 2.0 elif x <= -2.4e-60: tmp = 27.0 * (a * b) elif x <= -2.8e-224: tmp = t * (y * (z * -9.0)) elif x <= 7.5e-202: tmp = a * (27.0 * b) elif x <= 6e+67: tmp = y * (-9.0 * (z * t)) else: tmp = x * 2.0 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.55e+58) tmp = Float64(x * 2.0); elseif (x <= -2.4e-60) tmp = Float64(27.0 * Float64(a * b)); elseif (x <= -2.8e-224) tmp = Float64(t * Float64(y * Float64(z * -9.0))); elseif (x <= 7.5e-202) tmp = Float64(a * Float64(27.0 * b)); elseif (x <= 6e+67) tmp = Float64(y * Float64(-9.0 * Float64(z * t))); else tmp = Float64(x * 2.0); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (x <= -1.55e+58)
tmp = x * 2.0;
elseif (x <= -2.4e-60)
tmp = 27.0 * (a * b);
elseif (x <= -2.8e-224)
tmp = t * (y * (z * -9.0));
elseif (x <= 7.5e-202)
tmp = a * (27.0 * b);
elseif (x <= 6e+67)
tmp = y * (-9.0 * (z * t));
else
tmp = x * 2.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.55e+58], N[(x * 2.0), $MachinePrecision], If[LessEqual[x, -2.4e-60], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.8e-224], N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.5e-202], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6e+67], N[(y * N[(-9.0 * N[(z * t), $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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{+58}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -2.4 \cdot 10^{-60}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;x \leq -2.8 \cdot 10^{-224}:\\
\;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{-202}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;x \leq 6 \cdot 10^{+67}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if x < -1.55e58 or 6.0000000000000002e67 < x Initial program 97.3%
sub-neg97.3%
sub-neg97.3%
associate-*l*96.3%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in x around inf 62.3%
if -1.55e58 < x < -2.40000000000000009e-60Initial program 99.7%
sub-neg99.7%
sub-neg99.7%
associate-*l*90.5%
associate-*l*90.6%
Simplified90.6%
Taylor expanded in a around inf 58.3%
if -2.40000000000000009e-60 < x < -2.7999999999999998e-224Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*97.2%
associate-*l*97.4%
Simplified97.4%
Taylor expanded in y around 0 99.8%
associate-*r*97.3%
Simplified97.3%
Taylor expanded in t around inf 58.7%
*-commutative58.7%
associate-*r*58.7%
associate-*l*58.8%
Simplified58.8%
if -2.7999999999999998e-224 < x < 7.50000000000000005e-202Initial program 93.2%
sub-neg93.2%
sub-neg93.2%
associate-*l*90.1%
associate-*l*90.0%
Simplified90.0%
Taylor expanded in a around inf 70.0%
associate-*r*70.0%
*-commutative70.0%
associate-*r*69.9%
Simplified69.9%
if 7.50000000000000005e-202 < x < 6.0000000000000002e67Initial program 93.4%
sub-neg93.4%
sub-neg93.4%
associate-*l*88.8%
associate-*l*88.8%
Simplified88.8%
Taylor expanded in a around 0 63.8%
Taylor expanded in y around inf 59.2%
Taylor expanded in x around 0 49.5%
Final simplification59.3%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= x -8.5e+57)
(* x 2.0)
(if (<= x -1.35e-56)
(* 27.0 (* a b))
(if (<= x -7.2e-224)
(* t (* y (* z -9.0)))
(if (<= x 7.8e-202)
(* a (* 27.0 b))
(if (<= x 1.45e+68) (* -9.0 (* y (* z t))) (* x 2.0)))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -8.5e+57) {
tmp = x * 2.0;
} else if (x <= -1.35e-56) {
tmp = 27.0 * (a * b);
} else if (x <= -7.2e-224) {
tmp = t * (y * (z * -9.0));
} else if (x <= 7.8e-202) {
tmp = a * (27.0 * b);
} else if (x <= 1.45e+68) {
tmp = -9.0 * (y * (z * t));
} else {
tmp = x * 2.0;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-8.5d+57)) then
tmp = x * 2.0d0
else if (x <= (-1.35d-56)) then
tmp = 27.0d0 * (a * b)
else if (x <= (-7.2d-224)) then
tmp = t * (y * (z * (-9.0d0)))
else if (x <= 7.8d-202) then
tmp = a * (27.0d0 * b)
else if (x <= 1.45d+68) then
tmp = (-9.0d0) * (y * (z * t))
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -8.5e+57) {
tmp = x * 2.0;
} else if (x <= -1.35e-56) {
tmp = 27.0 * (a * b);
} else if (x <= -7.2e-224) {
tmp = t * (y * (z * -9.0));
} else if (x <= 7.8e-202) {
tmp = a * (27.0 * b);
} else if (x <= 1.45e+68) {
tmp = -9.0 * (y * (z * t));
} else {
tmp = x * 2.0;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if x <= -8.5e+57: tmp = x * 2.0 elif x <= -1.35e-56: tmp = 27.0 * (a * b) elif x <= -7.2e-224: tmp = t * (y * (z * -9.0)) elif x <= 7.8e-202: tmp = a * (27.0 * b) elif x <= 1.45e+68: tmp = -9.0 * (y * (z * t)) else: tmp = x * 2.0 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -8.5e+57) tmp = Float64(x * 2.0); elseif (x <= -1.35e-56) tmp = Float64(27.0 * Float64(a * b)); elseif (x <= -7.2e-224) tmp = Float64(t * Float64(y * Float64(z * -9.0))); elseif (x <= 7.8e-202) tmp = Float64(a * Float64(27.0 * b)); elseif (x <= 1.45e+68) tmp = Float64(-9.0 * Float64(y * Float64(z * t))); else tmp = Float64(x * 2.0); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (x <= -8.5e+57)
tmp = x * 2.0;
elseif (x <= -1.35e-56)
tmp = 27.0 * (a * b);
elseif (x <= -7.2e-224)
tmp = t * (y * (z * -9.0));
elseif (x <= 7.8e-202)
tmp = a * (27.0 * b);
elseif (x <= 1.45e+68)
tmp = -9.0 * (y * (z * t));
else
tmp = x * 2.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -8.5e+57], N[(x * 2.0), $MachinePrecision], If[LessEqual[x, -1.35e-56], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -7.2e-224], N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.8e-202], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.45e+68], N[(-9.0 * N[(y * N[(z * t), $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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{+57}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{-56}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;x \leq -7.2 \cdot 10^{-224}:\\
\;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{-202}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{+68}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if x < -8.5000000000000001e57 or 1.45000000000000006e68 < x Initial program 97.3%
sub-neg97.3%
sub-neg97.3%
associate-*l*96.3%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in x around inf 62.3%
if -8.5000000000000001e57 < x < -1.34999999999999997e-56Initial program 99.7%
sub-neg99.7%
sub-neg99.7%
associate-*l*90.5%
associate-*l*90.6%
Simplified90.6%
Taylor expanded in a around inf 58.3%
if -1.34999999999999997e-56 < x < -7.1999999999999999e-224Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*97.2%
associate-*l*97.4%
Simplified97.4%
Taylor expanded in y around 0 99.8%
associate-*r*97.3%
Simplified97.3%
Taylor expanded in t around inf 58.7%
*-commutative58.7%
associate-*r*58.7%
associate-*l*58.8%
Simplified58.8%
if -7.1999999999999999e-224 < x < 7.7999999999999998e-202Initial program 93.2%
sub-neg93.2%
sub-neg93.2%
associate-*l*90.1%
associate-*l*90.0%
Simplified90.0%
Taylor expanded in a around inf 70.0%
associate-*r*70.0%
*-commutative70.0%
associate-*r*69.9%
Simplified69.9%
if 7.7999999999999998e-202 < x < 1.45000000000000006e68Initial program 93.4%
sub-neg93.4%
sub-neg93.4%
associate-*l*88.8%
associate-*l*88.8%
Simplified88.8%
+-commutative88.8%
associate-+r-88.8%
associate-*r*88.8%
*-commutative88.8%
associate-*l*88.9%
associate-*l*89.0%
associate-*r*89.0%
Applied egg-rr89.0%
Taylor expanded in t around inf 85.9%
associate--l+85.9%
fma-define85.9%
fma-neg85.9%
*-commutative85.9%
associate-/l*85.9%
distribute-lft-neg-in85.9%
metadata-eval85.9%
*-commutative85.9%
*-commutative85.9%
associate-*l*85.9%
Simplified85.9%
Taylor expanded in t around inf 54.0%
*-commutative54.0%
associate-*l*49.5%
*-commutative49.5%
Simplified49.5%
Final simplification59.3%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= x -3.5e+58)
(* x 2.0)
(if (<= x -1.02e-103)
(* 27.0 (* a b))
(if (<= x -1.15e-221)
(* -9.0 (* z (* y t)))
(if (<= x 1.7e-201)
(* a (* 27.0 b))
(if (<= x 2.2e+68) (* -9.0 (* y (* z t))) (* x 2.0)))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -3.5e+58) {
tmp = x * 2.0;
} else if (x <= -1.02e-103) {
tmp = 27.0 * (a * b);
} else if (x <= -1.15e-221) {
tmp = -9.0 * (z * (y * t));
} else if (x <= 1.7e-201) {
tmp = a * (27.0 * b);
} else if (x <= 2.2e+68) {
tmp = -9.0 * (y * (z * t));
} else {
tmp = x * 2.0;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-3.5d+58)) then
tmp = x * 2.0d0
else if (x <= (-1.02d-103)) then
tmp = 27.0d0 * (a * b)
else if (x <= (-1.15d-221)) then
tmp = (-9.0d0) * (z * (y * t))
else if (x <= 1.7d-201) then
tmp = a * (27.0d0 * b)
else if (x <= 2.2d+68) then
tmp = (-9.0d0) * (y * (z * t))
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -3.5e+58) {
tmp = x * 2.0;
} else if (x <= -1.02e-103) {
tmp = 27.0 * (a * b);
} else if (x <= -1.15e-221) {
tmp = -9.0 * (z * (y * t));
} else if (x <= 1.7e-201) {
tmp = a * (27.0 * b);
} else if (x <= 2.2e+68) {
tmp = -9.0 * (y * (z * t));
} else {
tmp = x * 2.0;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if x <= -3.5e+58: tmp = x * 2.0 elif x <= -1.02e-103: tmp = 27.0 * (a * b) elif x <= -1.15e-221: tmp = -9.0 * (z * (y * t)) elif x <= 1.7e-201: tmp = a * (27.0 * b) elif x <= 2.2e+68: tmp = -9.0 * (y * (z * t)) else: tmp = x * 2.0 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -3.5e+58) tmp = Float64(x * 2.0); elseif (x <= -1.02e-103) tmp = Float64(27.0 * Float64(a * b)); elseif (x <= -1.15e-221) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (x <= 1.7e-201) tmp = Float64(a * Float64(27.0 * b)); elseif (x <= 2.2e+68) tmp = Float64(-9.0 * Float64(y * Float64(z * t))); else tmp = Float64(x * 2.0); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (x <= -3.5e+58)
tmp = x * 2.0;
elseif (x <= -1.02e-103)
tmp = 27.0 * (a * b);
elseif (x <= -1.15e-221)
tmp = -9.0 * (z * (y * t));
elseif (x <= 1.7e-201)
tmp = a * (27.0 * b);
elseif (x <= 2.2e+68)
tmp = -9.0 * (y * (z * t));
else
tmp = x * 2.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -3.5e+58], N[(x * 2.0), $MachinePrecision], If[LessEqual[x, -1.02e-103], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.15e-221], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.7e-201], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.2e+68], N[(-9.0 * N[(y * N[(z * t), $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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.5 \cdot 10^{+58}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -1.02 \cdot 10^{-103}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;x \leq -1.15 \cdot 10^{-221}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{-201}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{+68}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if x < -3.4999999999999997e58 or 2.19999999999999987e68 < x Initial program 97.3%
sub-neg97.3%
sub-neg97.3%
associate-*l*96.3%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in x around inf 62.3%
if -3.4999999999999997e58 < x < -1.01999999999999998e-103Initial program 99.6%
sub-neg99.6%
sub-neg99.6%
associate-*l*93.0%
associate-*l*93.2%
Simplified93.2%
Taylor expanded in a around inf 56.3%
if -1.01999999999999998e-103 < x < -1.15e-221Initial program 99.9%
sub-neg99.9%
sub-neg99.9%
associate-*l*96.6%
associate-*l*96.7%
Simplified96.7%
Taylor expanded in y around inf 60.9%
pow160.9%
*-commutative60.9%
associate-*l*54.6%
Applied egg-rr54.6%
unpow154.6%
associate-*r*60.9%
*-commutative60.9%
associate-*r*57.7%
Simplified57.7%
if -1.15e-221 < x < 1.69999999999999993e-201Initial program 93.2%
sub-neg93.2%
sub-neg93.2%
associate-*l*90.1%
associate-*l*90.0%
Simplified90.0%
Taylor expanded in a around inf 70.0%
associate-*r*70.0%
*-commutative70.0%
associate-*r*69.9%
Simplified69.9%
if 1.69999999999999993e-201 < x < 2.19999999999999987e68Initial program 93.4%
sub-neg93.4%
sub-neg93.4%
associate-*l*88.8%
associate-*l*88.8%
Simplified88.8%
+-commutative88.8%
associate-+r-88.8%
associate-*r*88.8%
*-commutative88.8%
associate-*l*88.9%
associate-*l*89.0%
associate-*r*89.0%
Applied egg-rr89.0%
Taylor expanded in t around inf 85.9%
associate--l+85.9%
fma-define85.9%
fma-neg85.9%
*-commutative85.9%
associate-/l*85.9%
distribute-lft-neg-in85.9%
metadata-eval85.9%
*-commutative85.9%
*-commutative85.9%
associate-*l*85.9%
Simplified85.9%
Taylor expanded in t around inf 54.0%
*-commutative54.0%
associate-*l*49.5%
*-commutative49.5%
Simplified49.5%
Final simplification58.9%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* -9.0 (* y (* z t)))))
(if (<= x -4.5e+58)
(* x 2.0)
(if (<= x -1.65e-103)
(* 27.0 (* a b))
(if (<= x -8e-224)
t_1
(if (<= x 7.8e-202)
(* a (* 27.0 b))
(if (<= x 9.5e+67) t_1 (* x 2.0))))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -9.0 * (y * (z * t));
double tmp;
if (x <= -4.5e+58) {
tmp = x * 2.0;
} else if (x <= -1.65e-103) {
tmp = 27.0 * (a * b);
} else if (x <= -8e-224) {
tmp = t_1;
} else if (x <= 7.8e-202) {
tmp = a * (27.0 * b);
} else if (x <= 9.5e+67) {
tmp = t_1;
} else {
tmp = x * 2.0;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (-9.0d0) * (y * (z * t))
if (x <= (-4.5d+58)) then
tmp = x * 2.0d0
else if (x <= (-1.65d-103)) then
tmp = 27.0d0 * (a * b)
else if (x <= (-8d-224)) then
tmp = t_1
else if (x <= 7.8d-202) then
tmp = a * (27.0d0 * b)
else if (x <= 9.5d+67) then
tmp = t_1
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -9.0 * (y * (z * t));
double tmp;
if (x <= -4.5e+58) {
tmp = x * 2.0;
} else if (x <= -1.65e-103) {
tmp = 27.0 * (a * b);
} else if (x <= -8e-224) {
tmp = t_1;
} else if (x <= 7.8e-202) {
tmp = a * (27.0 * b);
} else if (x <= 9.5e+67) {
tmp = t_1;
} else {
tmp = x * 2.0;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = -9.0 * (y * (z * t)) tmp = 0 if x <= -4.5e+58: tmp = x * 2.0 elif x <= -1.65e-103: tmp = 27.0 * (a * b) elif x <= -8e-224: tmp = t_1 elif x <= 7.8e-202: tmp = a * (27.0 * b) elif x <= 9.5e+67: tmp = t_1 else: tmp = x * 2.0 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(-9.0 * Float64(y * Float64(z * t))) tmp = 0.0 if (x <= -4.5e+58) tmp = Float64(x * 2.0); elseif (x <= -1.65e-103) tmp = Float64(27.0 * Float64(a * b)); elseif (x <= -8e-224) tmp = t_1; elseif (x <= 7.8e-202) tmp = Float64(a * Float64(27.0 * b)); elseif (x <= 9.5e+67) tmp = t_1; else tmp = Float64(x * 2.0); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = -9.0 * (y * (z * t));
tmp = 0.0;
if (x <= -4.5e+58)
tmp = x * 2.0;
elseif (x <= -1.65e-103)
tmp = 27.0 * (a * b);
elseif (x <= -8e-224)
tmp = t_1;
elseif (x <= 7.8e-202)
tmp = a * (27.0 * b);
elseif (x <= 9.5e+67)
tmp = t_1;
else
tmp = x * 2.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.5e+58], N[(x * 2.0), $MachinePrecision], If[LessEqual[x, -1.65e-103], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -8e-224], t$95$1, If[LessEqual[x, 7.8e-202], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.5e+67], t$95$1, N[(x * 2.0), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := -9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{if}\;x \leq -4.5 \cdot 10^{+58}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -1.65 \cdot 10^{-103}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;x \leq -8 \cdot 10^{-224}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{-202}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{+67}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if x < -4.4999999999999998e58 or 9.5000000000000002e67 < x Initial program 97.3%
sub-neg97.3%
sub-neg97.3%
associate-*l*96.3%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in x around inf 62.3%
if -4.4999999999999998e58 < x < -1.64999999999999995e-103Initial program 99.6%
sub-neg99.6%
sub-neg99.6%
associate-*l*93.0%
associate-*l*93.2%
Simplified93.2%
Taylor expanded in a around inf 56.3%
if -1.64999999999999995e-103 < x < -8.0000000000000002e-224 or 7.7999999999999998e-202 < x < 9.5000000000000002e67Initial program 95.6%
sub-neg95.6%
sub-neg95.6%
associate-*l*91.4%
associate-*l*91.4%
Simplified91.4%
+-commutative91.4%
associate-+r-91.4%
associate-*r*91.4%
*-commutative91.4%
associate-*l*91.4%
associate-*l*91.5%
associate-*r*91.5%
Applied egg-rr91.5%
Taylor expanded in t around inf 90.5%
associate--l+90.5%
fma-define90.5%
fma-neg90.5%
*-commutative90.5%
associate-/l*89.4%
distribute-lft-neg-in89.4%
metadata-eval89.4%
*-commutative89.4%
*-commutative89.4%
associate-*l*89.5%
Simplified89.5%
Taylor expanded in t around inf 56.2%
*-commutative56.2%
associate-*l*51.2%
*-commutative51.2%
Simplified51.2%
if -8.0000000000000002e-224 < x < 7.7999999999999998e-202Initial program 93.2%
sub-neg93.2%
sub-neg93.2%
associate-*l*90.1%
associate-*l*90.0%
Simplified90.0%
Taylor expanded in a around inf 70.0%
associate-*r*70.0%
*-commutative70.0%
associate-*r*69.9%
Simplified69.9%
Final simplification58.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* -9.0 (* t (* z y)))))
(if (<= x -2.45e+57)
(* x 2.0)
(if (<= x -8.5e-104)
(* 27.0 (* a b))
(if (<= x -1.06e-212)
t_1
(if (<= x 2e-201)
(* a (* 27.0 b))
(if (<= x 3.5e+70) t_1 (* x 2.0))))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -9.0 * (t * (z * y));
double tmp;
if (x <= -2.45e+57) {
tmp = x * 2.0;
} else if (x <= -8.5e-104) {
tmp = 27.0 * (a * b);
} else if (x <= -1.06e-212) {
tmp = t_1;
} else if (x <= 2e-201) {
tmp = a * (27.0 * b);
} else if (x <= 3.5e+70) {
tmp = t_1;
} else {
tmp = x * 2.0;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (-9.0d0) * (t * (z * y))
if (x <= (-2.45d+57)) then
tmp = x * 2.0d0
else if (x <= (-8.5d-104)) then
tmp = 27.0d0 * (a * b)
else if (x <= (-1.06d-212)) then
tmp = t_1
else if (x <= 2d-201) then
tmp = a * (27.0d0 * b)
else if (x <= 3.5d+70) then
tmp = t_1
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -9.0 * (t * (z * y));
double tmp;
if (x <= -2.45e+57) {
tmp = x * 2.0;
} else if (x <= -8.5e-104) {
tmp = 27.0 * (a * b);
} else if (x <= -1.06e-212) {
tmp = t_1;
} else if (x <= 2e-201) {
tmp = a * (27.0 * b);
} else if (x <= 3.5e+70) {
tmp = t_1;
} else {
tmp = x * 2.0;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = -9.0 * (t * (z * y)) tmp = 0 if x <= -2.45e+57: tmp = x * 2.0 elif x <= -8.5e-104: tmp = 27.0 * (a * b) elif x <= -1.06e-212: tmp = t_1 elif x <= 2e-201: tmp = a * (27.0 * b) elif x <= 3.5e+70: tmp = t_1 else: tmp = x * 2.0 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(-9.0 * Float64(t * Float64(z * y))) tmp = 0.0 if (x <= -2.45e+57) tmp = Float64(x * 2.0); elseif (x <= -8.5e-104) tmp = Float64(27.0 * Float64(a * b)); elseif (x <= -1.06e-212) tmp = t_1; elseif (x <= 2e-201) tmp = Float64(a * Float64(27.0 * b)); elseif (x <= 3.5e+70) tmp = t_1; else tmp = Float64(x * 2.0); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = -9.0 * (t * (z * y));
tmp = 0.0;
if (x <= -2.45e+57)
tmp = x * 2.0;
elseif (x <= -8.5e-104)
tmp = 27.0 * (a * b);
elseif (x <= -1.06e-212)
tmp = t_1;
elseif (x <= 2e-201)
tmp = a * (27.0 * b);
elseif (x <= 3.5e+70)
tmp = t_1;
else
tmp = x * 2.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.45e+57], N[(x * 2.0), $MachinePrecision], If[LessEqual[x, -8.5e-104], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.06e-212], t$95$1, If[LessEqual[x, 2e-201], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.5e+70], t$95$1, N[(x * 2.0), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := -9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{if}\;x \leq -2.45 \cdot 10^{+57}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -8.5 \cdot 10^{-104}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;x \leq -1.06 \cdot 10^{-212}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2 \cdot 10^{-201}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if x < -2.45e57 or 3.50000000000000002e70 < x Initial program 97.3%
sub-neg97.3%
sub-neg97.3%
associate-*l*96.3%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in x around inf 62.3%
if -2.45e57 < x < -8.50000000000000007e-104Initial program 99.6%
sub-neg99.6%
sub-neg99.6%
associate-*l*93.0%
associate-*l*93.2%
Simplified93.2%
Taylor expanded in a around inf 56.3%
if -8.50000000000000007e-104 < x < -1.06000000000000004e-212 or 1.99999999999999989e-201 < x < 3.50000000000000002e70Initial program 95.5%
sub-neg95.5%
sub-neg95.5%
associate-*l*91.2%
associate-*l*91.2%
Simplified91.2%
Taylor expanded in y around inf 56.3%
if -1.06000000000000004e-212 < x < 1.99999999999999989e-201Initial program 93.6%
sub-neg93.6%
sub-neg93.6%
associate-*l*90.8%
associate-*l*90.7%
Simplified90.7%
Taylor expanded in a around inf 68.8%
associate-*r*68.8%
*-commutative68.8%
associate-*r*68.7%
Simplified68.7%
Final simplification60.3%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* 9.0 (* t (* z y)))))
(if (<= (* x 2.0) -1e+90)
(- (* x 2.0) t_1)
(if (<= (* x 2.0) 2e+26)
(- (* 27.0 (* a b)) t_1)
(+ (* z (* y (* t -9.0))) (* x 2.0))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 9.0 * (t * (z * y));
double tmp;
if ((x * 2.0) <= -1e+90) {
tmp = (x * 2.0) - t_1;
} else if ((x * 2.0) <= 2e+26) {
tmp = (27.0 * (a * b)) - t_1;
} else {
tmp = (z * (y * (t * -9.0))) + (x * 2.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = 9.0d0 * (t * (z * y))
if ((x * 2.0d0) <= (-1d+90)) then
tmp = (x * 2.0d0) - t_1
else if ((x * 2.0d0) <= 2d+26) then
tmp = (27.0d0 * (a * b)) - t_1
else
tmp = (z * (y * (t * (-9.0d0)))) + (x * 2.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 9.0 * (t * (z * y));
double tmp;
if ((x * 2.0) <= -1e+90) {
tmp = (x * 2.0) - t_1;
} else if ((x * 2.0) <= 2e+26) {
tmp = (27.0 * (a * b)) - t_1;
} else {
tmp = (z * (y * (t * -9.0))) + (x * 2.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = 9.0 * (t * (z * y)) tmp = 0 if (x * 2.0) <= -1e+90: tmp = (x * 2.0) - t_1 elif (x * 2.0) <= 2e+26: tmp = (27.0 * (a * b)) - t_1 else: tmp = (z * (y * (t * -9.0))) + (x * 2.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(9.0 * Float64(t * Float64(z * y))) tmp = 0.0 if (Float64(x * 2.0) <= -1e+90) tmp = Float64(Float64(x * 2.0) - t_1); elseif (Float64(x * 2.0) <= 2e+26) tmp = Float64(Float64(27.0 * Float64(a * b)) - t_1); else tmp = Float64(Float64(z * Float64(y * Float64(t * -9.0))) + Float64(x * 2.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = 9.0 * (t * (z * y));
tmp = 0.0;
if ((x * 2.0) <= -1e+90)
tmp = (x * 2.0) - t_1;
elseif ((x * 2.0) <= 2e+26)
tmp = (27.0 * (a * b)) - t_1;
else
tmp = (z * (y * (t * -9.0))) + (x * 2.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * 2.0), $MachinePrecision], -1e+90], N[(N[(x * 2.0), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[N[(x * 2.0), $MachinePrecision], 2e+26], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(z * N[(y * N[(t * -9.0), $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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{if}\;x \cdot 2 \leq -1 \cdot 10^{+90}:\\
\;\;\;\;x \cdot 2 - t\_1\\
\mathbf{elif}\;x \cdot 2 \leq 2 \cdot 10^{+26}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y \cdot \left(t \cdot -9\right)\right) + x \cdot 2\\
\end{array}
\end{array}
if (*.f64 x #s(literal 2 binary64)) < -9.99999999999999966e89Initial program 100.0%
sub-neg100.0%
sub-neg100.0%
associate-*l*94.9%
associate-*l*94.9%
Simplified94.9%
Taylor expanded in a around 0 90.2%
if -9.99999999999999966e89 < (*.f64 x #s(literal 2 binary64)) < 2.0000000000000001e26Initial program 95.9%
sub-neg95.9%
sub-neg95.9%
associate-*l*92.7%
associate-*l*92.7%
Simplified92.7%
Taylor expanded in x around 0 86.5%
if 2.0000000000000001e26 < (*.f64 x #s(literal 2 binary64)) Initial program 95.7%
sub-neg95.7%
sub-neg95.7%
associate-*l*94.3%
associate-*l*94.3%
Simplified94.3%
Taylor expanded in a around 0 77.8%
cancel-sign-sub-inv77.8%
*-commutative77.8%
metadata-eval77.8%
+-commutative77.8%
associate-*r*77.7%
associate-*r*79.1%
*-commutative79.1%
Applied egg-rr79.1%
Final simplification85.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* 27.0 b))))
(if (<= (* y 9.0) -1e+105)
(+ (- (* x 2.0) (* (* y 9.0) (* z t))) t_1)
(+ t_1 (- (* x 2.0) (* 9.0 (* z (* y t))))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (27.0 * b);
double tmp;
if ((y * 9.0) <= -1e+105) {
tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + t_1;
} else {
tmp = t_1 + ((x * 2.0) - (9.0 * (z * (y * t))));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * (27.0d0 * b)
if ((y * 9.0d0) <= (-1d+105)) then
tmp = ((x * 2.0d0) - ((y * 9.0d0) * (z * t))) + t_1
else
tmp = t_1 + ((x * 2.0d0) - (9.0d0 * (z * (y * t))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (27.0 * b);
double tmp;
if ((y * 9.0) <= -1e+105) {
tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + t_1;
} else {
tmp = t_1 + ((x * 2.0) - (9.0 * (z * (y * t))));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = a * (27.0 * b) tmp = 0 if (y * 9.0) <= -1e+105: tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + t_1 else: tmp = t_1 + ((x * 2.0) - (9.0 * (z * (y * t)))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(27.0 * b)) tmp = 0.0 if (Float64(y * 9.0) <= -1e+105) tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(z * t))) + t_1); else tmp = Float64(t_1 + Float64(Float64(x * 2.0) - Float64(9.0 * Float64(z * Float64(y * t))))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = a * (27.0 * b);
tmp = 0.0;
if ((y * 9.0) <= -1e+105)
tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + t_1;
else
tmp = t_1 + ((x * 2.0) - (9.0 * (z * (y * t))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(y * 9.0), $MachinePrecision], -1e+105], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$1 + N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right)\\
\mathbf{if}\;y \cdot 9 \leq -1 \cdot 10^{+105}:\\
\;\;\;\;\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \left(x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 y #s(literal 9 binary64)) < -9.9999999999999994e104Initial program 93.1%
sub-neg93.1%
sub-neg93.1%
associate-*l*95.2%
associate-*l*95.2%
Simplified95.2%
if -9.9999999999999994e104 < (*.f64 y #s(literal 9 binary64)) Initial program 97.2%
sub-neg97.2%
sub-neg97.2%
associate-*l*93.1%
associate-*l*93.2%
Simplified93.2%
Taylor expanded in y around 0 97.1%
associate-*r*98.2%
Simplified98.2%
Final simplification97.7%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z 1.6e+81) (- (+ (* 27.0 (* a b)) (* x 2.0)) (* y (* t (* z 9.0)))) (* x (+ 2.0 (* -9.0 (/ (* z (* y t)) x))))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.6e+81) {
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (t * (z * 9.0)));
} else {
tmp = x * (2.0 + (-9.0 * ((z * (y * t)) / x)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= 1.6d+81) then
tmp = ((27.0d0 * (a * b)) + (x * 2.0d0)) - (y * (t * (z * 9.0d0)))
else
tmp = x * (2.0d0 + ((-9.0d0) * ((z * (y * t)) / x)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.6e+81) {
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (t * (z * 9.0)));
} else {
tmp = x * (2.0 + (-9.0 * ((z * (y * t)) / x)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= 1.6e+81: tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (t * (z * 9.0))) else: tmp = x * (2.0 + (-9.0 * ((z * (y * t)) / x))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 1.6e+81) tmp = Float64(Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)) - Float64(y * Float64(t * Float64(z * 9.0)))); else tmp = Float64(x * Float64(2.0 + Float64(-9.0 * Float64(Float64(z * Float64(y * t)) / x)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= 1.6e+81)
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (t * (z * 9.0)));
else
tmp = x * (2.0 + (-9.0 * ((z * (y * t)) / x)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 1.6e+81], N[(N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] - N[(y * N[(t * N[(z * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(2.0 + N[(-9.0 * N[(N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.6 \cdot 10^{+81}:\\
\;\;\;\;\left(27 \cdot \left(a \cdot b\right) + x \cdot 2\right) - y \cdot \left(t \cdot \left(z \cdot 9\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(2 + -9 \cdot \frac{z \cdot \left(y \cdot t\right)}{x}\right)\\
\end{array}
\end{array}
if z < 1.6e81Initial program 98.0%
sub-neg98.0%
sub-neg98.0%
associate-*l*93.4%
associate-*l*93.4%
Simplified93.4%
+-commutative93.4%
associate-+r-93.4%
associate-*r*93.4%
*-commutative93.4%
associate-*l*93.5%
associate-*l*93.5%
associate-*r*93.5%
Applied egg-rr93.5%
if 1.6e81 < z Initial program 89.8%
sub-neg89.8%
sub-neg89.8%
associate-*l*93.7%
associate-*l*93.7%
Simplified93.7%
Taylor expanded in a around 0 79.3%
Taylor expanded in x around inf 77.3%
*-commutative77.3%
associate-*r*84.2%
Simplified84.2%
Final simplification91.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.55e-113) (not (<= t 8e+74))) (+ (* z (* y (* t -9.0))) (* x 2.0)) (+ (* 27.0 (* a b)) (* x 2.0))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.55e-113) || !(t <= 8e+74)) {
tmp = (z * (y * (t * -9.0))) + (x * 2.0);
} else {
tmp = (27.0 * (a * b)) + (x * 2.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-2.55d-113)) .or. (.not. (t <= 8d+74))) then
tmp = (z * (y * (t * (-9.0d0)))) + (x * 2.0d0)
else
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.55e-113) || !(t <= 8e+74)) {
tmp = (z * (y * (t * -9.0))) + (x * 2.0);
} else {
tmp = (27.0 * (a * b)) + (x * 2.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.55e-113) or not (t <= 8e+74): tmp = (z * (y * (t * -9.0))) + (x * 2.0) else: tmp = (27.0 * (a * b)) + (x * 2.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.55e-113) || !(t <= 8e+74)) tmp = Float64(Float64(z * Float64(y * Float64(t * -9.0))) + Float64(x * 2.0)); else tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((t <= -2.55e-113) || ~((t <= 8e+74)))
tmp = (z * (y * (t * -9.0))) + (x * 2.0);
else
tmp = (27.0 * (a * b)) + (x * 2.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.55e-113], N[Not[LessEqual[t, 8e+74]], $MachinePrecision]], N[(N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.55 \cdot 10^{-113} \lor \neg \left(t \leq 8 \cdot 10^{+74}\right):\\
\;\;\;\;z \cdot \left(y \cdot \left(t \cdot -9\right)\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\end{array}
\end{array}
if t < -2.54999999999999989e-113 or 7.99999999999999961e74 < t Initial program 97.7%
sub-neg97.7%
sub-neg97.7%
associate-*l*88.3%
associate-*l*88.3%
Simplified88.3%
Taylor expanded in a around 0 72.5%
cancel-sign-sub-inv72.5%
*-commutative72.5%
metadata-eval72.5%
+-commutative72.5%
associate-*r*72.5%
associate-*r*70.4%
*-commutative70.4%
Applied egg-rr70.4%
if -2.54999999999999989e-113 < t < 7.99999999999999961e74Initial program 94.9%
sub-neg94.9%
sub-neg94.9%
associate-*l*99.8%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in y around 0 83.8%
Final simplification76.4%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= t -4.5e-113)
(+ (* z (* y (* t -9.0))) (* x 2.0))
(if (<= t 1.35e+77)
(+ (* 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);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4.5e-113) {
tmp = (z * (y * (t * -9.0))) + (x * 2.0);
} else if (t <= 1.35e+77) {
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.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-4.5d-113)) then
tmp = (z * (y * (t * (-9.0d0)))) + (x * 2.0d0)
else if (t <= 1.35d+77) 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;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4.5e-113) {
tmp = (z * (y * (t * -9.0))) + (x * 2.0);
} else if (t <= 1.35e+77) {
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]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if t <= -4.5e-113: tmp = (z * (y * (t * -9.0))) + (x * 2.0) elif t <= 1.35e+77: 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]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -4.5e-113) tmp = Float64(Float64(z * Float64(y * Float64(t * -9.0))) + Float64(x * 2.0)); elseif (t <= 1.35e+77) 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])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (t <= -4.5e-113)
tmp = (z * (y * (t * -9.0))) + (x * 2.0);
elseif (t <= 1.35e+77)
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. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -4.5e-113], N[(N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e+77], 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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{-113}:\\
\;\;\;\;z \cdot \left(y \cdot \left(t \cdot -9\right)\right) + x \cdot 2\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+77}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if t < -4.5000000000000001e-113Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*89.0%
associate-*l*89.0%
Simplified89.0%
Taylor expanded in a around 0 68.7%
cancel-sign-sub-inv68.7%
*-commutative68.7%
metadata-eval68.7%
+-commutative68.7%
associate-*r*68.7%
associate-*r*66.7%
*-commutative66.7%
Applied egg-rr66.7%
if -4.5000000000000001e-113 < t < 1.3499999999999999e77Initial program 94.9%
sub-neg94.9%
sub-neg94.9%
associate-*l*99.8%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in y around 0 83.8%
if 1.3499999999999999e77 < t Initial program 93.3%
sub-neg93.3%
sub-neg93.3%
associate-*l*86.7%
associate-*l*86.8%
Simplified86.8%
Taylor expanded in a around 0 80.6%
Final simplification76.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= t -4.5e-113) (* -9.0 (* y (* z t))) (if (<= t 3.8e+193) (+ (* 27.0 (* a b)) (* x 2.0)) (* t (* y (* z -9.0))))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4.5e-113) {
tmp = -9.0 * (y * (z * t));
} else if (t <= 3.8e+193) {
tmp = (27.0 * (a * b)) + (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.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-4.5d-113)) then
tmp = (-9.0d0) * (y * (z * t))
else if (t <= 3.8d+193) then
tmp = (27.0d0 * (a * b)) + (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;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4.5e-113) {
tmp = -9.0 * (y * (z * t));
} else if (t <= 3.8e+193) {
tmp = (27.0 * (a * b)) + (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]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if t <= -4.5e-113: tmp = -9.0 * (y * (z * t)) elif t <= 3.8e+193: tmp = (27.0 * (a * b)) + (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]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -4.5e-113) tmp = Float64(-9.0 * Float64(y * Float64(z * t))); elseif (t <= 3.8e+193) tmp = Float64(Float64(27.0 * Float64(a * b)) + 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])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (t <= -4.5e-113)
tmp = -9.0 * (y * (z * t));
elseif (t <= 3.8e+193)
tmp = (27.0 * (a * b)) + (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. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -4.5e-113], N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.8e+193], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{-113}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{+193}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\end{array}
\end{array}
if t < -4.5000000000000001e-113Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*89.0%
associate-*l*89.0%
Simplified89.0%
+-commutative89.0%
associate-+r-89.0%
associate-*r*89.0%
*-commutative89.0%
associate-*l*89.0%
associate-*l*89.0%
associate-*r*89.0%
Applied egg-rr89.0%
Taylor expanded in t around inf 97.7%
associate--l+97.7%
fma-define97.7%
fma-neg97.7%
*-commutative97.7%
associate-/l*96.7%
distribute-lft-neg-in96.7%
metadata-eval96.7%
*-commutative96.7%
*-commutative96.7%
associate-*l*96.8%
Simplified96.8%
Taylor expanded in t around inf 47.2%
*-commutative47.2%
associate-*l*38.5%
*-commutative38.5%
Simplified38.5%
if -4.5000000000000001e-113 < t < 3.79999999999999972e193Initial program 95.7%
sub-neg95.7%
sub-neg95.7%
associate-*l*99.1%
associate-*l*99.1%
Simplified99.1%
Taylor expanded in y around 0 79.8%
if 3.79999999999999972e193 < t Initial program 87.7%
sub-neg87.7%
sub-neg87.7%
associate-*l*79.6%
associate-*l*79.6%
Simplified79.6%
Taylor expanded in y around 0 87.8%
associate-*r*91.5%
Simplified91.5%
Taylor expanded in t around inf 83.7%
*-commutative83.7%
associate-*r*83.8%
associate-*l*83.7%
Simplified83.7%
Final simplification64.7%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (+ (* a (* 27.0 b)) (- (* x 2.0) (* 9.0 (* z (* y t))))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
return (a * (27.0 * b)) + ((x * 2.0) - (9.0 * (z * (y * t))));
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (a * (27.0d0 * b)) + ((x * 2.0d0) - (9.0d0 * (z * (y * t))))
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
return (a * (27.0 * b)) + ((x * 2.0) - (9.0 * (z * (y * t))));
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): return (a * (27.0 * b)) + ((x * 2.0) - (9.0 * (z * (y * t))))
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(Float64(a * Float64(27.0 * b)) + Float64(Float64(x * 2.0) - Float64(9.0 * Float64(z * Float64(y * t))))) end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
tmp = (a * (27.0 * b)) + ((x * 2.0) - (9.0 * (z * (y * t))));
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := N[(N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
a \cdot \left(27 \cdot b\right) + \left(x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)
\end{array}
Initial program 96.5%
sub-neg96.5%
sub-neg96.5%
associate-*l*93.5%
associate-*l*93.5%
Simplified93.5%
Taylor expanded in y around 0 96.4%
associate-*r*96.6%
Simplified96.6%
Final simplification96.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (+ (+ (* b (* a 27.0)) (* z (* y (* t -9.0)))) (* x 2.0)))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
return ((b * (a * 27.0)) + (z * (y * (t * -9.0)))) + (x * 2.0);
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((b * (a * 27.0d0)) + (z * (y * (t * (-9.0d0))))) + (x * 2.0d0)
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
return ((b * (a * 27.0)) + (z * (y * (t * -9.0)))) + (x * 2.0);
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): return ((b * (a * 27.0)) + (z * (y * (t * -9.0)))) + (x * 2.0)
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(Float64(Float64(b * Float64(a * 27.0)) + Float64(z * Float64(y * Float64(t * -9.0)))) + Float64(x * 2.0)) end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
tmp = ((b * (a * 27.0)) + (z * (y * (t * -9.0)))) + (x * 2.0);
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\left(b \cdot \left(a \cdot 27\right) + z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\right) + x \cdot 2
\end{array}
Initial program 96.5%
sub-neg96.5%
sub-neg96.5%
associate-*l*93.5%
associate-*l*93.5%
Simplified93.5%
+-commutative93.5%
associate-+r-93.5%
associate-*r*93.5%
*-commutative93.5%
associate-*l*93.5%
associate-*l*93.5%
associate-*r*93.5%
Applied egg-rr93.5%
sub-neg93.5%
+-commutative93.5%
associate-+l+93.5%
associate-*r*93.5%
*-commutative93.5%
associate-*r*96.4%
*-commutative96.4%
*-commutative96.4%
associate-*r*96.4%
associate-*l*96.4%
*-commutative96.4%
distribute-lft-neg-in96.4%
metadata-eval96.4%
associate-*r*96.4%
associate-*r*96.6%
*-commutative96.6%
Applied egg-rr96.6%
Final simplification96.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= x -2.45e+58) (not (<= x 2.1e+26))) (* x 2.0) (* 27.0 (* a b))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -2.45e+58) || !(x <= 2.1e+26)) {
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.
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.45d+58)) .or. (.not. (x <= 2.1d+26))) 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;
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.45e+58) || !(x <= 2.1e+26)) {
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]) [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.45e+58) or not (x <= 2.1e+26): 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]) 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.45e+58) || !(x <= 2.1e+26)) 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])){:}
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.45e+58) || ~((x <= 2.1e+26)))
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. 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.45e+58], N[Not[LessEqual[x, 2.1e+26]], $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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.45 \cdot 10^{+58} \lor \neg \left(x \leq 2.1 \cdot 10^{+26}\right):\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if x < -2.45000000000000009e58 or 2.1000000000000001e26 < x Initial program 97.5%
sub-neg97.5%
sub-neg97.5%
associate-*l*94.9%
associate-*l*94.9%
Simplified94.9%
Taylor expanded in x around inf 60.2%
if -2.45000000000000009e58 < x < 2.1000000000000001e26Initial program 95.6%
sub-neg95.6%
sub-neg95.6%
associate-*l*92.3%
associate-*l*92.3%
Simplified92.3%
Taylor expanded in a around inf 46.9%
Final simplification52.9%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (* x 2.0))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * 2.0d0
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): return x * 2.0
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(x * 2.0) end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
tmp = x * 2.0;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := N[(x * 2.0), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
x \cdot 2
\end{array}
Initial program 96.5%
sub-neg96.5%
sub-neg96.5%
associate-*l*93.5%
associate-*l*93.5%
Simplified93.5%
Taylor expanded in x around inf 32.5%
Final simplification32.5%
(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 2024091
(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)))