
(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 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= (* (* y 9.0) z) 5e+251) (+ (- (* x 2.0) (* (* 9.0 (* y z)) t)) (* (* a 27.0) b)) (+ (* (* z t) (* y -9.0)) (* x 2.0))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((y * 9.0) * z) <= 5e+251) {
tmp = ((x * 2.0) - ((9.0 * (y * z)) * t)) + ((a * 27.0) * b);
} else {
tmp = ((z * t) * (y * -9.0)) + (x * 2.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (((y * 9.0d0) * z) <= 5d+251) then
tmp = ((x * 2.0d0) - ((9.0d0 * (y * z)) * t)) + ((a * 27.0d0) * b)
else
tmp = ((z * t) * (y * (-9.0d0))) + (x * 2.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((y * 9.0) * z) <= 5e+251) {
tmp = ((x * 2.0) - ((9.0 * (y * z)) * t)) + ((a * 27.0) * b);
} else {
tmp = ((z * t) * (y * -9.0)) + (x * 2.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if ((y * 9.0) * z) <= 5e+251: tmp = ((x * 2.0) - ((9.0 * (y * z)) * t)) + ((a * 27.0) * b) else: tmp = ((z * t) * (y * -9.0)) + (x * 2.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(y * 9.0) * z) <= 5e+251) tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(9.0 * Float64(y * z)) * t)) + Float64(Float64(a * 27.0) * b)); else tmp = Float64(Float64(Float64(z * t) * Float64(y * -9.0)) + Float64(x * 2.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (((y * 9.0) * z) <= 5e+251)
tmp = ((x * 2.0) - ((9.0 * (y * z)) * t)) + ((a * 27.0) * b);
else
tmp = ((z * t) * (y * -9.0)) + (x * 2.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision], 5e+251], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * t), $MachinePrecision] * N[(y * -9.0), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(y \cdot 9\right) \cdot z \leq 5 \cdot 10^{+251}:\\
\;\;\;\;\left(x \cdot 2 - \left(9 \cdot \left(y \cdot z\right)\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot t\right) \cdot \left(y \cdot -9\right) + x \cdot 2\\
\end{array}
\end{array}
if (*.f64 (*.f64 y #s(literal 9 binary64)) z) < 5.0000000000000005e251Initial program 97.7%
Taylor expanded in y around 0 97.7%
if 5.0000000000000005e251 < (*.f64 (*.f64 y #s(literal 9 binary64)) z) Initial program 76.1%
sub-neg76.1%
sub-neg76.1%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in a around 0 76.0%
cancel-sign-sub-inv76.0%
*-commutative76.0%
metadata-eval76.0%
*-commutative76.0%
associate-*r*76.0%
associate-*l*76.1%
*-commutative76.1%
*-commutative76.1%
associate-*r*90.0%
*-commutative90.0%
Applied egg-rr90.0%
Final simplification97.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* -9.0 (* (* y z) t))))
(if (<= a -2.05e+64)
(* a (* 27.0 b))
(if (<= a -28.0)
t_1
(if (<= a -3.5e-54)
(* x 2.0)
(if (<= a -1.35e-134)
t_1
(if (<= a 1.35e-291)
(* x 2.0)
(if (<= a 3.4e-8) t_1 (* (* a 27.0) b)))))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -9.0 * ((y * z) * t);
double tmp;
if (a <= -2.05e+64) {
tmp = a * (27.0 * b);
} else if (a <= -28.0) {
tmp = t_1;
} else if (a <= -3.5e-54) {
tmp = x * 2.0;
} else if (a <= -1.35e-134) {
tmp = t_1;
} else if (a <= 1.35e-291) {
tmp = x * 2.0;
} else if (a <= 3.4e-8) {
tmp = t_1;
} else {
tmp = (a * 27.0) * b;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (-9.0d0) * ((y * z) * t)
if (a <= (-2.05d+64)) then
tmp = a * (27.0d0 * b)
else if (a <= (-28.0d0)) then
tmp = t_1
else if (a <= (-3.5d-54)) then
tmp = x * 2.0d0
else if (a <= (-1.35d-134)) then
tmp = t_1
else if (a <= 1.35d-291) then
tmp = x * 2.0d0
else if (a <= 3.4d-8) then
tmp = t_1
else
tmp = (a * 27.0d0) * b
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -9.0 * ((y * z) * t);
double tmp;
if (a <= -2.05e+64) {
tmp = a * (27.0 * b);
} else if (a <= -28.0) {
tmp = t_1;
} else if (a <= -3.5e-54) {
tmp = x * 2.0;
} else if (a <= -1.35e-134) {
tmp = t_1;
} else if (a <= 1.35e-291) {
tmp = x * 2.0;
} else if (a <= 3.4e-8) {
tmp = t_1;
} else {
tmp = (a * 27.0) * b;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = -9.0 * ((y * z) * t) tmp = 0 if a <= -2.05e+64: tmp = a * (27.0 * b) elif a <= -28.0: tmp = t_1 elif a <= -3.5e-54: tmp = x * 2.0 elif a <= -1.35e-134: tmp = t_1 elif a <= 1.35e-291: tmp = x * 2.0 elif a <= 3.4e-8: tmp = t_1 else: tmp = (a * 27.0) * b return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(-9.0 * Float64(Float64(y * z) * t)) tmp = 0.0 if (a <= -2.05e+64) tmp = Float64(a * Float64(27.0 * b)); elseif (a <= -28.0) tmp = t_1; elseif (a <= -3.5e-54) tmp = Float64(x * 2.0); elseif (a <= -1.35e-134) tmp = t_1; elseif (a <= 1.35e-291) tmp = Float64(x * 2.0); elseif (a <= 3.4e-8) tmp = t_1; else tmp = Float64(Float64(a * 27.0) * b); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = -9.0 * ((y * z) * t);
tmp = 0.0;
if (a <= -2.05e+64)
tmp = a * (27.0 * b);
elseif (a <= -28.0)
tmp = t_1;
elseif (a <= -3.5e-54)
tmp = x * 2.0;
elseif (a <= -1.35e-134)
tmp = t_1;
elseif (a <= 1.35e-291)
tmp = x * 2.0;
elseif (a <= 3.4e-8)
tmp = t_1;
else
tmp = (a * 27.0) * b;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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[(N[(y * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.05e+64], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -28.0], t$95$1, If[LessEqual[a, -3.5e-54], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, -1.35e-134], t$95$1, If[LessEqual[a, 1.35e-291], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, 3.4e-8], t$95$1, N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := -9 \cdot \left(\left(y \cdot z\right) \cdot t\right)\\
\mathbf{if}\;a \leq -2.05 \cdot 10^{+64}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;a \leq -28:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -3.5 \cdot 10^{-54}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;a \leq -1.35 \cdot 10^{-134}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{-291}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot 27\right) \cdot b\\
\end{array}
\end{array}
if a < -2.04999999999999989e64Initial program 93.3%
sub-neg93.3%
sub-neg93.3%
associate-*l*95.4%
associate-*l*95.5%
Simplified95.5%
Taylor expanded in a around inf 61.3%
*-commutative61.3%
associate-*r*61.3%
Simplified61.3%
if -2.04999999999999989e64 < a < -28 or -3.49999999999999982e-54 < a < -1.3499999999999999e-134 or 1.34999999999999996e-291 < a < 3.4e-8Initial program 95.9%
sub-neg95.9%
sub-neg95.9%
associate-*l*96.9%
associate-*l*96.9%
Simplified96.9%
Taylor expanded in y around inf 50.3%
if -28 < a < -3.49999999999999982e-54 or -1.3499999999999999e-134 < a < 1.34999999999999996e-291Initial program 95.6%
sub-neg95.6%
sub-neg95.6%
associate-*l*94.0%
associate-*l*94.1%
Simplified94.1%
Taylor expanded in x around inf 43.2%
if 3.4e-8 < a Initial program 98.4%
sub-neg98.4%
sub-neg98.4%
associate-*l*96.9%
associate-*l*96.9%
Simplified96.9%
Taylor expanded in y around 0 75.7%
Taylor expanded in b around inf 64.1%
Taylor expanded in x around 0 54.0%
Final simplification51.9%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (* (* y z) -9.0))))
(if (<= a -2.6e+64)
(* a (* 27.0 b))
(if (<= a -60.0)
t_1
(if (<= a -1.28e-58)
(* x 2.0)
(if (<= a -4e-135)
t_1
(if (<= a 1.6e-295)
(* x 2.0)
(if (<= a 7.8e-10) t_1 (* (* a 27.0) b)))))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * ((y * z) * -9.0);
double tmp;
if (a <= -2.6e+64) {
tmp = a * (27.0 * b);
} else if (a <= -60.0) {
tmp = t_1;
} else if (a <= -1.28e-58) {
tmp = x * 2.0;
} else if (a <= -4e-135) {
tmp = t_1;
} else if (a <= 1.6e-295) {
tmp = x * 2.0;
} else if (a <= 7.8e-10) {
tmp = t_1;
} else {
tmp = (a * 27.0) * b;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 = t * ((y * z) * (-9.0d0))
if (a <= (-2.6d+64)) then
tmp = a * (27.0d0 * b)
else if (a <= (-60.0d0)) then
tmp = t_1
else if (a <= (-1.28d-58)) then
tmp = x * 2.0d0
else if (a <= (-4d-135)) then
tmp = t_1
else if (a <= 1.6d-295) then
tmp = x * 2.0d0
else if (a <= 7.8d-10) then
tmp = t_1
else
tmp = (a * 27.0d0) * b
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * ((y * z) * -9.0);
double tmp;
if (a <= -2.6e+64) {
tmp = a * (27.0 * b);
} else if (a <= -60.0) {
tmp = t_1;
} else if (a <= -1.28e-58) {
tmp = x * 2.0;
} else if (a <= -4e-135) {
tmp = t_1;
} else if (a <= 1.6e-295) {
tmp = x * 2.0;
} else if (a <= 7.8e-10) {
tmp = t_1;
} else {
tmp = (a * 27.0) * b;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = t * ((y * z) * -9.0) tmp = 0 if a <= -2.6e+64: tmp = a * (27.0 * b) elif a <= -60.0: tmp = t_1 elif a <= -1.28e-58: tmp = x * 2.0 elif a <= -4e-135: tmp = t_1 elif a <= 1.6e-295: tmp = x * 2.0 elif a <= 7.8e-10: tmp = t_1 else: tmp = (a * 27.0) * b return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(Float64(y * z) * -9.0)) tmp = 0.0 if (a <= -2.6e+64) tmp = Float64(a * Float64(27.0 * b)); elseif (a <= -60.0) tmp = t_1; elseif (a <= -1.28e-58) tmp = Float64(x * 2.0); elseif (a <= -4e-135) tmp = t_1; elseif (a <= 1.6e-295) tmp = Float64(x * 2.0); elseif (a <= 7.8e-10) tmp = t_1; else tmp = Float64(Float64(a * 27.0) * b); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = t * ((y * z) * -9.0);
tmp = 0.0;
if (a <= -2.6e+64)
tmp = a * (27.0 * b);
elseif (a <= -60.0)
tmp = t_1;
elseif (a <= -1.28e-58)
tmp = x * 2.0;
elseif (a <= -4e-135)
tmp = t_1;
elseif (a <= 1.6e-295)
tmp = x * 2.0;
elseif (a <= 7.8e-10)
tmp = t_1;
else
tmp = (a * 27.0) * b;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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[(t * N[(N[(y * z), $MachinePrecision] * -9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.6e+64], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -60.0], t$95$1, If[LessEqual[a, -1.28e-58], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, -4e-135], t$95$1, If[LessEqual[a, 1.6e-295], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, 7.8e-10], t$95$1, N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(\left(y \cdot z\right) \cdot -9\right)\\
\mathbf{if}\;a \leq -2.6 \cdot 10^{+64}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;a \leq -60:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.28 \cdot 10^{-58}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;a \leq -4 \cdot 10^{-135}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{-295}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;a \leq 7.8 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot 27\right) \cdot b\\
\end{array}
\end{array}
if a < -2.59999999999999997e64Initial program 93.3%
sub-neg93.3%
sub-neg93.3%
associate-*l*95.4%
associate-*l*95.5%
Simplified95.5%
Taylor expanded in a around inf 61.3%
*-commutative61.3%
associate-*r*61.3%
Simplified61.3%
if -2.59999999999999997e64 < a < -60 or -1.28e-58 < a < -4.0000000000000002e-135 or 1.6e-295 < a < 7.7999999999999999e-10Initial program 96.0%
Taylor expanded in y around 0 96.0%
Taylor expanded in y around inf 49.8%
*-commutative49.8%
associate-*r*49.8%
*-commutative49.8%
*-commutative49.8%
associate-*l*49.8%
Simplified49.8%
Taylor expanded in y around 0 49.8%
if -60 < a < -1.28e-58 or -4.0000000000000002e-135 < a < 1.6e-295Initial program 95.5%
sub-neg95.5%
sub-neg95.5%
associate-*l*93.9%
associate-*l*94.0%
Simplified94.0%
Taylor expanded in x around inf 42.0%
if 7.7999999999999999e-10 < a Initial program 98.4%
sub-neg98.4%
sub-neg98.4%
associate-*l*96.9%
associate-*l*96.9%
Simplified96.9%
Taylor expanded in y around 0 75.7%
Taylor expanded in b around inf 64.1%
Taylor expanded in x around 0 54.0%
Final simplification51.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (* (* y z) -9.0))))
(if (<= a -1.7e+64)
(* a (* 27.0 b))
(if (<= a -16.0)
(* t (* y (* z -9.0)))
(if (<= a -2.3e-54)
(* x 2.0)
(if (<= a -4.3e-135)
t_1
(if (<= a 5.2e-293)
(* x 2.0)
(if (<= a 8e-7) t_1 (* (* a 27.0) b)))))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * ((y * z) * -9.0);
double tmp;
if (a <= -1.7e+64) {
tmp = a * (27.0 * b);
} else if (a <= -16.0) {
tmp = t * (y * (z * -9.0));
} else if (a <= -2.3e-54) {
tmp = x * 2.0;
} else if (a <= -4.3e-135) {
tmp = t_1;
} else if (a <= 5.2e-293) {
tmp = x * 2.0;
} else if (a <= 8e-7) {
tmp = t_1;
} else {
tmp = (a * 27.0) * b;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 = t * ((y * z) * (-9.0d0))
if (a <= (-1.7d+64)) then
tmp = a * (27.0d0 * b)
else if (a <= (-16.0d0)) then
tmp = t * (y * (z * (-9.0d0)))
else if (a <= (-2.3d-54)) then
tmp = x * 2.0d0
else if (a <= (-4.3d-135)) then
tmp = t_1
else if (a <= 5.2d-293) then
tmp = x * 2.0d0
else if (a <= 8d-7) then
tmp = t_1
else
tmp = (a * 27.0d0) * b
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * ((y * z) * -9.0);
double tmp;
if (a <= -1.7e+64) {
tmp = a * (27.0 * b);
} else if (a <= -16.0) {
tmp = t * (y * (z * -9.0));
} else if (a <= -2.3e-54) {
tmp = x * 2.0;
} else if (a <= -4.3e-135) {
tmp = t_1;
} else if (a <= 5.2e-293) {
tmp = x * 2.0;
} else if (a <= 8e-7) {
tmp = t_1;
} else {
tmp = (a * 27.0) * b;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = t * ((y * z) * -9.0) tmp = 0 if a <= -1.7e+64: tmp = a * (27.0 * b) elif a <= -16.0: tmp = t * (y * (z * -9.0)) elif a <= -2.3e-54: tmp = x * 2.0 elif a <= -4.3e-135: tmp = t_1 elif a <= 5.2e-293: tmp = x * 2.0 elif a <= 8e-7: tmp = t_1 else: tmp = (a * 27.0) * b return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(Float64(y * z) * -9.0)) tmp = 0.0 if (a <= -1.7e+64) tmp = Float64(a * Float64(27.0 * b)); elseif (a <= -16.0) tmp = Float64(t * Float64(y * Float64(z * -9.0))); elseif (a <= -2.3e-54) tmp = Float64(x * 2.0); elseif (a <= -4.3e-135) tmp = t_1; elseif (a <= 5.2e-293) tmp = Float64(x * 2.0); elseif (a <= 8e-7) tmp = t_1; else tmp = Float64(Float64(a * 27.0) * b); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = t * ((y * z) * -9.0);
tmp = 0.0;
if (a <= -1.7e+64)
tmp = a * (27.0 * b);
elseif (a <= -16.0)
tmp = t * (y * (z * -9.0));
elseif (a <= -2.3e-54)
tmp = x * 2.0;
elseif (a <= -4.3e-135)
tmp = t_1;
elseif (a <= 5.2e-293)
tmp = x * 2.0;
elseif (a <= 8e-7)
tmp = t_1;
else
tmp = (a * 27.0) * b;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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[(t * N[(N[(y * z), $MachinePrecision] * -9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.7e+64], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -16.0], N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.3e-54], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, -4.3e-135], t$95$1, If[LessEqual[a, 5.2e-293], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, 8e-7], t$95$1, N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(\left(y \cdot z\right) \cdot -9\right)\\
\mathbf{if}\;a \leq -1.7 \cdot 10^{+64}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;a \leq -16:\\
\;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\mathbf{elif}\;a \leq -2.3 \cdot 10^{-54}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;a \leq -4.3 \cdot 10^{-135}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 5.2 \cdot 10^{-293}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;a \leq 8 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot 27\right) \cdot b\\
\end{array}
\end{array}
if a < -1.7000000000000001e64Initial program 93.3%
sub-neg93.3%
sub-neg93.3%
associate-*l*95.4%
associate-*l*95.5%
Simplified95.5%
Taylor expanded in a around inf 61.3%
*-commutative61.3%
associate-*r*61.3%
Simplified61.3%
if -1.7000000000000001e64 < a < -16Initial program 99.8%
Taylor expanded in y around 0 99.7%
Taylor expanded in y around inf 50.8%
*-commutative50.8%
associate-*r*50.8%
*-commutative50.8%
*-commutative50.8%
associate-*l*50.9%
Simplified50.9%
if -16 < a < -2.2999999999999999e-54 or -4.29999999999999999e-135 < a < 5.1999999999999996e-293Initial program 95.6%
sub-neg95.6%
sub-neg95.6%
associate-*l*94.0%
associate-*l*94.1%
Simplified94.1%
Taylor expanded in x around inf 43.2%
if -2.2999999999999999e-54 < a < -4.29999999999999999e-135 or 5.1999999999999996e-293 < a < 7.9999999999999996e-7Initial program 95.2%
Taylor expanded in y around 0 95.2%
Taylor expanded in y around inf 50.2%
*-commutative50.2%
associate-*r*50.2%
*-commutative50.2%
*-commutative50.2%
associate-*l*50.2%
Simplified50.2%
Taylor expanded in y around 0 50.2%
if 7.9999999999999996e-7 < a Initial program 98.4%
sub-neg98.4%
sub-neg98.4%
associate-*l*96.9%
associate-*l*96.9%
Simplified96.9%
Taylor expanded in y around 0 75.7%
Taylor expanded in b around inf 64.1%
Taylor expanded in x around 0 54.0%
Final simplification51.9%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (* (* y z) -9.0))))
(if (<= a -1.28e+64)
(* a (* 27.0 b))
(if (<= a -17.0)
(* t (* z (* y -9.0)))
(if (<= a -9.6e-56)
(* x 2.0)
(if (<= a -1.7e-134)
t_1
(if (<= a 1.06e-294)
(* x 2.0)
(if (<= a 1.85e-10) t_1 (* (* a 27.0) b)))))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * ((y * z) * -9.0);
double tmp;
if (a <= -1.28e+64) {
tmp = a * (27.0 * b);
} else if (a <= -17.0) {
tmp = t * (z * (y * -9.0));
} else if (a <= -9.6e-56) {
tmp = x * 2.0;
} else if (a <= -1.7e-134) {
tmp = t_1;
} else if (a <= 1.06e-294) {
tmp = x * 2.0;
} else if (a <= 1.85e-10) {
tmp = t_1;
} else {
tmp = (a * 27.0) * b;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 = t * ((y * z) * (-9.0d0))
if (a <= (-1.28d+64)) then
tmp = a * (27.0d0 * b)
else if (a <= (-17.0d0)) then
tmp = t * (z * (y * (-9.0d0)))
else if (a <= (-9.6d-56)) then
tmp = x * 2.0d0
else if (a <= (-1.7d-134)) then
tmp = t_1
else if (a <= 1.06d-294) then
tmp = x * 2.0d0
else if (a <= 1.85d-10) then
tmp = t_1
else
tmp = (a * 27.0d0) * b
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * ((y * z) * -9.0);
double tmp;
if (a <= -1.28e+64) {
tmp = a * (27.0 * b);
} else if (a <= -17.0) {
tmp = t * (z * (y * -9.0));
} else if (a <= -9.6e-56) {
tmp = x * 2.0;
} else if (a <= -1.7e-134) {
tmp = t_1;
} else if (a <= 1.06e-294) {
tmp = x * 2.0;
} else if (a <= 1.85e-10) {
tmp = t_1;
} else {
tmp = (a * 27.0) * b;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = t * ((y * z) * -9.0) tmp = 0 if a <= -1.28e+64: tmp = a * (27.0 * b) elif a <= -17.0: tmp = t * (z * (y * -9.0)) elif a <= -9.6e-56: tmp = x * 2.0 elif a <= -1.7e-134: tmp = t_1 elif a <= 1.06e-294: tmp = x * 2.0 elif a <= 1.85e-10: tmp = t_1 else: tmp = (a * 27.0) * b return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(Float64(y * z) * -9.0)) tmp = 0.0 if (a <= -1.28e+64) tmp = Float64(a * Float64(27.0 * b)); elseif (a <= -17.0) tmp = Float64(t * Float64(z * Float64(y * -9.0))); elseif (a <= -9.6e-56) tmp = Float64(x * 2.0); elseif (a <= -1.7e-134) tmp = t_1; elseif (a <= 1.06e-294) tmp = Float64(x * 2.0); elseif (a <= 1.85e-10) tmp = t_1; else tmp = Float64(Float64(a * 27.0) * b); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = t * ((y * z) * -9.0);
tmp = 0.0;
if (a <= -1.28e+64)
tmp = a * (27.0 * b);
elseif (a <= -17.0)
tmp = t * (z * (y * -9.0));
elseif (a <= -9.6e-56)
tmp = x * 2.0;
elseif (a <= -1.7e-134)
tmp = t_1;
elseif (a <= 1.06e-294)
tmp = x * 2.0;
elseif (a <= 1.85e-10)
tmp = t_1;
else
tmp = (a * 27.0) * b;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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[(t * N[(N[(y * z), $MachinePrecision] * -9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.28e+64], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -17.0], N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -9.6e-56], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, -1.7e-134], t$95$1, If[LessEqual[a, 1.06e-294], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, 1.85e-10], t$95$1, N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(\left(y \cdot z\right) \cdot -9\right)\\
\mathbf{if}\;a \leq -1.28 \cdot 10^{+64}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;a \leq -17:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\mathbf{elif}\;a \leq -9.6 \cdot 10^{-56}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;a \leq -1.7 \cdot 10^{-134}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.06 \cdot 10^{-294}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;a \leq 1.85 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot 27\right) \cdot b\\
\end{array}
\end{array}
if a < -1.28000000000000004e64Initial program 93.3%
sub-neg93.3%
sub-neg93.3%
associate-*l*95.4%
associate-*l*95.5%
Simplified95.5%
Taylor expanded in a around inf 61.3%
*-commutative61.3%
associate-*r*61.3%
Simplified61.3%
if -1.28000000000000004e64 < a < -17Initial program 99.8%
Taylor expanded in y around 0 99.7%
Taylor expanded in y around inf 50.8%
*-commutative50.8%
associate-*r*50.8%
*-commutative50.8%
*-commutative50.8%
associate-*l*50.9%
Simplified50.9%
Taylor expanded in y around 0 50.8%
associate-*r*50.9%
Simplified50.9%
if -17 < a < -9.60000000000000002e-56 or -1.69999999999999988e-134 < a < 1.0600000000000001e-294Initial program 95.5%
sub-neg95.5%
sub-neg95.5%
associate-*l*93.9%
associate-*l*94.0%
Simplified94.0%
Taylor expanded in x around inf 42.0%
if -9.60000000000000002e-56 < a < -1.69999999999999988e-134 or 1.0600000000000001e-294 < a < 1.85000000000000007e-10Initial program 95.2%
Taylor expanded in y around 0 95.2%
Taylor expanded in y around inf 49.6%
*-commutative49.6%
associate-*r*49.6%
*-commutative49.6%
*-commutative49.6%
associate-*l*49.6%
Simplified49.6%
Taylor expanded in y around 0 49.6%
if 1.85000000000000007e-10 < a Initial program 98.4%
sub-neg98.4%
sub-neg98.4%
associate-*l*96.9%
associate-*l*96.9%
Simplified96.9%
Taylor expanded in y around 0 75.7%
Taylor expanded in b around inf 64.1%
Taylor expanded in x around 0 54.0%
Final simplification51.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.4e-50) (not (<= z 7.6e-52))) (+ (* (* z t) (* y -9.0)) (* x 2.0)) (+ (* x 2.0) (* 27.0 (* a b)))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.4e-50) || !(z <= 7.6e-52)) {
tmp = ((z * t) * (y * -9.0)) + (x * 2.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.
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.4d-50)) .or. (.not. (z <= 7.6d-52))) then
tmp = ((z * t) * (y * (-9.0d0))) + (x * 2.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;
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.4e-50) || !(z <= 7.6e-52)) {
tmp = ((z * t) * (y * -9.0)) + (x * 2.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]) [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.4e-50) or not (z <= 7.6e-52): tmp = ((z * t) * (y * -9.0)) + (x * 2.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]) 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.4e-50) || !(z <= 7.6e-52)) tmp = Float64(Float64(Float64(z * t) * Float64(y * -9.0)) + Float64(x * 2.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])){:}
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.4e-50) || ~((z <= 7.6e-52)))
tmp = ((z * t) * (y * -9.0)) + (x * 2.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. 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, -3.4e-50], N[Not[LessEqual[z, 7.6e-52]], $MachinePrecision]], N[(N[(N[(z * t), $MachinePrecision] * N[(y * -9.0), $MachinePrecision]), $MachinePrecision] + N[(x * 2.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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{-50} \lor \neg \left(z \leq 7.6 \cdot 10^{-52}\right):\\
\;\;\;\;\left(z \cdot t\right) \cdot \left(y \cdot -9\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if z < -3.40000000000000014e-50 or 7.6000000000000007e-52 < z Initial program 94.1%
sub-neg94.1%
sub-neg94.1%
associate-*l*93.6%
associate-*l*93.7%
Simplified93.7%
Taylor expanded in a around 0 70.9%
cancel-sign-sub-inv70.9%
*-commutative70.9%
metadata-eval70.9%
*-commutative70.9%
associate-*r*70.9%
associate-*l*70.9%
*-commutative70.9%
*-commutative70.9%
associate-*r*70.4%
*-commutative70.4%
Applied egg-rr70.4%
if -3.40000000000000014e-50 < z < 7.6000000000000007e-52Initial program 98.9%
sub-neg98.9%
sub-neg98.9%
associate-*l*99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in y around 0 83.2%
Final simplification75.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= z -4.1e-54)
(+ (* (* z t) (* y -9.0)) (* x 2.0))
(if (<= z 4.2e-49)
(+ (* x 2.0) (* 27.0 (* a b)))
(- (* x 2.0) (* 9.0 (* (* y z) t))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.1e-54) {
tmp = ((z * t) * (y * -9.0)) + (x * 2.0);
} else if (z <= 4.2e-49) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * ((y * z) * t));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-4.1d-54)) then
tmp = ((z * t) * (y * (-9.0d0))) + (x * 2.0d0)
else if (z <= 4.2d-49) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = (x * 2.0d0) - (9.0d0 * ((y * z) * t))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.1e-54) {
tmp = ((z * t) * (y * -9.0)) + (x * 2.0);
} else if (z <= 4.2e-49) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * ((y * z) * t));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -4.1e-54: tmp = ((z * t) * (y * -9.0)) + (x * 2.0) elif z <= 4.2e-49: tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = (x * 2.0) - (9.0 * ((y * z) * t)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -4.1e-54) tmp = Float64(Float64(Float64(z * t) * Float64(y * -9.0)) + Float64(x * 2.0)); elseif (z <= 4.2e-49) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(Float64(y * z) * t))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -4.1e-54)
tmp = ((z * t) * (y * -9.0)) + (x * 2.0);
elseif (z <= 4.2e-49)
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = (x * 2.0) - (9.0 * ((y * 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. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.1e-54], N[(N[(N[(z * t), $MachinePrecision] * N[(y * -9.0), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-49], 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[(N[(y * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{-54}:\\
\;\;\;\;\left(z \cdot t\right) \cdot \left(y \cdot -9\right) + x \cdot 2\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-49}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(\left(y \cdot z\right) \cdot t\right)\\
\end{array}
\end{array}
if z < -4.1000000000000001e-54Initial program 98.6%
sub-neg98.6%
sub-neg98.6%
associate-*l*94.0%
associate-*l*94.1%
Simplified94.1%
Taylor expanded in a around 0 72.7%
cancel-sign-sub-inv72.7%
*-commutative72.7%
metadata-eval72.7%
*-commutative72.7%
associate-*r*72.8%
associate-*l*72.8%
*-commutative72.8%
*-commutative72.8%
associate-*r*69.4%
*-commutative69.4%
Applied egg-rr69.4%
if -4.1000000000000001e-54 < z < 4.1999999999999998e-49Initial program 98.9%
sub-neg98.9%
sub-neg98.9%
associate-*l*99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in y around 0 83.2%
if 4.1999999999999998e-49 < z Initial program 89.0%
sub-neg89.0%
sub-neg89.0%
associate-*l*93.2%
associate-*l*93.2%
Simplified93.2%
Taylor expanded in a around 0 68.8%
Final simplification74.7%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2.75e-5)
(+ (* -9.0 (* y (* z t))) (* a (* 27.0 b)))
(if (<= y 1.22e-118)
(+ (* x 2.0) (* 27.0 (* a b)))
(- (* x 2.0) (* 9.0 (* (* y z) t))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.75e-5) {
tmp = (-9.0 * (y * (z * t))) + (a * (27.0 * b));
} else if (y <= 1.22e-118) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * ((y * z) * t));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-2.75d-5)) then
tmp = ((-9.0d0) * (y * (z * t))) + (a * (27.0d0 * b))
else if (y <= 1.22d-118) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = (x * 2.0d0) - (9.0d0 * ((y * z) * t))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.75e-5) {
tmp = (-9.0 * (y * (z * t))) + (a * (27.0 * b));
} else if (y <= 1.22e-118) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * ((y * z) * t));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if y <= -2.75e-5: tmp = (-9.0 * (y * (z * t))) + (a * (27.0 * b)) elif y <= 1.22e-118: tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = (x * 2.0) - (9.0 * ((y * z) * t)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.75e-5) tmp = Float64(Float64(-9.0 * Float64(y * Float64(z * t))) + Float64(a * Float64(27.0 * b))); elseif (y <= 1.22e-118) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(Float64(y * z) * t))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (y <= -2.75e-5)
tmp = (-9.0 * (y * (z * t))) + (a * (27.0 * b));
elseif (y <= 1.22e-118)
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = (x * 2.0) - (9.0 * ((y * 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. 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[y, -2.75e-5], N[(N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.22e-118], 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[(N[(y * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.75 \cdot 10^{-5}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;y \leq 1.22 \cdot 10^{-118}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(\left(y \cdot z\right) \cdot t\right)\\
\end{array}
\end{array}
if y < -2.7500000000000001e-5Initial program 94.4%
sub-neg94.4%
sub-neg94.4%
associate-*l*96.3%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in x around 0 82.2%
associate-*r*82.2%
*-commutative82.2%
*-commutative82.2%
associate-*l*82.2%
sub-neg82.2%
+-commutative82.2%
associate-*l*82.2%
*-commutative82.2%
*-commutative82.2%
distribute-rgt-neg-in82.2%
*-commutative82.2%
associate-*l*82.2%
metadata-eval82.2%
associate-*l*82.2%
Applied egg-rr82.2%
if -2.7500000000000001e-5 < y < 1.2200000000000001e-118Initial program 98.9%
sub-neg98.9%
sub-neg98.9%
associate-*l*93.8%
associate-*l*93.8%
Simplified93.8%
Taylor expanded in y around 0 83.7%
if 1.2200000000000001e-118 < y Initial program 93.5%
sub-neg93.5%
sub-neg93.5%
associate-*l*98.8%
associate-*l*98.8%
Simplified98.8%
Taylor expanded in a around 0 62.7%
Final simplification75.9%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= y -8.6e-7)
(* y (- (* 27.0 (/ (* a b) y)) (* 9.0 (* z t))))
(if (<= y 1.95e-122)
(+ (* x 2.0) (* 27.0 (* a b)))
(- (* x 2.0) (* 9.0 (* (* y z) t))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8.6e-7) {
tmp = y * ((27.0 * ((a * b) / y)) - (9.0 * (z * t)));
} else if (y <= 1.95e-122) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * ((y * z) * t));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-8.6d-7)) then
tmp = y * ((27.0d0 * ((a * b) / y)) - (9.0d0 * (z * t)))
else if (y <= 1.95d-122) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = (x * 2.0d0) - (9.0d0 * ((y * z) * t))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8.6e-7) {
tmp = y * ((27.0 * ((a * b) / y)) - (9.0 * (z * t)));
} else if (y <= 1.95e-122) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * ((y * z) * t));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if y <= -8.6e-7: tmp = y * ((27.0 * ((a * b) / y)) - (9.0 * (z * t))) elif y <= 1.95e-122: tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = (x * 2.0) - (9.0 * ((y * z) * t)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -8.6e-7) tmp = Float64(y * Float64(Float64(27.0 * Float64(Float64(a * b) / y)) - Float64(9.0 * Float64(z * t)))); elseif (y <= 1.95e-122) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(Float64(y * z) * t))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (y <= -8.6e-7)
tmp = y * ((27.0 * ((a * b) / y)) - (9.0 * (z * t)));
elseif (y <= 1.95e-122)
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = (x * 2.0) - (9.0 * ((y * 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. 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[y, -8.6e-7], N[(y * N[(N[(27.0 * N[(N[(a * b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.95e-122], 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[(N[(y * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.6 \cdot 10^{-7}:\\
\;\;\;\;y \cdot \left(27 \cdot \frac{a \cdot b}{y} - 9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{-122}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(\left(y \cdot z\right) \cdot t\right)\\
\end{array}
\end{array}
if y < -8.6000000000000002e-7Initial program 94.4%
sub-neg94.4%
sub-neg94.4%
associate-*l*96.3%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in x around 0 82.2%
Taylor expanded in y around inf 84.1%
if -8.6000000000000002e-7 < y < 1.94999999999999995e-122Initial program 98.9%
sub-neg98.9%
sub-neg98.9%
associate-*l*93.8%
associate-*l*93.8%
Simplified93.8%
Taylor expanded in y around 0 83.7%
if 1.94999999999999995e-122 < y Initial program 93.5%
sub-neg93.5%
sub-neg93.5%
associate-*l*98.8%
associate-*l*98.8%
Simplified98.8%
Taylor expanded in a around 0 62.7%
Final simplification76.3%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1e+169)
(* t (* z (* y -9.0)))
(if (<= y 1.15e-101)
(+ (* x 2.0) (* 27.0 (* a b)))
(* -9.0 (* (* y z) t)))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1e+169) {
tmp = t * (z * (y * -9.0));
} else if (y <= 1.15e-101) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = -9.0 * ((y * z) * t);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1d+169)) then
tmp = t * (z * (y * (-9.0d0)))
else if (y <= 1.15d-101) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = (-9.0d0) * ((y * z) * t)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1e+169) {
tmp = t * (z * (y * -9.0));
} else if (y <= 1.15e-101) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = -9.0 * ((y * z) * t);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if y <= -1e+169: tmp = t * (z * (y * -9.0)) elif y <= 1.15e-101: tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = -9.0 * ((y * z) * t) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1e+169) tmp = Float64(t * Float64(z * Float64(y * -9.0))); elseif (y <= 1.15e-101) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(-9.0 * Float64(Float64(y * z) * t)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (y <= -1e+169)
tmp = t * (z * (y * -9.0));
elseif (y <= 1.15e-101)
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = -9.0 * ((y * 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. 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[y, -1e+169], N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e-101], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-9.0 * N[(N[(y * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+169}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-101}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;-9 \cdot \left(\left(y \cdot z\right) \cdot t\right)\\
\end{array}
\end{array}
if y < -9.99999999999999934e168Initial program 94.7%
Taylor expanded in y around 0 94.5%
Taylor expanded in y around inf 80.3%
*-commutative80.3%
associate-*r*80.2%
*-commutative80.2%
*-commutative80.2%
associate-*l*80.2%
Simplified80.2%
Taylor expanded in y around 0 80.2%
associate-*r*80.4%
Simplified80.4%
if -9.99999999999999934e168 < y < 1.15e-101Initial program 97.8%
sub-neg97.8%
sub-neg97.8%
associate-*l*93.9%
associate-*l*93.9%
Simplified93.9%
Taylor expanded in y around 0 72.5%
if 1.15e-101 < y Initial program 93.4%
sub-neg93.4%
sub-neg93.4%
associate-*l*98.8%
associate-*l*98.8%
Simplified98.8%
Taylor expanded in y around inf 46.1%
Final simplification63.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= a -3.4e+24) (not (<= a 1.1e-19))) (* 27.0 (* a b)) (* x 2.0)))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -3.4e+24) || !(a <= 1.1e-19)) {
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.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-3.4d+24)) .or. (.not. (a <= 1.1d-19))) 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;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -3.4e+24) || !(a <= 1.1e-19)) {
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]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (a <= -3.4e+24) or not (a <= 1.1e-19): 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]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -3.4e+24) || !(a <= 1.1e-19)) 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])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((a <= -3.4e+24) || ~((a <= 1.1e-19)))
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. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -3.4e+24], N[Not[LessEqual[a, 1.1e-19]], $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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.4 \cdot 10^{+24} \lor \neg \left(a \leq 1.1 \cdot 10^{-19}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if a < -3.4000000000000001e24 or 1.0999999999999999e-19 < a Initial program 96.7%
sub-neg96.7%
sub-neg96.7%
associate-*l*96.7%
associate-*l*96.7%
Simplified96.7%
Taylor expanded in a around inf 54.8%
if -3.4000000000000001e24 < a < 1.0999999999999999e-19Initial program 95.4%
sub-neg95.4%
sub-neg95.4%
associate-*l*95.5%
associate-*l*95.6%
Simplified95.6%
Taylor expanded in x around inf 37.3%
Final simplification45.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= a -8.6e+24) (not (<= a 7e-28))) (* (* a 27.0) b) (* x 2.0)))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -8.6e+24) || !(a <= 7e-28)) {
tmp = (a * 27.0) * b;
} else {
tmp = x * 2.0;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-8.6d+24)) .or. (.not. (a <= 7d-28))) then
tmp = (a * 27.0d0) * b
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -8.6e+24) || !(a <= 7e-28)) {
tmp = (a * 27.0) * b;
} else {
tmp = x * 2.0;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (a <= -8.6e+24) or not (a <= 7e-28): tmp = (a * 27.0) * b else: tmp = x * 2.0 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -8.6e+24) || !(a <= 7e-28)) tmp = Float64(Float64(a * 27.0) * b); else tmp = Float64(x * 2.0); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((a <= -8.6e+24) || ~((a <= 7e-28)))
tmp = (a * 27.0) * b;
else
tmp = x * 2.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -8.6e+24], N[Not[LessEqual[a, 7e-28]], $MachinePrecision]], N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision], N[(x * 2.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.6 \cdot 10^{+24} \lor \neg \left(a \leq 7 \cdot 10^{-28}\right):\\
\;\;\;\;\left(a \cdot 27\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if a < -8.59999999999999975e24 or 6.9999999999999999e-28 < a Initial program 96.7%
sub-neg96.7%
sub-neg96.7%
associate-*l*96.7%
associate-*l*96.7%
Simplified96.7%
Taylor expanded in y around 0 72.0%
Taylor expanded in b around inf 62.3%
Taylor expanded in x around 0 54.4%
if -8.59999999999999975e24 < a < 6.9999999999999999e-28Initial program 95.4%
sub-neg95.4%
sub-neg95.4%
associate-*l*95.5%
associate-*l*95.5%
Simplified95.5%
Taylor expanded in x around inf 36.8%
Final simplification45.4%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= a -1.8e+25) (* a (* 27.0 b)) (if (<= a 2e-23) (* x 2.0) (* (* a 27.0) b))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.8e+25) {
tmp = a * (27.0 * b);
} else if (a <= 2e-23) {
tmp = x * 2.0;
} else {
tmp = (a * 27.0) * b;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-1.8d+25)) then
tmp = a * (27.0d0 * b)
else if (a <= 2d-23) then
tmp = x * 2.0d0
else
tmp = (a * 27.0d0) * b
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.8e+25) {
tmp = a * (27.0 * b);
} else if (a <= 2e-23) {
tmp = x * 2.0;
} else {
tmp = (a * 27.0) * b;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if a <= -1.8e+25: tmp = a * (27.0 * b) elif a <= 2e-23: tmp = x * 2.0 else: tmp = (a * 27.0) * b return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.8e+25) tmp = Float64(a * Float64(27.0 * b)); elseif (a <= 2e-23) tmp = Float64(x * 2.0); else tmp = Float64(Float64(a * 27.0) * b); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (a <= -1.8e+25)
tmp = a * (27.0 * b);
elseif (a <= 2e-23)
tmp = x * 2.0;
else
tmp = (a * 27.0) * b;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.8e+25], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2e-23], N[(x * 2.0), $MachinePrecision], N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{+25}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;a \leq 2 \cdot 10^{-23}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot 27\right) \cdot b\\
\end{array}
\end{array}
if a < -1.80000000000000008e25Initial program 94.6%
sub-neg94.6%
sub-neg94.6%
associate-*l*96.3%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in a around inf 57.4%
*-commutative57.4%
associate-*r*57.4%
Simplified57.4%
if -1.80000000000000008e25 < a < 1.99999999999999992e-23Initial program 95.4%
sub-neg95.4%
sub-neg95.4%
associate-*l*95.5%
associate-*l*95.6%
Simplified95.6%
Taylor expanded in x around inf 37.3%
if 1.99999999999999992e-23 < a Initial program 98.4%
sub-neg98.4%
sub-neg98.4%
associate-*l*97.0%
associate-*l*97.0%
Simplified97.0%
Taylor expanded in y around 0 73.5%
Taylor expanded in b around inf 62.2%
Taylor expanded in x around 0 52.5%
Final simplification45.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (* x 2.0))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * 2.0d0
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): return x * 2.0
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(x * 2.0) end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
tmp = x * 2.0;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := N[(x * 2.0), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
x \cdot 2
\end{array}
Initial program 96.0%
sub-neg96.0%
sub-neg96.0%
associate-*l*96.1%
associate-*l*96.1%
Simplified96.1%
Taylor expanded in x around inf 28.3%
Final simplification28.3%
(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 2024058
(FPCore (x y z t a b)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, A"
:precision binary64
:alt
(if (< y 7.590524218811189e-161) (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* a (* 27.0 b))) (+ (- (* x 2.0) (* 9.0 (* y (* t z)))) (* (* a 27.0) b)))
(+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))