
(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 15 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) z) 2e+210) (fma a (* 27.0 b) (fma x 2.0 (* t (* y (* z -9.0))))) (* y (- (+ (* 2.0 (/ x y)) (* 27.0 (/ (* a b) y))) (* 9.0 (* z t))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((y * 9.0) * z) <= 2e+210) {
tmp = fma(a, (27.0 * b), fma(x, 2.0, (t * (y * (z * -9.0)))));
} else {
tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (z * t)));
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(y * 9.0) * z) <= 2e+210) tmp = fma(a, Float64(27.0 * b), fma(x, 2.0, Float64(t * Float64(y * Float64(z * -9.0))))); else tmp = Float64(y * Float64(Float64(Float64(2.0 * Float64(x / y)) + Float64(27.0 * Float64(Float64(a * b) / y))) - Float64(9.0 * Float64(z * t)))); end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision], 2e+210], N[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(N[(2.0 * N[(x / y), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(N[(a * b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(y \cdot 9\right) \cdot z \leq 2 \cdot 10^{+210}:\\
\;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(2 \cdot \frac{x}{y} + 27 \cdot \frac{a \cdot b}{y}\right) - 9 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 y #s(literal 9 binary64)) z) < 1.99999999999999985e210Initial program 95.9%
+-commutative95.9%
associate-+r-95.9%
*-commutative95.9%
cancel-sign-sub-inv95.9%
associate-*r*94.7%
distribute-lft-neg-in94.7%
*-commutative94.7%
cancel-sign-sub-inv94.7%
associate-+r-94.7%
associate-*l*95.6%
fma-define96.0%
cancel-sign-sub-inv96.0%
fma-define96.0%
distribute-lft-neg-in96.0%
distribute-rgt-neg-in96.0%
*-commutative96.0%
associate-*r*97.3%
associate-*l*97.3%
neg-mul-197.3%
associate-*r*97.3%
Simplified97.3%
if 1.99999999999999985e210 < (*.f64 (*.f64 y #s(literal 9 binary64)) z) Initial program 77.2%
sub-neg77.2%
sub-neg77.2%
associate-*l*99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in y around inf 99.9%
Final simplification97.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (* y 9.0) z)))
(if (<= t_1 5e+181)
(+ (- (* x 2.0) (* t_1 t)) (* b (* a 27.0)))
(* y (- (+ (* 2.0 (/ x y)) (* 27.0 (/ (* a b) y))) (* 9.0 (* z t)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * 9.0) * z;
double tmp;
if (t_1 <= 5e+181) {
tmp = ((x * 2.0) - (t_1 * t)) + (b * (a * 27.0));
} else {
tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (z * t)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (y * 9.0d0) * z
if (t_1 <= 5d+181) then
tmp = ((x * 2.0d0) - (t_1 * t)) + (b * (a * 27.0d0))
else
tmp = y * (((2.0d0 * (x / y)) + (27.0d0 * ((a * b) / y))) - (9.0d0 * (z * t)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * 9.0) * z;
double tmp;
if (t_1 <= 5e+181) {
tmp = ((x * 2.0) - (t_1 * t)) + (b * (a * 27.0));
} else {
tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (z * t)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = (y * 9.0) * z tmp = 0 if t_1 <= 5e+181: tmp = ((x * 2.0) - (t_1 * t)) + (b * (a * 27.0)) else: tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (z * t))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * 9.0) * z) tmp = 0.0 if (t_1 <= 5e+181) tmp = Float64(Float64(Float64(x * 2.0) - Float64(t_1 * t)) + Float64(b * Float64(a * 27.0))); else tmp = Float64(y * Float64(Float64(Float64(2.0 * Float64(x / y)) + Float64(27.0 * Float64(Float64(a * b) / y))) - Float64(9.0 * Float64(z * t)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (y * 9.0) * z;
tmp = 0.0;
if (t_1 <= 5e+181)
tmp = ((x * 2.0) - (t_1 * t)) + (b * (a * 27.0));
else
tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (z * t)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+181], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t$95$1 * t), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(N[(2.0 * N[(x / y), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(N[(a * b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \left(y \cdot 9\right) \cdot z\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+181}:\\
\;\;\;\;\left(x \cdot 2 - t\_1 \cdot t\right) + b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(2 \cdot \frac{x}{y} + 27 \cdot \frac{a \cdot b}{y}\right) - 9 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 y #s(literal 9 binary64)) z) < 5.0000000000000003e181Initial program 95.8%
if 5.0000000000000003e181 < (*.f64 (*.f64 y #s(literal 9 binary64)) z) Initial program 81.1%
sub-neg81.1%
sub-neg81.1%
associate-*l*99.7%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in y around inf 99.9%
Final simplification96.4%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* 27.0 (* a b))))
(if (<= x -1.65e+50)
(- (* x 2.0) (* (* (* y 9.0) z) t))
(if (<= x 4.5e-35)
(- t_1 (* 9.0 (* t (* y z))))
(if (<= x 6.3e+60)
(+ (* x 2.0) t_1)
(* x (+ 2.0 (/ (* z (* -9.0 (* y t))) x))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 27.0 * (a * b);
double tmp;
if (x <= -1.65e+50) {
tmp = (x * 2.0) - (((y * 9.0) * z) * t);
} else if (x <= 4.5e-35) {
tmp = t_1 - (9.0 * (t * (y * z)));
} else if (x <= 6.3e+60) {
tmp = (x * 2.0) + t_1;
} else {
tmp = x * (2.0 + ((z * (-9.0 * (y * t))) / x));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = 27.0d0 * (a * b)
if (x <= (-1.65d+50)) then
tmp = (x * 2.0d0) - (((y * 9.0d0) * z) * t)
else if (x <= 4.5d-35) then
tmp = t_1 - (9.0d0 * (t * (y * z)))
else if (x <= 6.3d+60) then
tmp = (x * 2.0d0) + t_1
else
tmp = x * (2.0d0 + ((z * ((-9.0d0) * (y * t))) / x))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 27.0 * (a * b);
double tmp;
if (x <= -1.65e+50) {
tmp = (x * 2.0) - (((y * 9.0) * z) * t);
} else if (x <= 4.5e-35) {
tmp = t_1 - (9.0 * (t * (y * z)));
} else if (x <= 6.3e+60) {
tmp = (x * 2.0) + t_1;
} else {
tmp = x * (2.0 + ((z * (-9.0 * (y * t))) / x));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = 27.0 * (a * b) tmp = 0 if x <= -1.65e+50: tmp = (x * 2.0) - (((y * 9.0) * z) * t) elif x <= 4.5e-35: tmp = t_1 - (9.0 * (t * (y * z))) elif x <= 6.3e+60: tmp = (x * 2.0) + t_1 else: tmp = x * (2.0 + ((z * (-9.0 * (y * t))) / x)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(27.0 * Float64(a * b)) tmp = 0.0 if (x <= -1.65e+50) tmp = Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)); elseif (x <= 4.5e-35) tmp = Float64(t_1 - Float64(9.0 * Float64(t * Float64(y * z)))); elseif (x <= 6.3e+60) tmp = Float64(Float64(x * 2.0) + t_1); else tmp = Float64(x * Float64(2.0 + Float64(Float64(z * Float64(-9.0 * Float64(y * t))) / x))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = 27.0 * (a * b);
tmp = 0.0;
if (x <= -1.65e+50)
tmp = (x * 2.0) - (((y * 9.0) * z) * t);
elseif (x <= 4.5e-35)
tmp = t_1 - (9.0 * (t * (y * z)));
elseif (x <= 6.3e+60)
tmp = (x * 2.0) + t_1;
else
tmp = x * (2.0 + ((z * (-9.0 * (y * t))) / x));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.65e+50], N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.5e-35], N[(t$95$1 - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.3e+60], N[(N[(x * 2.0), $MachinePrecision] + t$95$1), $MachinePrecision], N[(x * N[(2.0 + N[(N[(z * N[(-9.0 * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;x \leq -1.65 \cdot 10^{+50}:\\
\;\;\;\;x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{-35}:\\
\;\;\;\;t\_1 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{elif}\;x \leq 6.3 \cdot 10^{+60}:\\
\;\;\;\;x \cdot 2 + t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(2 + \frac{z \cdot \left(-9 \cdot \left(y \cdot t\right)\right)}{x}\right)\\
\end{array}
\end{array}
if x < -1.65e50Initial program 94.0%
sub-neg94.0%
sub-neg94.0%
associate-*l*94.3%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in a around 0 86.5%
pow186.5%
Applied egg-rr86.5%
unpow186.5%
associate-*r*86.5%
*-commutative86.5%
associate-*r*86.5%
*-commutative86.5%
associate-*r*86.5%
Simplified86.5%
if -1.65e50 < x < 4.5000000000000001e-35Initial program 94.3%
sub-neg94.3%
sub-neg94.3%
associate-*l*94.2%
associate-*l*94.3%
Simplified94.3%
Taylor expanded in x around 0 85.9%
if 4.5000000000000001e-35 < x < 6.3000000000000003e60Initial program 99.9%
+-commutative99.9%
associate-+r-99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
associate-*r*99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-+r-99.8%
associate-*l*99.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*99.9%
associate-*l*99.9%
neg-mul-199.9%
associate-*r*99.9%
Simplified99.9%
Taylor expanded in t around 0 93.1%
if 6.3000000000000003e60 < x Initial program 90.8%
sub-neg90.8%
sub-neg90.8%
associate-*l*89.1%
associate-*l*90.9%
Simplified90.9%
Taylor expanded in y around inf 69.1%
Taylor expanded in a around 0 69.2%
Taylor expanded in x around inf 79.9%
associate-*r/79.9%
associate-*r*79.9%
*-commutative79.9%
associate-*r*83.5%
*-commutative83.5%
associate-*r*83.5%
Simplified83.5%
Final simplification85.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 (<= t -1.6e-165)
(* (* z t) (* y -9.0))
(if (<= t 2.9e-300)
(* 27.0 (* a b))
(if (<= t 1.15e+75) (* x 2.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 (t <= -1.6e-165) {
tmp = (z * t) * (y * -9.0);
} else if (t <= 2.9e-300) {
tmp = 27.0 * (a * b);
} else if (t <= 1.15e+75) {
tmp = x * 2.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 (t <= (-1.6d-165)) then
tmp = (z * t) * (y * (-9.0d0))
else if (t <= 2.9d-300) then
tmp = 27.0d0 * (a * b)
else if (t <= 1.15d+75) then
tmp = x * 2.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 (t <= -1.6e-165) {
tmp = (z * t) * (y * -9.0);
} else if (t <= 2.9e-300) {
tmp = 27.0 * (a * b);
} else if (t <= 1.15e+75) {
tmp = x * 2.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 t <= -1.6e-165: tmp = (z * t) * (y * -9.0) elif t <= 2.9e-300: tmp = 27.0 * (a * b) elif t <= 1.15e+75: tmp = x * 2.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 (t <= -1.6e-165) tmp = Float64(Float64(z * t) * Float64(y * -9.0)); elseif (t <= 2.9e-300) tmp = Float64(27.0 * Float64(a * b)); elseif (t <= 1.15e+75) tmp = Float64(x * 2.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 (t <= -1.6e-165)
tmp = (z * t) * (y * -9.0);
elseif (t <= 2.9e-300)
tmp = 27.0 * (a * b);
elseif (t <= 1.15e+75)
tmp = x * 2.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[LessEqual[t, -1.6e-165], N[(N[(z * t), $MachinePrecision] * N[(y * -9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.9e-300], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+75], N[(x * 2.0), $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}\;t \leq -1.6 \cdot 10^{-165}:\\
\;\;\;\;\left(z \cdot t\right) \cdot \left(y \cdot -9\right)\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-300}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+75}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if t < -1.60000000000000006e-165Initial program 92.7%
+-commutative92.7%
associate-+r-92.7%
*-commutative92.7%
cancel-sign-sub-inv92.7%
associate-*r*94.3%
distribute-lft-neg-in94.3%
*-commutative94.3%
cancel-sign-sub-inv94.3%
associate-+r-94.3%
associate-*l*95.2%
fma-define95.2%
cancel-sign-sub-inv95.2%
fma-define95.2%
distribute-lft-neg-in95.2%
distribute-rgt-neg-in95.2%
*-commutative95.2%
associate-*r*93.6%
associate-*l*93.7%
neg-mul-193.7%
associate-*r*93.7%
Simplified93.7%
Taylor expanded in t around inf 37.7%
*-commutative37.7%
associate-*l*38.4%
associate-*l*38.4%
*-commutative38.4%
*-commutative38.4%
*-commutative38.4%
Simplified38.4%
if -1.60000000000000006e-165 < t < 2.89999999999999992e-300Initial program 88.2%
+-commutative88.2%
associate-+r-88.2%
*-commutative88.2%
cancel-sign-sub-inv88.2%
associate-*r*95.8%
distribute-lft-neg-in95.8%
*-commutative95.8%
cancel-sign-sub-inv95.8%
associate-+r-95.8%
associate-*l*99.8%
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*92.2%
associate-*l*92.3%
neg-mul-192.3%
associate-*r*92.3%
Simplified92.3%
Taylor expanded in a around inf 57.5%
if 2.89999999999999992e-300 < t < 1.1499999999999999e75Initial program 94.8%
+-commutative94.8%
associate-+r-94.8%
*-commutative94.8%
cancel-sign-sub-inv94.8%
associate-*r*97.5%
distribute-lft-neg-in97.5%
*-commutative97.5%
cancel-sign-sub-inv97.5%
associate-+r-97.5%
associate-*l*97.5%
fma-define97.5%
cancel-sign-sub-inv97.5%
fma-define97.5%
distribute-lft-neg-in97.5%
distribute-rgt-neg-in97.5%
*-commutative97.5%
associate-*r*94.8%
associate-*l*94.8%
neg-mul-194.8%
associate-*r*94.8%
Simplified94.8%
Taylor expanded in t around 0 74.6%
Taylor expanded in x around inf 46.2%
if 1.1499999999999999e75 < t Initial program 97.7%
+-commutative97.7%
associate-+r-97.7%
*-commutative97.7%
cancel-sign-sub-inv97.7%
associate-*r*93.7%
distribute-lft-neg-in93.7%
*-commutative93.7%
cancel-sign-sub-inv93.7%
associate-+r-93.7%
associate-*l*93.7%
fma-define95.8%
cancel-sign-sub-inv95.8%
fma-define95.8%
distribute-lft-neg-in95.8%
distribute-rgt-neg-in95.8%
*-commutative95.8%
associate-*r*99.9%
associate-*l*99.9%
neg-mul-199.9%
associate-*r*99.9%
Simplified99.9%
Taylor expanded in t around inf 71.8%
*-commutative71.8%
associate-*r*71.8%
associate-*l*71.8%
Simplified71.8%
Taylor expanded in y around 0 71.8%
Final simplification48.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 (<= t -1.7e-165)
(* z (* y (* t -9.0)))
(if (<= t 4.1e-299)
(* 27.0 (* a b))
(if (<= t 1.15e+75) (* x 2.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 (t <= -1.7e-165) {
tmp = z * (y * (t * -9.0));
} else if (t <= 4.1e-299) {
tmp = 27.0 * (a * b);
} else if (t <= 1.15e+75) {
tmp = x * 2.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 (t <= (-1.7d-165)) then
tmp = z * (y * (t * (-9.0d0)))
else if (t <= 4.1d-299) then
tmp = 27.0d0 * (a * b)
else if (t <= 1.15d+75) then
tmp = x * 2.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 (t <= -1.7e-165) {
tmp = z * (y * (t * -9.0));
} else if (t <= 4.1e-299) {
tmp = 27.0 * (a * b);
} else if (t <= 1.15e+75) {
tmp = x * 2.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 t <= -1.7e-165: tmp = z * (y * (t * -9.0)) elif t <= 4.1e-299: tmp = 27.0 * (a * b) elif t <= 1.15e+75: tmp = x * 2.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 (t <= -1.7e-165) tmp = Float64(z * Float64(y * Float64(t * -9.0))); elseif (t <= 4.1e-299) tmp = Float64(27.0 * Float64(a * b)); elseif (t <= 1.15e+75) tmp = Float64(x * 2.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 (t <= -1.7e-165)
tmp = z * (y * (t * -9.0));
elseif (t <= 4.1e-299)
tmp = 27.0 * (a * b);
elseif (t <= 1.15e+75)
tmp = x * 2.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[LessEqual[t, -1.7e-165], N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.1e-299], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+75], N[(x * 2.0), $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}\;t \leq -1.7 \cdot 10^{-165}:\\
\;\;\;\;z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;t \leq 4.1 \cdot 10^{-299}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+75}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if t < -1.7e-165Initial program 92.7%
+-commutative92.7%
associate-+r-92.7%
*-commutative92.7%
cancel-sign-sub-inv92.7%
associate-*r*94.3%
distribute-lft-neg-in94.3%
*-commutative94.3%
cancel-sign-sub-inv94.3%
associate-+r-94.3%
associate-*l*95.2%
fma-define95.2%
cancel-sign-sub-inv95.2%
fma-define95.2%
distribute-lft-neg-in95.2%
distribute-rgt-neg-in95.2%
*-commutative95.2%
associate-*r*93.6%
associate-*l*93.7%
neg-mul-193.7%
associate-*r*93.7%
Simplified93.7%
Taylor expanded in t around inf 37.7%
*-commutative37.7%
associate-*r*37.7%
associate-*l*37.7%
Simplified37.7%
Taylor expanded in y around 0 37.7%
Taylor expanded in t around 0 37.7%
associate-*r*36.9%
*-commutative36.9%
associate-*r*40.6%
*-commutative40.6%
associate-*r*41.4%
*-commutative41.4%
associate-*r*40.6%
*-commutative40.6%
Simplified40.6%
if -1.7e-165 < t < 4.1000000000000001e-299Initial program 88.2%
+-commutative88.2%
associate-+r-88.2%
*-commutative88.2%
cancel-sign-sub-inv88.2%
associate-*r*95.8%
distribute-lft-neg-in95.8%
*-commutative95.8%
cancel-sign-sub-inv95.8%
associate-+r-95.8%
associate-*l*99.8%
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*92.2%
associate-*l*92.3%
neg-mul-192.3%
associate-*r*92.3%
Simplified92.3%
Taylor expanded in a around inf 57.5%
if 4.1000000000000001e-299 < t < 1.1499999999999999e75Initial program 94.8%
+-commutative94.8%
associate-+r-94.8%
*-commutative94.8%
cancel-sign-sub-inv94.8%
associate-*r*97.5%
distribute-lft-neg-in97.5%
*-commutative97.5%
cancel-sign-sub-inv97.5%
associate-+r-97.5%
associate-*l*97.5%
fma-define97.5%
cancel-sign-sub-inv97.5%
fma-define97.5%
distribute-lft-neg-in97.5%
distribute-rgt-neg-in97.5%
*-commutative97.5%
associate-*r*94.8%
associate-*l*94.8%
neg-mul-194.8%
associate-*r*94.8%
Simplified94.8%
Taylor expanded in t around 0 74.6%
Taylor expanded in x around inf 46.2%
if 1.1499999999999999e75 < t Initial program 97.7%
+-commutative97.7%
associate-+r-97.7%
*-commutative97.7%
cancel-sign-sub-inv97.7%
associate-*r*93.7%
distribute-lft-neg-in93.7%
*-commutative93.7%
cancel-sign-sub-inv93.7%
associate-+r-93.7%
associate-*l*93.7%
fma-define95.8%
cancel-sign-sub-inv95.8%
fma-define95.8%
distribute-lft-neg-in95.8%
distribute-rgt-neg-in95.8%
*-commutative95.8%
associate-*r*99.9%
associate-*l*99.9%
neg-mul-199.9%
associate-*r*99.9%
Simplified99.9%
Taylor expanded in t around inf 71.8%
*-commutative71.8%
associate-*r*71.8%
associate-*l*71.8%
Simplified71.8%
Taylor expanded in y around 0 71.8%
Final simplification49.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 -2.95e-145)
(* -9.0 (* t (* y z)))
(if (<= t 1.5e-299)
(* b (* a 27.0))
(if (<= t 1.15e+75) (* x 2.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 (t <= -2.95e-145) {
tmp = -9.0 * (t * (y * z));
} else if (t <= 1.5e-299) {
tmp = b * (a * 27.0);
} else if (t <= 1.15e+75) {
tmp = x * 2.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 (t <= (-2.95d-145)) then
tmp = (-9.0d0) * (t * (y * z))
else if (t <= 1.5d-299) then
tmp = b * (a * 27.0d0)
else if (t <= 1.15d+75) then
tmp = x * 2.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 (t <= -2.95e-145) {
tmp = -9.0 * (t * (y * z));
} else if (t <= 1.5e-299) {
tmp = b * (a * 27.0);
} else if (t <= 1.15e+75) {
tmp = x * 2.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 t <= -2.95e-145: tmp = -9.0 * (t * (y * z)) elif t <= 1.5e-299: tmp = b * (a * 27.0) elif t <= 1.15e+75: tmp = x * 2.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 (t <= -2.95e-145) tmp = Float64(-9.0 * Float64(t * Float64(y * z))); elseif (t <= 1.5e-299) tmp = Float64(b * Float64(a * 27.0)); elseif (t <= 1.15e+75) tmp = Float64(x * 2.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 (t <= -2.95e-145)
tmp = -9.0 * (t * (y * z));
elseif (t <= 1.5e-299)
tmp = b * (a * 27.0);
elseif (t <= 1.15e+75)
tmp = x * 2.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[LessEqual[t, -2.95e-145], N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e-299], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+75], N[(x * 2.0), $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}\;t \leq -2.95 \cdot 10^{-145}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{-299}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+75}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if t < -2.9499999999999999e-145Initial program 93.5%
+-commutative93.5%
associate-+r-93.5%
*-commutative93.5%
cancel-sign-sub-inv93.5%
associate-*r*94.2%
distribute-lft-neg-in94.2%
*-commutative94.2%
cancel-sign-sub-inv94.2%
associate-+r-94.2%
associate-*l*95.2%
fma-define95.2%
cancel-sign-sub-inv95.2%
fma-define95.2%
distribute-lft-neg-in95.2%
distribute-rgt-neg-in95.2%
*-commutative95.2%
associate-*r*94.4%
associate-*l*94.5%
neg-mul-194.5%
associate-*r*94.5%
Simplified94.5%
Taylor expanded in t around inf 38.0%
if -2.9499999999999999e-145 < t < 1.49999999999999992e-299Initial program 85.0%
+-commutative85.0%
associate-+r-85.0%
*-commutative85.0%
cancel-sign-sub-inv85.0%
associate-*r*96.0%
distribute-lft-neg-in96.0%
*-commutative96.0%
cancel-sign-sub-inv96.0%
associate-+r-96.0%
associate-*l*99.8%
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.8%
associate-*l*89.0%
neg-mul-189.0%
associate-*r*89.0%
Simplified89.0%
Taylor expanded in t around 0 88.7%
Taylor expanded in x around 0 55.3%
associate-*r*55.2%
*-commutative55.2%
Simplified55.2%
if 1.49999999999999992e-299 < t < 1.1499999999999999e75Initial program 94.8%
+-commutative94.8%
associate-+r-94.8%
*-commutative94.8%
cancel-sign-sub-inv94.8%
associate-*r*97.5%
distribute-lft-neg-in97.5%
*-commutative97.5%
cancel-sign-sub-inv97.5%
associate-+r-97.5%
associate-*l*97.5%
fma-define97.5%
cancel-sign-sub-inv97.5%
fma-define97.5%
distribute-lft-neg-in97.5%
distribute-rgt-neg-in97.5%
*-commutative97.5%
associate-*r*94.8%
associate-*l*94.8%
neg-mul-194.8%
associate-*r*94.8%
Simplified94.8%
Taylor expanded in t around 0 74.6%
Taylor expanded in x around inf 46.2%
if 1.1499999999999999e75 < t Initial program 97.7%
+-commutative97.7%
associate-+r-97.7%
*-commutative97.7%
cancel-sign-sub-inv97.7%
associate-*r*93.7%
distribute-lft-neg-in93.7%
*-commutative93.7%
cancel-sign-sub-inv93.7%
associate-+r-93.7%
associate-*l*93.7%
fma-define95.8%
cancel-sign-sub-inv95.8%
fma-define95.8%
distribute-lft-neg-in95.8%
distribute-rgt-neg-in95.8%
*-commutative95.8%
associate-*r*99.9%
associate-*l*99.9%
neg-mul-199.9%
associate-*r*99.9%
Simplified99.9%
Taylor expanded in t around inf 71.8%
*-commutative71.8%
associate-*r*71.8%
associate-*l*71.8%
Simplified71.8%
Taylor expanded in y around 0 71.8%
Final simplification48.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* -9.0 (* t (* y z)))))
(if (<= t -2.75e-145)
t_1
(if (<= t 1.65e-299)
(* b (* a 27.0))
(if (<= t 1.15e+75) (* x 2.0) 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 * (t * (y * z));
double tmp;
if (t <= -2.75e-145) {
tmp = t_1;
} else if (t <= 1.65e-299) {
tmp = b * (a * 27.0);
} else if (t <= 1.15e+75) {
tmp = x * 2.0;
} 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) * (t * (y * z))
if (t <= (-2.75d-145)) then
tmp = t_1
else if (t <= 1.65d-299) then
tmp = b * (a * 27.0d0)
else if (t <= 1.15d+75) then
tmp = x * 2.0d0
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 * (t * (y * z));
double tmp;
if (t <= -2.75e-145) {
tmp = t_1;
} else if (t <= 1.65e-299) {
tmp = b * (a * 27.0);
} else if (t <= 1.15e+75) {
tmp = x * 2.0;
} 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 * (t * (y * z)) tmp = 0 if t <= -2.75e-145: tmp = t_1 elif t <= 1.65e-299: tmp = b * (a * 27.0) elif t <= 1.15e+75: tmp = x * 2.0 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(-9.0 * Float64(t * Float64(y * z))) tmp = 0.0 if (t <= -2.75e-145) tmp = t_1; elseif (t <= 1.65e-299) tmp = Float64(b * Float64(a * 27.0)); elseif (t <= 1.15e+75) tmp = Float64(x * 2.0); 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 * (t * (y * z));
tmp = 0.0;
if (t <= -2.75e-145)
tmp = t_1;
elseif (t <= 1.65e-299)
tmp = b * (a * 27.0);
elseif (t <= 1.15e+75)
tmp = x * 2.0;
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[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.75e-145], t$95$1, If[LessEqual[t, 1.65e-299], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+75], N[(x * 2.0), $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(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;t \leq -2.75 \cdot 10^{-145}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{-299}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+75}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.75000000000000008e-145 or 1.1499999999999999e75 < t Initial program 94.8%
+-commutative94.8%
associate-+r-94.8%
*-commutative94.8%
cancel-sign-sub-inv94.8%
associate-*r*94.1%
distribute-lft-neg-in94.1%
*-commutative94.1%
cancel-sign-sub-inv94.1%
associate-+r-94.1%
associate-*l*94.7%
fma-define95.4%
cancel-sign-sub-inv95.4%
fma-define95.4%
distribute-lft-neg-in95.4%
distribute-rgt-neg-in95.4%
*-commutative95.4%
associate-*r*96.1%
associate-*l*96.2%
neg-mul-196.2%
associate-*r*96.2%
Simplified96.2%
Taylor expanded in t around inf 48.5%
if -2.75000000000000008e-145 < t < 1.6500000000000001e-299Initial program 85.0%
+-commutative85.0%
associate-+r-85.0%
*-commutative85.0%
cancel-sign-sub-inv85.0%
associate-*r*96.0%
distribute-lft-neg-in96.0%
*-commutative96.0%
cancel-sign-sub-inv96.0%
associate-+r-96.0%
associate-*l*99.8%
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.8%
associate-*l*89.0%
neg-mul-189.0%
associate-*r*89.0%
Simplified89.0%
Taylor expanded in t around 0 88.7%
Taylor expanded in x around 0 55.3%
associate-*r*55.2%
*-commutative55.2%
Simplified55.2%
if 1.6500000000000001e-299 < t < 1.1499999999999999e75Initial program 94.8%
+-commutative94.8%
associate-+r-94.8%
*-commutative94.8%
cancel-sign-sub-inv94.8%
associate-*r*97.5%
distribute-lft-neg-in97.5%
*-commutative97.5%
cancel-sign-sub-inv97.5%
associate-+r-97.5%
associate-*l*97.5%
fma-define97.5%
cancel-sign-sub-inv97.5%
fma-define97.5%
distribute-lft-neg-in97.5%
distribute-rgt-neg-in97.5%
*-commutative97.5%
associate-*r*94.8%
associate-*l*94.8%
neg-mul-194.8%
associate-*r*94.8%
Simplified94.8%
Taylor expanded in t around 0 74.6%
Taylor expanded in x around inf 46.2%
Final simplification48.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 (<= z -1.12e-190) (+ (- (* x 2.0) (* (* y 9.0) (* z t))) (* a (* 27.0 b))) (+ (- (* x 2.0) (* (* (* y 9.0) z) 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 <= -1.12e-190) {
tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
} else {
tmp = ((x * 2.0) - (((y * 9.0) * z) * 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 <= (-1.12d-190)) then
tmp = ((x * 2.0d0) - ((y * 9.0d0) * (z * t))) + (a * (27.0d0 * b))
else
tmp = ((x * 2.0d0) - (((y * 9.0d0) * z) * 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 <= -1.12e-190) {
tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
} else {
tmp = ((x * 2.0) - (((y * 9.0) * z) * 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 <= -1.12e-190: tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b)) else: tmp = ((x * 2.0) - (((y * 9.0) * z) * 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 <= -1.12e-190) tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(z * t))) + Float64(a * Float64(27.0 * b))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * 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 <= -1.12e-190)
tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
else
tmp = ((x * 2.0) - (((y * 9.0) * z) * 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, -1.12e-190], 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], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $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 -1.12 \cdot 10^{-190}:\\
\;\;\;\;\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if z < -1.12000000000000005e-190Initial program 91.7%
sub-neg91.7%
sub-neg91.7%
associate-*l*92.5%
associate-*l*92.5%
Simplified92.5%
if -1.12000000000000005e-190 < z Initial program 95.3%
Final simplification94.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 -3.6e-49)
(- (* x 2.0) (* 9.0 (* z (* y t))))
(if (<= z 5e-177)
(+ (* x 2.0) (* 27.0 (* a b)))
(- (* x 2.0) (* (* (* y 9.0) z) t)))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.6e-49) {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
} else if (z <= 5e-177) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (((y * 9.0) * z) * t);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-3.6d-49)) then
tmp = (x * 2.0d0) - (9.0d0 * (z * (y * t)))
else if (z <= 5d-177) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = (x * 2.0d0) - (((y * 9.0d0) * z) * t)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.6e-49) {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
} else if (z <= 5e-177) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (((y * 9.0) * z) * t);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -3.6e-49: tmp = (x * 2.0) - (9.0 * (z * (y * t))) elif z <= 5e-177: tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = (x * 2.0) - (((y * 9.0) * z) * t) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.6e-49) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(z * Float64(y * t)))); elseif (z <= 5e-177) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -3.6e-49)
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
elseif (z <= 5e-177)
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = (x * 2.0) - (((y * 9.0) * z) * t);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.6e-49], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e-177], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $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.6 \cdot 10^{-49}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-177}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\\
\end{array}
\end{array}
if z < -3.5999999999999997e-49Initial program 89.0%
sub-neg89.0%
sub-neg89.0%
associate-*l*90.1%
associate-*l*90.2%
Simplified90.2%
Taylor expanded in a around 0 72.8%
pow172.8%
Applied egg-rr72.8%
unpow172.8%
associate-*r*79.9%
Simplified79.9%
if -3.5999999999999997e-49 < z < 5e-177Initial program 97.1%
+-commutative97.1%
associate-+r-97.1%
*-commutative97.1%
cancel-sign-sub-inv97.1%
associate-*r*89.1%
distribute-lft-neg-in89.1%
*-commutative89.1%
cancel-sign-sub-inv89.1%
associate-+r-89.1%
associate-*l*90.4%
fma-define90.4%
cancel-sign-sub-inv90.4%
fma-define90.4%
distribute-lft-neg-in90.4%
distribute-rgt-neg-in90.4%
*-commutative90.4%
associate-*r*98.4%
associate-*l*98.5%
neg-mul-198.5%
associate-*r*98.5%
Simplified98.5%
Taylor expanded in t around 0 85.0%
if 5e-177 < z Initial program 95.1%
sub-neg95.1%
sub-neg95.1%
associate-*l*92.6%
associate-*l*93.6%
Simplified93.6%
Taylor expanded in a around 0 71.5%
pow171.5%
Applied egg-rr71.5%
unpow171.5%
associate-*r*70.6%
*-commutative70.6%
associate-*r*71.4%
*-commutative71.4%
associate-*r*71.4%
Simplified71.4%
Final simplification77.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.05e-47)
(- (* x 2.0) (* 9.0 (* z (* y t))))
(if (<= z 3.1e-178)
(+ (* x 2.0) (* 27.0 (* a b)))
(- (* x 2.0) (* 9.0 (* t (* y z)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.05e-47) {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
} else if (z <= 3.1e-178) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.05d-47)) then
tmp = (x * 2.0d0) - (9.0d0 * (z * (y * t)))
else if (z <= 3.1d-178) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = (x * 2.0d0) - (9.0d0 * (t * (y * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.05e-47) {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
} else if (z <= 3.1e-178) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -1.05e-47: tmp = (x * 2.0) - (9.0 * (z * (y * t))) elif z <= 3.1e-178: tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = (x * 2.0) - (9.0 * (t * (y * z))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.05e-47) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(z * Float64(y * t)))); elseif (z <= 3.1e-178) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(y * z)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -1.05e-47)
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
elseif (z <= 3.1e-178)
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.05e-47], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1e-178], 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.05 \cdot 10^{-47}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-178}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -1.05e-47Initial program 88.8%
sub-neg88.8%
sub-neg88.8%
associate-*l*90.0%
associate-*l*90.0%
Simplified90.0%
Taylor expanded in a around 0 72.4%
pow172.4%
Applied egg-rr72.4%
unpow172.4%
associate-*r*79.6%
Simplified79.6%
if -1.05e-47 < z < 3.1e-178Initial program 97.2%
+-commutative97.2%
associate-+r-97.2%
*-commutative97.2%
cancel-sign-sub-inv97.2%
associate-*r*89.2%
distribute-lft-neg-in89.2%
*-commutative89.2%
cancel-sign-sub-inv89.2%
associate-+r-89.2%
associate-*l*90.5%
fma-define90.5%
cancel-sign-sub-inv90.5%
fma-define90.5%
distribute-lft-neg-in90.5%
distribute-rgt-neg-in90.5%
*-commutative90.5%
associate-*r*98.5%
associate-*l*98.5%
neg-mul-198.5%
associate-*r*98.5%
Simplified98.5%
Taylor expanded in t around 0 85.2%
if 3.1e-178 < z Initial program 95.1%
sub-neg95.1%
sub-neg95.1%
associate-*l*92.6%
associate-*l*93.6%
Simplified93.6%
Taylor expanded in a around 0 71.5%
Final simplification77.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 (<= t -1.7e-165)
(* (* z t) (* y -9.0))
(if (<= t 6.8e+86)
(+ (* 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 (t <= -1.7e-165) {
tmp = (z * t) * (y * -9.0);
} else if (t <= 6.8e+86) {
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 (t <= (-1.7d-165)) then
tmp = (z * t) * (y * (-9.0d0))
else if (t <= 6.8d+86) 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 (t <= -1.7e-165) {
tmp = (z * t) * (y * -9.0);
} else if (t <= 6.8e+86) {
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 t <= -1.7e-165: tmp = (z * t) * (y * -9.0) elif t <= 6.8e+86: 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 (t <= -1.7e-165) tmp = Float64(Float64(z * t) * Float64(y * -9.0)); elseif (t <= 6.8e+86) 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 (t <= -1.7e-165)
tmp = (z * t) * (y * -9.0);
elseif (t <= 6.8e+86)
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[t, -1.7e-165], N[(N[(z * t), $MachinePrecision] * N[(y * -9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.8e+86], 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}\;t \leq -1.7 \cdot 10^{-165}:\\
\;\;\;\;\left(z \cdot t\right) \cdot \left(y \cdot -9\right)\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{+86}:\\
\;\;\;\;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 t < -1.7e-165Initial program 92.7%
+-commutative92.7%
associate-+r-92.7%
*-commutative92.7%
cancel-sign-sub-inv92.7%
associate-*r*94.3%
distribute-lft-neg-in94.3%
*-commutative94.3%
cancel-sign-sub-inv94.3%
associate-+r-94.3%
associate-*l*95.2%
fma-define95.2%
cancel-sign-sub-inv95.2%
fma-define95.2%
distribute-lft-neg-in95.2%
distribute-rgt-neg-in95.2%
*-commutative95.2%
associate-*r*93.6%
associate-*l*93.7%
neg-mul-193.7%
associate-*r*93.7%
Simplified93.7%
Taylor expanded in t around inf 37.7%
*-commutative37.7%
associate-*l*38.4%
associate-*l*38.4%
*-commutative38.4%
*-commutative38.4%
*-commutative38.4%
Simplified38.4%
if -1.7e-165 < t < 6.7999999999999995e86Initial program 93.3%
+-commutative93.3%
associate-+r-93.3%
*-commutative93.3%
cancel-sign-sub-inv93.3%
associate-*r*97.1%
distribute-lft-neg-in97.1%
*-commutative97.1%
cancel-sign-sub-inv97.1%
associate-+r-97.1%
associate-*l*98.1%
fma-define98.1%
cancel-sign-sub-inv98.1%
fma-define98.1%
distribute-lft-neg-in98.1%
distribute-rgt-neg-in98.1%
*-commutative98.1%
associate-*r*94.3%
associate-*l*94.3%
neg-mul-194.3%
associate-*r*94.3%
Simplified94.3%
Taylor expanded in t around 0 79.4%
if 6.7999999999999995e86 < t Initial program 97.6%
sub-neg97.6%
sub-neg97.6%
associate-*l*89.8%
associate-*l*89.9%
Simplified89.9%
Taylor expanded in a around 0 83.1%
Final simplification62.9%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= z -9.2e-20) (not (<= z 1.65e+18))) (* (* z t) (* y -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 <= -9.2e-20) || !(z <= 1.65e+18)) {
tmp = (z * t) * (y * -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 <= (-9.2d-20)) .or. (.not. (z <= 1.65d+18))) then
tmp = (z * t) * (y * (-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 <= -9.2e-20) || !(z <= 1.65e+18)) {
tmp = (z * t) * (y * -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 <= -9.2e-20) or not (z <= 1.65e+18): tmp = (z * t) * (y * -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 <= -9.2e-20) || !(z <= 1.65e+18)) tmp = Float64(Float64(z * t) * Float64(y * -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 <= -9.2e-20) || ~((z <= 1.65e+18)))
tmp = (z * t) * (y * -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[Or[LessEqual[z, -9.2e-20], N[Not[LessEqual[z, 1.65e+18]], $MachinePrecision]], N[(N[(z * t), $MachinePrecision] * N[(y * -9.0), $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 -9.2 \cdot 10^{-20} \lor \neg \left(z \leq 1.65 \cdot 10^{+18}\right):\\
\;\;\;\;\left(z \cdot t\right) \cdot \left(y \cdot -9\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if z < -9.1999999999999997e-20 or 1.65e18 < z Initial program 91.4%
+-commutative91.4%
associate-+r-91.4%
*-commutative91.4%
cancel-sign-sub-inv91.4%
associate-*r*98.4%
distribute-lft-neg-in98.4%
*-commutative98.4%
cancel-sign-sub-inv98.4%
associate-+r-98.4%
associate-*l*98.5%
fma-define99.2%
cancel-sign-sub-inv99.2%
fma-define99.2%
distribute-lft-neg-in99.2%
distribute-rgt-neg-in99.2%
*-commutative99.2%
associate-*r*92.2%
associate-*l*92.3%
neg-mul-192.3%
associate-*r*92.3%
Simplified92.3%
Taylor expanded in t around inf 54.1%
*-commutative54.1%
associate-*l*53.4%
associate-*l*53.4%
*-commutative53.4%
*-commutative53.4%
*-commutative53.4%
Simplified53.4%
if -9.1999999999999997e-20 < z < 1.65e18Initial program 96.6%
+-commutative96.6%
associate-+r-96.6%
*-commutative96.6%
cancel-sign-sub-inv96.6%
associate-*r*91.7%
distribute-lft-neg-in91.7%
*-commutative91.7%
cancel-sign-sub-inv91.7%
associate-+r-91.7%
associate-*l*93.4%
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*98.2%
associate-*l*98.2%
neg-mul-198.2%
associate-*r*98.2%
Simplified98.2%
Taylor expanded in t around 0 81.2%
Final simplification66.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 (+ (- (* x 2.0) (* (* y 9.0) (* z t))) (* a (* 27.0 b))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * 2.0d0) - ((y * 9.0d0) * (z * t))) + (a * (27.0d0 * b))
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): return ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b))
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(z * t))) + Float64(a * Float64(27.0 * b))) end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)
\end{array}
Initial program 93.8%
sub-neg93.8%
sub-neg93.8%
associate-*l*93.5%
associate-*l*94.3%
Simplified94.3%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= x -1.6e+52) (not (<= x 8.5e+57))) (* x 2.0) (* 27.0 (* a b))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -1.6e+52) || !(x <= 8.5e+57)) {
tmp = x * 2.0;
} else {
tmp = 27.0 * (a * b);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((x <= (-1.6d+52)) .or. (.not. (x <= 8.5d+57))) then
tmp = x * 2.0d0
else
tmp = 27.0d0 * (a * b)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -1.6e+52) || !(x <= 8.5e+57)) {
tmp = x * 2.0;
} else {
tmp = 27.0 * (a * b);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (x <= -1.6e+52) or not (x <= 8.5e+57): tmp = x * 2.0 else: tmp = 27.0 * (a * b) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((x <= -1.6e+52) || !(x <= 8.5e+57)) tmp = Float64(x * 2.0); else tmp = Float64(27.0 * Float64(a * b)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((x <= -1.6e+52) || ~((x <= 8.5e+57)))
tmp = x * 2.0;
else
tmp = 27.0 * (a * b);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -1.6e+52], N[Not[LessEqual[x, 8.5e+57]], $MachinePrecision]], N[(x * 2.0), $MachinePrecision], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.6 \cdot 10^{+52} \lor \neg \left(x \leq 8.5 \cdot 10^{+57}\right):\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if x < -1.6e52 or 8.5000000000000001e57 < x Initial program 92.3%
+-commutative92.3%
associate-+r-92.3%
*-commutative92.3%
cancel-sign-sub-inv92.3%
associate-*r*95.2%
distribute-lft-neg-in95.2%
*-commutative95.2%
cancel-sign-sub-inv95.2%
associate-+r-95.2%
associate-*l*97.1%
fma-define98.1%
cancel-sign-sub-inv98.1%
fma-define98.1%
distribute-lft-neg-in98.1%
distribute-rgt-neg-in98.1%
*-commutative98.1%
associate-*r*95.2%
associate-*l*95.3%
neg-mul-195.3%
associate-*r*95.3%
Simplified95.3%
Taylor expanded in t around 0 69.6%
Taylor expanded in x around inf 57.4%
if -1.6e52 < x < 8.5000000000000001e57Initial program 94.8%
+-commutative94.8%
associate-+r-94.8%
*-commutative94.8%
cancel-sign-sub-inv94.8%
associate-*r*95.4%
distribute-lft-neg-in95.4%
*-commutative95.4%
cancel-sign-sub-inv95.4%
associate-+r-95.4%
associate-*l*95.4%
fma-define95.4%
cancel-sign-sub-inv95.4%
fma-define95.4%
distribute-lft-neg-in95.4%
distribute-rgt-neg-in95.4%
*-commutative95.4%
associate-*r*94.8%
associate-*l*94.9%
neg-mul-194.9%
associate-*r*94.9%
Simplified94.9%
Taylor expanded in a around inf 45.2%
Final simplification50.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 (* x 2.0))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * 2.0d0
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): return x * 2.0
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(x * 2.0) end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
tmp = x * 2.0;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := N[(x * 2.0), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
x \cdot 2
\end{array}
Initial program 93.8%
+-commutative93.8%
associate-+r-93.8%
*-commutative93.8%
cancel-sign-sub-inv93.8%
associate-*r*95.3%
distribute-lft-neg-in95.3%
*-commutative95.3%
cancel-sign-sub-inv95.3%
associate-+r-95.3%
associate-*l*96.1%
fma-define96.5%
cancel-sign-sub-inv96.5%
fma-define96.5%
distribute-lft-neg-in96.5%
distribute-rgt-neg-in96.5%
*-commutative96.5%
associate-*r*95.0%
associate-*l*95.1%
neg-mul-195.1%
associate-*r*95.1%
Simplified95.1%
Taylor expanded in t around 0 61.5%
Taylor expanded in x around inf 31.0%
Final simplification31.0%
(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 2024181
(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)))