
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z 3.5e+68) (+ (- (* x 2.0) (* (* y 9.0) (* z t))) (* a (* 27.0 b))) (* b (+ (* a 27.0) (* -9.0 (* t (* y (/ z 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.5e+68) {
tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
} else {
tmp = b * ((a * 27.0) + (-9.0 * (t * (y * (z / 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.5d+68) then
tmp = ((x * 2.0d0) - ((y * 9.0d0) * (z * t))) + (a * (27.0d0 * b))
else
tmp = b * ((a * 27.0d0) + ((-9.0d0) * (t * (y * (z / 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.5e+68) {
tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
} else {
tmp = b * ((a * 27.0) + (-9.0 * (t * (y * (z / 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.5e+68: tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b)) else: tmp = b * ((a * 27.0) + (-9.0 * (t * (y * (z / 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.5e+68) tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(z * t))) + Float64(a * Float64(27.0 * b))); else tmp = Float64(b * Float64(Float64(a * 27.0) + Float64(-9.0 * Float64(t * Float64(y * Float64(z / 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.5e+68)
tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
else
tmp = b * ((a * 27.0) + (-9.0 * (t * (y * (z / 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[z, 3.5e+68], 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[(b * N[(N[(a * 27.0), $MachinePrecision] + N[(-9.0 * N[(t * N[(y * N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 3.5 \cdot 10^{+68}:\\
\;\;\;\;\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}:\\
\;\;\;\;b \cdot \left(a \cdot 27 + -9 \cdot \left(t \cdot \left(y \cdot \frac{z}{b}\right)\right)\right)\\
\end{array}
\end{array}
if z < 3.49999999999999977e68Initial program 95.2%
sub-neg95.2%
sub-neg95.2%
associate-*l*96.7%
associate-*l*96.7%
Simplified96.7%
if 3.49999999999999977e68 < z Initial program 87.6%
sub-neg87.6%
sub-neg87.6%
associate-*l*83.6%
associate-*l*83.6%
Simplified83.6%
+-commutative83.6%
associate-+r-83.6%
associate-*r*83.6%
*-commutative83.6%
associate-*l*83.6%
associate-*l*83.5%
associate-*r*83.5%
Applied egg-rr83.5%
add-cube-cbrt83.1%
pow383.1%
Applied egg-rr83.1%
Taylor expanded in b around inf 73.6%
+-commutative73.6%
associate--l+73.6%
*-commutative73.6%
associate-*r/73.6%
associate-*r/73.6%
div-sub75.7%
Simplified75.6%
Taylor expanded in x around 0 67.5%
associate-/l*71.7%
associate-/l*73.8%
Simplified73.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
(let* ((t_1 (* t (* z y))) (t_2 (* 27.0 (* a b))))
(if (<= x -8.8e+49)
(+ (* x 2.0) t_2)
(if (<= x 0.0001)
(- t_2 (* 9.0 t_1))
(if (<= x 2.05e+74)
(* x (+ 2.0 (* 27.0 (* a (/ b x)))))
(if (<= x 1.12e+105)
(+ (* b (* a 27.0)) (* -9.0 t_1))
(- (* 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 t_1 = t * (z * y);
double t_2 = 27.0 * (a * b);
double tmp;
if (x <= -8.8e+49) {
tmp = (x * 2.0) + t_2;
} else if (x <= 0.0001) {
tmp = t_2 - (9.0 * t_1);
} else if (x <= 2.05e+74) {
tmp = x * (2.0 + (27.0 * (a * (b / x))));
} else if (x <= 1.12e+105) {
tmp = (b * (a * 27.0)) + (-9.0 * t_1);
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * (z * y)
t_2 = 27.0d0 * (a * b)
if (x <= (-8.8d+49)) then
tmp = (x * 2.0d0) + t_2
else if (x <= 0.0001d0) then
tmp = t_2 - (9.0d0 * t_1)
else if (x <= 2.05d+74) then
tmp = x * (2.0d0 + (27.0d0 * (a * (b / x))))
else if (x <= 1.12d+105) then
tmp = (b * (a * 27.0d0)) + ((-9.0d0) * t_1)
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 t_1 = t * (z * y);
double t_2 = 27.0 * (a * b);
double tmp;
if (x <= -8.8e+49) {
tmp = (x * 2.0) + t_2;
} else if (x <= 0.0001) {
tmp = t_2 - (9.0 * t_1);
} else if (x <= 2.05e+74) {
tmp = x * (2.0 + (27.0 * (a * (b / x))));
} else if (x <= 1.12e+105) {
tmp = (b * (a * 27.0)) + (-9.0 * t_1);
} 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): t_1 = t * (z * y) t_2 = 27.0 * (a * b) tmp = 0 if x <= -8.8e+49: tmp = (x * 2.0) + t_2 elif x <= 0.0001: tmp = t_2 - (9.0 * t_1) elif x <= 2.05e+74: tmp = x * (2.0 + (27.0 * (a * (b / x)))) elif x <= 1.12e+105: tmp = (b * (a * 27.0)) + (-9.0 * t_1) 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) t_1 = Float64(t * Float64(z * y)) t_2 = Float64(27.0 * Float64(a * b)) tmp = 0.0 if (x <= -8.8e+49) tmp = Float64(Float64(x * 2.0) + t_2); elseif (x <= 0.0001) tmp = Float64(t_2 - Float64(9.0 * t_1)); elseif (x <= 2.05e+74) tmp = Float64(x * Float64(2.0 + Float64(27.0 * Float64(a * Float64(b / x))))); elseif (x <= 1.12e+105) tmp = Float64(Float64(b * Float64(a * 27.0)) + Float64(-9.0 * t_1)); else tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(y * Float64(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)
t_1 = t * (z * y);
t_2 = 27.0 * (a * b);
tmp = 0.0;
if (x <= -8.8e+49)
tmp = (x * 2.0) + t_2;
elseif (x <= 0.0001)
tmp = t_2 - (9.0 * t_1);
elseif (x <= 2.05e+74)
tmp = x * (2.0 + (27.0 * (a * (b / x))));
elseif (x <= 1.12e+105)
tmp = (b * (a * 27.0)) + (-9.0 * t_1);
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_] := Block[{t$95$1 = N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.8e+49], N[(N[(x * 2.0), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[x, 0.0001], N[(t$95$2 - N[(9.0 * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.05e+74], N[(x * N[(2.0 + N[(27.0 * N[(a * N[(b / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.12e+105], N[(N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision] + N[(-9.0 * t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(z \cdot y\right)\\
t_2 := 27 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;x \leq -8.8 \cdot 10^{+49}:\\
\;\;\;\;x \cdot 2 + t\_2\\
\mathbf{elif}\;x \leq 0.0001:\\
\;\;\;\;t\_2 - 9 \cdot t\_1\\
\mathbf{elif}\;x \leq 2.05 \cdot 10^{+74}:\\
\;\;\;\;x \cdot \left(2 + 27 \cdot \left(a \cdot \frac{b}{x}\right)\right)\\
\mathbf{elif}\;x \leq 1.12 \cdot 10^{+105}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right) + -9 \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if x < -8.8000000000000003e49Initial program 98.1%
sub-neg98.1%
sub-neg98.1%
associate-*l*96.5%
associate-*l*96.5%
Simplified96.5%
Taylor expanded in y around 0 84.2%
if -8.8000000000000003e49 < x < 1.00000000000000005e-4Initial program 93.2%
sub-neg93.2%
sub-neg93.2%
associate-*l*93.9%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in x around 0 87.3%
if 1.00000000000000005e-4 < x < 2.05e74Initial program 86.5%
sub-neg86.5%
sub-neg86.5%
associate-*l*86.5%
associate-*l*80.2%
Simplified80.2%
Taylor expanded in y around 0 86.6%
Taylor expanded in x around inf 86.6%
associate-/l*86.7%
Simplified86.7%
if 2.05e74 < x < 1.12e105Initial program 78.2%
sub-neg78.2%
sub-neg78.2%
associate-*l*99.7%
associate-*l*99.5%
Simplified99.5%
+-commutative99.5%
associate-+r-99.5%
associate-*r*99.7%
*-commutative99.7%
associate-*l*99.5%
associate-*l*99.8%
associate-*r*99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 63.8%
cancel-sign-sub-inv63.8%
metadata-eval63.8%
associate-*r*63.8%
*-commutative63.8%
Simplified63.8%
if 1.12e105 < x Initial program 96.7%
sub-neg96.7%
sub-neg96.7%
associate-*l*93.8%
associate-*l*93.8%
Simplified93.8%
Taylor expanded in a around 0 81.8%
pow181.8%
Applied egg-rr81.8%
unpow181.8%
*-commutative81.8%
associate-*l*78.9%
*-commutative78.9%
Simplified78.9%
Final simplification84.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 (or (<= b -1.38e-45)
(not (or (<= b 3.7e-59) (and (not (<= b 9.5e+70)) (<= b 8.5e+96)))))
(+ (* x 2.0) (* 27.0 (* a b)))
(- (* x 2.0) (* 9.0 (* t (* z y))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.38e-45) || !((b <= 3.7e-59) || (!(b <= 9.5e+70) && (b <= 8.5e+96)))) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-1.38d-45)) .or. (.not. (b <= 3.7d-59) .or. (.not. (b <= 9.5d+70)) .and. (b <= 8.5d+96))) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = (x * 2.0d0) - (9.0d0 * (t * (z * y)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.38e-45) || !((b <= 3.7e-59) || (!(b <= 9.5e+70) && (b <= 8.5e+96)))) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.38e-45) or not ((b <= 3.7e-59) or (not (b <= 9.5e+70) and (b <= 8.5e+96))): tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = (x * 2.0) - (9.0 * (t * (z * y))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.38e-45) || !((b <= 3.7e-59) || (!(b <= 9.5e+70) && (b <= 8.5e+96)))) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(z * y)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((b <= -1.38e-45) || ~(((b <= 3.7e-59) || (~((b <= 9.5e+70)) && (b <= 8.5e+96)))))
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.38e-45], N[Not[Or[LessEqual[b, 3.7e-59], And[N[Not[LessEqual[b, 9.5e+70]], $MachinePrecision], LessEqual[b, 8.5e+96]]]], $MachinePrecision]], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.38 \cdot 10^{-45} \lor \neg \left(b \leq 3.7 \cdot 10^{-59} \lor \neg \left(b \leq 9.5 \cdot 10^{+70}\right) \land b \leq 8.5 \cdot 10^{+96}\right):\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if b < -1.38e-45 or 3.6999999999999999e-59 < b < 9.5000000000000002e70 or 8.50000000000000025e96 < b Initial program 92.2%
sub-neg92.2%
sub-neg92.2%
associate-*l*93.0%
associate-*l*92.4%
Simplified92.4%
Taylor expanded in y around 0 75.2%
if -1.38e-45 < b < 3.6999999999999999e-59 or 9.5000000000000002e70 < b < 8.50000000000000025e96Initial program 95.7%
sub-neg95.7%
sub-neg95.7%
associate-*l*95.7%
associate-*l*96.5%
Simplified96.5%
Taylor expanded in a around 0 86.2%
Final simplification80.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 (+ (* x 2.0) (* 27.0 (* a b)))))
(if (<= b -7e-46)
t_1
(if (<= b 5e-59)
(- (* x 2.0) (* 9.0 (* t (* z y))))
(if (or (<= b 1.35e+17) (not (<= b 3.8e+98)))
t_1
(- (* 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 t_1 = (x * 2.0) + (27.0 * (a * b));
double tmp;
if (b <= -7e-46) {
tmp = t_1;
} else if (b <= 5e-59) {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
} else if ((b <= 1.35e+17) || !(b <= 3.8e+98)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (x * 2.0d0) + (27.0d0 * (a * b))
if (b <= (-7d-46)) then
tmp = t_1
else if (b <= 5d-59) then
tmp = (x * 2.0d0) - (9.0d0 * (t * (z * y)))
else if ((b <= 1.35d+17) .or. (.not. (b <= 3.8d+98))) then
tmp = t_1
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 t_1 = (x * 2.0) + (27.0 * (a * b));
double tmp;
if (b <= -7e-46) {
tmp = t_1;
} else if (b <= 5e-59) {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
} else if ((b <= 1.35e+17) || !(b <= 3.8e+98)) {
tmp = t_1;
} 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): t_1 = (x * 2.0) + (27.0 * (a * b)) tmp = 0 if b <= -7e-46: tmp = t_1 elif b <= 5e-59: tmp = (x * 2.0) - (9.0 * (t * (z * y))) elif (b <= 1.35e+17) or not (b <= 3.8e+98): tmp = t_1 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) t_1 = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))) tmp = 0.0 if (b <= -7e-46) tmp = t_1; elseif (b <= 5e-59) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(z * y)))); elseif ((b <= 1.35e+17) || !(b <= 3.8e+98)) tmp = t_1; else tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(y * Float64(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)
t_1 = (x * 2.0) + (27.0 * (a * b));
tmp = 0.0;
if (b <= -7e-46)
tmp = t_1;
elseif (b <= 5e-59)
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
elseif ((b <= 1.35e+17) || ~((b <= 3.8e+98)))
tmp = t_1;
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_] := Block[{t$95$1 = N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -7e-46], t$95$1, If[LessEqual[b, 5e-59], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, 1.35e+17], N[Not[LessEqual[b, 3.8e+98]], $MachinePrecision]], t$95$1, N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;b \leq -7 \cdot 10^{-46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 5 \cdot 10^{-59}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{elif}\;b \leq 1.35 \cdot 10^{+17} \lor \neg \left(b \leq 3.8 \cdot 10^{+98}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if b < -7.0000000000000004e-46 or 5.0000000000000001e-59 < b < 1.35e17 or 3.7999999999999999e98 < b Initial program 92.4%
sub-neg92.4%
sub-neg92.4%
associate-*l*94.0%
associate-*l*93.3%
Simplified93.3%
Taylor expanded in y around 0 76.2%
if -7.0000000000000004e-46 < b < 5.0000000000000001e-59Initial program 95.5%
sub-neg95.5%
sub-neg95.5%
associate-*l*95.5%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in a around 0 85.5%
if 1.35e17 < b < 3.7999999999999999e98Initial program 93.7%
sub-neg93.7%
sub-neg93.7%
associate-*l*87.7%
associate-*l*87.7%
Simplified87.7%
Taylor expanded in a around 0 69.1%
pow169.1%
Applied egg-rr69.1%
unpow169.1%
*-commutative69.1%
associate-*l*69.2%
*-commutative69.2%
Simplified69.2%
Final simplification79.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 (<= x -4.1e+49)
(* x 2.0)
(if (<= x -2.5e-196)
(* (* z t) (* y -9.0))
(if (<= x -2.9e-260)
(* a (* 27.0 b))
(if (<= x 2.75e-271)
(* t (* y (* z -9.0)))
(if (<= x 2.2e+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 (x <= -4.1e+49) {
tmp = x * 2.0;
} else if (x <= -2.5e-196) {
tmp = (z * t) * (y * -9.0);
} else if (x <= -2.9e-260) {
tmp = a * (27.0 * b);
} else if (x <= 2.75e-271) {
tmp = t * (y * (z * -9.0));
} else if (x <= 2.2e+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 (x <= (-4.1d+49)) then
tmp = x * 2.0d0
else if (x <= (-2.5d-196)) then
tmp = (z * t) * (y * (-9.0d0))
else if (x <= (-2.9d-260)) then
tmp = a * (27.0d0 * b)
else if (x <= 2.75d-271) then
tmp = t * (y * (z * (-9.0d0)))
else if (x <= 2.2d+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 (x <= -4.1e+49) {
tmp = x * 2.0;
} else if (x <= -2.5e-196) {
tmp = (z * t) * (y * -9.0);
} else if (x <= -2.9e-260) {
tmp = a * (27.0 * b);
} else if (x <= 2.75e-271) {
tmp = t * (y * (z * -9.0));
} else if (x <= 2.2e+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 x <= -4.1e+49: tmp = x * 2.0 elif x <= -2.5e-196: tmp = (z * t) * (y * -9.0) elif x <= -2.9e-260: tmp = a * (27.0 * b) elif x <= 2.75e-271: tmp = t * (y * (z * -9.0)) elif x <= 2.2e+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 (x <= -4.1e+49) tmp = Float64(x * 2.0); elseif (x <= -2.5e-196) tmp = Float64(Float64(z * t) * Float64(y * -9.0)); elseif (x <= -2.9e-260) tmp = Float64(a * Float64(27.0 * b)); elseif (x <= 2.75e-271) tmp = Float64(t * Float64(y * Float64(z * -9.0))); elseif (x <= 2.2e+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 (x <= -4.1e+49)
tmp = x * 2.0;
elseif (x <= -2.5e-196)
tmp = (z * t) * (y * -9.0);
elseif (x <= -2.9e-260)
tmp = a * (27.0 * b);
elseif (x <= 2.75e-271)
tmp = t * (y * (z * -9.0));
elseif (x <= 2.2e+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[LessEqual[x, -4.1e+49], N[(x * 2.0), $MachinePrecision], If[LessEqual[x, -2.5e-196], N[(N[(z * t), $MachinePrecision] * N[(y * -9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.9e-260], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.75e-271], N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.2e+19], 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}\;x \leq -4.1 \cdot 10^{+49}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -2.5 \cdot 10^{-196}:\\
\;\;\;\;\left(z \cdot t\right) \cdot \left(y \cdot -9\right)\\
\mathbf{elif}\;x \leq -2.9 \cdot 10^{-260}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;x \leq 2.75 \cdot 10^{-271}:\\
\;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{+19}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if x < -4.1e49 or 2.2e19 < x Initial program 96.1%
sub-neg96.1%
sub-neg96.1%
associate-*l*96.3%
associate-*l*95.4%
Simplified95.4%
Taylor expanded in x around inf 58.5%
if -4.1e49 < x < -2.5000000000000002e-196Initial program 92.1%
sub-neg92.1%
sub-neg92.1%
associate-*l*96.0%
associate-*l*95.9%
Simplified95.9%
+-commutative95.9%
associate-+r-95.9%
associate-*r*96.0%
*-commutative96.0%
associate-*l*95.9%
associate-*l*94.0%
associate-*r*94.0%
Applied egg-rr94.0%
add-cube-cbrt93.7%
pow393.7%
Applied egg-rr93.7%
Taylor expanded in y around inf 55.3%
*-commutative55.3%
associate-*r*55.3%
*-commutative55.3%
associate-*l*53.4%
*-commutative53.4%
associate-*l*55.3%
*-commutative55.3%
*-commutative55.3%
Simplified55.3%
if -2.5000000000000002e-196 < x < -2.8999999999999999e-260Initial program 95.4%
sub-neg95.4%
sub-neg95.4%
associate-*l*90.8%
associate-*l*95.1%
Simplified95.1%
Taylor expanded in a around inf 68.2%
associate-*r*63.8%
*-commutative63.8%
associate-*r*68.1%
Simplified68.1%
if -2.8999999999999999e-260 < x < 2.7499999999999998e-271Initial program 91.1%
sub-neg91.1%
sub-neg91.1%
associate-*l*90.6%
associate-*l*90.7%
Simplified90.7%
+-commutative90.7%
associate-+r-90.7%
associate-*r*90.6%
*-commutative90.6%
associate-*l*90.7%
associate-*l*90.5%
associate-*r*90.4%
Applied egg-rr90.4%
Taylor expanded in y around inf 58.8%
associate-*r*58.9%
*-commutative58.9%
associate-*r*58.8%
*-commutative58.8%
associate-*r*58.8%
Simplified58.8%
if 2.7499999999999998e-271 < x < 2.2e19Initial program 91.4%
sub-neg91.4%
sub-neg91.4%
associate-*l*91.7%
associate-*l*91.8%
Simplified91.8%
Taylor expanded in a around inf 56.0%
Final simplification58.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
(if (<= x -8.4e+49)
(* x 2.0)
(if (<= x -1.22e-194)
(* y (* z (* t -9.0)))
(if (<= x -9.8e-261)
(* a (* 27.0 b))
(if (<= x 5.8e-271)
(* t (* y (* z -9.0)))
(if (<= x 1e+20) (* 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 (x <= -8.4e+49) {
tmp = x * 2.0;
} else if (x <= -1.22e-194) {
tmp = y * (z * (t * -9.0));
} else if (x <= -9.8e-261) {
tmp = a * (27.0 * b);
} else if (x <= 5.8e-271) {
tmp = t * (y * (z * -9.0));
} else if (x <= 1e+20) {
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 (x <= (-8.4d+49)) then
tmp = x * 2.0d0
else if (x <= (-1.22d-194)) then
tmp = y * (z * (t * (-9.0d0)))
else if (x <= (-9.8d-261)) then
tmp = a * (27.0d0 * b)
else if (x <= 5.8d-271) then
tmp = t * (y * (z * (-9.0d0)))
else if (x <= 1d+20) 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 (x <= -8.4e+49) {
tmp = x * 2.0;
} else if (x <= -1.22e-194) {
tmp = y * (z * (t * -9.0));
} else if (x <= -9.8e-261) {
tmp = a * (27.0 * b);
} else if (x <= 5.8e-271) {
tmp = t * (y * (z * -9.0));
} else if (x <= 1e+20) {
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 x <= -8.4e+49: tmp = x * 2.0 elif x <= -1.22e-194: tmp = y * (z * (t * -9.0)) elif x <= -9.8e-261: tmp = a * (27.0 * b) elif x <= 5.8e-271: tmp = t * (y * (z * -9.0)) elif x <= 1e+20: 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 (x <= -8.4e+49) tmp = Float64(x * 2.0); elseif (x <= -1.22e-194) tmp = Float64(y * Float64(z * Float64(t * -9.0))); elseif (x <= -9.8e-261) tmp = Float64(a * Float64(27.0 * b)); elseif (x <= 5.8e-271) tmp = Float64(t * Float64(y * Float64(z * -9.0))); elseif (x <= 1e+20) 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 (x <= -8.4e+49)
tmp = x * 2.0;
elseif (x <= -1.22e-194)
tmp = y * (z * (t * -9.0));
elseif (x <= -9.8e-261)
tmp = a * (27.0 * b);
elseif (x <= 5.8e-271)
tmp = t * (y * (z * -9.0));
elseif (x <= 1e+20)
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[LessEqual[x, -8.4e+49], N[(x * 2.0), $MachinePrecision], If[LessEqual[x, -1.22e-194], N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -9.8e-261], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.8e-271], N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1e+20], 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}\;x \leq -8.4 \cdot 10^{+49}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -1.22 \cdot 10^{-194}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;x \leq -9.8 \cdot 10^{-261}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{-271}:\\
\;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\mathbf{elif}\;x \leq 10^{+20}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if x < -8.40000000000000043e49 or 1e20 < x Initial program 96.1%
sub-neg96.1%
sub-neg96.1%
associate-*l*96.3%
associate-*l*95.4%
Simplified95.4%
Taylor expanded in x around inf 58.5%
if -8.40000000000000043e49 < x < -1.2200000000000001e-194Initial program 92.1%
sub-neg92.1%
sub-neg92.1%
associate-*l*96.0%
associate-*l*95.9%
Simplified95.9%
Taylor expanded in y around inf 91.9%
Taylor expanded in y around inf 53.4%
*-commutative53.4%
*-commutative53.4%
associate-*l*53.4%
Simplified53.4%
if -1.2200000000000001e-194 < x < -9.80000000000000009e-261Initial program 95.4%
sub-neg95.4%
sub-neg95.4%
associate-*l*90.8%
associate-*l*95.1%
Simplified95.1%
Taylor expanded in a around inf 68.2%
associate-*r*63.8%
*-commutative63.8%
associate-*r*68.1%
Simplified68.1%
if -9.80000000000000009e-261 < x < 5.80000000000000028e-271Initial program 91.1%
sub-neg91.1%
sub-neg91.1%
associate-*l*90.6%
associate-*l*90.7%
Simplified90.7%
+-commutative90.7%
associate-+r-90.7%
associate-*r*90.6%
*-commutative90.6%
associate-*l*90.7%
associate-*l*90.5%
associate-*r*90.4%
Applied egg-rr90.4%
Taylor expanded in y around inf 58.8%
associate-*r*58.9%
*-commutative58.9%
associate-*r*58.8%
*-commutative58.8%
associate-*r*58.8%
Simplified58.8%
if 5.80000000000000028e-271 < x < 1e20Initial program 91.4%
sub-neg91.4%
sub-neg91.4%
associate-*l*91.7%
associate-*l*91.8%
Simplified91.8%
Taylor expanded in a around inf 56.0%
Final simplification57.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 (<= x -9.8e+48)
(* x 2.0)
(if (<= x -3e-195)
(* y (* t (* z -9.0)))
(if (<= x -2.05e-260)
(* a (* 27.0 b))
(if (<= x 2.18e-271)
(* t (* y (* z -9.0)))
(if (<= x 2.65e+17) (* 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 (x <= -9.8e+48) {
tmp = x * 2.0;
} else if (x <= -3e-195) {
tmp = y * (t * (z * -9.0));
} else if (x <= -2.05e-260) {
tmp = a * (27.0 * b);
} else if (x <= 2.18e-271) {
tmp = t * (y * (z * -9.0));
} else if (x <= 2.65e+17) {
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 (x <= (-9.8d+48)) then
tmp = x * 2.0d0
else if (x <= (-3d-195)) then
tmp = y * (t * (z * (-9.0d0)))
else if (x <= (-2.05d-260)) then
tmp = a * (27.0d0 * b)
else if (x <= 2.18d-271) then
tmp = t * (y * (z * (-9.0d0)))
else if (x <= 2.65d+17) 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 (x <= -9.8e+48) {
tmp = x * 2.0;
} else if (x <= -3e-195) {
tmp = y * (t * (z * -9.0));
} else if (x <= -2.05e-260) {
tmp = a * (27.0 * b);
} else if (x <= 2.18e-271) {
tmp = t * (y * (z * -9.0));
} else if (x <= 2.65e+17) {
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 x <= -9.8e+48: tmp = x * 2.0 elif x <= -3e-195: tmp = y * (t * (z * -9.0)) elif x <= -2.05e-260: tmp = a * (27.0 * b) elif x <= 2.18e-271: tmp = t * (y * (z * -9.0)) elif x <= 2.65e+17: 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 (x <= -9.8e+48) tmp = Float64(x * 2.0); elseif (x <= -3e-195) tmp = Float64(y * Float64(t * Float64(z * -9.0))); elseif (x <= -2.05e-260) tmp = Float64(a * Float64(27.0 * b)); elseif (x <= 2.18e-271) tmp = Float64(t * Float64(y * Float64(z * -9.0))); elseif (x <= 2.65e+17) 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 (x <= -9.8e+48)
tmp = x * 2.0;
elseif (x <= -3e-195)
tmp = y * (t * (z * -9.0));
elseif (x <= -2.05e-260)
tmp = a * (27.0 * b);
elseif (x <= 2.18e-271)
tmp = t * (y * (z * -9.0));
elseif (x <= 2.65e+17)
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[LessEqual[x, -9.8e+48], N[(x * 2.0), $MachinePrecision], If[LessEqual[x, -3e-195], N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.05e-260], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.18e-271], N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.65e+17], 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}\;x \leq -9.8 \cdot 10^{+48}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -3 \cdot 10^{-195}:\\
\;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\
\mathbf{elif}\;x \leq -2.05 \cdot 10^{-260}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;x \leq 2.18 \cdot 10^{-271}:\\
\;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\mathbf{elif}\;x \leq 2.65 \cdot 10^{+17}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if x < -9.80000000000000059e48 or 2.65e17 < x Initial program 96.1%
sub-neg96.1%
sub-neg96.1%
associate-*l*96.3%
associate-*l*95.4%
Simplified95.4%
Taylor expanded in x around inf 58.5%
if -9.80000000000000059e48 < x < -3e-195Initial program 92.1%
sub-neg92.1%
sub-neg92.1%
associate-*l*96.0%
associate-*l*95.9%
Simplified95.9%
Taylor expanded in y around inf 91.9%
Taylor expanded in y around inf 53.4%
*-commutative53.4%
*-commutative53.4%
associate-*l*53.4%
Simplified53.4%
Taylor expanded in z around 0 53.4%
*-commutative53.4%
associate-*l*53.4%
Simplified53.4%
if -3e-195 < x < -2.04999999999999998e-260Initial program 95.4%
sub-neg95.4%
sub-neg95.4%
associate-*l*90.8%
associate-*l*95.1%
Simplified95.1%
Taylor expanded in a around inf 68.2%
associate-*r*63.8%
*-commutative63.8%
associate-*r*68.1%
Simplified68.1%
if -2.04999999999999998e-260 < x < 2.1800000000000001e-271Initial program 91.1%
sub-neg91.1%
sub-neg91.1%
associate-*l*90.6%
associate-*l*90.7%
Simplified90.7%
+-commutative90.7%
associate-+r-90.7%
associate-*r*90.6%
*-commutative90.6%
associate-*l*90.7%
associate-*l*90.5%
associate-*r*90.4%
Applied egg-rr90.4%
Taylor expanded in y around inf 58.8%
associate-*r*58.9%
*-commutative58.9%
associate-*r*58.8%
*-commutative58.8%
associate-*r*58.8%
Simplified58.8%
if 2.1800000000000001e-271 < x < 2.65e17Initial program 91.4%
sub-neg91.4%
sub-neg91.4%
associate-*l*91.7%
associate-*l*91.8%
Simplified91.8%
Taylor expanded in a around inf 56.0%
Final simplification57.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 (<= x -2.5e+49)
(* x 2.0)
(if (<= x -1.45e-195)
(* y (* -9.0 (* z t)))
(if (<= x -3.1e-260)
(* a (* 27.0 b))
(if (<= x 2.15e-271)
(* t (* y (* z -9.0)))
(if (<= x 2.6e+18) (* 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 (x <= -2.5e+49) {
tmp = x * 2.0;
} else if (x <= -1.45e-195) {
tmp = y * (-9.0 * (z * t));
} else if (x <= -3.1e-260) {
tmp = a * (27.0 * b);
} else if (x <= 2.15e-271) {
tmp = t * (y * (z * -9.0));
} else if (x <= 2.6e+18) {
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 (x <= (-2.5d+49)) then
tmp = x * 2.0d0
else if (x <= (-1.45d-195)) then
tmp = y * ((-9.0d0) * (z * t))
else if (x <= (-3.1d-260)) then
tmp = a * (27.0d0 * b)
else if (x <= 2.15d-271) then
tmp = t * (y * (z * (-9.0d0)))
else if (x <= 2.6d+18) 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 (x <= -2.5e+49) {
tmp = x * 2.0;
} else if (x <= -1.45e-195) {
tmp = y * (-9.0 * (z * t));
} else if (x <= -3.1e-260) {
tmp = a * (27.0 * b);
} else if (x <= 2.15e-271) {
tmp = t * (y * (z * -9.0));
} else if (x <= 2.6e+18) {
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 x <= -2.5e+49: tmp = x * 2.0 elif x <= -1.45e-195: tmp = y * (-9.0 * (z * t)) elif x <= -3.1e-260: tmp = a * (27.0 * b) elif x <= 2.15e-271: tmp = t * (y * (z * -9.0)) elif x <= 2.6e+18: 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 (x <= -2.5e+49) tmp = Float64(x * 2.0); elseif (x <= -1.45e-195) tmp = Float64(y * Float64(-9.0 * Float64(z * t))); elseif (x <= -3.1e-260) tmp = Float64(a * Float64(27.0 * b)); elseif (x <= 2.15e-271) tmp = Float64(t * Float64(y * Float64(z * -9.0))); elseif (x <= 2.6e+18) 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 (x <= -2.5e+49)
tmp = x * 2.0;
elseif (x <= -1.45e-195)
tmp = y * (-9.0 * (z * t));
elseif (x <= -3.1e-260)
tmp = a * (27.0 * b);
elseif (x <= 2.15e-271)
tmp = t * (y * (z * -9.0));
elseif (x <= 2.6e+18)
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[LessEqual[x, -2.5e+49], N[(x * 2.0), $MachinePrecision], If[LessEqual[x, -1.45e-195], N[(y * N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.1e-260], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.15e-271], N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.6e+18], 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}\;x \leq -2.5 \cdot 10^{+49}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -1.45 \cdot 10^{-195}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;x \leq -3.1 \cdot 10^{-260}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;x \leq 2.15 \cdot 10^{-271}:\\
\;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{+18}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if x < -2.5000000000000002e49 or 2.6e18 < x Initial program 96.1%
sub-neg96.1%
sub-neg96.1%
associate-*l*96.3%
associate-*l*95.4%
Simplified95.4%
Taylor expanded in x around inf 58.5%
if -2.5000000000000002e49 < x < -1.4500000000000001e-195Initial program 92.1%
sub-neg92.1%
sub-neg92.1%
associate-*l*96.0%
associate-*l*95.9%
Simplified95.9%
Taylor expanded in y around inf 91.9%
Taylor expanded in y around inf 53.4%
if -1.4500000000000001e-195 < x < -3.09999999999999983e-260Initial program 95.4%
sub-neg95.4%
sub-neg95.4%
associate-*l*90.8%
associate-*l*95.1%
Simplified95.1%
Taylor expanded in a around inf 68.2%
associate-*r*63.8%
*-commutative63.8%
associate-*r*68.1%
Simplified68.1%
if -3.09999999999999983e-260 < x < 2.15e-271Initial program 91.1%
sub-neg91.1%
sub-neg91.1%
associate-*l*90.6%
associate-*l*90.7%
Simplified90.7%
+-commutative90.7%
associate-+r-90.7%
associate-*r*90.6%
*-commutative90.6%
associate-*l*90.7%
associate-*l*90.5%
associate-*r*90.4%
Applied egg-rr90.4%
Taylor expanded in y around inf 58.8%
associate-*r*58.9%
*-commutative58.9%
associate-*r*58.8%
*-commutative58.8%
associate-*r*58.8%
Simplified58.8%
if 2.15e-271 < x < 2.6e18Initial program 91.4%
sub-neg91.4%
sub-neg91.4%
associate-*l*91.7%
associate-*l*91.8%
Simplified91.8%
Taylor expanded in a around inf 56.0%
Final simplification57.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 (<= x -1.95e+48)
(* x 2.0)
(if (<= x -1.05e-194)
(* -9.0 (* t (* z y)))
(if (<= x -2.8e-260)
(* a (* 27.0 b))
(if (<= x 4.6e-271)
(* t (* y (* z -9.0)))
(if (<= x 4.5e+18) (* 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 (x <= -1.95e+48) {
tmp = x * 2.0;
} else if (x <= -1.05e-194) {
tmp = -9.0 * (t * (z * y));
} else if (x <= -2.8e-260) {
tmp = a * (27.0 * b);
} else if (x <= 4.6e-271) {
tmp = t * (y * (z * -9.0));
} else if (x <= 4.5e+18) {
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 (x <= (-1.95d+48)) then
tmp = x * 2.0d0
else if (x <= (-1.05d-194)) then
tmp = (-9.0d0) * (t * (z * y))
else if (x <= (-2.8d-260)) then
tmp = a * (27.0d0 * b)
else if (x <= 4.6d-271) then
tmp = t * (y * (z * (-9.0d0)))
else if (x <= 4.5d+18) 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 (x <= -1.95e+48) {
tmp = x * 2.0;
} else if (x <= -1.05e-194) {
tmp = -9.0 * (t * (z * y));
} else if (x <= -2.8e-260) {
tmp = a * (27.0 * b);
} else if (x <= 4.6e-271) {
tmp = t * (y * (z * -9.0));
} else if (x <= 4.5e+18) {
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 x <= -1.95e+48: tmp = x * 2.0 elif x <= -1.05e-194: tmp = -9.0 * (t * (z * y)) elif x <= -2.8e-260: tmp = a * (27.0 * b) elif x <= 4.6e-271: tmp = t * (y * (z * -9.0)) elif x <= 4.5e+18: 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 (x <= -1.95e+48) tmp = Float64(x * 2.0); elseif (x <= -1.05e-194) tmp = Float64(-9.0 * Float64(t * Float64(z * y))); elseif (x <= -2.8e-260) tmp = Float64(a * Float64(27.0 * b)); elseif (x <= 4.6e-271) tmp = Float64(t * Float64(y * Float64(z * -9.0))); elseif (x <= 4.5e+18) 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 (x <= -1.95e+48)
tmp = x * 2.0;
elseif (x <= -1.05e-194)
tmp = -9.0 * (t * (z * y));
elseif (x <= -2.8e-260)
tmp = a * (27.0 * b);
elseif (x <= 4.6e-271)
tmp = t * (y * (z * -9.0));
elseif (x <= 4.5e+18)
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[LessEqual[x, -1.95e+48], N[(x * 2.0), $MachinePrecision], If[LessEqual[x, -1.05e-194], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.8e-260], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.6e-271], N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.5e+18], 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}\;x \leq -1.95 \cdot 10^{+48}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -1.05 \cdot 10^{-194}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{elif}\;x \leq -2.8 \cdot 10^{-260}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;x \leq 4.6 \cdot 10^{-271}:\\
\;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+18}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if x < -1.95e48 or 4.5e18 < x Initial program 96.1%
sub-neg96.1%
sub-neg96.1%
associate-*l*96.3%
associate-*l*95.4%
Simplified95.4%
Taylor expanded in x around inf 58.5%
if -1.95e48 < x < -1.05e-194Initial program 92.1%
sub-neg92.1%
sub-neg92.1%
associate-*l*96.0%
associate-*l*95.9%
Simplified95.9%
Taylor expanded in y around inf 55.3%
if -1.05e-194 < x < -2.7999999999999998e-260Initial program 95.4%
sub-neg95.4%
sub-neg95.4%
associate-*l*90.8%
associate-*l*95.1%
Simplified95.1%
Taylor expanded in a around inf 68.2%
associate-*r*63.8%
*-commutative63.8%
associate-*r*68.1%
Simplified68.1%
if -2.7999999999999998e-260 < x < 4.60000000000000017e-271Initial program 91.1%
sub-neg91.1%
sub-neg91.1%
associate-*l*90.6%
associate-*l*90.7%
Simplified90.7%
+-commutative90.7%
associate-+r-90.7%
associate-*r*90.6%
*-commutative90.6%
associate-*l*90.7%
associate-*l*90.5%
associate-*r*90.4%
Applied egg-rr90.4%
Taylor expanded in y around inf 58.8%
associate-*r*58.9%
*-commutative58.9%
associate-*r*58.8%
*-commutative58.8%
associate-*r*58.8%
Simplified58.8%
if 4.60000000000000017e-271 < x < 4.5e18Initial program 91.4%
sub-neg91.4%
sub-neg91.4%
associate-*l*91.7%
associate-*l*91.8%
Simplified91.8%
Taylor expanded in a around inf 56.0%
Final simplification58.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 (* t (* z y)))))
(if (<= x -2.65e+48)
(* x 2.0)
(if (<= x -3.1e-196)
t_1
(if (<= x -9.5e-261)
(* a (* 27.0 b))
(if (<= x 9.8e-271)
t_1
(if (<= x 1.75e+18) (* 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 t_1 = -9.0 * (t * (z * y));
double tmp;
if (x <= -2.65e+48) {
tmp = x * 2.0;
} else if (x <= -3.1e-196) {
tmp = t_1;
} else if (x <= -9.5e-261) {
tmp = a * (27.0 * b);
} else if (x <= 9.8e-271) {
tmp = t_1;
} else if (x <= 1.75e+18) {
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) :: t_1
real(8) :: tmp
t_1 = (-9.0d0) * (t * (z * y))
if (x <= (-2.65d+48)) then
tmp = x * 2.0d0
else if (x <= (-3.1d-196)) then
tmp = t_1
else if (x <= (-9.5d-261)) then
tmp = a * (27.0d0 * b)
else if (x <= 9.8d-271) then
tmp = t_1
else if (x <= 1.75d+18) 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 t_1 = -9.0 * (t * (z * y));
double tmp;
if (x <= -2.65e+48) {
tmp = x * 2.0;
} else if (x <= -3.1e-196) {
tmp = t_1;
} else if (x <= -9.5e-261) {
tmp = a * (27.0 * b);
} else if (x <= 9.8e-271) {
tmp = t_1;
} else if (x <= 1.75e+18) {
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): t_1 = -9.0 * (t * (z * y)) tmp = 0 if x <= -2.65e+48: tmp = x * 2.0 elif x <= -3.1e-196: tmp = t_1 elif x <= -9.5e-261: tmp = a * (27.0 * b) elif x <= 9.8e-271: tmp = t_1 elif x <= 1.75e+18: 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) t_1 = Float64(-9.0 * Float64(t * Float64(z * y))) tmp = 0.0 if (x <= -2.65e+48) tmp = Float64(x * 2.0); elseif (x <= -3.1e-196) tmp = t_1; elseif (x <= -9.5e-261) tmp = Float64(a * Float64(27.0 * b)); elseif (x <= 9.8e-271) tmp = t_1; elseif (x <= 1.75e+18) 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)
t_1 = -9.0 * (t * (z * y));
tmp = 0.0;
if (x <= -2.65e+48)
tmp = x * 2.0;
elseif (x <= -3.1e-196)
tmp = t_1;
elseif (x <= -9.5e-261)
tmp = a * (27.0 * b);
elseif (x <= 9.8e-271)
tmp = t_1;
elseif (x <= 1.75e+18)
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_] := Block[{t$95$1 = N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.65e+48], N[(x * 2.0), $MachinePrecision], If[LessEqual[x, -3.1e-196], t$95$1, If[LessEqual[x, -9.5e-261], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.8e-271], t$95$1, If[LessEqual[x, 1.75e+18], 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}
t_1 := -9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{if}\;x \leq -2.65 \cdot 10^{+48}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -3.1 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -9.5 \cdot 10^{-261}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;x \leq 9.8 \cdot 10^{-271}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.75 \cdot 10^{+18}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if x < -2.65e48 or 1.75e18 < x Initial program 96.1%
sub-neg96.1%
sub-neg96.1%
associate-*l*96.3%
associate-*l*95.4%
Simplified95.4%
Taylor expanded in x around inf 58.5%
if -2.65e48 < x < -3.09999999999999993e-196 or -9.5000000000000008e-261 < x < 9.8000000000000007e-271Initial program 91.8%
sub-neg91.8%
sub-neg91.8%
associate-*l*94.3%
associate-*l*94.3%
Simplified94.3%
Taylor expanded in y around inf 56.4%
if -3.09999999999999993e-196 < x < -9.5000000000000008e-261Initial program 95.4%
sub-neg95.4%
sub-neg95.4%
associate-*l*90.8%
associate-*l*95.1%
Simplified95.1%
Taylor expanded in a around inf 68.2%
associate-*r*63.8%
*-commutative63.8%
associate-*r*68.1%
Simplified68.1%
if 9.8000000000000007e-271 < x < 1.75e18Initial program 91.4%
sub-neg91.4%
sub-neg91.4%
associate-*l*91.7%
associate-*l*91.8%
Simplified91.8%
Taylor expanded in a around inf 56.0%
Final simplification58.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 (* t (* z y))))
(if (<= z -6.8e-12)
(+ (* a (* 27.0 b)) (* -9.0 (* z (* y t))))
(if (<= z -1.2e-131)
(- (* x 2.0) (* 9.0 t_1))
(if (<= z 7.7e-50)
(+ (* x 2.0) (* 27.0 (* a b)))
(+ (* b (* a 27.0)) (* -9.0 t_1)))))))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 * (z * y);
double tmp;
if (z <= -6.8e-12) {
tmp = (a * (27.0 * b)) + (-9.0 * (z * (y * t)));
} else if (z <= -1.2e-131) {
tmp = (x * 2.0) - (9.0 * t_1);
} else if (z <= 7.7e-50) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (b * (a * 27.0)) + (-9.0 * t_1);
}
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 * (z * y)
if (z <= (-6.8d-12)) then
tmp = (a * (27.0d0 * b)) + ((-9.0d0) * (z * (y * t)))
else if (z <= (-1.2d-131)) then
tmp = (x * 2.0d0) - (9.0d0 * t_1)
else if (z <= 7.7d-50) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = (b * (a * 27.0d0)) + ((-9.0d0) * t_1)
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 * (z * y);
double tmp;
if (z <= -6.8e-12) {
tmp = (a * (27.0 * b)) + (-9.0 * (z * (y * t)));
} else if (z <= -1.2e-131) {
tmp = (x * 2.0) - (9.0 * t_1);
} else if (z <= 7.7e-50) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (b * (a * 27.0)) + (-9.0 * t_1);
}
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 * (z * y) tmp = 0 if z <= -6.8e-12: tmp = (a * (27.0 * b)) + (-9.0 * (z * (y * t))) elif z <= -1.2e-131: tmp = (x * 2.0) - (9.0 * t_1) elif z <= 7.7e-50: tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = (b * (a * 27.0)) + (-9.0 * t_1) 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(z * y)) tmp = 0.0 if (z <= -6.8e-12) tmp = Float64(Float64(a * Float64(27.0 * b)) + Float64(-9.0 * Float64(z * Float64(y * t)))); elseif (z <= -1.2e-131) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * t_1)); elseif (z <= 7.7e-50) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(Float64(b * Float64(a * 27.0)) + Float64(-9.0 * t_1)); 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 * (z * y);
tmp = 0.0;
if (z <= -6.8e-12)
tmp = (a * (27.0 * b)) + (-9.0 * (z * (y * t)));
elseif (z <= -1.2e-131)
tmp = (x * 2.0) - (9.0 * t_1);
elseif (z <= 7.7e-50)
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = (b * (a * 27.0)) + (-9.0 * 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.
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[(z * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.8e-12], N[(N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.2e-131], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.7e-50], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision] + N[(-9.0 * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(z \cdot y\right)\\
\mathbf{if}\;z \leq -6.8 \cdot 10^{-12}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right) + -9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-131}:\\
\;\;\;\;x \cdot 2 - 9 \cdot t\_1\\
\mathbf{elif}\;z \leq 7.7 \cdot 10^{-50}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right) + -9 \cdot t\_1\\
\end{array}
\end{array}
if z < -6.8000000000000001e-12Initial program 89.7%
sub-neg89.7%
sub-neg89.7%
associate-*l*90.2%
associate-*l*91.7%
Simplified91.7%
+-commutative91.7%
associate-+r-91.7%
associate-*r*90.2%
*-commutative90.2%
associate-*l*91.8%
associate-*l*90.2%
associate-*r*90.1%
Applied egg-rr90.1%
add-cube-cbrt89.8%
pow389.7%
Applied egg-rr89.7%
Taylor expanded in x around 0 75.1%
cancel-sign-sub-inv75.1%
metadata-eval75.1%
*-commutative75.1%
associate-*r*75.1%
*-commutative75.1%
associate-*r*78.5%
Simplified78.5%
if -6.8000000000000001e-12 < z < -1.2e-131Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*99.8%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in a around 0 62.5%
if -1.2e-131 < z < 7.69999999999999964e-50Initial program 98.0%
sub-neg98.0%
sub-neg98.0%
associate-*l*98.9%
associate-*l*98.9%
Simplified98.9%
Taylor expanded in y around 0 85.2%
if 7.69999999999999964e-50 < z Initial program 89.8%
sub-neg89.8%
sub-neg89.8%
associate-*l*89.7%
associate-*l*89.8%
Simplified89.8%
+-commutative89.8%
associate-+r-89.8%
associate-*r*89.7%
*-commutative89.7%
associate-*l*89.8%
associate-*l*89.8%
associate-*r*89.8%
Applied egg-rr89.8%
Taylor expanded in x around 0 71.3%
cancel-sign-sub-inv71.3%
metadata-eval71.3%
associate-*r*71.2%
*-commutative71.2%
Simplified71.2%
Final simplification77.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* a (* 27.0 b)) (* -9.0 (* z (* y t))))))
(if (<= z -7e-11)
t_1
(if (<= z -4.4e-131)
(- (* x 2.0) (* 9.0 (* t (* z y))))
(if (<= z 1.4e-49) (+ (* x 2.0) (* 27.0 (* a b))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a * (27.0 * b)) + (-9.0 * (z * (y * t)));
double tmp;
if (z <= -7e-11) {
tmp = t_1;
} else if (z <= -4.4e-131) {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
} else if (z <= 1.4e-49) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (a * (27.0d0 * b)) + ((-9.0d0) * (z * (y * t)))
if (z <= (-7d-11)) then
tmp = t_1
else if (z <= (-4.4d-131)) then
tmp = (x * 2.0d0) - (9.0d0 * (t * (z * y)))
else if (z <= 1.4d-49) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a * (27.0 * b)) + (-9.0 * (z * (y * t)));
double tmp;
if (z <= -7e-11) {
tmp = t_1;
} else if (z <= -4.4e-131) {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
} else if (z <= 1.4e-49) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = (a * (27.0 * b)) + (-9.0 * (z * (y * t))) tmp = 0 if z <= -7e-11: tmp = t_1 elif z <= -4.4e-131: tmp = (x * 2.0) - (9.0 * (t * (z * y))) elif z <= 1.4e-49: tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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(a * Float64(27.0 * b)) + Float64(-9.0 * Float64(z * Float64(y * t)))) tmp = 0.0 if (z <= -7e-11) tmp = t_1; elseif (z <= -4.4e-131) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(z * y)))); elseif (z <= 1.4e-49) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = t_1; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (a * (27.0 * b)) + (-9.0 * (z * (y * t)));
tmp = 0.0;
if (z <= -7e-11)
tmp = t_1;
elseif (z <= -4.4e-131)
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
elseif (z <= 1.4e-49)
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7e-11], t$95$1, If[LessEqual[z, -4.4e-131], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e-49], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right) + -9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{if}\;z \leq -7 \cdot 10^{-11}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.4 \cdot 10^{-131}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-49}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.00000000000000038e-11 or 1.39999999999999999e-49 < z Initial program 89.7%
sub-neg89.7%
sub-neg89.7%
associate-*l*89.9%
associate-*l*90.6%
Simplified90.6%
+-commutative90.6%
associate-+r-90.6%
associate-*r*89.9%
*-commutative89.9%
associate-*l*90.7%
associate-*l*89.9%
associate-*r*89.9%
Applied egg-rr89.9%
add-cube-cbrt89.6%
pow389.6%
Applied egg-rr89.6%
Taylor expanded in x around 0 72.9%
cancel-sign-sub-inv72.9%
metadata-eval72.9%
*-commutative72.9%
associate-*r*72.9%
*-commutative72.9%
associate-*r*77.5%
Simplified77.5%
if -7.00000000000000038e-11 < z < -4.3999999999999999e-131Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*99.8%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in a around 0 62.5%
if -4.3999999999999999e-131 < z < 1.39999999999999999e-49Initial program 98.0%
sub-neg98.0%
sub-neg98.0%
associate-*l*98.9%
associate-*l*98.9%
Simplified98.9%
Taylor expanded in y around 0 85.2%
Final simplification79.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 (<= z -1.12e+52) (+ (* a (* 27.0 b)) (* -9.0 (* z (* y t)))) (+ (- (* x 2.0) (* t (* 9.0 (* z y)))) (* b (* a 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.12e+52) {
tmp = (a * (27.0 * b)) + (-9.0 * (z * (y * t)));
} else {
tmp = ((x * 2.0) - (t * (9.0 * (z * y)))) + (b * (a * 27.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 (z <= (-1.12d+52)) then
tmp = (a * (27.0d0 * b)) + ((-9.0d0) * (z * (y * t)))
else
tmp = ((x * 2.0d0) - (t * (9.0d0 * (z * y)))) + (b * (a * 27.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 (z <= -1.12e+52) {
tmp = (a * (27.0 * b)) + (-9.0 * (z * (y * t)));
} else {
tmp = ((x * 2.0) - (t * (9.0 * (z * y)))) + (b * (a * 27.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 z <= -1.12e+52: tmp = (a * (27.0 * b)) + (-9.0 * (z * (y * t))) else: tmp = ((x * 2.0) - (t * (9.0 * (z * y)))) + (b * (a * 27.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.12e+52) tmp = Float64(Float64(a * Float64(27.0 * b)) + Float64(-9.0 * Float64(z * Float64(y * t)))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(t * Float64(9.0 * Float64(z * y)))) + Float64(b * Float64(a * 27.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 (z <= -1.12e+52)
tmp = (a * (27.0 * b)) + (-9.0 * (z * (y * t)));
else
tmp = ((x * 2.0) - (t * (9.0 * (z * y)))) + (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. 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+52], N[(N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(9.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[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^{+52}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right) + -9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - t \cdot \left(9 \cdot \left(z \cdot y\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if z < -1.12000000000000002e52Initial program 87.5%
sub-neg87.5%
sub-neg87.5%
associate-*l*88.1%
associate-*l*90.0%
Simplified90.0%
+-commutative90.0%
associate-+r-90.0%
associate-*r*88.1%
*-commutative88.1%
associate-*l*90.2%
associate-*l*88.1%
associate-*r*88.0%
Applied egg-rr88.0%
add-cube-cbrt87.7%
pow387.7%
Applied egg-rr87.7%
Taylor expanded in x around 0 74.0%
cancel-sign-sub-inv74.0%
metadata-eval74.0%
*-commutative74.0%
associate-*r*74.0%
*-commutative74.0%
associate-*r*78.2%
Simplified78.2%
if -1.12000000000000002e52 < z Initial program 95.2%
Taylor expanded in y around 0 95.1%
Final simplification92.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. (FPCore (x y z t a b) :precision binary64 (if (<= z -1.25e-42) (* (* z t) (* y -9.0)) (if (<= z 5.2e+96) (+ (* x 2.0) (* 27.0 (* a b))) (* -9.0 (* t (* z y))))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.25e-42) {
tmp = (z * t) * (y * -9.0);
} else if (z <= 5.2e+96) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = -9.0 * (t * (z * y));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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.25d-42)) then
tmp = (z * t) * (y * (-9.0d0))
else if (z <= 5.2d+96) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = (-9.0d0) * (t * (z * y))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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.25e-42) {
tmp = (z * t) * (y * -9.0);
} else if (z <= 5.2e+96) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = -9.0 * (t * (z * y));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -1.25e-42: tmp = (z * t) * (y * -9.0) elif z <= 5.2e+96: tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = -9.0 * (t * (z * y)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.25e-42) tmp = Float64(Float64(z * t) * Float64(y * -9.0)); elseif (z <= 5.2e+96) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(-9.0 * Float64(t * Float64(z * y))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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.25e-42)
tmp = (z * t) * (y * -9.0);
elseif (z <= 5.2e+96)
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = -9.0 * (t * (z * y));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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.25e-42], N[(N[(z * t), $MachinePrecision] * N[(y * -9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+96], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{-42}:\\
\;\;\;\;\left(z \cdot t\right) \cdot \left(y \cdot -9\right)\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+96}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if z < -1.25000000000000001e-42Initial program 90.4%
sub-neg90.4%
sub-neg90.4%
associate-*l*90.8%
associate-*l*92.3%
Simplified92.3%
+-commutative92.3%
associate-+r-92.3%
associate-*r*90.8%
*-commutative90.8%
associate-*l*92.4%
associate-*l*90.8%
associate-*r*90.7%
Applied egg-rr90.7%
add-cube-cbrt90.4%
pow390.4%
Applied egg-rr90.4%
Taylor expanded in y around inf 56.0%
*-commutative56.0%
associate-*r*53.4%
*-commutative53.4%
associate-*l*51.8%
*-commutative51.8%
associate-*l*53.4%
*-commutative53.4%
*-commutative53.4%
Simplified53.4%
if -1.25000000000000001e-42 < z < 5.2e96Initial program 97.3%
sub-neg97.3%
sub-neg97.3%
associate-*l*99.1%
associate-*l*98.6%
Simplified98.6%
Taylor expanded in y around 0 77.6%
if 5.2e96 < z Initial program 85.8%
sub-neg85.8%
sub-neg85.8%
associate-*l*81.2%
associate-*l*81.2%
Simplified81.2%
Taylor expanded in y around inf 51.3%
Final simplification67.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 (<= x -1.3e+17) (not (<= x 8.5e+19))) (* 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 ((x <= -1.3e+17) || !(x <= 8.5e+19)) {
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 ((x <= (-1.3d+17)) .or. (.not. (x <= 8.5d+19))) 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 ((x <= -1.3e+17) || !(x <= 8.5e+19)) {
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 (x <= -1.3e+17) or not (x <= 8.5e+19): 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 ((x <= -1.3e+17) || !(x <= 8.5e+19)) tmp = Float64(x * 2.0); else tmp = Float64(a * Float64(27.0 * b)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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.3e+17) || ~((x <= 8.5e+19)))
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[Or[LessEqual[x, -1.3e+17], N[Not[LessEqual[x, 8.5e+19]], $MachinePrecision]], N[(x * 2.0), $MachinePrecision], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{+17} \lor \neg \left(x \leq 8.5 \cdot 10^{+19}\right):\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if x < -1.3e17 or 8.5e19 < x Initial program 95.6%
sub-neg95.6%
sub-neg95.6%
associate-*l*94.9%
associate-*l*94.1%
Simplified94.1%
Taylor expanded in x around inf 56.3%
if -1.3e17 < x < 8.5e19Initial program 92.4%
sub-neg92.4%
sub-neg92.4%
associate-*l*93.7%
associate-*l*94.4%
Simplified94.4%
Taylor expanded in a around inf 49.9%
associate-*r*49.8%
*-commutative49.8%
associate-*r*49.8%
Simplified49.8%
Final simplification52.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 (or (<= a -2e-32) (not (<= a 1.5e-109))) (* 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 <= -2e-32) || !(a <= 1.5e-109)) {
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 <= (-2d-32)) .or. (.not. (a <= 1.5d-109))) 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 <= -2e-32) || !(a <= 1.5e-109)) {
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 <= -2e-32) or not (a <= 1.5e-109): 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 <= -2e-32) || !(a <= 1.5e-109)) 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 <= -2e-32) || ~((a <= 1.5e-109)))
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, -2e-32], N[Not[LessEqual[a, 1.5e-109]], $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 -2 \cdot 10^{-32} \lor \neg \left(a \leq 1.5 \cdot 10^{-109}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if a < -2.00000000000000011e-32 or 1.50000000000000011e-109 < a Initial program 92.0%
sub-neg92.0%
sub-neg92.0%
associate-*l*93.3%
associate-*l*93.9%
Simplified93.9%
Taylor expanded in a around inf 50.5%
if -2.00000000000000011e-32 < a < 1.50000000000000011e-109Initial program 96.9%
sub-neg96.9%
sub-neg96.9%
associate-*l*95.7%
associate-*l*94.7%
Simplified94.7%
Taylor expanded in x around inf 44.8%
Final simplification48.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 (* 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 93.8%
sub-neg93.8%
sub-neg93.8%
associate-*l*94.2%
associate-*l*94.2%
Simplified94.2%
Taylor expanded in x around inf 30.1%
Final simplification30.1%
(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 2024088
(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)))