
(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 22 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 (<= (* y 9.0) -2e+210) (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 ((y * 9.0) <= -2e+210) {
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 (Float64(y * 9.0) <= -2e+210) 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[N[(y * 9.0), $MachinePrecision], -2e+210], 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}\;y \cdot 9 \leq -2 \cdot 10^{+210}:\\
\;\;\;\;\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 (*.f64 y #s(literal 9 binary64)) < -1.99999999999999985e210Initial program 72.5%
Simplified99.8%
if -1.99999999999999985e210 < (*.f64 y #s(literal 9 binary64)) Initial program 94.6%
+-commutative94.6%
associate-+r-94.6%
*-commutative94.6%
cancel-sign-sub-inv94.6%
associate-*r*93.8%
distribute-lft-neg-in93.8%
*-commutative93.8%
cancel-sign-sub-inv93.8%
associate-+r-93.8%
associate-*l*93.8%
fma-define95.6%
cancel-sign-sub-inv95.6%
fma-define95.6%
distribute-lft-neg-in95.6%
distribute-rgt-neg-in95.6%
*-commutative95.6%
associate-*r*96.4%
associate-*l*96.4%
neg-mul-196.4%
associate-*r*96.4%
Simplified96.4%
Final simplification96.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 (<= t 4e+93) (- (+ (* x 2.0) (* b (* a 27.0))) (* y (* 9.0 (* z t)))) (fma a (* 27.0 b) (fma x 2.0 (* t (* y (* z -9.0)))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 4e+93) {
tmp = ((x * 2.0) + (b * (a * 27.0))) - (y * (9.0 * (z * t)));
} else {
tmp = fma(a, (27.0 * b), fma(x, 2.0, (t * (y * (z * -9.0)))));
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 4e+93) tmp = Float64(Float64(Float64(x * 2.0) + Float64(b * Float64(a * 27.0))) - Float64(y * Float64(9.0 * Float64(z * t)))); else tmp = fma(a, Float64(27.0 * b), fma(x, 2.0, Float64(t * Float64(y * Float64(z * -9.0))))); end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 4e+93], N[(N[(N[(x * 2.0), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(9.0 * N[(z * t), $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}\;t \leq 4 \cdot 10^{+93}:\\
\;\;\;\;\left(x \cdot 2 + b \cdot \left(a \cdot 27\right)\right) - y \cdot \left(9 \cdot \left(z \cdot t\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 t < 4.00000000000000017e93Initial program 91.6%
+-commutative91.6%
associate-+r-91.6%
*-commutative91.6%
cancel-sign-sub-inv91.6%
associate-*r*93.3%
distribute-lft-neg-in93.3%
*-commutative93.3%
cancel-sign-sub-inv93.3%
associate-+r-93.3%
associate-*l*93.3%
fma-define94.7%
cancel-sign-sub-inv94.7%
fma-define94.7%
distribute-lft-neg-in94.7%
distribute-rgt-neg-in94.7%
*-commutative94.7%
associate-*r*93.0%
associate-*l*93.0%
neg-mul-193.0%
associate-*r*93.0%
Simplified93.0%
fma-undefine91.6%
fma-undefine91.6%
associate-+r+91.6%
*-commutative91.6%
associate-*l*94.5%
*-commutative94.5%
associate-*r*94.5%
*-commutative94.5%
*-commutative94.5%
associate-*r*94.4%
associate-*l*94.5%
metadata-eval94.5%
distribute-lft-neg-in94.5%
*-commutative94.5%
distribute-rgt-neg-in94.5%
*-commutative94.5%
associate-+r+94.5%
sub-neg94.5%
Applied egg-rr94.5%
if 4.00000000000000017e93 < t Initial program 95.3%
+-commutative95.3%
associate-+r-95.3%
*-commutative95.3%
cancel-sign-sub-inv95.3%
associate-*r*88.8%
distribute-lft-neg-in88.8%
*-commutative88.8%
cancel-sign-sub-inv88.8%
associate-+r-88.8%
associate-*l*88.8%
fma-define93.3%
cancel-sign-sub-inv93.3%
fma-define93.3%
distribute-lft-neg-in93.3%
distribute-rgt-neg-in93.3%
*-commutative93.3%
associate-*r*99.9%
associate-*l*99.9%
neg-mul-199.9%
associate-*r*99.9%
Simplified99.9%
Final simplification95.4%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (* a 27.0))))
(if (<= (+ (- (* x 2.0) (* t (* (* y 9.0) z))) t_1) INFINITY)
(- (+ (* x 2.0) t_1) (* y (* 9.0 (* z t))))
(* a (fma -9.0 (/ (* z (* y 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) {
double t_1 = b * (a * 27.0);
double tmp;
if ((((x * 2.0) - (t * ((y * 9.0) * z))) + t_1) <= ((double) INFINITY)) {
tmp = ((x * 2.0) + t_1) - (y * (9.0 * (z * t)));
} else {
tmp = a * fma(-9.0, ((z * (y * t)) / 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) t_1 = Float64(b * Float64(a * 27.0)) tmp = 0.0 if (Float64(Float64(Float64(x * 2.0) - Float64(t * Float64(Float64(y * 9.0) * z))) + t_1) <= Inf) tmp = Float64(Float64(Float64(x * 2.0) + t_1) - Float64(y * Float64(9.0 * Float64(z * t)))); else tmp = Float64(a * fma(-9.0, Float64(Float64(z * Float64(y * t)) / a), Float64(27.0 * b))); 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_] := Block[{t$95$1 = N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], Infinity], N[(N[(N[(x * 2.0), $MachinePrecision] + t$95$1), $MachinePrecision] - N[(y * N[(9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(-9.0 * N[(N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] + N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;\left(x \cdot 2 - t \cdot \left(\left(y \cdot 9\right) \cdot z\right)\right) + t\_1 \leq \infty:\\
\;\;\;\;\left(x \cdot 2 + t\_1\right) - y \cdot \left(9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \mathsf{fma}\left(-9, \frac{z \cdot \left(y \cdot t\right)}{a}, 27 \cdot b\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t)) (*.f64 (*.f64 a #s(literal 27 binary64)) b)) < +inf.0Initial program 95.2%
+-commutative95.2%
associate-+r-95.2%
*-commutative95.2%
cancel-sign-sub-inv95.2%
associate-*r*94.3%
distribute-lft-neg-in94.3%
*-commutative94.3%
cancel-sign-sub-inv94.3%
associate-+r-94.3%
associate-*l*94.3%
fma-define94.3%
cancel-sign-sub-inv94.3%
fma-define94.3%
distribute-lft-neg-in94.3%
distribute-rgt-neg-in94.3%
*-commutative94.3%
associate-*r*95.2%
associate-*l*95.2%
neg-mul-195.2%
associate-*r*95.2%
Simplified95.2%
fma-undefine95.2%
fma-undefine95.2%
associate-+r+95.2%
*-commutative95.2%
associate-*l*95.3%
*-commutative95.3%
associate-*r*94.9%
*-commutative94.9%
*-commutative94.9%
associate-*r*95.3%
associate-*l*95.3%
metadata-eval95.3%
distribute-lft-neg-in95.3%
*-commutative95.3%
distribute-rgt-neg-in95.3%
*-commutative95.3%
associate-+r+95.3%
sub-neg95.3%
Applied egg-rr95.3%
if +inf.0 < (+.f64 (-.f64 (*.f64 x #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t)) (*.f64 (*.f64 a #s(literal 27 binary64)) b)) Initial program 0.0%
sub-neg0.0%
sub-neg0.0%
associate-*l*37.5%
associate-*l*37.5%
Simplified37.5%
Taylor expanded in x around 0 0.0%
cancel-sign-sub-inv0.0%
associate-*r*0.0%
*-commutative0.0%
*-commutative0.0%
metadata-eval0.0%
associate-*r*37.5%
Applied egg-rr37.5%
Taylor expanded in a around inf 62.5%
fma-define62.5%
associate-*r*100.0%
Simplified100.0%
Final simplification95.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 -4.5e+60)
(* y (+ (* z (* t -9.0)) (* 27.0 (* a (/ b y)))))
(if (<= z -9e-68)
(* y (+ (* -9.0 (* z t)) (* 2.0 (/ x y))))
(if (<= z 7000000.0)
(+ (* x 2.0) (* 27.0 (* a b)))
(+ (* -9.0 (* z (* y t))) (* b (* a 27.0)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.5e+60) {
tmp = y * ((z * (t * -9.0)) + (27.0 * (a * (b / y))));
} else if (z <= -9e-68) {
tmp = y * ((-9.0 * (z * t)) + (2.0 * (x / y)));
} else if (z <= 7000000.0) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (-9.0 * (z * (y * t))) + (b * (a * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-4.5d+60)) then
tmp = y * ((z * (t * (-9.0d0))) + (27.0d0 * (a * (b / y))))
else if (z <= (-9d-68)) then
tmp = y * (((-9.0d0) * (z * t)) + (2.0d0 * (x / y)))
else if (z <= 7000000.0d0) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = ((-9.0d0) * (z * (y * t))) + (b * (a * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.5e+60) {
tmp = y * ((z * (t * -9.0)) + (27.0 * (a * (b / y))));
} else if (z <= -9e-68) {
tmp = y * ((-9.0 * (z * t)) + (2.0 * (x / y)));
} else if (z <= 7000000.0) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (-9.0 * (z * (y * t))) + (b * (a * 27.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -4.5e+60: tmp = y * ((z * (t * -9.0)) + (27.0 * (a * (b / y)))) elif z <= -9e-68: tmp = y * ((-9.0 * (z * t)) + (2.0 * (x / y))) elif z <= 7000000.0: tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = (-9.0 * (z * (y * t))) + (b * (a * 27.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -4.5e+60) tmp = Float64(y * Float64(Float64(z * Float64(t * -9.0)) + Float64(27.0 * Float64(a * Float64(b / y))))); elseif (z <= -9e-68) tmp = Float64(y * Float64(Float64(-9.0 * Float64(z * t)) + Float64(2.0 * Float64(x / y)))); elseif (z <= 7000000.0) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(Float64(-9.0 * Float64(z * Float64(y * t))) + Float64(b * Float64(a * 27.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -4.5e+60)
tmp = y * ((z * (t * -9.0)) + (27.0 * (a * (b / y))));
elseif (z <= -9e-68)
tmp = y * ((-9.0 * (z * t)) + (2.0 * (x / y)));
elseif (z <= 7000000.0)
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = (-9.0 * (z * (y * t))) + (b * (a * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.5e+60], N[(y * N[(N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(a * N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9e-68], N[(y * N[(N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7000000.0], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+60}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right) + 27 \cdot \left(a \cdot \frac{b}{y}\right)\right)\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-68}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right) + 2 \cdot \frac{x}{y}\right)\\
\mathbf{elif}\;z \leq 7000000:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right) + b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if z < -4.50000000000000013e60Initial program 85.1%
sub-neg85.1%
sub-neg85.1%
associate-*l*83.6%
associate-*l*83.6%
Simplified83.6%
Taylor expanded in x around 0 69.4%
Taylor expanded in y around inf 64.5%
cancel-sign-sub-inv64.5%
associate-/l*66.7%
metadata-eval66.7%
associate-*r*66.7%
Simplified66.7%
if -4.50000000000000013e60 < z < -8.99999999999999998e-68Initial program 91.8%
sub-neg91.8%
sub-neg91.8%
associate-*l*95.6%
associate-*l*95.6%
Simplified95.6%
Taylor expanded in x around inf 69.0%
Taylor expanded in a around 0 52.3%
cancel-sign-sub-inv52.3%
metadata-eval52.3%
associate-*r*56.3%
associate-*r/56.1%
Simplified56.1%
Taylor expanded in y around inf 74.8%
if -8.99999999999999998e-68 < z < 7e6Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-*r*87.9%
distribute-lft-neg-in87.9%
*-commutative87.9%
cancel-sign-sub-inv87.9%
associate-+r-87.9%
associate-*l*87.9%
fma-define87.9%
cancel-sign-sub-inv87.9%
fma-define87.9%
distribute-lft-neg-in87.9%
distribute-rgt-neg-in87.9%
*-commutative87.9%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around 0 79.8%
if 7e6 < z Initial program 85.1%
sub-neg85.1%
sub-neg85.1%
associate-*l*92.3%
associate-*l*92.3%
Simplified92.3%
Taylor expanded in x around 0 67.4%
cancel-sign-sub-inv67.4%
associate-*r*67.4%
*-commutative67.4%
*-commutative67.4%
metadata-eval67.4%
associate-*r*77.4%
Applied egg-rr77.4%
Final simplification76.0%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* -9.0 (* z (* y t))) (* b (* a 27.0)))))
(if (<= z -2.6e+60)
t_1
(if (<= z -7.2e-67)
(* y (+ (* -9.0 (* z t)) (* 2.0 (/ x y))))
(if (<= z 11500000.0) (+ (* x 2.0) (* 27.0 (* a b))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (-9.0 * (z * (y * t))) + (b * (a * 27.0));
double tmp;
if (z <= -2.6e+60) {
tmp = t_1;
} else if (z <= -7.2e-67) {
tmp = y * ((-9.0 * (z * t)) + (2.0 * (x / y)));
} else if (z <= 11500000.0) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = ((-9.0d0) * (z * (y * t))) + (b * (a * 27.0d0))
if (z <= (-2.6d+60)) then
tmp = t_1
else if (z <= (-7.2d-67)) then
tmp = y * (((-9.0d0) * (z * t)) + (2.0d0 * (x / y)))
else if (z <= 11500000.0d0) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (-9.0 * (z * (y * t))) + (b * (a * 27.0));
double tmp;
if (z <= -2.6e+60) {
tmp = t_1;
} else if (z <= -7.2e-67) {
tmp = y * ((-9.0 * (z * t)) + (2.0 * (x / y)));
} else if (z <= 11500000.0) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = (-9.0 * (z * (y * t))) + (b * (a * 27.0)) tmp = 0 if z <= -2.6e+60: tmp = t_1 elif z <= -7.2e-67: tmp = y * ((-9.0 * (z * t)) + (2.0 * (x / y))) elif z <= 11500000.0: tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(Float64(-9.0 * Float64(z * Float64(y * t))) + Float64(b * Float64(a * 27.0))) tmp = 0.0 if (z <= -2.6e+60) tmp = t_1; elseif (z <= -7.2e-67) tmp = Float64(y * Float64(Float64(-9.0 * Float64(z * t)) + Float64(2.0 * Float64(x / y)))); elseif (z <= 11500000.0) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = t_1; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (-9.0 * (z * (y * t))) + (b * (a * 27.0));
tmp = 0.0;
if (z <= -2.6e+60)
tmp = t_1;
elseif (z <= -7.2e-67)
tmp = y * ((-9.0 * (z * t)) + (2.0 * (x / y)));
elseif (z <= 11500000.0)
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.6e+60], t$95$1, If[LessEqual[z, -7.2e-67], N[(y * N[(N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 11500000.0], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := -9 \cdot \left(z \cdot \left(y \cdot t\right)\right) + b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{-67}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right) + 2 \cdot \frac{x}{y}\right)\\
\mathbf{elif}\;z \leq 11500000:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.60000000000000008e60 or 1.15e7 < z Initial program 85.1%
sub-neg85.1%
sub-neg85.1%
associate-*l*88.4%
associate-*l*88.4%
Simplified88.4%
Taylor expanded in x around 0 68.3%
cancel-sign-sub-inv68.3%
associate-*r*68.3%
*-commutative68.3%
*-commutative68.3%
metadata-eval68.3%
associate-*r*78.8%
Applied egg-rr78.8%
if -2.60000000000000008e60 < z < -7.19999999999999998e-67Initial program 91.8%
sub-neg91.8%
sub-neg91.8%
associate-*l*95.6%
associate-*l*95.6%
Simplified95.6%
Taylor expanded in x around inf 69.0%
Taylor expanded in a around 0 52.3%
cancel-sign-sub-inv52.3%
metadata-eval52.3%
associate-*r*56.3%
associate-*r/56.1%
Simplified56.1%
Taylor expanded in y around inf 74.8%
if -7.19999999999999998e-67 < z < 1.15e7Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-*r*87.9%
distribute-lft-neg-in87.9%
*-commutative87.9%
cancel-sign-sub-inv87.9%
associate-+r-87.9%
associate-*l*87.9%
fma-define87.9%
cancel-sign-sub-inv87.9%
fma-define87.9%
distribute-lft-neg-in87.9%
distribute-rgt-neg-in87.9%
*-commutative87.9%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around 0 79.8%
Final simplification78.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 -1e+53)
(* x (+ 2.0 (* -9.0 (* (* y t) (/ z x)))))
(if (or (<= z -7.8e-67) (not (<= z 2e-66)))
(- (* x 2.0) (* 9.0 (* t (* y z))))
(+ (* x 2.0) (* 27.0 (* a b))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1e+53) {
tmp = x * (2.0 + (-9.0 * ((y * t) * (z / x))));
} else if ((z <= -7.8e-67) || !(z <= 2e-66)) {
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
} else {
tmp = (x * 2.0) + (27.0 * (a * b));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1d+53)) then
tmp = x * (2.0d0 + ((-9.0d0) * ((y * t) * (z / x))))
else if ((z <= (-7.8d-67)) .or. (.not. (z <= 2d-66))) then
tmp = (x * 2.0d0) - (9.0d0 * (t * (y * z)))
else
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1e+53) {
tmp = x * (2.0 + (-9.0 * ((y * t) * (z / x))));
} else if ((z <= -7.8e-67) || !(z <= 2e-66)) {
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
} else {
tmp = (x * 2.0) + (27.0 * (a * b));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -1e+53: tmp = x * (2.0 + (-9.0 * ((y * t) * (z / x)))) elif (z <= -7.8e-67) or not (z <= 2e-66): tmp = (x * 2.0) - (9.0 * (t * (y * z))) else: tmp = (x * 2.0) + (27.0 * (a * b)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1e+53) tmp = Float64(x * Float64(2.0 + Float64(-9.0 * Float64(Float64(y * t) * Float64(z / x))))); elseif ((z <= -7.8e-67) || !(z <= 2e-66)) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(y * z)))); else tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -1e+53)
tmp = x * (2.0 + (-9.0 * ((y * t) * (z / x))));
elseif ((z <= -7.8e-67) || ~((z <= 2e-66)))
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
else
tmp = (x * 2.0) + (27.0 * (a * b));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1e+53], N[(x * N[(2.0 + N[(-9.0 * N[(N[(y * t), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -7.8e-67], N[Not[LessEqual[z, 2e-66]], $MachinePrecision]], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+53}:\\
\;\;\;\;x \cdot \left(2 + -9 \cdot \left(\left(y \cdot t\right) \cdot \frac{z}{x}\right)\right)\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-67} \lor \neg \left(z \leq 2 \cdot 10^{-66}\right):\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if z < -9.9999999999999999e52Initial program 84.5%
sub-neg84.5%
sub-neg84.5%
associate-*l*84.8%
associate-*l*84.7%
Simplified84.7%
Taylor expanded in x around inf 67.9%
Taylor expanded in a around 0 54.6%
cancel-sign-sub-inv54.6%
metadata-eval54.6%
associate-*r*59.6%
associate-*r/59.6%
Simplified59.6%
if -9.9999999999999999e52 < z < -7.7999999999999997e-67 or 2e-66 < z Initial program 88.9%
sub-neg88.9%
sub-neg88.9%
associate-*l*93.7%
associate-*l*93.7%
Simplified93.7%
Taylor expanded in a around 0 64.5%
if -7.7999999999999997e-67 < z < 2e-66Initial program 99.7%
+-commutative99.7%
associate-+r-99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
associate-*r*86.6%
distribute-lft-neg-in86.6%
*-commutative86.6%
cancel-sign-sub-inv86.6%
associate-+r-86.6%
associate-*l*86.6%
fma-define86.6%
cancel-sign-sub-inv86.6%
fma-define86.6%
distribute-lft-neg-in86.6%
distribute-rgt-neg-in86.6%
*-commutative86.6%
associate-*r*99.7%
associate-*l*99.7%
neg-mul-199.7%
associate-*r*99.7%
Simplified99.7%
Taylor expanded in t around 0 81.3%
Final simplification70.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= z -2.4e+60)
(* -9.0 (* y (* z t)))
(if (or (<= z -1.45e-68) (not (<= z 1.65e-66)))
(- (* x 2.0) (* 9.0 (* t (* y z))))
(+ (* x 2.0) (* 27.0 (* a b))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.4e+60) {
tmp = -9.0 * (y * (z * t));
} else if ((z <= -1.45e-68) || !(z <= 1.65e-66)) {
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
} else {
tmp = (x * 2.0) + (27.0 * (a * b));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-2.4d+60)) then
tmp = (-9.0d0) * (y * (z * t))
else if ((z <= (-1.45d-68)) .or. (.not. (z <= 1.65d-66))) then
tmp = (x * 2.0d0) - (9.0d0 * (t * (y * z)))
else
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.4e+60) {
tmp = -9.0 * (y * (z * t));
} else if ((z <= -1.45e-68) || !(z <= 1.65e-66)) {
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
} else {
tmp = (x * 2.0) + (27.0 * (a * b));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -2.4e+60: tmp = -9.0 * (y * (z * t)) elif (z <= -1.45e-68) or not (z <= 1.65e-66): tmp = (x * 2.0) - (9.0 * (t * (y * z))) else: tmp = (x * 2.0) + (27.0 * (a * b)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.4e+60) tmp = Float64(-9.0 * Float64(y * Float64(z * t))); elseif ((z <= -1.45e-68) || !(z <= 1.65e-66)) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(y * z)))); else tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -2.4e+60)
tmp = -9.0 * (y * (z * t));
elseif ((z <= -1.45e-68) || ~((z <= 1.65e-66)))
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
else
tmp = (x * 2.0) + (27.0 * (a * b));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.4e+60], N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1.45e-68], N[Not[LessEqual[z, 1.65e-66]], $MachinePrecision]], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+60}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{-68} \lor \neg \left(z \leq 1.65 \cdot 10^{-66}\right):\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if z < -2.4e60Initial program 85.1%
+-commutative85.1%
associate-+r-85.1%
*-commutative85.1%
cancel-sign-sub-inv85.1%
associate-*r*96.0%
distribute-lft-neg-in96.0%
*-commutative96.0%
cancel-sign-sub-inv96.0%
associate-+r-96.0%
associate-*l*96.0%
fma-define99.8%
cancel-sign-sub-inv99.8%
fma-define99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
*-commutative99.8%
associate-*r*88.9%
associate-*l*88.9%
neg-mul-188.9%
associate-*r*88.9%
Simplified88.9%
Taylor expanded in t around inf 49.2%
*-commutative49.2%
associate-*r*49.3%
*-commutative49.3%
associate-*l*49.2%
Simplified49.2%
Taylor expanded in t around 0 49.2%
associate-*r*49.2%
*-commutative49.2%
metadata-eval49.2%
distribute-lft-neg-in49.2%
distribute-rgt-neg-in49.2%
associate-*r*49.3%
*-commutative49.3%
distribute-lft-neg-in49.3%
distribute-lft-neg-in49.3%
metadata-eval49.3%
associate-*r*49.2%
*-commutative49.2%
*-commutative49.2%
*-commutative49.2%
associate-*r*49.3%
*-commutative49.3%
metadata-eval49.3%
distribute-rgt-neg-in49.3%
distribute-rgt-neg-in49.3%
associate-*r*49.4%
distribute-rgt-neg-in49.4%
*-commutative49.4%
*-commutative49.4%
metadata-eval49.4%
Simplified49.4%
if -2.4e60 < z < -1.45e-68 or 1.6499999999999999e-66 < z Initial program 88.3%
sub-neg88.3%
sub-neg88.3%
associate-*l*93.9%
associate-*l*93.9%
Simplified93.9%
Taylor expanded in a around 0 64.0%
if -1.45e-68 < z < 1.6499999999999999e-66Initial program 99.7%
+-commutative99.7%
associate-+r-99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
associate-*r*86.6%
distribute-lft-neg-in86.6%
*-commutative86.6%
cancel-sign-sub-inv86.6%
associate-+r-86.6%
associate-*l*86.6%
fma-define86.6%
cancel-sign-sub-inv86.6%
fma-define86.6%
distribute-lft-neg-in86.6%
distribute-rgt-neg-in86.6%
*-commutative86.6%
associate-*r*99.7%
associate-*l*99.7%
neg-mul-199.7%
associate-*r*99.7%
Simplified99.7%
Taylor expanded in t around 0 81.3%
Final simplification67.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 -2.4e+60)
(* -9.0 (* y (* z t)))
(if (or (<= z -2.35e-67) (not (<= z 2.1e-66)))
(+ (* x 2.0) (* t (* y (* z -9.0))))
(+ (* x 2.0) (* 27.0 (* a b))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.4e+60) {
tmp = -9.0 * (y * (z * t));
} else if ((z <= -2.35e-67) || !(z <= 2.1e-66)) {
tmp = (x * 2.0) + (t * (y * (z * -9.0)));
} else {
tmp = (x * 2.0) + (27.0 * (a * b));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-2.4d+60)) then
tmp = (-9.0d0) * (y * (z * t))
else if ((z <= (-2.35d-67)) .or. (.not. (z <= 2.1d-66))) then
tmp = (x * 2.0d0) + (t * (y * (z * (-9.0d0))))
else
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.4e+60) {
tmp = -9.0 * (y * (z * t));
} else if ((z <= -2.35e-67) || !(z <= 2.1e-66)) {
tmp = (x * 2.0) + (t * (y * (z * -9.0)));
} else {
tmp = (x * 2.0) + (27.0 * (a * b));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -2.4e+60: tmp = -9.0 * (y * (z * t)) elif (z <= -2.35e-67) or not (z <= 2.1e-66): tmp = (x * 2.0) + (t * (y * (z * -9.0))) else: tmp = (x * 2.0) + (27.0 * (a * b)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.4e+60) tmp = Float64(-9.0 * Float64(y * Float64(z * t))); elseif ((z <= -2.35e-67) || !(z <= 2.1e-66)) tmp = Float64(Float64(x * 2.0) + Float64(t * Float64(y * Float64(z * -9.0)))); else tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -2.4e+60)
tmp = -9.0 * (y * (z * t));
elseif ((z <= -2.35e-67) || ~((z <= 2.1e-66)))
tmp = (x * 2.0) + (t * (y * (z * -9.0)));
else
tmp = (x * 2.0) + (27.0 * (a * b));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.4e+60], N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -2.35e-67], N[Not[LessEqual[z, 2.1e-66]], $MachinePrecision]], N[(N[(x * 2.0), $MachinePrecision] + N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+60}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;z \leq -2.35 \cdot 10^{-67} \lor \neg \left(z \leq 2.1 \cdot 10^{-66}\right):\\
\;\;\;\;x \cdot 2 + t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if z < -2.4e60Initial program 85.1%
+-commutative85.1%
associate-+r-85.1%
*-commutative85.1%
cancel-sign-sub-inv85.1%
associate-*r*96.0%
distribute-lft-neg-in96.0%
*-commutative96.0%
cancel-sign-sub-inv96.0%
associate-+r-96.0%
associate-*l*96.0%
fma-define99.8%
cancel-sign-sub-inv99.8%
fma-define99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
*-commutative99.8%
associate-*r*88.9%
associate-*l*88.9%
neg-mul-188.9%
associate-*r*88.9%
Simplified88.9%
Taylor expanded in t around inf 49.2%
*-commutative49.2%
associate-*r*49.3%
*-commutative49.3%
associate-*l*49.2%
Simplified49.2%
Taylor expanded in t around 0 49.2%
associate-*r*49.2%
*-commutative49.2%
metadata-eval49.2%
distribute-lft-neg-in49.2%
distribute-rgt-neg-in49.2%
associate-*r*49.3%
*-commutative49.3%
distribute-lft-neg-in49.3%
distribute-lft-neg-in49.3%
metadata-eval49.3%
associate-*r*49.2%
*-commutative49.2%
*-commutative49.2%
*-commutative49.2%
associate-*r*49.3%
*-commutative49.3%
metadata-eval49.3%
distribute-rgt-neg-in49.3%
distribute-rgt-neg-in49.3%
associate-*r*49.4%
distribute-rgt-neg-in49.4%
*-commutative49.4%
*-commutative49.4%
metadata-eval49.4%
Simplified49.4%
if -2.4e60 < z < -2.35000000000000002e-67 or 2.1e-66 < z Initial program 88.3%
+-commutative88.3%
associate-+r-88.3%
*-commutative88.3%
cancel-sign-sub-inv88.3%
associate-*r*96.7%
distribute-lft-neg-in96.7%
*-commutative96.7%
cancel-sign-sub-inv96.7%
associate-+r-96.7%
associate-*l*96.7%
fma-define99.7%
cancel-sign-sub-inv99.7%
fma-define99.7%
distribute-lft-neg-in99.7%
distribute-rgt-neg-in99.7%
*-commutative99.7%
associate-*r*91.3%
associate-*l*91.4%
neg-mul-191.4%
associate-*r*91.4%
Simplified91.4%
fma-undefine88.4%
fma-undefine88.4%
associate-+r+88.4%
*-commutative88.4%
associate-*l*94.0%
*-commutative94.0%
associate-*r*93.0%
*-commutative93.0%
*-commutative93.0%
associate-*r*93.9%
associate-*l*93.9%
metadata-eval93.9%
distribute-lft-neg-in93.9%
*-commutative93.9%
distribute-rgt-neg-in93.9%
*-commutative93.9%
associate-+r+93.9%
sub-neg93.9%
Applied egg-rr93.9%
Taylor expanded in y around 0 88.4%
associate-*r*87.4%
*-commutative87.4%
associate-*l*93.0%
*-commutative93.0%
associate-*r*93.9%
*-commutative93.9%
associate-*l*94.0%
associate-*r*88.4%
*-commutative88.4%
Simplified88.4%
Taylor expanded in b around 0 64.0%
cancel-sign-sub-inv64.0%
metadata-eval64.0%
*-commutative64.0%
associate-*r*64.0%
associate-*l*64.0%
Simplified64.0%
if -2.35000000000000002e-67 < z < 2.1e-66Initial program 99.7%
+-commutative99.7%
associate-+r-99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
associate-*r*86.6%
distribute-lft-neg-in86.6%
*-commutative86.6%
cancel-sign-sub-inv86.6%
associate-+r-86.6%
associate-*l*86.6%
fma-define86.6%
cancel-sign-sub-inv86.6%
fma-define86.6%
distribute-lft-neg-in86.6%
distribute-rgt-neg-in86.6%
*-commutative86.6%
associate-*r*99.7%
associate-*l*99.7%
neg-mul-199.7%
associate-*r*99.7%
Simplified99.7%
Taylor expanded in t around 0 81.3%
Final simplification67.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 (<= (* (* y 9.0) z) 5e+262) (+ (- (* x 2.0) (* t (* y (* 9.0 z)))) (* b (* a 27.0))) (* y (+ (* z (* t -9.0)) (* 27.0 (* a (/ b 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 (((y * 9.0) * z) <= 5e+262) {
tmp = ((x * 2.0) - (t * (y * (9.0 * z)))) + (b * (a * 27.0));
} else {
tmp = y * ((z * (t * -9.0)) + (27.0 * (a * (b / 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 (((y * 9.0d0) * z) <= 5d+262) then
tmp = ((x * 2.0d0) - (t * (y * (9.0d0 * z)))) + (b * (a * 27.0d0))
else
tmp = y * ((z * (t * (-9.0d0))) + (27.0d0 * (a * (b / 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 (((y * 9.0) * z) <= 5e+262) {
tmp = ((x * 2.0) - (t * (y * (9.0 * z)))) + (b * (a * 27.0));
} else {
tmp = y * ((z * (t * -9.0)) + (27.0 * (a * (b / 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 ((y * 9.0) * z) <= 5e+262: tmp = ((x * 2.0) - (t * (y * (9.0 * z)))) + (b * (a * 27.0)) else: tmp = y * ((z * (t * -9.0)) + (27.0 * (a * (b / 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 (Float64(Float64(y * 9.0) * z) <= 5e+262) tmp = Float64(Float64(Float64(x * 2.0) - Float64(t * Float64(y * Float64(9.0 * z)))) + Float64(b * Float64(a * 27.0))); else tmp = Float64(y * Float64(Float64(z * Float64(t * -9.0)) + Float64(27.0 * Float64(a * Float64(b / 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 (((y * 9.0) * z) <= 5e+262)
tmp = ((x * 2.0) - (t * (y * (9.0 * z)))) + (b * (a * 27.0));
else
tmp = y * ((z * (t * -9.0)) + (27.0 * (a * (b / 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[N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision], 5e+262], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(y * N[(9.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(a * N[(b / y), $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}\;\left(y \cdot 9\right) \cdot z \leq 5 \cdot 10^{+262}:\\
\;\;\;\;\left(x \cdot 2 - t \cdot \left(y \cdot \left(9 \cdot z\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right) + 27 \cdot \left(a \cdot \frac{b}{y}\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 y #s(literal 9 binary64)) z) < 5.00000000000000008e262Initial program 95.9%
Taylor expanded in y around 0 95.9%
associate-*r*95.9%
*-commutative95.9%
associate-*r*95.9%
Simplified95.9%
if 5.00000000000000008e262 < (*.f64 (*.f64 y #s(literal 9 binary64)) z) Initial program 62.1%
sub-neg62.1%
sub-neg62.1%
associate-*l*92.6%
associate-*l*92.6%
Simplified92.6%
Taylor expanded in x around 0 60.3%
Taylor expanded in y around inf 90.7%
cancel-sign-sub-inv90.7%
associate-/l*97.9%
metadata-eval97.9%
associate-*r*98.0%
Simplified98.0%
Final simplification96.2%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1e-67)
(* y (+ (* -9.0 (* z t)) (* 2.0 (/ x y))))
(if (<= z 2e-66)
(+ (* x 2.0) (* 27.0 (* a b)))
(- (* x 2.0) (* 9.0 (* t (* y z)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1e-67) {
tmp = y * ((-9.0 * (z * t)) + (2.0 * (x / y)));
} else if (z <= 2e-66) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1d-67)) then
tmp = y * (((-9.0d0) * (z * t)) + (2.0d0 * (x / y)))
else if (z <= 2d-66) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = (x * 2.0d0) - (9.0d0 * (t * (y * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1e-67) {
tmp = y * ((-9.0 * (z * t)) + (2.0 * (x / y)));
} else if (z <= 2e-66) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -1e-67: tmp = y * ((-9.0 * (z * t)) + (2.0 * (x / y))) elif z <= 2e-66: tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = (x * 2.0) - (9.0 * (t * (y * z))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1e-67) tmp = Float64(y * Float64(Float64(-9.0 * Float64(z * t)) + Float64(2.0 * Float64(x / y)))); elseif (z <= 2e-66) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(y * z)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -1e-67)
tmp = y * ((-9.0 * (z * t)) + (2.0 * (x / y)));
elseif (z <= 2e-66)
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1e-67], N[(y * N[(N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e-66], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-67}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right) + 2 \cdot \frac{x}{y}\right)\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-66}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -9.99999999999999943e-68Initial program 87.3%
sub-neg87.3%
sub-neg87.3%
associate-*l*87.5%
associate-*l*87.4%
Simplified87.4%
Taylor expanded in x around inf 69.0%
Taylor expanded in a around 0 55.2%
cancel-sign-sub-inv55.2%
metadata-eval55.2%
associate-*r*58.9%
associate-*r/58.8%
Simplified58.8%
Taylor expanded in y around inf 60.7%
if -9.99999999999999943e-68 < z < 2e-66Initial program 99.7%
+-commutative99.7%
associate-+r-99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
associate-*r*86.6%
distribute-lft-neg-in86.6%
*-commutative86.6%
cancel-sign-sub-inv86.6%
associate-+r-86.6%
associate-*l*86.6%
fma-define86.6%
cancel-sign-sub-inv86.6%
fma-define86.6%
distribute-lft-neg-in86.6%
distribute-rgt-neg-in86.6%
*-commutative86.6%
associate-*r*99.7%
associate-*l*99.7%
neg-mul-199.7%
associate-*r*99.7%
Simplified99.7%
Taylor expanded in t around 0 81.3%
if 2e-66 < z Initial program 87.2%
sub-neg87.2%
sub-neg87.2%
associate-*l*93.4%
associate-*l*93.4%
Simplified93.4%
Taylor expanded in a around 0 61.6%
Final simplification69.2%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.9e-33) (not (<= z 1.12e+28))) (* -9.0 (* z (* y t))) (+ (* x 2.0) (* 27.0 (* a b)))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.9e-33) || !(z <= 1.12e+28)) {
tmp = -9.0 * (z * (y * t));
} else {
tmp = (x * 2.0) + (27.0 * (a * b));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.9d-33)) .or. (.not. (z <= 1.12d+28))) then
tmp = (-9.0d0) * (z * (y * t))
else
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.9e-33) || !(z <= 1.12e+28)) {
tmp = -9.0 * (z * (y * t));
} else {
tmp = (x * 2.0) + (27.0 * (a * b));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.9e-33) or not (z <= 1.12e+28): tmp = -9.0 * (z * (y * t)) else: tmp = (x * 2.0) + (27.0 * (a * b)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.9e-33) || !(z <= 1.12e+28)) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); else tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((z <= -1.9e-33) || ~((z <= 1.12e+28)))
tmp = -9.0 * (z * (y * t));
else
tmp = (x * 2.0) + (27.0 * (a * b));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.9e-33], N[Not[LessEqual[z, 1.12e+28]], $MachinePrecision]], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{-33} \lor \neg \left(z \leq 1.12 \cdot 10^{+28}\right):\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if z < -1.89999999999999997e-33 or 1.12e28 < z Initial program 84.7%
+-commutative84.7%
associate-+r-84.7%
*-commutative84.7%
cancel-sign-sub-inv84.7%
associate-*r*95.8%
distribute-lft-neg-in95.8%
*-commutative95.8%
cancel-sign-sub-inv95.8%
associate-+r-95.8%
associate-*l*95.8%
fma-define99.7%
cancel-sign-sub-inv99.7%
fma-define99.7%
distribute-lft-neg-in99.7%
distribute-rgt-neg-in99.7%
*-commutative99.7%
associate-*r*88.6%
associate-*l*88.6%
neg-mul-188.6%
associate-*r*88.6%
Simplified88.6%
Taylor expanded in t around inf 47.3%
*-commutative47.3%
associate-*r*47.4%
*-commutative47.4%
associate-*l*47.3%
Simplified47.3%
Taylor expanded in t around 0 47.3%
associate-*r*47.3%
*-commutative47.3%
metadata-eval47.3%
distribute-lft-neg-in47.3%
distribute-rgt-neg-in47.3%
associate-*r*47.4%
*-commutative47.4%
distribute-lft-neg-in47.4%
distribute-lft-neg-in47.4%
metadata-eval47.4%
associate-*r*47.3%
*-commutative47.3%
*-commutative47.3%
*-commutative47.3%
associate-*r*51.4%
*-commutative51.4%
metadata-eval51.4%
distribute-rgt-neg-in51.4%
distribute-rgt-neg-in51.4%
associate-*r*51.4%
distribute-rgt-neg-in51.4%
*-commutative51.4%
*-commutative51.4%
metadata-eval51.4%
Simplified51.4%
Taylor expanded in y around 0 47.3%
associate-*r*54.7%
Simplified54.7%
if -1.89999999999999997e-33 < z < 1.12e28Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-*r*89.3%
distribute-lft-neg-in89.3%
*-commutative89.3%
cancel-sign-sub-inv89.3%
associate-+r-89.3%
associate-*l*89.2%
fma-define89.3%
cancel-sign-sub-inv89.3%
fma-define89.3%
distribute-lft-neg-in89.3%
distribute-rgt-neg-in89.3%
*-commutative89.3%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around 0 77.6%
Final simplification66.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= b -6.8e-14) (not (<= b 2.3e+157))) (* b (* a 27.0)) (* 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 ((b <= -6.8e-14) || !(b <= 2.3e+157)) {
tmp = b * (a * 27.0);
} 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 ((b <= (-6.8d-14)) .or. (.not. (b <= 2.3d+157))) then
tmp = b * (a * 27.0d0)
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 ((b <= -6.8e-14) || !(b <= 2.3e+157)) {
tmp = b * (a * 27.0);
} 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 (b <= -6.8e-14) or not (b <= 2.3e+157): tmp = b * (a * 27.0) 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 ((b <= -6.8e-14) || !(b <= 2.3e+157)) tmp = Float64(b * Float64(a * 27.0)); 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 ((b <= -6.8e-14) || ~((b <= 2.3e+157)))
tmp = b * (a * 27.0);
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[Or[LessEqual[b, -6.8e-14], N[Not[LessEqual[b, 2.3e+157]], $MachinePrecision]], N[(b * N[(a * 27.0), $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}\;b \leq -6.8 \cdot 10^{-14} \lor \neg \left(b \leq 2.3 \cdot 10^{+157}\right):\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\end{array}
\end{array}
if b < -6.80000000000000006e-14 or 2.30000000000000004e157 < b Initial program 90.4%
+-commutative90.4%
associate-+r-90.4%
*-commutative90.4%
cancel-sign-sub-inv90.4%
associate-*r*91.4%
distribute-lft-neg-in91.4%
*-commutative91.4%
cancel-sign-sub-inv91.4%
associate-+r-91.4%
associate-*l*91.3%
fma-define95.1%
cancel-sign-sub-inv95.1%
fma-define95.1%
distribute-lft-neg-in95.1%
distribute-rgt-neg-in95.1%
*-commutative95.1%
associate-*r*94.2%
associate-*l*94.2%
neg-mul-194.2%
associate-*r*94.2%
Simplified94.2%
Taylor expanded in t around 0 72.1%
Taylor expanded in x around 0 58.0%
associate-*r*58.0%
*-commutative58.0%
Simplified58.0%
if -6.80000000000000006e-14 < b < 2.30000000000000004e157Initial program 93.5%
+-commutative93.5%
associate-+r-93.5%
*-commutative93.5%
cancel-sign-sub-inv93.5%
associate-*r*93.4%
distribute-lft-neg-in93.4%
*-commutative93.4%
cancel-sign-sub-inv93.4%
associate-+r-93.4%
associate-*l*93.4%
fma-define94.0%
cancel-sign-sub-inv94.0%
fma-define94.0%
distribute-lft-neg-in94.0%
distribute-rgt-neg-in94.0%
*-commutative94.0%
associate-*r*94.1%
associate-*l*94.2%
neg-mul-194.2%
associate-*r*94.2%
Simplified94.2%
Taylor expanded in t around inf 41.4%
*-commutative41.4%
associate-*r*41.4%
*-commutative41.4%
associate-*l*41.4%
Simplified41.4%
Final simplification48.2%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.02e-16) (not (<= b 2.1e+157))) (* b (* a 27.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 ((b <= -1.02e-16) || !(b <= 2.1e+157)) {
tmp = b * (a * 27.0);
} else {
tmp = t * (y * (z * -9.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-1.02d-16)) .or. (.not. (b <= 2.1d+157))) then
tmp = b * (a * 27.0d0)
else
tmp = t * (y * (z * (-9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.02e-16) || !(b <= 2.1e+157)) {
tmp = b * (a * 27.0);
} else {
tmp = t * (y * (z * -9.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.02e-16) or not (b <= 2.1e+157): tmp = b * (a * 27.0) else: tmp = t * (y * (z * -9.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.02e-16) || !(b <= 2.1e+157)) tmp = Float64(b * Float64(a * 27.0)); else tmp = Float64(t * Float64(y * Float64(z * -9.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((b <= -1.02e-16) || ~((b <= 2.1e+157)))
tmp = b * (a * 27.0);
else
tmp = t * (y * (z * -9.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.02e-16], N[Not[LessEqual[b, 2.1e+157]], $MachinePrecision]], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.02 \cdot 10^{-16} \lor \neg \left(b \leq 2.1 \cdot 10^{+157}\right):\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\end{array}
\end{array}
if b < -1.0200000000000001e-16 or 2.1e157 < b Initial program 90.4%
+-commutative90.4%
associate-+r-90.4%
*-commutative90.4%
cancel-sign-sub-inv90.4%
associate-*r*91.4%
distribute-lft-neg-in91.4%
*-commutative91.4%
cancel-sign-sub-inv91.4%
associate-+r-91.4%
associate-*l*91.3%
fma-define95.1%
cancel-sign-sub-inv95.1%
fma-define95.1%
distribute-lft-neg-in95.1%
distribute-rgt-neg-in95.1%
*-commutative95.1%
associate-*r*94.2%
associate-*l*94.2%
neg-mul-194.2%
associate-*r*94.2%
Simplified94.2%
Taylor expanded in t around 0 72.1%
Taylor expanded in x around 0 58.0%
associate-*r*58.0%
*-commutative58.0%
Simplified58.0%
if -1.0200000000000001e-16 < b < 2.1e157Initial program 93.5%
+-commutative93.5%
associate-+r-93.5%
*-commutative93.5%
cancel-sign-sub-inv93.5%
associate-*r*93.4%
distribute-lft-neg-in93.4%
*-commutative93.4%
cancel-sign-sub-inv93.4%
associate-+r-93.4%
associate-*l*93.4%
fma-define94.0%
cancel-sign-sub-inv94.0%
fma-define94.0%
distribute-lft-neg-in94.0%
distribute-rgt-neg-in94.0%
*-commutative94.0%
associate-*r*94.1%
associate-*l*94.2%
neg-mul-194.2%
associate-*r*94.2%
Simplified94.2%
Taylor expanded in t around inf 41.4%
*-commutative41.4%
associate-*r*41.4%
associate-*l*41.4%
Simplified41.4%
Final simplification48.2%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.95e-14) (not (<= b 1.42e+157))) (* b (* a 27.0)) (* t (* -9.0 (* y z)))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.95e-14) || !(b <= 1.42e+157)) {
tmp = b * (a * 27.0);
} else {
tmp = t * (-9.0 * (y * z));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-1.95d-14)) .or. (.not. (b <= 1.42d+157))) then
tmp = b * (a * 27.0d0)
else
tmp = t * ((-9.0d0) * (y * z))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.95e-14) || !(b <= 1.42e+157)) {
tmp = b * (a * 27.0);
} else {
tmp = t * (-9.0 * (y * z));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.95e-14) or not (b <= 1.42e+157): tmp = b * (a * 27.0) else: tmp = t * (-9.0 * (y * z)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.95e-14) || !(b <= 1.42e+157)) tmp = Float64(b * Float64(a * 27.0)); else tmp = Float64(t * Float64(-9.0 * Float64(y * z))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((b <= -1.95e-14) || ~((b <= 1.42e+157)))
tmp = b * (a * 27.0);
else
tmp = t * (-9.0 * (y * z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.95e-14], N[Not[LessEqual[b, 1.42e+157]], $MachinePrecision]], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(-9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.95 \cdot 10^{-14} \lor \neg \left(b \leq 1.42 \cdot 10^{+157}\right):\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if b < -1.9499999999999999e-14 or 1.41999999999999987e157 < b Initial program 90.4%
+-commutative90.4%
associate-+r-90.4%
*-commutative90.4%
cancel-sign-sub-inv90.4%
associate-*r*91.4%
distribute-lft-neg-in91.4%
*-commutative91.4%
cancel-sign-sub-inv91.4%
associate-+r-91.4%
associate-*l*91.3%
fma-define95.1%
cancel-sign-sub-inv95.1%
fma-define95.1%
distribute-lft-neg-in95.1%
distribute-rgt-neg-in95.1%
*-commutative95.1%
associate-*r*94.2%
associate-*l*94.2%
neg-mul-194.2%
associate-*r*94.2%
Simplified94.2%
Taylor expanded in t around 0 72.1%
Taylor expanded in x around 0 58.0%
associate-*r*58.0%
*-commutative58.0%
Simplified58.0%
if -1.9499999999999999e-14 < b < 1.41999999999999987e157Initial program 93.5%
+-commutative93.5%
associate-+r-93.5%
*-commutative93.5%
cancel-sign-sub-inv93.5%
associate-*r*93.4%
distribute-lft-neg-in93.4%
*-commutative93.4%
cancel-sign-sub-inv93.4%
associate-+r-93.4%
associate-*l*93.4%
fma-define94.0%
cancel-sign-sub-inv94.0%
fma-define94.0%
distribute-lft-neg-in94.0%
distribute-rgt-neg-in94.0%
*-commutative94.0%
associate-*r*94.1%
associate-*l*94.2%
neg-mul-194.2%
associate-*r*94.2%
Simplified94.2%
Taylor expanded in t around inf 41.4%
*-commutative41.4%
associate-*r*41.4%
*-commutative41.4%
associate-*l*41.4%
Simplified41.4%
Taylor expanded in z around 0 41.4%
Final simplification48.2%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.55e-14) (not (<= b 1.8e+157))) (* b (* a 27.0)) (* -9.0 (* t (* y z)))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.55e-14) || !(b <= 1.8e+157)) {
tmp = b * (a * 27.0);
} else {
tmp = -9.0 * (t * (y * z));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-1.55d-14)) .or. (.not. (b <= 1.8d+157))) then
tmp = b * (a * 27.0d0)
else
tmp = (-9.0d0) * (t * (y * z))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.55e-14) || !(b <= 1.8e+157)) {
tmp = b * (a * 27.0);
} else {
tmp = -9.0 * (t * (y * z));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.55e-14) or not (b <= 1.8e+157): tmp = b * (a * 27.0) else: tmp = -9.0 * (t * (y * z)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.55e-14) || !(b <= 1.8e+157)) tmp = Float64(b * Float64(a * 27.0)); else tmp = Float64(-9.0 * Float64(t * Float64(y * z))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((b <= -1.55e-14) || ~((b <= 1.8e+157)))
tmp = b * (a * 27.0);
else
tmp = -9.0 * (t * (y * z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.55e-14], N[Not[LessEqual[b, 1.8e+157]], $MachinePrecision]], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.55 \cdot 10^{-14} \lor \neg \left(b \leq 1.8 \cdot 10^{+157}\right):\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if b < -1.55000000000000002e-14 or 1.80000000000000012e157 < b Initial program 90.4%
+-commutative90.4%
associate-+r-90.4%
*-commutative90.4%
cancel-sign-sub-inv90.4%
associate-*r*91.4%
distribute-lft-neg-in91.4%
*-commutative91.4%
cancel-sign-sub-inv91.4%
associate-+r-91.4%
associate-*l*91.3%
fma-define95.1%
cancel-sign-sub-inv95.1%
fma-define95.1%
distribute-lft-neg-in95.1%
distribute-rgt-neg-in95.1%
*-commutative95.1%
associate-*r*94.2%
associate-*l*94.2%
neg-mul-194.2%
associate-*r*94.2%
Simplified94.2%
Taylor expanded in t around 0 72.1%
Taylor expanded in x around 0 58.0%
associate-*r*58.0%
*-commutative58.0%
Simplified58.0%
if -1.55000000000000002e-14 < b < 1.80000000000000012e157Initial program 93.5%
+-commutative93.5%
associate-+r-93.5%
*-commutative93.5%
cancel-sign-sub-inv93.5%
associate-*r*93.4%
distribute-lft-neg-in93.4%
*-commutative93.4%
cancel-sign-sub-inv93.4%
associate-+r-93.4%
associate-*l*93.4%
fma-define94.0%
cancel-sign-sub-inv94.0%
fma-define94.0%
distribute-lft-neg-in94.0%
distribute-rgt-neg-in94.0%
*-commutative94.0%
associate-*r*94.1%
associate-*l*94.2%
neg-mul-194.2%
associate-*r*94.2%
Simplified94.2%
Taylor expanded in t around inf 41.4%
Final simplification48.2%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z -5.8e-67) (* -9.0 (* z (* y t))) (if (<= z 2.1e-66) (* b (* a 27.0)) (* 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 <= -5.8e-67) {
tmp = -9.0 * (z * (y * t));
} else if (z <= 2.1e-66) {
tmp = b * (a * 27.0);
} 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 <= (-5.8d-67)) then
tmp = (-9.0d0) * (z * (y * t))
else if (z <= 2.1d-66) then
tmp = b * (a * 27.0d0)
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 <= -5.8e-67) {
tmp = -9.0 * (z * (y * t));
} else if (z <= 2.1e-66) {
tmp = b * (a * 27.0);
} 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 <= -5.8e-67: tmp = -9.0 * (z * (y * t)) elif z <= 2.1e-66: tmp = b * (a * 27.0) 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 <= -5.8e-67) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (z <= 2.1e-66) tmp = Float64(b * Float64(a * 27.0)); 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 <= -5.8e-67)
tmp = -9.0 * (z * (y * t));
elseif (z <= 2.1e-66)
tmp = b * (a * 27.0);
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, -5.8e-67], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e-66], N[(b * N[(a * 27.0), $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 -5.8 \cdot 10^{-67}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-66}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -5.8000000000000001e-67Initial program 87.3%
+-commutative87.3%
associate-+r-87.3%
*-commutative87.3%
cancel-sign-sub-inv87.3%
associate-*r*95.9%
distribute-lft-neg-in95.9%
*-commutative95.9%
cancel-sign-sub-inv95.9%
associate-+r-95.9%
associate-*l*95.9%
fma-define99.8%
cancel-sign-sub-inv99.8%
fma-define99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
*-commutative99.8%
associate-*r*91.1%
associate-*l*91.2%
neg-mul-191.2%
associate-*r*91.2%
Simplified91.2%
Taylor expanded in t around inf 49.9%
*-commutative49.9%
associate-*r*50.0%
*-commutative50.0%
associate-*l*49.9%
Simplified49.9%
Taylor expanded in t around 0 49.9%
associate-*r*49.9%
*-commutative49.9%
metadata-eval49.9%
distribute-lft-neg-in49.9%
distribute-rgt-neg-in49.9%
associate-*r*50.0%
*-commutative50.0%
distribute-lft-neg-in50.0%
distribute-lft-neg-in50.0%
metadata-eval50.0%
associate-*r*49.9%
*-commutative49.9%
*-commutative49.9%
*-commutative49.9%
associate-*r*51.2%
*-commutative51.2%
metadata-eval51.2%
distribute-rgt-neg-in51.2%
distribute-rgt-neg-in51.2%
associate-*r*51.2%
distribute-rgt-neg-in51.2%
*-commutative51.2%
*-commutative51.2%
metadata-eval51.2%
Simplified51.2%
Taylor expanded in y around 0 49.9%
associate-*r*54.8%
Simplified54.8%
if -5.8000000000000001e-67 < z < 2.1e-66Initial program 99.7%
+-commutative99.7%
associate-+r-99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
associate-*r*86.6%
distribute-lft-neg-in86.6%
*-commutative86.6%
cancel-sign-sub-inv86.6%
associate-+r-86.6%
associate-*l*86.6%
fma-define86.6%
cancel-sign-sub-inv86.6%
fma-define86.6%
distribute-lft-neg-in86.6%
distribute-rgt-neg-in86.6%
*-commutative86.6%
associate-*r*99.7%
associate-*l*99.7%
neg-mul-199.7%
associate-*r*99.7%
Simplified99.7%
Taylor expanded in t around 0 81.3%
Taylor expanded in x around 0 47.3%
associate-*r*47.2%
*-commutative47.2%
Simplified47.2%
if 2.1e-66 < z Initial program 87.2%
+-commutative87.2%
associate-+r-87.2%
*-commutative87.2%
cancel-sign-sub-inv87.2%
associate-*r*97.1%
distribute-lft-neg-in97.1%
*-commutative97.1%
cancel-sign-sub-inv97.1%
associate-+r-97.1%
associate-*l*97.1%
fma-define99.7%
cancel-sign-sub-inv99.7%
fma-define99.7%
distribute-lft-neg-in99.7%
distribute-rgt-neg-in99.7%
*-commutative99.7%
associate-*r*89.8%
associate-*l*89.9%
neg-mul-189.9%
associate-*r*89.9%
Simplified89.9%
Taylor expanded in t around inf 41.1%
*-commutative41.1%
associate-*r*41.1%
*-commutative41.1%
associate-*l*41.0%
Simplified41.0%
Final simplification47.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 -3.5e-69) (* -9.0 (* y (* z t))) (if (<= z 2e-66) (* b (* a 27.0)) (* 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 <= -3.5e-69) {
tmp = -9.0 * (y * (z * t));
} else if (z <= 2e-66) {
tmp = b * (a * 27.0);
} 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 <= (-3.5d-69)) then
tmp = (-9.0d0) * (y * (z * t))
else if (z <= 2d-66) then
tmp = b * (a * 27.0d0)
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 <= -3.5e-69) {
tmp = -9.0 * (y * (z * t));
} else if (z <= 2e-66) {
tmp = b * (a * 27.0);
} 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 <= -3.5e-69: tmp = -9.0 * (y * (z * t)) elif z <= 2e-66: tmp = b * (a * 27.0) 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 <= -3.5e-69) tmp = Float64(-9.0 * Float64(y * Float64(z * t))); elseif (z <= 2e-66) tmp = Float64(b * Float64(a * 27.0)); 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 <= -3.5e-69)
tmp = -9.0 * (y * (z * t));
elseif (z <= 2e-66)
tmp = b * (a * 27.0);
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, -3.5e-69], N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e-66], N[(b * N[(a * 27.0), $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 -3.5 \cdot 10^{-69}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-66}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -3.5000000000000001e-69Initial program 87.3%
+-commutative87.3%
associate-+r-87.3%
*-commutative87.3%
cancel-sign-sub-inv87.3%
associate-*r*95.9%
distribute-lft-neg-in95.9%
*-commutative95.9%
cancel-sign-sub-inv95.9%
associate-+r-95.9%
associate-*l*95.9%
fma-define99.8%
cancel-sign-sub-inv99.8%
fma-define99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
*-commutative99.8%
associate-*r*91.1%
associate-*l*91.2%
neg-mul-191.2%
associate-*r*91.2%
Simplified91.2%
Taylor expanded in t around inf 49.9%
*-commutative49.9%
associate-*r*50.0%
*-commutative50.0%
associate-*l*49.9%
Simplified49.9%
Taylor expanded in t around 0 49.9%
associate-*r*49.9%
*-commutative49.9%
metadata-eval49.9%
distribute-lft-neg-in49.9%
distribute-rgt-neg-in49.9%
associate-*r*50.0%
*-commutative50.0%
distribute-lft-neg-in50.0%
distribute-lft-neg-in50.0%
metadata-eval50.0%
associate-*r*49.9%
*-commutative49.9%
*-commutative49.9%
*-commutative49.9%
associate-*r*51.2%
*-commutative51.2%
metadata-eval51.2%
distribute-rgt-neg-in51.2%
distribute-rgt-neg-in51.2%
associate-*r*51.2%
distribute-rgt-neg-in51.2%
*-commutative51.2%
*-commutative51.2%
metadata-eval51.2%
Simplified51.2%
if -3.5000000000000001e-69 < z < 2e-66Initial program 99.7%
+-commutative99.7%
associate-+r-99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
associate-*r*86.6%
distribute-lft-neg-in86.6%
*-commutative86.6%
cancel-sign-sub-inv86.6%
associate-+r-86.6%
associate-*l*86.6%
fma-define86.6%
cancel-sign-sub-inv86.6%
fma-define86.6%
distribute-lft-neg-in86.6%
distribute-rgt-neg-in86.6%
*-commutative86.6%
associate-*r*99.7%
associate-*l*99.7%
neg-mul-199.7%
associate-*r*99.7%
Simplified99.7%
Taylor expanded in t around 0 81.3%
Taylor expanded in x around 0 47.3%
associate-*r*47.2%
*-commutative47.2%
Simplified47.2%
if 2e-66 < z Initial program 87.2%
+-commutative87.2%
associate-+r-87.2%
*-commutative87.2%
cancel-sign-sub-inv87.2%
associate-*r*97.1%
distribute-lft-neg-in97.1%
*-commutative97.1%
cancel-sign-sub-inv97.1%
associate-+r-97.1%
associate-*l*97.1%
fma-define99.7%
cancel-sign-sub-inv99.7%
fma-define99.7%
distribute-lft-neg-in99.7%
distribute-rgt-neg-in99.7%
*-commutative99.7%
associate-*r*89.8%
associate-*l*89.9%
neg-mul-189.9%
associate-*r*89.9%
Simplified89.9%
Taylor expanded in t around inf 41.1%
*-commutative41.1%
associate-*r*41.1%
*-commutative41.1%
associate-*l*41.0%
Simplified41.0%
Final simplification46.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z -1.15e-68) (* y (* -9.0 (* z t))) (if (<= z 1.95e-66) (* b (* a 27.0)) (* 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.15e-68) {
tmp = y * (-9.0 * (z * t));
} else if (z <= 1.95e-66) {
tmp = b * (a * 27.0);
} 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.15d-68)) then
tmp = y * ((-9.0d0) * (z * t))
else if (z <= 1.95d-66) then
tmp = b * (a * 27.0d0)
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.15e-68) {
tmp = y * (-9.0 * (z * t));
} else if (z <= 1.95e-66) {
tmp = b * (a * 27.0);
} 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.15e-68: tmp = y * (-9.0 * (z * t)) elif z <= 1.95e-66: tmp = b * (a * 27.0) 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.15e-68) tmp = Float64(y * Float64(-9.0 * Float64(z * t))); elseif (z <= 1.95e-66) tmp = Float64(b * Float64(a * 27.0)); 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.15e-68)
tmp = y * (-9.0 * (z * t));
elseif (z <= 1.95e-66)
tmp = b * (a * 27.0);
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.15e-68], N[(y * N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.95e-66], N[(b * N[(a * 27.0), $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.15 \cdot 10^{-68}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-66}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -1.14999999999999998e-68Initial program 87.3%
sub-neg87.3%
sub-neg87.3%
associate-*l*87.5%
associate-*l*87.4%
Simplified87.4%
Taylor expanded in x around 0 69.8%
Taylor expanded in y around inf 65.2%
Taylor expanded in a around 0 51.1%
if -1.14999999999999998e-68 < z < 1.94999999999999991e-66Initial program 99.7%
+-commutative99.7%
associate-+r-99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
associate-*r*86.6%
distribute-lft-neg-in86.6%
*-commutative86.6%
cancel-sign-sub-inv86.6%
associate-+r-86.6%
associate-*l*86.6%
fma-define86.6%
cancel-sign-sub-inv86.6%
fma-define86.6%
distribute-lft-neg-in86.6%
distribute-rgt-neg-in86.6%
*-commutative86.6%
associate-*r*99.7%
associate-*l*99.7%
neg-mul-199.7%
associate-*r*99.7%
Simplified99.7%
Taylor expanded in t around 0 81.3%
Taylor expanded in x around 0 47.3%
associate-*r*47.2%
*-commutative47.2%
Simplified47.2%
if 1.94999999999999991e-66 < z Initial program 87.2%
+-commutative87.2%
associate-+r-87.2%
*-commutative87.2%
cancel-sign-sub-inv87.2%
associate-*r*97.1%
distribute-lft-neg-in97.1%
*-commutative97.1%
cancel-sign-sub-inv97.1%
associate-+r-97.1%
associate-*l*97.1%
fma-define99.7%
cancel-sign-sub-inv99.7%
fma-define99.7%
distribute-lft-neg-in99.7%
distribute-rgt-neg-in99.7%
*-commutative99.7%
associate-*r*89.8%
associate-*l*89.9%
neg-mul-189.9%
associate-*r*89.9%
Simplified89.9%
Taylor expanded in t around inf 41.1%
*-commutative41.1%
associate-*r*41.1%
*-commutative41.1%
associate-*l*41.0%
Simplified41.0%
Final simplification46.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (+ (- (* 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 92.2%
sub-neg92.2%
sub-neg92.2%
associate-*l*93.5%
associate-*l*93.5%
Simplified93.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= b -3.05e-30) (not (<= b 3.8e+81))) (* 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 ((b <= -3.05e-30) || !(b <= 3.8e+81)) {
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 ((b <= (-3.05d-30)) .or. (.not. (b <= 3.8d+81))) 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 ((b <= -3.05e-30) || !(b <= 3.8e+81)) {
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 (b <= -3.05e-30) or not (b <= 3.8e+81): 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 ((b <= -3.05e-30) || !(b <= 3.8e+81)) 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 ((b <= -3.05e-30) || ~((b <= 3.8e+81)))
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[b, -3.05e-30], N[Not[LessEqual[b, 3.8e+81]], $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}\;b \leq -3.05 \cdot 10^{-30} \lor \neg \left(b \leq 3.8 \cdot 10^{+81}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if b < -3.0499999999999999e-30 or 3.8e81 < b Initial program 90.9%
+-commutative90.9%
associate-+r-90.9%
*-commutative90.9%
cancel-sign-sub-inv90.9%
associate-*r*91.6%
distribute-lft-neg-in91.6%
*-commutative91.6%
cancel-sign-sub-inv91.6%
associate-+r-91.6%
associate-*l*91.6%
fma-define95.0%
cancel-sign-sub-inv95.0%
fma-define95.0%
distribute-lft-neg-in95.0%
distribute-rgt-neg-in95.0%
*-commutative95.0%
associate-*r*94.2%
associate-*l*94.2%
neg-mul-194.2%
associate-*r*94.2%
Simplified94.2%
Taylor expanded in a around inf 55.5%
if -3.0499999999999999e-30 < b < 3.8e81Initial program 93.4%
+-commutative93.4%
associate-+r-93.4%
*-commutative93.4%
cancel-sign-sub-inv93.4%
associate-*r*93.4%
distribute-lft-neg-in93.4%
*-commutative93.4%
cancel-sign-sub-inv93.4%
associate-+r-93.4%
associate-*l*93.3%
fma-define94.1%
cancel-sign-sub-inv94.1%
fma-define94.1%
distribute-lft-neg-in94.1%
distribute-rgt-neg-in94.1%
*-commutative94.1%
associate-*r*94.1%
associate-*l*94.2%
neg-mul-194.2%
associate-*r*94.2%
Simplified94.2%
fma-undefine93.4%
fma-undefine93.4%
associate-+r+93.4%
*-commutative93.4%
associate-*l*94.4%
*-commutative94.4%
associate-*r*94.4%
*-commutative94.4%
*-commutative94.4%
associate-*r*94.3%
associate-*l*94.4%
metadata-eval94.4%
distribute-lft-neg-in94.4%
*-commutative94.4%
distribute-rgt-neg-in94.4%
*-commutative94.4%
associate-+r+94.4%
sub-neg94.4%
Applied egg-rr94.4%
Taylor expanded in x around inf 35.9%
Final simplification45.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= b -2.5e-30) (* b (* a 27.0)) (if (<= b 3.4e+80) (* x 2.0) (* 27.0 (* a b)))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.5e-30) {
tmp = b * (a * 27.0);
} else if (b <= 3.4e+80) {
tmp = x * 2.0;
} else {
tmp = 27.0 * (a * b);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-2.5d-30)) then
tmp = b * (a * 27.0d0)
else if (b <= 3.4d+80) then
tmp = x * 2.0d0
else
tmp = 27.0d0 * (a * b)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.5e-30) {
tmp = b * (a * 27.0);
} else if (b <= 3.4e+80) {
tmp = x * 2.0;
} else {
tmp = 27.0 * (a * b);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if b <= -2.5e-30: tmp = b * (a * 27.0) elif b <= 3.4e+80: tmp = x * 2.0 else: tmp = 27.0 * (a * b) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.5e-30) tmp = Float64(b * Float64(a * 27.0)); elseif (b <= 3.4e+80) tmp = Float64(x * 2.0); else tmp = Float64(27.0 * Float64(a * b)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (b <= -2.5e-30)
tmp = b * (a * 27.0);
elseif (b <= 3.4e+80)
tmp = x * 2.0;
else
tmp = 27.0 * (a * b);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.5e-30], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.4e+80], N[(x * 2.0), $MachinePrecision], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.5 \cdot 10^{-30}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{elif}\;b \leq 3.4 \cdot 10^{+80}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if b < -2.49999999999999986e-30Initial program 92.1%
+-commutative92.1%
associate-+r-92.1%
*-commutative92.1%
cancel-sign-sub-inv92.1%
associate-*r*93.3%
distribute-lft-neg-in93.3%
*-commutative93.3%
cancel-sign-sub-inv93.3%
associate-+r-93.3%
associate-*l*93.3%
fma-define95.9%
cancel-sign-sub-inv95.9%
fma-define95.9%
distribute-lft-neg-in95.9%
distribute-rgt-neg-in95.9%
*-commutative95.9%
associate-*r*94.7%
associate-*l*94.7%
neg-mul-194.7%
associate-*r*94.7%
Simplified94.7%
Taylor expanded in t around 0 69.9%
Taylor expanded in x around 0 53.0%
associate-*r*53.0%
*-commutative53.0%
Simplified53.0%
if -2.49999999999999986e-30 < b < 3.39999999999999992e80Initial program 93.4%
+-commutative93.4%
associate-+r-93.4%
*-commutative93.4%
cancel-sign-sub-inv93.4%
associate-*r*93.4%
distribute-lft-neg-in93.4%
*-commutative93.4%
cancel-sign-sub-inv93.4%
associate-+r-93.4%
associate-*l*93.3%
fma-define94.1%
cancel-sign-sub-inv94.1%
fma-define94.1%
distribute-lft-neg-in94.1%
distribute-rgt-neg-in94.1%
*-commutative94.1%
associate-*r*94.1%
associate-*l*94.2%
neg-mul-194.2%
associate-*r*94.2%
Simplified94.2%
fma-undefine93.4%
fma-undefine93.4%
associate-+r+93.4%
*-commutative93.4%
associate-*l*94.4%
*-commutative94.4%
associate-*r*94.4%
*-commutative94.4%
*-commutative94.4%
associate-*r*94.3%
associate-*l*94.4%
metadata-eval94.4%
distribute-lft-neg-in94.4%
*-commutative94.4%
distribute-rgt-neg-in94.4%
*-commutative94.4%
associate-+r+94.4%
sub-neg94.4%
Applied egg-rr94.4%
Taylor expanded in x around inf 35.9%
if 3.39999999999999992e80 < b Initial program 88.8%
+-commutative88.8%
associate-+r-88.8%
*-commutative88.8%
cancel-sign-sub-inv88.8%
associate-*r*88.8%
distribute-lft-neg-in88.8%
*-commutative88.8%
cancel-sign-sub-inv88.8%
associate-+r-88.8%
associate-*l*88.8%
fma-define93.3%
cancel-sign-sub-inv93.3%
fma-define93.3%
distribute-lft-neg-in93.3%
distribute-rgt-neg-in93.3%
*-commutative93.3%
associate-*r*93.3%
associate-*l*93.3%
neg-mul-193.3%
associate-*r*93.3%
Simplified93.3%
Taylor expanded in a around inf 59.6%
Final simplification45.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))
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 92.2%
+-commutative92.2%
associate-+r-92.2%
*-commutative92.2%
cancel-sign-sub-inv92.2%
associate-*r*92.6%
distribute-lft-neg-in92.6%
*-commutative92.6%
cancel-sign-sub-inv92.6%
associate-+r-92.6%
associate-*l*92.5%
fma-define94.5%
cancel-sign-sub-inv94.5%
fma-define94.5%
distribute-lft-neg-in94.5%
distribute-rgt-neg-in94.5%
*-commutative94.5%
associate-*r*94.2%
associate-*l*94.2%
neg-mul-194.2%
associate-*r*94.2%
Simplified94.2%
fma-undefine92.2%
fma-undefine92.2%
associate-+r+92.2%
*-commutative92.2%
associate-*l*93.5%
*-commutative93.5%
associate-*r*93.1%
*-commutative93.1%
*-commutative93.1%
associate-*r*93.5%
associate-*l*93.5%
metadata-eval93.5%
distribute-lft-neg-in93.5%
*-commutative93.5%
distribute-rgt-neg-in93.5%
*-commutative93.5%
associate-+r+93.5%
sub-neg93.5%
Applied egg-rr93.5%
Taylor expanded in x around inf 26.2%
Final simplification26.2%
(FPCore (x y z t a b) :precision binary64 (if (< y 7.590524218811189e-161) (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* a (* 27.0 b))) (+ (- (* x 2.0) (* 9.0 (* y (* t z)))) (* (* a 27.0) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y < 7.590524218811189e-161) {
tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
} else {
tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y < 7.590524218811189d-161) then
tmp = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + (a * (27.0d0 * b))
else
tmp = ((x * 2.0d0) - (9.0d0 * (y * (t * z)))) + ((a * 27.0d0) * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y < 7.590524218811189e-161) {
tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
} else {
tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y < 7.590524218811189e-161: tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b)) else: tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y < 7.590524218811189e-161) tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(a * Float64(27.0 * b))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(9.0 * Float64(y * Float64(t * z)))) + Float64(Float64(a * 27.0) * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y < 7.590524218811189e-161) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b)); else tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Less[y, 7.590524218811189e-161], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y < 7.590524218811189 \cdot 10^{-161}:\\
\;\;\;\;\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - 9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right) + \left(a \cdot 27\right) \cdot b\\
\end{array}
\end{array}
herbie shell --seed 2024157
(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)))