
(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 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z -1e-14) (fma a (* 27.0 b) (fma x 2.0 (* y (* z (* t -9.0))))) (fma a (* 27.0 b) (fma x 2.0 (* t (* y (* z -9.0)))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1e-14) {
tmp = fma(a, (27.0 * b), fma(x, 2.0, (y * (z * (t * -9.0)))));
} else {
tmp = fma(a, (27.0 * b), fma(x, 2.0, (t * (y * (z * -9.0)))));
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1e-14) tmp = fma(a, Float64(27.0 * b), fma(x, 2.0, Float64(y * Float64(z * Float64(t * -9.0))))); else tmp = fma(a, Float64(27.0 * b), fma(x, 2.0, Float64(t * Float64(y * Float64(z * -9.0))))); end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1e-14], N[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-14}:\\
\;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\right)\right)\\
\end{array}
\end{array}
if z < -9.99999999999999999e-15Initial program 90.7%
Simplified91.2%
if -9.99999999999999999e-15 < z Initial program 94.7%
+-commutative94.7%
associate-+r-94.7%
*-commutative94.7%
cancel-sign-sub-inv94.7%
associate-*r*91.3%
distribute-lft-neg-in91.3%
*-commutative91.3%
cancel-sign-sub-inv91.3%
associate-+r-91.3%
associate-*l*91.2%
fma-define92.3%
cancel-sign-sub-inv92.3%
fma-define92.3%
distribute-lft-neg-in92.3%
distribute-rgt-neg-in92.3%
*-commutative92.3%
associate-*r*95.8%
associate-*l*96.3%
neg-mul-196.3%
associate-*r*96.3%
Simplified96.3%
Final simplification95.0%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= (* z (* y 9.0)) 2e+147) (fma a (* 27.0 b) (fma x 2.0 (* t (* y (* z -9.0))))) (* y (- (+ (* 2.0 (/ x y)) (* 27.0 (/ (* a b) y))) (* 9.0 (* z t))))))
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 * (y * 9.0)) <= 2e+147) {
tmp = fma(a, (27.0 * b), fma(x, 2.0, (t * (y * (z * -9.0)))));
} else {
tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (z * t)));
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(z * Float64(y * 9.0)) <= 2e+147) tmp = fma(a, Float64(27.0 * b), fma(x, 2.0, Float64(t * Float64(y * Float64(z * -9.0))))); else tmp = Float64(y * Float64(Float64(Float64(2.0 * Float64(x / y)) + Float64(27.0 * Float64(Float64(a * b) / y))) - Float64(9.0 * Float64(z * t)))); 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[N[(z * N[(y * 9.0), $MachinePrecision]), $MachinePrecision], 2e+147], N[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(N[(2.0 * N[(x / y), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(N[(a * b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(z * t), $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 \cdot \left(y \cdot 9\right) \leq 2 \cdot 10^{+147}:\\
\;\;\;\;\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)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(2 \cdot \frac{x}{y} + 27 \cdot \frac{a \cdot b}{y}\right) - 9 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 y #s(literal 9 binary64)) z) < 2e147Initial program 95.8%
+-commutative95.8%
associate-+r-95.8%
*-commutative95.8%
cancel-sign-sub-inv95.8%
associate-*r*92.8%
distribute-lft-neg-in92.8%
*-commutative92.8%
cancel-sign-sub-inv92.8%
associate-+r-92.8%
associate-*l*92.8%
fma-define94.2%
cancel-sign-sub-inv94.2%
fma-define94.2%
distribute-lft-neg-in94.2%
distribute-rgt-neg-in94.2%
*-commutative94.2%
associate-*r*97.2%
associate-*l*97.2%
neg-mul-197.2%
associate-*r*97.2%
Simplified97.2%
if 2e147 < (*.f64 (*.f64 y #s(literal 9 binary64)) z) Initial program 80.9%
sub-neg80.9%
sub-neg80.9%
associate-*l*91.5%
associate-*l*91.6%
Simplified91.6%
Taylor expanded in y around inf 91.9%
Final simplification96.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 -1e-14) (fma a (* 27.0 b) (fma 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);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1e-14) {
tmp = fma(a, (27.0 * b), fma(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]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1e-14) tmp = fma(a, Float64(27.0 * b), fma(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. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1e-14], N[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-14}:\\
\;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\right)\right)\\
\end{array}
\end{array}
if z < -9.99999999999999999e-15Initial program 90.7%
Simplified91.2%
Taylor expanded in z around 0 91.2%
*-commutative91.2%
associate-*l*91.2%
Simplified91.2%
if -9.99999999999999999e-15 < z Initial program 94.7%
+-commutative94.7%
associate-+r-94.7%
*-commutative94.7%
cancel-sign-sub-inv94.7%
associate-*r*91.3%
distribute-lft-neg-in91.3%
*-commutative91.3%
cancel-sign-sub-inv91.3%
associate-+r-91.3%
associate-*l*91.2%
fma-define92.3%
cancel-sign-sub-inv92.3%
fma-define92.3%
distribute-lft-neg-in92.3%
distribute-rgt-neg-in92.3%
*-commutative92.3%
associate-*r*95.8%
associate-*l*96.3%
neg-mul-196.3%
associate-*r*96.3%
Simplified96.3%
Final simplification95.0%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (* y 9.0))))
(if (<= t_1 2e+147)
(+ (- (* x 2.0) (* t t_1)) (* b (* a 27.0)))
(* y (- (+ (* 2.0 (/ x y)) (* 27.0 (/ (* a b) y))) (* 9.0 (* z t)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y * 9.0);
double tmp;
if (t_1 <= 2e+147) {
tmp = ((x * 2.0) - (t * t_1)) + (b * (a * 27.0));
} else {
tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (z * t)));
}
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 = z * (y * 9.0d0)
if (t_1 <= 2d+147) then
tmp = ((x * 2.0d0) - (t * t_1)) + (b * (a * 27.0d0))
else
tmp = y * (((2.0d0 * (x / y)) + (27.0d0 * ((a * b) / y))) - (9.0d0 * (z * t)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y * 9.0);
double tmp;
if (t_1 <= 2e+147) {
tmp = ((x * 2.0) - (t * t_1)) + (b * (a * 27.0));
} else {
tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (z * t)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = z * (y * 9.0) tmp = 0 if t_1 <= 2e+147: tmp = ((x * 2.0) - (t * t_1)) + (b * (a * 27.0)) else: tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (z * t))) 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(z * Float64(y * 9.0)) tmp = 0.0 if (t_1 <= 2e+147) tmp = Float64(Float64(Float64(x * 2.0) - Float64(t * t_1)) + Float64(b * Float64(a * 27.0))); else tmp = Float64(y * Float64(Float64(Float64(2.0 * Float64(x / y)) + Float64(27.0 * Float64(Float64(a * b) / y))) - Float64(9.0 * Float64(z * t)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = z * (y * 9.0);
tmp = 0.0;
if (t_1 <= 2e+147)
tmp = ((x * 2.0) - (t * t_1)) + (b * (a * 27.0));
else
tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (z * t)));
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[(z * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+147], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(N[(2.0 * N[(x / y), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(N[(a * b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(z * t), $MachinePrecision]), $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 := z \cdot \left(y \cdot 9\right)\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{+147}:\\
\;\;\;\;\left(x \cdot 2 - t \cdot t\_1\right) + b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(2 \cdot \frac{x}{y} + 27 \cdot \frac{a \cdot b}{y}\right) - 9 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 y #s(literal 9 binary64)) z) < 2e147Initial program 95.8%
if 2e147 < (*.f64 (*.f64 y #s(literal 9 binary64)) z) Initial program 80.9%
sub-neg80.9%
sub-neg80.9%
associate-*l*91.5%
associate-*l*91.6%
Simplified91.6%
Taylor expanded in y around inf 91.9%
Final simplification95.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 (* z (* y 9.0))))
(if (<= t_1 1e+253)
(+ (- (* x 2.0) (* t t_1)) (* b (* a 27.0)))
(* y (- (* b (* a (/ 27.0 y))) (* 9.0 (* z t)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y * 9.0);
double tmp;
if (t_1 <= 1e+253) {
tmp = ((x * 2.0) - (t * t_1)) + (b * (a * 27.0));
} else {
tmp = y * ((b * (a * (27.0 / y))) - (9.0 * (z * t)));
}
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 = z * (y * 9.0d0)
if (t_1 <= 1d+253) then
tmp = ((x * 2.0d0) - (t * t_1)) + (b * (a * 27.0d0))
else
tmp = y * ((b * (a * (27.0d0 / y))) - (9.0d0 * (z * t)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y * 9.0);
double tmp;
if (t_1 <= 1e+253) {
tmp = ((x * 2.0) - (t * t_1)) + (b * (a * 27.0));
} else {
tmp = y * ((b * (a * (27.0 / y))) - (9.0 * (z * t)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = z * (y * 9.0) tmp = 0 if t_1 <= 1e+253: tmp = ((x * 2.0) - (t * t_1)) + (b * (a * 27.0)) else: tmp = y * ((b * (a * (27.0 / y))) - (9.0 * (z * t))) 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(z * Float64(y * 9.0)) tmp = 0.0 if (t_1 <= 1e+253) tmp = Float64(Float64(Float64(x * 2.0) - Float64(t * t_1)) + Float64(b * Float64(a * 27.0))); else tmp = Float64(y * Float64(Float64(b * Float64(a * Float64(27.0 / y))) - Float64(9.0 * Float64(z * t)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = z * (y * 9.0);
tmp = 0.0;
if (t_1 <= 1e+253)
tmp = ((x * 2.0) - (t * t_1)) + (b * (a * 27.0));
else
tmp = y * ((b * (a * (27.0 / y))) - (9.0 * (z * t)));
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[(z * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+253], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(b * N[(a * N[(27.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(z * t), $MachinePrecision]), $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 := z \cdot \left(y \cdot 9\right)\\
\mathbf{if}\;t\_1 \leq 10^{+253}:\\
\;\;\;\;\left(x \cdot 2 - t \cdot t\_1\right) + b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(b \cdot \left(a \cdot \frac{27}{y}\right) - 9 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 y #s(literal 9 binary64)) z) < 9.9999999999999994e252Initial program 95.6%
if 9.9999999999999994e252 < (*.f64 (*.f64 y #s(literal 9 binary64)) z) Initial program 75.5%
sub-neg75.5%
sub-neg75.5%
associate-*l*91.5%
associate-*l*91.6%
Simplified91.6%
Taylor expanded in y around inf 95.6%
Taylor expanded in x around 0 83.9%
associate-*r/83.9%
associate-*r*83.8%
*-commutative83.8%
associate-*r/88.1%
*-commutative88.1%
associate-/l*88.1%
Simplified88.1%
Final simplification94.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 (<= z -1.4e+17)
(* y (* z (* t -9.0)))
(if (<= z -2.3e-277)
(* x 2.0)
(if (<= z 4.8e-108) (* a (* 27.0 b)) (* t (* z (* y -9.0)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.4e+17) {
tmp = y * (z * (t * -9.0));
} else if (z <= -2.3e-277) {
tmp = x * 2.0;
} else if (z <= 4.8e-108) {
tmp = a * (27.0 * b);
} else {
tmp = t * (z * (y * -9.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.4d+17)) then
tmp = y * (z * (t * (-9.0d0)))
else if (z <= (-2.3d-277)) then
tmp = x * 2.0d0
else if (z <= 4.8d-108) then
tmp = a * (27.0d0 * b)
else
tmp = t * (z * (y * (-9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.4e+17) {
tmp = y * (z * (t * -9.0));
} else if (z <= -2.3e-277) {
tmp = x * 2.0;
} else if (z <= 4.8e-108) {
tmp = a * (27.0 * b);
} else {
tmp = t * (z * (y * -9.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -1.4e+17: tmp = y * (z * (t * -9.0)) elif z <= -2.3e-277: tmp = x * 2.0 elif z <= 4.8e-108: tmp = a * (27.0 * b) else: tmp = t * (z * (y * -9.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.4e+17) tmp = Float64(y * Float64(z * Float64(t * -9.0))); elseif (z <= -2.3e-277) tmp = Float64(x * 2.0); elseif (z <= 4.8e-108) tmp = Float64(a * Float64(27.0 * b)); else tmp = Float64(t * Float64(z * Float64(y * -9.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -1.4e+17)
tmp = y * (z * (t * -9.0));
elseif (z <= -2.3e-277)
tmp = x * 2.0;
elseif (z <= 4.8e-108)
tmp = a * (27.0 * b);
else
tmp = t * (z * (y * -9.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.4e+17], N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.3e-277], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 4.8e-108], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+17}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-277}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-108}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -1.4e17Initial program 89.4%
sub-neg89.4%
sub-neg89.4%
associate-*l*86.3%
associate-*l*86.4%
Simplified86.4%
Taylor expanded in y around inf 79.5%
Taylor expanded in x around inf 64.5%
associate-*r/64.5%
associate-*l/64.5%
associate-/r/64.5%
Simplified64.5%
Taylor expanded in y around inf 57.9%
pow157.9%
*-commutative57.9%
associate-*l*57.9%
Applied egg-rr57.9%
unpow157.9%
associate-*r*57.9%
*-commutative57.9%
associate-*r*57.9%
Simplified57.9%
if -1.4e17 < z < -2.3e-277Initial program 98.1%
Simplified99.9%
Taylor expanded in z around 0 99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in x around inf 42.4%
if -2.3e-277 < z < 4.80000000000000034e-108Initial program 94.9%
sub-neg94.9%
sub-neg94.9%
associate-*l*98.2%
associate-*l*98.2%
Simplified98.2%
Taylor expanded in x around 0 58.8%
Taylor expanded in b around inf 57.3%
Taylor expanded in b around inf 40.4%
associate-*r*40.4%
*-commutative40.4%
associate-*r*40.4%
Simplified40.4%
if 4.80000000000000034e-108 < z Initial program 92.9%
+-commutative92.9%
associate-+r-92.9%
*-commutative92.9%
cancel-sign-sub-inv92.9%
associate-*r*95.2%
distribute-lft-neg-in95.2%
*-commutative95.2%
cancel-sign-sub-inv95.2%
associate-+r-95.2%
associate-*l*95.2%
fma-define97.6%
cancel-sign-sub-inv97.6%
fma-define97.6%
distribute-lft-neg-in97.6%
distribute-rgt-neg-in97.6%
*-commutative97.6%
associate-*r*95.2%
associate-*l*95.2%
neg-mul-195.2%
associate-*r*95.2%
Simplified95.2%
Taylor expanded in t around inf 58.9%
*-commutative58.9%
associate-*r*58.9%
*-commutative58.9%
associate-*l*58.9%
Simplified58.9%
Final simplification50.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 (<= z -1.3e+18)
(* y (* -9.0 (* z t)))
(if (<= z -7.2e-276)
(* x 2.0)
(if (<= z 2.7e-108) (* a (* 27.0 b)) (* t (* z (* y -9.0)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.3e+18) {
tmp = y * (-9.0 * (z * t));
} else if (z <= -7.2e-276) {
tmp = x * 2.0;
} else if (z <= 2.7e-108) {
tmp = a * (27.0 * b);
} else {
tmp = t * (z * (y * -9.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.3d+18)) then
tmp = y * ((-9.0d0) * (z * t))
else if (z <= (-7.2d-276)) then
tmp = x * 2.0d0
else if (z <= 2.7d-108) then
tmp = a * (27.0d0 * b)
else
tmp = t * (z * (y * (-9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.3e+18) {
tmp = y * (-9.0 * (z * t));
} else if (z <= -7.2e-276) {
tmp = x * 2.0;
} else if (z <= 2.7e-108) {
tmp = a * (27.0 * b);
} else {
tmp = t * (z * (y * -9.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -1.3e+18: tmp = y * (-9.0 * (z * t)) elif z <= -7.2e-276: tmp = x * 2.0 elif z <= 2.7e-108: tmp = a * (27.0 * b) else: tmp = t * (z * (y * -9.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.3e+18) tmp = Float64(y * Float64(-9.0 * Float64(z * t))); elseif (z <= -7.2e-276) tmp = Float64(x * 2.0); elseif (z <= 2.7e-108) tmp = Float64(a * Float64(27.0 * b)); else tmp = Float64(t * Float64(z * Float64(y * -9.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -1.3e+18)
tmp = y * (-9.0 * (z * t));
elseif (z <= -7.2e-276)
tmp = x * 2.0;
elseif (z <= 2.7e-108)
tmp = a * (27.0 * b);
else
tmp = t * (z * (y * -9.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.3e+18], N[(y * N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.2e-276], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 2.7e-108], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+18}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{-276}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-108}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -1.3e18Initial program 89.4%
sub-neg89.4%
sub-neg89.4%
associate-*l*86.3%
associate-*l*86.4%
Simplified86.4%
Taylor expanded in y around inf 79.5%
Taylor expanded in x around inf 64.5%
associate-*r/64.5%
associate-*l/64.5%
associate-/r/64.5%
Simplified64.5%
Taylor expanded in y around inf 57.9%
if -1.3e18 < z < -7.19999999999999988e-276Initial program 98.1%
Simplified99.9%
Taylor expanded in z around 0 99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in x around inf 42.4%
if -7.19999999999999988e-276 < z < 2.70000000000000005e-108Initial program 94.9%
sub-neg94.9%
sub-neg94.9%
associate-*l*98.2%
associate-*l*98.2%
Simplified98.2%
Taylor expanded in x around 0 58.8%
Taylor expanded in b around inf 57.3%
Taylor expanded in b around inf 40.4%
associate-*r*40.4%
*-commutative40.4%
associate-*r*40.4%
Simplified40.4%
if 2.70000000000000005e-108 < z Initial program 92.9%
+-commutative92.9%
associate-+r-92.9%
*-commutative92.9%
cancel-sign-sub-inv92.9%
associate-*r*95.2%
distribute-lft-neg-in95.2%
*-commutative95.2%
cancel-sign-sub-inv95.2%
associate-+r-95.2%
associate-*l*95.2%
fma-define97.6%
cancel-sign-sub-inv97.6%
fma-define97.6%
distribute-lft-neg-in97.6%
distribute-rgt-neg-in97.6%
*-commutative97.6%
associate-*r*95.2%
associate-*l*95.2%
neg-mul-195.2%
associate-*r*95.2%
Simplified95.2%
Taylor expanded in t around inf 58.9%
*-commutative58.9%
associate-*r*58.9%
*-commutative58.9%
associate-*l*58.9%
Simplified58.9%
Final simplification50.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 (<= z -1.4e+17)
(* -9.0 (* z (* y t)))
(if (<= z -7.5e-275)
(* x 2.0)
(if (<= z 4.4e-108) (* a (* 27.0 b)) (* t (* z (* y -9.0)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.4e+17) {
tmp = -9.0 * (z * (y * t));
} else if (z <= -7.5e-275) {
tmp = x * 2.0;
} else if (z <= 4.4e-108) {
tmp = a * (27.0 * b);
} else {
tmp = t * (z * (y * -9.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.4d+17)) then
tmp = (-9.0d0) * (z * (y * t))
else if (z <= (-7.5d-275)) then
tmp = x * 2.0d0
else if (z <= 4.4d-108) then
tmp = a * (27.0d0 * b)
else
tmp = t * (z * (y * (-9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.4e+17) {
tmp = -9.0 * (z * (y * t));
} else if (z <= -7.5e-275) {
tmp = x * 2.0;
} else if (z <= 4.4e-108) {
tmp = a * (27.0 * b);
} else {
tmp = t * (z * (y * -9.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -1.4e+17: tmp = -9.0 * (z * (y * t)) elif z <= -7.5e-275: tmp = x * 2.0 elif z <= 4.4e-108: tmp = a * (27.0 * b) else: tmp = t * (z * (y * -9.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.4e+17) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (z <= -7.5e-275) tmp = Float64(x * 2.0); elseif (z <= 4.4e-108) tmp = Float64(a * Float64(27.0 * b)); else tmp = Float64(t * Float64(z * Float64(y * -9.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -1.4e+17)
tmp = -9.0 * (z * (y * t));
elseif (z <= -7.5e-275)
tmp = x * 2.0;
elseif (z <= 4.4e-108)
tmp = a * (27.0 * b);
else
tmp = t * (z * (y * -9.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.4e+17], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.5e-275], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 4.4e-108], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+17}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-275}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-108}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -1.4e17Initial program 89.4%
Simplified89.9%
Taylor expanded in z around 0 89.9%
*-commutative89.9%
associate-*l*89.9%
Simplified89.9%
Taylor expanded in y around inf 62.9%
associate-*r*66.2%
*-commutative66.2%
Simplified66.2%
if -1.4e17 < z < -7.49999999999999943e-275Initial program 98.1%
Simplified99.9%
Taylor expanded in z around 0 99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in x around inf 42.4%
if -7.49999999999999943e-275 < z < 4.4000000000000002e-108Initial program 94.9%
sub-neg94.9%
sub-neg94.9%
associate-*l*98.2%
associate-*l*98.2%
Simplified98.2%
Taylor expanded in x around 0 58.8%
Taylor expanded in b around inf 57.3%
Taylor expanded in b around inf 40.4%
associate-*r*40.4%
*-commutative40.4%
associate-*r*40.4%
Simplified40.4%
if 4.4000000000000002e-108 < z Initial program 92.9%
+-commutative92.9%
associate-+r-92.9%
*-commutative92.9%
cancel-sign-sub-inv92.9%
associate-*r*95.2%
distribute-lft-neg-in95.2%
*-commutative95.2%
cancel-sign-sub-inv95.2%
associate-+r-95.2%
associate-*l*95.2%
fma-define97.6%
cancel-sign-sub-inv97.6%
fma-define97.6%
distribute-lft-neg-in97.6%
distribute-rgt-neg-in97.6%
*-commutative97.6%
associate-*r*95.2%
associate-*l*95.2%
neg-mul-195.2%
associate-*r*95.2%
Simplified95.2%
Taylor expanded in t around inf 58.9%
*-commutative58.9%
associate-*r*58.9%
*-commutative58.9%
associate-*l*58.9%
Simplified58.9%
Final simplification52.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 (<= z -1.6e+17)
(* -9.0 (* z (* y t)))
(if (<= z -2.3e-275)
(* x 2.0)
(if (<= z 3e-108) (* a (* 27.0 b)) (* t (* y (* z -9.0)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.6e+17) {
tmp = -9.0 * (z * (y * t));
} else if (z <= -2.3e-275) {
tmp = x * 2.0;
} else if (z <= 3e-108) {
tmp = a * (27.0 * b);
} else {
tmp = t * (y * (z * -9.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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+17)) then
tmp = (-9.0d0) * (z * (y * t))
else if (z <= (-2.3d-275)) then
tmp = x * 2.0d0
else if (z <= 3d-108) then
tmp = a * (27.0d0 * b)
else
tmp = t * (y * (z * (-9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.6e+17) {
tmp = -9.0 * (z * (y * t));
} else if (z <= -2.3e-275) {
tmp = x * 2.0;
} else if (z <= 3e-108) {
tmp = a * (27.0 * b);
} else {
tmp = t * (y * (z * -9.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -1.6e+17: tmp = -9.0 * (z * (y * t)) elif z <= -2.3e-275: tmp = x * 2.0 elif z <= 3e-108: tmp = a * (27.0 * b) else: tmp = t * (y * (z * -9.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.6e+17) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (z <= -2.3e-275) tmp = Float64(x * 2.0); elseif (z <= 3e-108) tmp = Float64(a * Float64(27.0 * b)); else tmp = Float64(t * Float64(y * Float64(z * -9.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -1.6e+17)
tmp = -9.0 * (z * (y * t));
elseif (z <= -2.3e-275)
tmp = x * 2.0;
elseif (z <= 3e-108)
tmp = a * (27.0 * b);
else
tmp = t * (y * (z * -9.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.6e+17], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.3e-275], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 3e-108], N[(a * N[(27.0 * b), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+17}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-275}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-108}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -1.6e17Initial program 89.4%
Simplified89.9%
Taylor expanded in z around 0 89.9%
*-commutative89.9%
associate-*l*89.9%
Simplified89.9%
Taylor expanded in y around inf 62.9%
associate-*r*66.2%
*-commutative66.2%
Simplified66.2%
if -1.6e17 < z < -2.2999999999999999e-275Initial program 98.1%
Simplified99.9%
Taylor expanded in z around 0 99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in x around inf 42.4%
if -2.2999999999999999e-275 < z < 2.99999999999999993e-108Initial program 94.9%
sub-neg94.9%
sub-neg94.9%
associate-*l*98.2%
associate-*l*98.2%
Simplified98.2%
Taylor expanded in x around 0 58.8%
Taylor expanded in b around inf 57.3%
Taylor expanded in b around inf 40.4%
associate-*r*40.4%
*-commutative40.4%
associate-*r*40.4%
Simplified40.4%
if 2.99999999999999993e-108 < z Initial program 92.9%
+-commutative92.9%
associate-+r-92.9%
*-commutative92.9%
cancel-sign-sub-inv92.9%
associate-*r*95.2%
distribute-lft-neg-in95.2%
*-commutative95.2%
cancel-sign-sub-inv95.2%
associate-+r-95.2%
associate-*l*95.2%
fma-define97.6%
cancel-sign-sub-inv97.6%
fma-define97.6%
distribute-lft-neg-in97.6%
distribute-rgt-neg-in97.6%
*-commutative97.6%
associate-*r*95.2%
associate-*l*95.2%
neg-mul-195.2%
associate-*r*95.2%
Simplified95.2%
Taylor expanded in t around inf 58.9%
*-commutative58.9%
associate-*r*58.9%
associate-*l*58.9%
Simplified58.9%
Final simplification52.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 (<= z -1.4e+17)
(* -9.0 (* z (* y t)))
(if (<= z -6.8e-276)
(* x 2.0)
(if (<= z 5.1e-108) (* a (* 27.0 b)) (* t (* -9.0 (* z y)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.4e+17) {
tmp = -9.0 * (z * (y * t));
} else if (z <= -6.8e-276) {
tmp = x * 2.0;
} else if (z <= 5.1e-108) {
tmp = a * (27.0 * b);
} else {
tmp = t * (-9.0 * (z * y));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.4d+17)) then
tmp = (-9.0d0) * (z * (y * t))
else if (z <= (-6.8d-276)) then
tmp = x * 2.0d0
else if (z <= 5.1d-108) then
tmp = a * (27.0d0 * b)
else
tmp = t * ((-9.0d0) * (z * y))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.4e+17) {
tmp = -9.0 * (z * (y * t));
} else if (z <= -6.8e-276) {
tmp = x * 2.0;
} else if (z <= 5.1e-108) {
tmp = a * (27.0 * b);
} else {
tmp = t * (-9.0 * (z * y));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -1.4e+17: tmp = -9.0 * (z * (y * t)) elif z <= -6.8e-276: tmp = x * 2.0 elif z <= 5.1e-108: tmp = a * (27.0 * b) else: tmp = t * (-9.0 * (z * y)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.4e+17) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (z <= -6.8e-276) tmp = Float64(x * 2.0); elseif (z <= 5.1e-108) tmp = Float64(a * Float64(27.0 * b)); else tmp = Float64(t * Float64(-9.0 * Float64(z * y))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -1.4e+17)
tmp = -9.0 * (z * (y * t));
elseif (z <= -6.8e-276)
tmp = x * 2.0;
elseif (z <= 5.1e-108)
tmp = a * (27.0 * b);
else
tmp = t * (-9.0 * (z * y));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.4e+17], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.8e-276], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 5.1e-108], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], N[(t * N[(-9.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+17}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{-276}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{-108}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-9 \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if z < -1.4e17Initial program 89.4%
Simplified89.9%
Taylor expanded in z around 0 89.9%
*-commutative89.9%
associate-*l*89.9%
Simplified89.9%
Taylor expanded in y around inf 62.9%
associate-*r*66.2%
*-commutative66.2%
Simplified66.2%
if -1.4e17 < z < -6.79999999999999984e-276Initial program 98.1%
Simplified99.9%
Taylor expanded in z around 0 99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in x around inf 42.4%
if -6.79999999999999984e-276 < z < 5.1000000000000002e-108Initial program 94.9%
sub-neg94.9%
sub-neg94.9%
associate-*l*98.2%
associate-*l*98.2%
Simplified98.2%
Taylor expanded in x around 0 58.8%
Taylor expanded in b around inf 57.3%
Taylor expanded in b around inf 40.4%
associate-*r*40.4%
*-commutative40.4%
associate-*r*40.4%
Simplified40.4%
if 5.1000000000000002e-108 < z Initial program 92.9%
+-commutative92.9%
associate-+r-92.9%
*-commutative92.9%
cancel-sign-sub-inv92.9%
associate-*r*95.2%
distribute-lft-neg-in95.2%
*-commutative95.2%
cancel-sign-sub-inv95.2%
associate-+r-95.2%
associate-*l*95.2%
fma-define97.6%
cancel-sign-sub-inv97.6%
fma-define97.6%
distribute-lft-neg-in97.6%
distribute-rgt-neg-in97.6%
*-commutative97.6%
associate-*r*95.2%
associate-*l*95.2%
neg-mul-195.2%
associate-*r*95.2%
Simplified95.2%
Taylor expanded in t around inf 58.9%
*-commutative58.9%
associate-*r*58.9%
*-commutative58.9%
associate-*l*58.9%
Simplified58.9%
Taylor expanded in z around 0 58.9%
Final simplification52.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 (<= z -1.45e+17)
(* -9.0 (* z (* y t)))
(if (<= z -1.05e-276)
(* x 2.0)
(if (<= z 5.8e-108) (* a (* 27.0 b)) (* -9.0 (* t (* z y)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.45e+17) {
tmp = -9.0 * (z * (y * t));
} else if (z <= -1.05e-276) {
tmp = x * 2.0;
} else if (z <= 5.8e-108) {
tmp = a * (27.0 * b);
} else {
tmp = -9.0 * (t * (z * y));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.45d+17)) then
tmp = (-9.0d0) * (z * (y * t))
else if (z <= (-1.05d-276)) then
tmp = x * 2.0d0
else if (z <= 5.8d-108) then
tmp = a * (27.0d0 * b)
else
tmp = (-9.0d0) * (t * (z * y))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.45e+17) {
tmp = -9.0 * (z * (y * t));
} else if (z <= -1.05e-276) {
tmp = x * 2.0;
} else if (z <= 5.8e-108) {
tmp = a * (27.0 * b);
} else {
tmp = -9.0 * (t * (z * y));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -1.45e+17: tmp = -9.0 * (z * (y * t)) elif z <= -1.05e-276: tmp = x * 2.0 elif z <= 5.8e-108: tmp = a * (27.0 * b) else: tmp = -9.0 * (t * (z * y)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.45e+17) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (z <= -1.05e-276) tmp = Float64(x * 2.0); elseif (z <= 5.8e-108) tmp = Float64(a * Float64(27.0 * b)); else tmp = Float64(-9.0 * Float64(t * Float64(z * y))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -1.45e+17)
tmp = -9.0 * (z * (y * t));
elseif (z <= -1.05e-276)
tmp = x * 2.0;
elseif (z <= 5.8e-108)
tmp = a * (27.0 * b);
else
tmp = -9.0 * (t * (z * y));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.45e+17], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.05e-276], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 5.8e-108], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+17}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-276}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-108}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if z < -1.45e17Initial program 89.4%
Simplified89.9%
Taylor expanded in z around 0 89.9%
*-commutative89.9%
associate-*l*89.9%
Simplified89.9%
Taylor expanded in y around inf 62.9%
associate-*r*66.2%
*-commutative66.2%
Simplified66.2%
if -1.45e17 < z < -1.05e-276Initial program 98.1%
Simplified99.9%
Taylor expanded in z around 0 99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in x around inf 42.4%
if -1.05e-276 < z < 5.8000000000000002e-108Initial program 94.9%
sub-neg94.9%
sub-neg94.9%
associate-*l*98.2%
associate-*l*98.2%
Simplified98.2%
Taylor expanded in x around 0 58.8%
Taylor expanded in b around inf 57.3%
Taylor expanded in b around inf 40.4%
associate-*r*40.4%
*-commutative40.4%
associate-*r*40.4%
Simplified40.4%
if 5.8000000000000002e-108 < z Initial program 92.9%
+-commutative92.9%
associate-+r-92.9%
*-commutative92.9%
cancel-sign-sub-inv92.9%
associate-*r*95.2%
distribute-lft-neg-in95.2%
*-commutative95.2%
cancel-sign-sub-inv95.2%
associate-+r-95.2%
associate-*l*95.2%
fma-define97.6%
cancel-sign-sub-inv97.6%
fma-define97.6%
distribute-lft-neg-in97.6%
distribute-rgt-neg-in97.6%
*-commutative97.6%
associate-*r*95.2%
associate-*l*95.2%
neg-mul-195.2%
associate-*r*95.2%
Simplified95.2%
Taylor expanded in t around inf 58.9%
Final simplification52.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 (<= a -1.8e+79)
(* a (+ (* 27.0 b) (* -9.0 (/ (* t (* z y)) a))))
(if (<= a 4.8e-71)
(- (* x 2.0) (* 9.0 (* z (* y t))))
(* a (+ (* 27.0 b) (* 2.0 (/ x a)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.8e+79) {
tmp = a * ((27.0 * b) + (-9.0 * ((t * (z * y)) / a)));
} else if (a <= 4.8e-71) {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
} else {
tmp = a * ((27.0 * b) + (2.0 * (x / a)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-1.8d+79)) then
tmp = a * ((27.0d0 * b) + ((-9.0d0) * ((t * (z * y)) / a)))
else if (a <= 4.8d-71) then
tmp = (x * 2.0d0) - (9.0d0 * (z * (y * t)))
else
tmp = a * ((27.0d0 * b) + (2.0d0 * (x / a)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.8e+79) {
tmp = a * ((27.0 * b) + (-9.0 * ((t * (z * y)) / a)));
} else if (a <= 4.8e-71) {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
} else {
tmp = a * ((27.0 * b) + (2.0 * (x / a)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if a <= -1.8e+79: tmp = a * ((27.0 * b) + (-9.0 * ((t * (z * y)) / a))) elif a <= 4.8e-71: tmp = (x * 2.0) - (9.0 * (z * (y * t))) else: tmp = a * ((27.0 * b) + (2.0 * (x / a))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.8e+79) tmp = Float64(a * Float64(Float64(27.0 * b) + Float64(-9.0 * Float64(Float64(t * Float64(z * y)) / a)))); elseif (a <= 4.8e-71) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(z * Float64(y * t)))); else tmp = Float64(a * Float64(Float64(27.0 * b) + Float64(2.0 * Float64(x / a)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (a <= -1.8e+79)
tmp = a * ((27.0 * b) + (-9.0 * ((t * (z * y)) / a)));
elseif (a <= 4.8e-71)
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
else
tmp = a * ((27.0 * b) + (2.0 * (x / a)));
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[a, -1.8e+79], N[(a * N[(N[(27.0 * b), $MachinePrecision] + N[(-9.0 * N[(N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.8e-71], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(27.0 * b), $MachinePrecision] + N[(2.0 * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{+79}:\\
\;\;\;\;a \cdot \left(27 \cdot b + -9 \cdot \frac{t \cdot \left(z \cdot y\right)}{a}\right)\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{-71}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b + 2 \cdot \frac{x}{a}\right)\\
\end{array}
\end{array}
if a < -1.8e79Initial program 90.4%
sub-neg90.4%
sub-neg90.4%
associate-*l*90.5%
associate-*l*90.5%
Simplified90.5%
Taylor expanded in x around 0 77.9%
Taylor expanded in a around inf 85.4%
if -1.8e79 < a < 4.8e-71Initial program 94.9%
sub-neg94.9%
sub-neg94.9%
associate-*l*93.5%
associate-*l*93.5%
Simplified93.5%
Taylor expanded in a around 0 87.6%
pow187.6%
Applied egg-rr87.6%
unpow187.6%
associate-*r*88.5%
*-commutative88.5%
Simplified88.5%
if 4.8e-71 < a Initial program 93.9%
+-commutative93.9%
associate-+r-93.9%
*-commutative93.9%
cancel-sign-sub-inv93.9%
associate-*r*88.4%
distribute-lft-neg-in88.4%
*-commutative88.4%
cancel-sign-sub-inv88.4%
associate-+r-88.4%
associate-*l*88.4%
fma-define88.4%
cancel-sign-sub-inv88.4%
fma-define88.4%
distribute-lft-neg-in88.4%
distribute-rgt-neg-in88.4%
*-commutative88.4%
associate-*r*93.9%
associate-*l*95.4%
neg-mul-195.4%
associate-*r*95.4%
Simplified95.4%
Taylor expanded in t around 0 67.3%
Taylor expanded in a around inf 66.0%
Final simplification81.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 (<= a -2.9e+79)
(- (* 27.0 (* a b)) (* y (* z (* t 9.0))))
(if (<= a 1.95e-64)
(- (* x 2.0) (* 9.0 (* z (* y t))))
(* a (+ (* 27.0 b) (* 2.0 (/ x a)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -2.9e+79) {
tmp = (27.0 * (a * b)) - (y * (z * (t * 9.0)));
} else if (a <= 1.95e-64) {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
} else {
tmp = a * ((27.0 * b) + (2.0 * (x / a)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-2.9d+79)) then
tmp = (27.0d0 * (a * b)) - (y * (z * (t * 9.0d0)))
else if (a <= 1.95d-64) then
tmp = (x * 2.0d0) - (9.0d0 * (z * (y * t)))
else
tmp = a * ((27.0d0 * b) + (2.0d0 * (x / a)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -2.9e+79) {
tmp = (27.0 * (a * b)) - (y * (z * (t * 9.0)));
} else if (a <= 1.95e-64) {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
} else {
tmp = a * ((27.0 * b) + (2.0 * (x / a)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if a <= -2.9e+79: tmp = (27.0 * (a * b)) - (y * (z * (t * 9.0))) elif a <= 1.95e-64: tmp = (x * 2.0) - (9.0 * (z * (y * t))) else: tmp = a * ((27.0 * b) + (2.0 * (x / a))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -2.9e+79) tmp = Float64(Float64(27.0 * Float64(a * b)) - Float64(y * Float64(z * Float64(t * 9.0)))); elseif (a <= 1.95e-64) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(z * Float64(y * t)))); else tmp = Float64(a * Float64(Float64(27.0 * b) + Float64(2.0 * Float64(x / a)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (a <= -2.9e+79)
tmp = (27.0 * (a * b)) - (y * (z * (t * 9.0)));
elseif (a <= 1.95e-64)
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
else
tmp = a * ((27.0 * b) + (2.0 * (x / a)));
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[a, -2.9e+79], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] - N[(y * N[(z * N[(t * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.95e-64], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(27.0 * b), $MachinePrecision] + N[(2.0 * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{+79}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) - y \cdot \left(z \cdot \left(t \cdot 9\right)\right)\\
\mathbf{elif}\;a \leq 1.95 \cdot 10^{-64}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b + 2 \cdot \frac{x}{a}\right)\\
\end{array}
\end{array}
if a < -2.89999999999999992e79Initial program 90.4%
sub-neg90.4%
sub-neg90.4%
associate-*l*90.5%
associate-*l*90.5%
Simplified90.5%
Taylor expanded in x around 0 77.9%
pow177.9%
Applied egg-rr77.9%
unpow177.9%
associate-*r*77.9%
*-commutative77.9%
associate-*l*78.0%
*-commutative78.0%
Simplified78.0%
if -2.89999999999999992e79 < a < 1.9499999999999998e-64Initial program 94.9%
sub-neg94.9%
sub-neg94.9%
associate-*l*93.5%
associate-*l*93.5%
Simplified93.5%
Taylor expanded in a around 0 87.6%
pow187.6%
Applied egg-rr87.6%
unpow187.6%
associate-*r*88.5%
*-commutative88.5%
Simplified88.5%
if 1.9499999999999998e-64 < a Initial program 93.9%
+-commutative93.9%
associate-+r-93.9%
*-commutative93.9%
cancel-sign-sub-inv93.9%
associate-*r*88.4%
distribute-lft-neg-in88.4%
*-commutative88.4%
cancel-sign-sub-inv88.4%
associate-+r-88.4%
associate-*l*88.4%
fma-define88.4%
cancel-sign-sub-inv88.4%
fma-define88.4%
distribute-lft-neg-in88.4%
distribute-rgt-neg-in88.4%
*-commutative88.4%
associate-*r*93.9%
associate-*l*95.4%
neg-mul-195.4%
associate-*r*95.4%
Simplified95.4%
Taylor expanded in t around 0 67.3%
Taylor expanded in a around inf 66.0%
Final simplification80.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 (<= a -1.8e+79)
(- (* 27.0 (* a b)) (* 9.0 (* t (* z y))))
(if (<= a 1.95e-64)
(- (* x 2.0) (* 9.0 (* z (* y t))))
(* a (+ (* 27.0 b) (* 2.0 (/ x a)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.8e+79) {
tmp = (27.0 * (a * b)) - (9.0 * (t * (z * y)));
} else if (a <= 1.95e-64) {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
} else {
tmp = a * ((27.0 * b) + (2.0 * (x / a)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-1.8d+79)) then
tmp = (27.0d0 * (a * b)) - (9.0d0 * (t * (z * y)))
else if (a <= 1.95d-64) then
tmp = (x * 2.0d0) - (9.0d0 * (z * (y * t)))
else
tmp = a * ((27.0d0 * b) + (2.0d0 * (x / a)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.8e+79) {
tmp = (27.0 * (a * b)) - (9.0 * (t * (z * y)));
} else if (a <= 1.95e-64) {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
} else {
tmp = a * ((27.0 * b) + (2.0 * (x / a)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if a <= -1.8e+79: tmp = (27.0 * (a * b)) - (9.0 * (t * (z * y))) elif a <= 1.95e-64: tmp = (x * 2.0) - (9.0 * (z * (y * t))) else: tmp = a * ((27.0 * b) + (2.0 * (x / a))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.8e+79) tmp = Float64(Float64(27.0 * Float64(a * b)) - Float64(9.0 * Float64(t * Float64(z * y)))); elseif (a <= 1.95e-64) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(z * Float64(y * t)))); else tmp = Float64(a * Float64(Float64(27.0 * b) + Float64(2.0 * Float64(x / a)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (a <= -1.8e+79)
tmp = (27.0 * (a * b)) - (9.0 * (t * (z * y)));
elseif (a <= 1.95e-64)
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
else
tmp = a * ((27.0 * b) + (2.0 * (x / a)));
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[a, -1.8e+79], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.95e-64], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(27.0 * b), $MachinePrecision] + N[(2.0 * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{+79}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{elif}\;a \leq 1.95 \cdot 10^{-64}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b + 2 \cdot \frac{x}{a}\right)\\
\end{array}
\end{array}
if a < -1.8e79Initial program 90.4%
sub-neg90.4%
sub-neg90.4%
associate-*l*90.5%
associate-*l*90.5%
Simplified90.5%
Taylor expanded in x around 0 77.9%
if -1.8e79 < a < 1.9499999999999998e-64Initial program 94.9%
sub-neg94.9%
sub-neg94.9%
associate-*l*93.5%
associate-*l*93.5%
Simplified93.5%
Taylor expanded in a around 0 87.6%
pow187.6%
Applied egg-rr87.6%
unpow187.6%
associate-*r*88.5%
*-commutative88.5%
Simplified88.5%
if 1.9499999999999998e-64 < a Initial program 93.9%
+-commutative93.9%
associate-+r-93.9%
*-commutative93.9%
cancel-sign-sub-inv93.9%
associate-*r*88.4%
distribute-lft-neg-in88.4%
*-commutative88.4%
cancel-sign-sub-inv88.4%
associate-+r-88.4%
associate-*l*88.4%
fma-define88.4%
cancel-sign-sub-inv88.4%
fma-define88.4%
distribute-lft-neg-in88.4%
distribute-rgt-neg-in88.4%
*-commutative88.4%
associate-*r*93.9%
associate-*l*95.4%
neg-mul-195.4%
associate-*r*95.4%
Simplified95.4%
Taylor expanded in t around 0 67.3%
Taylor expanded in a around inf 66.0%
Final simplification80.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 -6.2e-60)
(* z (- (* 2.0 (/ x z)) (* 9.0 (* y t))))
(if (<= z 5.2e-172)
(+ (* x 2.0) (* 27.0 (* a b)))
(- (* x 2.0) (* 9.0 (* t (* z y)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -6.2e-60) {
tmp = z * ((2.0 * (x / z)) - (9.0 * (y * t)));
} else if (z <= 5.2e-172) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-6.2d-60)) then
tmp = z * ((2.0d0 * (x / z)) - (9.0d0 * (y * t)))
else if (z <= 5.2d-172) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = (x * 2.0d0) - (9.0d0 * (t * (z * y)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -6.2e-60) {
tmp = z * ((2.0 * (x / z)) - (9.0 * (y * t)));
} else if (z <= 5.2e-172) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -6.2e-60: tmp = z * ((2.0 * (x / z)) - (9.0 * (y * t))) elif z <= 5.2e-172: tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = (x * 2.0) - (9.0 * (t * (z * y))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -6.2e-60) tmp = Float64(z * Float64(Float64(2.0 * Float64(x / z)) - Float64(9.0 * Float64(y * t)))); elseif (z <= 5.2e-172) 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(z * y)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -6.2e-60)
tmp = z * ((2.0 * (x / z)) - (9.0 * (y * t)));
elseif (z <= 5.2e-172)
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -6.2e-60], N[(z * N[(N[(2.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e-172], 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[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{-60}:\\
\;\;\;\;z \cdot \left(2 \cdot \frac{x}{z} - 9 \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-172}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if z < -6.19999999999999976e-60Initial program 91.9%
sub-neg91.9%
sub-neg91.9%
associate-*l*89.5%
associate-*l*89.6%
Simplified89.6%
Taylor expanded in a around 0 72.3%
Taylor expanded in z around inf 76.1%
if -6.19999999999999976e-60 < z < 5.1999999999999996e-172Initial program 95.3%
+-commutative95.3%
associate-+r-95.3%
*-commutative95.3%
cancel-sign-sub-inv95.3%
associate-*r*87.4%
distribute-lft-neg-in87.4%
*-commutative87.4%
cancel-sign-sub-inv87.4%
associate-+r-87.4%
associate-*l*87.3%
fma-define87.3%
cancel-sign-sub-inv87.3%
fma-define87.3%
distribute-lft-neg-in87.3%
distribute-rgt-neg-in87.3%
*-commutative87.3%
associate-*r*95.3%
associate-*l*96.5%
neg-mul-196.5%
associate-*r*96.5%
Simplified96.5%
Taylor expanded in t around 0 81.8%
if 5.1999999999999996e-172 < z Initial program 93.7%
sub-neg93.7%
sub-neg93.7%
associate-*l*92.8%
associate-*l*92.7%
Simplified92.7%
Taylor expanded in a around 0 79.8%
Final simplification79.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 -5.9e-62)
(- (* x 2.0) (* 9.0 (* z (* y t))))
(if (<= z 1.1e-173)
(+ (* x 2.0) (* 27.0 (* a b)))
(- (* x 2.0) (* 9.0 (* t (* z y)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5.9e-62) {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
} else if (z <= 1.1e-173) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-5.9d-62)) then
tmp = (x * 2.0d0) - (9.0d0 * (z * (y * t)))
else if (z <= 1.1d-173) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = (x * 2.0d0) - (9.0d0 * (t * (z * y)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5.9e-62) {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
} else if (z <= 1.1e-173) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -5.9e-62: tmp = (x * 2.0) - (9.0 * (z * (y * t))) elif z <= 1.1e-173: tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = (x * 2.0) - (9.0 * (t * (z * y))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -5.9e-62) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(z * Float64(y * t)))); elseif (z <= 1.1e-173) 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(z * y)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -5.9e-62)
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
elseif (z <= 1.1e-173)
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5.9e-62], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e-173], 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[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.9 \cdot 10^{-62}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-173}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if z < -5.9000000000000004e-62Initial program 91.9%
sub-neg91.9%
sub-neg91.9%
associate-*l*89.5%
associate-*l*89.6%
Simplified89.6%
Taylor expanded in a around 0 72.3%
pow172.3%
Applied egg-rr72.3%
unpow172.3%
associate-*r*76.1%
*-commutative76.1%
Simplified76.1%
if -5.9000000000000004e-62 < z < 1.1e-173Initial program 96.4%
+-commutative96.4%
associate-+r-96.4%
*-commutative96.4%
cancel-sign-sub-inv96.4%
associate-*r*87.2%
distribute-lft-neg-in87.2%
*-commutative87.2%
cancel-sign-sub-inv87.2%
associate-+r-87.2%
associate-*l*87.2%
fma-define87.2%
cancel-sign-sub-inv87.2%
fma-define87.2%
distribute-lft-neg-in87.2%
distribute-rgt-neg-in87.2%
*-commutative87.2%
associate-*r*96.3%
associate-*l*97.5%
neg-mul-197.5%
associate-*r*97.5%
Simplified97.5%
Taylor expanded in t around 0 82.7%
if 1.1e-173 < z Initial program 92.8%
sub-neg92.8%
sub-neg92.8%
associate-*l*92.8%
associate-*l*92.8%
Simplified92.8%
Taylor expanded in a around 0 79.0%
Final simplification79.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 (<= a -9.1e+148)
(+ (* x 2.0) (* 27.0 (* a b)))
(if (<= a 4.6e-66)
(- (* x 2.0) (* 9.0 (* t (* z y))))
(* a (+ (* 27.0 b) (* 2.0 (/ x a)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -9.1e+148) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else if (a <= 4.6e-66) {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
} else {
tmp = a * ((27.0 * b) + (2.0 * (x / a)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-9.1d+148)) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else if (a <= 4.6d-66) then
tmp = (x * 2.0d0) - (9.0d0 * (t * (z * y)))
else
tmp = a * ((27.0d0 * b) + (2.0d0 * (x / a)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -9.1e+148) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else if (a <= 4.6e-66) {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
} else {
tmp = a * ((27.0 * b) + (2.0 * (x / a)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if a <= -9.1e+148: tmp = (x * 2.0) + (27.0 * (a * b)) elif a <= 4.6e-66: tmp = (x * 2.0) - (9.0 * (t * (z * y))) else: tmp = a * ((27.0 * b) + (2.0 * (x / a))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -9.1e+148) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); elseif (a <= 4.6e-66) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(z * y)))); else tmp = Float64(a * Float64(Float64(27.0 * b) + Float64(2.0 * Float64(x / a)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (a <= -9.1e+148)
tmp = (x * 2.0) + (27.0 * (a * b));
elseif (a <= 4.6e-66)
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
else
tmp = a * ((27.0 * b) + (2.0 * (x / a)));
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[a, -9.1e+148], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.6e-66], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(27.0 * b), $MachinePrecision] + N[(2.0 * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.1 \cdot 10^{+148}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq 4.6 \cdot 10^{-66}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b + 2 \cdot \frac{x}{a}\right)\\
\end{array}
\end{array}
if a < -9.0999999999999995e148Initial program 91.9%
+-commutative91.9%
associate-+r-91.9%
*-commutative91.9%
cancel-sign-sub-inv91.9%
associate-*r*92.0%
distribute-lft-neg-in92.0%
*-commutative92.0%
cancel-sign-sub-inv92.0%
associate-+r-92.0%
associate-*l*92.1%
fma-define97.3%
cancel-sign-sub-inv97.3%
fma-define97.3%
distribute-lft-neg-in97.3%
distribute-rgt-neg-in97.3%
*-commutative97.3%
associate-*r*97.2%
associate-*l*97.2%
neg-mul-197.2%
associate-*r*97.2%
Simplified97.2%
Taylor expanded in t around 0 84.7%
if -9.0999999999999995e148 < a < 4.59999999999999984e-66Initial program 94.1%
sub-neg94.1%
sub-neg94.1%
associate-*l*92.8%
associate-*l*92.8%
Simplified92.8%
Taylor expanded in a around 0 85.6%
if 4.59999999999999984e-66 < a Initial program 93.9%
+-commutative93.9%
associate-+r-93.9%
*-commutative93.9%
cancel-sign-sub-inv93.9%
associate-*r*88.4%
distribute-lft-neg-in88.4%
*-commutative88.4%
cancel-sign-sub-inv88.4%
associate-+r-88.4%
associate-*l*88.4%
fma-define88.4%
cancel-sign-sub-inv88.4%
fma-define88.4%
distribute-lft-neg-in88.4%
distribute-rgt-neg-in88.4%
*-commutative88.4%
associate-*r*93.9%
associate-*l*95.4%
neg-mul-195.4%
associate-*r*95.4%
Simplified95.4%
Taylor expanded in t around 0 67.3%
Taylor expanded in a around inf 66.0%
Final simplification80.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 (<= a -1.35e+149)
(* 27.0 (* a b))
(if (<= a 1.118e-191)
(* -9.0 (* t (* z y)))
(if (<= a 3.9e-76) (* 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 (a <= -1.35e+149) {
tmp = 27.0 * (a * b);
} else if (a <= 1.118e-191) {
tmp = -9.0 * (t * (z * y));
} else if (a <= 3.9e-76) {
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 (a <= (-1.35d+149)) then
tmp = 27.0d0 * (a * b)
else if (a <= 1.118d-191) then
tmp = (-9.0d0) * (t * (z * y))
else if (a <= 3.9d-76) 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 (a <= -1.35e+149) {
tmp = 27.0 * (a * b);
} else if (a <= 1.118e-191) {
tmp = -9.0 * (t * (z * y));
} else if (a <= 3.9e-76) {
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 a <= -1.35e+149: tmp = 27.0 * (a * b) elif a <= 1.118e-191: tmp = -9.0 * (t * (z * y)) elif a <= 3.9e-76: 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 (a <= -1.35e+149) tmp = Float64(27.0 * Float64(a * b)); elseif (a <= 1.118e-191) tmp = Float64(-9.0 * Float64(t * Float64(z * y))); elseif (a <= 3.9e-76) 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 (a <= -1.35e+149)
tmp = 27.0 * (a * b);
elseif (a <= 1.118e-191)
tmp = -9.0 * (t * (z * y));
elseif (a <= 3.9e-76)
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[LessEqual[a, -1.35e+149], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.118e-191], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.9e-76], 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}\;a \leq -1.35 \cdot 10^{+149}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq 1.118 \cdot 10^{-191}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{elif}\;a \leq 3.9 \cdot 10^{-76}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if a < -1.35e149Initial program 91.9%
+-commutative91.9%
associate-+r-91.9%
*-commutative91.9%
cancel-sign-sub-inv91.9%
associate-*r*92.0%
distribute-lft-neg-in92.0%
*-commutative92.0%
cancel-sign-sub-inv92.0%
associate-+r-92.0%
associate-*l*92.1%
fma-define97.3%
cancel-sign-sub-inv97.3%
fma-define97.3%
distribute-lft-neg-in97.3%
distribute-rgt-neg-in97.3%
*-commutative97.3%
associate-*r*97.2%
associate-*l*97.2%
neg-mul-197.2%
associate-*r*97.2%
Simplified97.2%
Taylor expanded in a around inf 72.1%
if -1.35e149 < a < 1.11799999999999995e-191Initial program 93.2%
+-commutative93.2%
associate-+r-93.2%
*-commutative93.2%
cancel-sign-sub-inv93.2%
associate-*r*93.9%
distribute-lft-neg-in93.9%
*-commutative93.9%
cancel-sign-sub-inv93.9%
associate-+r-93.9%
associate-*l*93.9%
fma-define95.4%
cancel-sign-sub-inv95.4%
fma-define95.4%
distribute-lft-neg-in95.4%
distribute-rgt-neg-in95.4%
*-commutative95.4%
associate-*r*94.7%
associate-*l*94.7%
neg-mul-194.7%
associate-*r*94.7%
Simplified94.7%
Taylor expanded in t around inf 55.8%
if 1.11799999999999995e-191 < a < 3.90000000000000025e-76Initial program 99.9%
Simplified84.8%
Taylor expanded in z around 0 84.9%
*-commutative84.9%
associate-*l*84.9%
Simplified84.9%
Taylor expanded in x around inf 63.9%
if 3.90000000000000025e-76 < a Initial program 94.1%
sub-neg94.1%
sub-neg94.1%
associate-*l*94.1%
associate-*l*94.1%
Simplified94.1%
Taylor expanded in x around 0 76.4%
Taylor expanded in b around inf 70.4%
Taylor expanded in b around inf 48.2%
associate-*r*48.2%
*-commutative48.2%
associate-*r*48.2%
Simplified48.2%
Final simplification56.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 -4.1e+17) (* y (* z (* t -9.0))) (if (<= z 6.1e-108) (+ (* x 2.0) (* 27.0 (* a b))) (* t (* z (* y -9.0))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.1e+17) {
tmp = y * (z * (t * -9.0));
} else if (z <= 6.1e-108) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = t * (z * (y * -9.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-4.1d+17)) then
tmp = y * (z * (t * (-9.0d0)))
else if (z <= 6.1d-108) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = t * (z * (y * (-9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.1e+17) {
tmp = y * (z * (t * -9.0));
} else if (z <= 6.1e-108) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = t * (z * (y * -9.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -4.1e+17: tmp = y * (z * (t * -9.0)) elif z <= 6.1e-108: tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = t * (z * (y * -9.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -4.1e+17) tmp = Float64(y * Float64(z * Float64(t * -9.0))); elseif (z <= 6.1e-108) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(t * Float64(z * Float64(y * -9.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -4.1e+17)
tmp = y * (z * (t * -9.0));
elseif (z <= 6.1e-108)
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = t * (z * (y * -9.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.1e+17], N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.1e-108], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{+17}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq 6.1 \cdot 10^{-108}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -4.1e17Initial program 89.4%
sub-neg89.4%
sub-neg89.4%
associate-*l*86.3%
associate-*l*86.4%
Simplified86.4%
Taylor expanded in y around inf 79.5%
Taylor expanded in x around inf 64.5%
associate-*r/64.5%
associate-*l/64.5%
associate-/r/64.5%
Simplified64.5%
Taylor expanded in y around inf 57.9%
pow157.9%
*-commutative57.9%
associate-*l*57.9%
Applied egg-rr57.9%
unpow157.9%
associate-*r*57.9%
*-commutative57.9%
associate-*r*57.9%
Simplified57.9%
if -4.1e17 < z < 6.10000000000000007e-108Initial program 96.5%
+-commutative96.5%
associate-+r-96.5%
*-commutative96.5%
cancel-sign-sub-inv96.5%
associate-*r*88.9%
distribute-lft-neg-in88.9%
*-commutative88.9%
cancel-sign-sub-inv88.9%
associate-+r-88.9%
associate-*l*88.9%
fma-define88.9%
cancel-sign-sub-inv88.9%
fma-define88.9%
distribute-lft-neg-in88.9%
distribute-rgt-neg-in88.9%
*-commutative88.9%
associate-*r*96.5%
associate-*l*97.3%
neg-mul-197.3%
associate-*r*97.3%
Simplified97.3%
Taylor expanded in t around 0 77.9%
if 6.10000000000000007e-108 < z Initial program 92.9%
+-commutative92.9%
associate-+r-92.9%
*-commutative92.9%
cancel-sign-sub-inv92.9%
associate-*r*95.2%
distribute-lft-neg-in95.2%
*-commutative95.2%
cancel-sign-sub-inv95.2%
associate-+r-95.2%
associate-*l*95.2%
fma-define97.6%
cancel-sign-sub-inv97.6%
fma-define97.6%
distribute-lft-neg-in97.6%
distribute-rgt-neg-in97.6%
*-commutative97.6%
associate-*r*95.2%
associate-*l*95.2%
neg-mul-195.2%
associate-*r*95.2%
Simplified95.2%
Taylor expanded in t around inf 58.9%
*-commutative58.9%
associate-*r*58.9%
*-commutative58.9%
associate-*l*58.9%
Simplified58.9%
Final simplification67.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 (+ (- (* x 2.0) (* (* y 9.0) (* z t))) (* 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) {
return ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
}
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) - ((y * 9.0d0) * (z * t))) + (a * (27.0d0 * b))
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) - ((y * 9.0) * (z * t))) + (a * (27.0 * 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) - ((y * 9.0) * (z * t))) + (a * (27.0 * 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(x * 2.0) - Float64(Float64(y * 9.0) * Float64(z * t))) + Float64(a * Float64(27.0 * b))) 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) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
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[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)
\end{array}
Initial program 93.7%
sub-neg93.7%
sub-neg93.7%
associate-*l*93.4%
associate-*l*93.4%
Simplified93.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 (or (<= a -1.16e+83) (not (<= a 7.2e-72))) (* a (* 27.0 b)) (* x 2.0)))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.16e+83) || !(a <= 7.2e-72)) {
tmp = a * (27.0 * b);
} else {
tmp = x * 2.0;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-1.16d+83)) .or. (.not. (a <= 7.2d-72))) then
tmp = a * (27.0d0 * b)
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.16e+83) || !(a <= 7.2e-72)) {
tmp = a * (27.0 * b);
} else {
tmp = x * 2.0;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.16e+83) or not (a <= 7.2e-72): tmp = a * (27.0 * b) else: tmp = x * 2.0 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.16e+83) || !(a <= 7.2e-72)) tmp = Float64(a * Float64(27.0 * b)); else tmp = Float64(x * 2.0); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((a <= -1.16e+83) || ~((a <= 7.2e-72)))
tmp = a * (27.0 * b);
else
tmp = x * 2.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.16e+83], N[Not[LessEqual[a, 7.2e-72]], $MachinePrecision]], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], N[(x * 2.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.16 \cdot 10^{+83} \lor \neg \left(a \leq 7.2 \cdot 10^{-72}\right):\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if a < -1.1600000000000001e83 or 7.2e-72 < a Initial program 92.4%
sub-neg92.4%
sub-neg92.4%
associate-*l*93.2%
associate-*l*93.2%
Simplified93.2%
Taylor expanded in x around 0 77.4%
Taylor expanded in b around inf 76.5%
Taylor expanded in b around inf 54.9%
associate-*r*54.8%
*-commutative54.8%
associate-*r*54.9%
Simplified54.9%
if -1.1600000000000001e83 < a < 7.2e-72Initial program 94.9%
Simplified93.5%
Taylor expanded in z around 0 93.5%
*-commutative93.5%
associate-*l*93.5%
Simplified93.5%
Taylor expanded in x around inf 38.1%
Final simplification46.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 (or (<= a -9.5e+79) (not (<= a 9.8e-73))) (* 27.0 (* a b)) (* x 2.0)))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -9.5e+79) || !(a <= 9.8e-73)) {
tmp = 27.0 * (a * b);
} else {
tmp = x * 2.0;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-9.5d+79)) .or. (.not. (a <= 9.8d-73))) then
tmp = 27.0d0 * (a * b)
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -9.5e+79) || !(a <= 9.8e-73)) {
tmp = 27.0 * (a * b);
} else {
tmp = x * 2.0;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (a <= -9.5e+79) or not (a <= 9.8e-73): tmp = 27.0 * (a * b) else: tmp = x * 2.0 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -9.5e+79) || !(a <= 9.8e-73)) tmp = Float64(27.0 * Float64(a * b)); else tmp = Float64(x * 2.0); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((a <= -9.5e+79) || ~((a <= 9.8e-73)))
tmp = 27.0 * (a * b);
else
tmp = x * 2.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -9.5e+79], N[Not[LessEqual[a, 9.8e-73]], $MachinePrecision]], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], N[(x * 2.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.5 \cdot 10^{+79} \lor \neg \left(a \leq 9.8 \cdot 10^{-73}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if a < -9.49999999999999994e79 or 9.80000000000000057e-73 < a Initial program 92.4%
+-commutative92.4%
associate-+r-92.4%
*-commutative92.4%
cancel-sign-sub-inv92.4%
associate-*r*89.4%
distribute-lft-neg-in89.4%
*-commutative89.4%
cancel-sign-sub-inv89.4%
associate-+r-89.4%
associate-*l*89.4%
fma-define92.7%
cancel-sign-sub-inv92.7%
fma-define92.7%
distribute-lft-neg-in92.7%
distribute-rgt-neg-in92.7%
*-commutative92.7%
associate-*r*95.7%
associate-*l*96.5%
neg-mul-196.5%
associate-*r*96.5%
Simplified96.5%
Taylor expanded in a around inf 54.4%
if -9.49999999999999994e79 < a < 9.80000000000000057e-73Initial program 94.9%
Simplified94.2%
Taylor expanded in z around 0 94.2%
*-commutative94.2%
associate-*l*94.1%
Simplified94.1%
Taylor expanded in x around inf 38.3%
Final simplification46.0%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (* x 2.0))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * 2.0d0
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): return x * 2.0
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(x * 2.0) end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
tmp = x * 2.0;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := N[(x * 2.0), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
x \cdot 2
\end{array}
Initial program 93.7%
Simplified95.3%
Taylor expanded in z around 0 95.3%
*-commutative95.3%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in x around inf 28.4%
Final simplification28.4%
(FPCore (x y z t a b) :precision binary64 (if (< y 7.590524218811189e-161) (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* a (* 27.0 b))) (+ (- (* x 2.0) (* 9.0 (* y (* t z)))) (* (* a 27.0) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y < 7.590524218811189e-161) {
tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
} else {
tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y < 7.590524218811189d-161) then
tmp = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + (a * (27.0d0 * b))
else
tmp = ((x * 2.0d0) - (9.0d0 * (y * (t * z)))) + ((a * 27.0d0) * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y < 7.590524218811189e-161) {
tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
} else {
tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y < 7.590524218811189e-161: tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b)) else: tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y < 7.590524218811189e-161) tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(a * Float64(27.0 * b))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(9.0 * Float64(y * Float64(t * z)))) + Float64(Float64(a * 27.0) * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y < 7.590524218811189e-161) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b)); else tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Less[y, 7.590524218811189e-161], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y < 7.590524218811189 \cdot 10^{-161}:\\
\;\;\;\;\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - 9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right) + \left(a \cdot 27\right) \cdot b\\
\end{array}
\end{array}
herbie shell --seed 2024163
(FPCore (x y z t a b)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, A"
:precision binary64
:alt
(! :herbie-platform default (if (< y 7590524218811189/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x 2) (* (* (* y 9) z) t)) (* a (* 27 b))) (+ (- (* x 2) (* 9 (* y (* t z)))) (* (* a 27) b))))
(+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))