
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* 27.0 b))))
(if (<= (* y 9.0) -5e+22)
(+ (- (* x 2.0) (* (* y 9.0) (* z t))) t_1)
(+ t_1 (- (* x 2.0) (* z (* (* y 9.0) t)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (27.0 * b);
double tmp;
if ((y * 9.0) <= -5e+22) {
tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + t_1;
} else {
tmp = t_1 + ((x * 2.0) - (z * ((y * 9.0) * t)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * (27.0d0 * b)
if ((y * 9.0d0) <= (-5d+22)) then
tmp = ((x * 2.0d0) - ((y * 9.0d0) * (z * t))) + t_1
else
tmp = t_1 + ((x * 2.0d0) - (z * ((y * 9.0d0) * t)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (27.0 * b);
double tmp;
if ((y * 9.0) <= -5e+22) {
tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + t_1;
} else {
tmp = t_1 + ((x * 2.0) - (z * ((y * 9.0) * t)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = a * (27.0 * b) tmp = 0 if (y * 9.0) <= -5e+22: tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + t_1 else: tmp = t_1 + ((x * 2.0) - (z * ((y * 9.0) * t))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(27.0 * b)) tmp = 0.0 if (Float64(y * 9.0) <= -5e+22) tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(z * t))) + t_1); else tmp = Float64(t_1 + Float64(Float64(x * 2.0) - Float64(z * Float64(Float64(y * 9.0) * t)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = a * (27.0 * b);
tmp = 0.0;
if ((y * 9.0) <= -5e+22)
tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + t_1;
else
tmp = t_1 + ((x * 2.0) - (z * ((y * 9.0) * t)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(y * 9.0), $MachinePrecision], -5e+22], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$1 + N[(N[(x * 2.0), $MachinePrecision] - N[(z * N[(N[(y * 9.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right)\\
\mathbf{if}\;y \cdot 9 \leq -5 \cdot 10^{+22}:\\
\;\;\;\;\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + t_1\\
\mathbf{else}:\\
\;\;\;\;t_1 + \left(x \cdot 2 - z \cdot \left(\left(y \cdot 9\right) \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 y 9) < -4.9999999999999996e22Initial program 92.6%
sub-neg92.6%
sub-neg92.6%
associate-*l*99.8%
associate-*l*99.8%
Simplified99.8%
if -4.9999999999999996e22 < (*.f64 y 9) Initial program 98.9%
sub-neg98.9%
sub-neg98.9%
associate-*l*93.3%
associate-*l*93.3%
Simplified93.3%
Taylor expanded in y around 0 98.8%
*-commutative98.8%
associate-*l*98.9%
*-commutative98.9%
associate-*r*98.9%
*-commutative98.9%
associate-*r*95.2%
*-commutative95.2%
Simplified95.2%
Final simplification96.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (* x 2.0) (* 9.0 (* t (* y z)))))
(t_2 (+ (* x 2.0) (* 27.0 (* a b)))))
(if (<= a -1.26e+194)
t_2
(if (<= a -1.7e+89)
t_1
(if (<= a -2.4e+65)
t_2
(if (<= a -5.4e+32)
(* y (* z (* t -9.0)))
(if (<= a 3.5e-129) t_1 t_2)))))))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) - (9.0 * (t * (y * z)));
double t_2 = (x * 2.0) + (27.0 * (a * b));
double tmp;
if (a <= -1.26e+194) {
tmp = t_2;
} else if (a <= -1.7e+89) {
tmp = t_1;
} else if (a <= -2.4e+65) {
tmp = t_2;
} else if (a <= -5.4e+32) {
tmp = y * (z * (t * -9.0));
} else if (a <= 3.5e-129) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x * 2.0d0) - (9.0d0 * (t * (y * z)))
t_2 = (x * 2.0d0) + (27.0d0 * (a * b))
if (a <= (-1.26d+194)) then
tmp = t_2
else if (a <= (-1.7d+89)) then
tmp = t_1
else if (a <= (-2.4d+65)) then
tmp = t_2
else if (a <= (-5.4d+32)) then
tmp = y * (z * (t * (-9.0d0)))
else if (a <= 3.5d-129) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * 2.0) - (9.0 * (t * (y * z)));
double t_2 = (x * 2.0) + (27.0 * (a * b));
double tmp;
if (a <= -1.26e+194) {
tmp = t_2;
} else if (a <= -1.7e+89) {
tmp = t_1;
} else if (a <= -2.4e+65) {
tmp = t_2;
} else if (a <= -5.4e+32) {
tmp = y * (z * (t * -9.0));
} else if (a <= 3.5e-129) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = (x * 2.0) - (9.0 * (t * (y * z))) t_2 = (x * 2.0) + (27.0 * (a * b)) tmp = 0 if a <= -1.26e+194: tmp = t_2 elif a <= -1.7e+89: tmp = t_1 elif a <= -2.4e+65: tmp = t_2 elif a <= -5.4e+32: tmp = y * (z * (t * -9.0)) elif a <= 3.5e-129: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(y * z)))) t_2 = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))) tmp = 0.0 if (a <= -1.26e+194) tmp = t_2; elseif (a <= -1.7e+89) tmp = t_1; elseif (a <= -2.4e+65) tmp = t_2; elseif (a <= -5.4e+32) tmp = Float64(y * Float64(z * Float64(t * -9.0))); elseif (a <= 3.5e-129) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (x * 2.0) - (9.0 * (t * (y * z)));
t_2 = (x * 2.0) + (27.0 * (a * b));
tmp = 0.0;
if (a <= -1.26e+194)
tmp = t_2;
elseif (a <= -1.7e+89)
tmp = t_1;
elseif (a <= -2.4e+65)
tmp = t_2;
elseif (a <= -5.4e+32)
tmp = y * (z * (t * -9.0));
elseif (a <= 3.5e-129)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.26e+194], t$95$2, If[LessEqual[a, -1.7e+89], t$95$1, If[LessEqual[a, -2.4e+65], t$95$2, If[LessEqual[a, -5.4e+32], N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.5e-129], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
t_2 := x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;a \leq -1.26 \cdot 10^{+194}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -1.7 \cdot 10^{+89}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -2.4 \cdot 10^{+65}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -5.4 \cdot 10^{+32}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;a \leq 3.5 \cdot 10^{-129}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -1.26e194 or -1.7000000000000001e89 < a < -2.4000000000000002e65 or 3.4999999999999997e-129 < a Initial program 97.3%
sub-neg97.3%
sub-neg97.3%
associate-*l*96.6%
associate-*l*96.6%
Simplified96.6%
Taylor expanded in y around 0 73.4%
if -1.26e194 < a < -1.7000000000000001e89 or -5.40000000000000025e32 < a < 3.4999999999999997e-129Initial program 97.7%
sub-neg97.7%
sub-neg97.7%
associate-*l*93.0%
associate-*l*92.9%
Simplified92.9%
Taylor expanded in a around 0 85.3%
if -2.4000000000000002e65 < a < -5.40000000000000025e32Initial program 100.0%
sub-neg100.0%
sub-neg100.0%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in a around 0 75.5%
associate-*r*75.5%
*-commutative75.5%
associate-*l*75.5%
*-commutative75.5%
Simplified75.5%
Final simplification79.9%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (* t (* y z)) -9.0)) (t_2 (* b (* a 27.0))))
(if (<= x -1.7e+76)
(* x 2.0)
(if (<= x -1.5e-163)
t_2
(if (<= x 3.25e-223)
t_1
(if (<= x 4.8e-113) t_2 (if (<= x 9e+43) t_1 (* x 2.0))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t * (y * z)) * -9.0;
double t_2 = b * (a * 27.0);
double tmp;
if (x <= -1.7e+76) {
tmp = x * 2.0;
} else if (x <= -1.5e-163) {
tmp = t_2;
} else if (x <= 3.25e-223) {
tmp = t_1;
} else if (x <= 4.8e-113) {
tmp = t_2;
} else if (x <= 9e+43) {
tmp = t_1;
} else {
tmp = x * 2.0;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (t * (y * z)) * (-9.0d0)
t_2 = b * (a * 27.0d0)
if (x <= (-1.7d+76)) then
tmp = x * 2.0d0
else if (x <= (-1.5d-163)) then
tmp = t_2
else if (x <= 3.25d-223) then
tmp = t_1
else if (x <= 4.8d-113) then
tmp = t_2
else if (x <= 9d+43) then
tmp = t_1
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t * (y * z)) * -9.0;
double t_2 = b * (a * 27.0);
double tmp;
if (x <= -1.7e+76) {
tmp = x * 2.0;
} else if (x <= -1.5e-163) {
tmp = t_2;
} else if (x <= 3.25e-223) {
tmp = t_1;
} else if (x <= 4.8e-113) {
tmp = t_2;
} else if (x <= 9e+43) {
tmp = t_1;
} else {
tmp = x * 2.0;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = (t * (y * z)) * -9.0 t_2 = b * (a * 27.0) tmp = 0 if x <= -1.7e+76: tmp = x * 2.0 elif x <= -1.5e-163: tmp = t_2 elif x <= 3.25e-223: tmp = t_1 elif x <= 4.8e-113: tmp = t_2 elif x <= 9e+43: tmp = t_1 else: tmp = x * 2.0 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(Float64(t * Float64(y * z)) * -9.0) t_2 = Float64(b * Float64(a * 27.0)) tmp = 0.0 if (x <= -1.7e+76) tmp = Float64(x * 2.0); elseif (x <= -1.5e-163) tmp = t_2; elseif (x <= 3.25e-223) tmp = t_1; elseif (x <= 4.8e-113) tmp = t_2; elseif (x <= 9e+43) tmp = t_1; else tmp = Float64(x * 2.0); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (t * (y * z)) * -9.0;
t_2 = b * (a * 27.0);
tmp = 0.0;
if (x <= -1.7e+76)
tmp = x * 2.0;
elseif (x <= -1.5e-163)
tmp = t_2;
elseif (x <= 3.25e-223)
tmp = t_1;
elseif (x <= 4.8e-113)
tmp = t_2;
elseif (x <= 9e+43)
tmp = t_1;
else
tmp = x * 2.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision] * -9.0), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.7e+76], N[(x * 2.0), $MachinePrecision], If[LessEqual[x, -1.5e-163], t$95$2, If[LessEqual[x, 3.25e-223], t$95$1, If[LessEqual[x, 4.8e-113], t$95$2, If[LessEqual[x, 9e+43], t$95$1, N[(x * 2.0), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \left(t \cdot \left(y \cdot z\right)\right) \cdot -9\\
t_2 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;x \leq -1.7 \cdot 10^{+76}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{-163}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 3.25 \cdot 10^{-223}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-113}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 9 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if x < -1.6999999999999999e76 or 9e43 < x Initial program 98.1%
sub-neg98.1%
sub-neg98.1%
associate-*l*94.5%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in x around inf 58.0%
if -1.6999999999999999e76 < x < -1.5000000000000001e-163 or 3.2499999999999998e-223 < x < 4.80000000000000024e-113Initial program 97.2%
sub-neg97.2%
sub-neg97.2%
associate-*l*96.1%
associate-*l*96.1%
Simplified96.1%
Taylor expanded in y around 0 97.1%
*-commutative97.1%
associate-*l*97.2%
*-commutative97.2%
associate-*r*97.2%
*-commutative97.2%
associate-*r*96.1%
*-commutative96.1%
Simplified96.1%
Taylor expanded in t around 0 96.1%
Taylor expanded in a around inf 52.9%
*-commutative52.9%
*-commutative52.9%
associate-*l*52.9%
*-commutative52.9%
Simplified52.9%
if -1.5000000000000001e-163 < x < 3.2499999999999998e-223 or 4.80000000000000024e-113 < x < 9e43Initial program 97.1%
sub-neg97.1%
sub-neg97.1%
associate-*l*93.4%
associate-*l*93.4%
Simplified93.4%
Taylor expanded in y around inf 65.2%
Final simplification58.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (* a 27.0))))
(if (<= x -2.4e+76)
(* x 2.0)
(if (<= x -1.35e-163)
t_1
(if (<= x 8e-224)
(* y (* z (* t -9.0)))
(if (<= x 9.8e-113)
t_1
(if (<= x 2.75e+42) (* (* t (* y z)) -9.0) (* x 2.0))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a * 27.0);
double tmp;
if (x <= -2.4e+76) {
tmp = x * 2.0;
} else if (x <= -1.35e-163) {
tmp = t_1;
} else if (x <= 8e-224) {
tmp = y * (z * (t * -9.0));
} else if (x <= 9.8e-113) {
tmp = t_1;
} else if (x <= 2.75e+42) {
tmp = (t * (y * z)) * -9.0;
} else {
tmp = x * 2.0;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a * 27.0d0)
if (x <= (-2.4d+76)) then
tmp = x * 2.0d0
else if (x <= (-1.35d-163)) then
tmp = t_1
else if (x <= 8d-224) then
tmp = y * (z * (t * (-9.0d0)))
else if (x <= 9.8d-113) then
tmp = t_1
else if (x <= 2.75d+42) then
tmp = (t * (y * z)) * (-9.0d0)
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a * 27.0);
double tmp;
if (x <= -2.4e+76) {
tmp = x * 2.0;
} else if (x <= -1.35e-163) {
tmp = t_1;
} else if (x <= 8e-224) {
tmp = y * (z * (t * -9.0));
} else if (x <= 9.8e-113) {
tmp = t_1;
} else if (x <= 2.75e+42) {
tmp = (t * (y * z)) * -9.0;
} else {
tmp = x * 2.0;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = b * (a * 27.0) tmp = 0 if x <= -2.4e+76: tmp = x * 2.0 elif x <= -1.35e-163: tmp = t_1 elif x <= 8e-224: tmp = y * (z * (t * -9.0)) elif x <= 9.8e-113: tmp = t_1 elif x <= 2.75e+42: tmp = (t * (y * z)) * -9.0 else: tmp = x * 2.0 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a * 27.0)) tmp = 0.0 if (x <= -2.4e+76) tmp = Float64(x * 2.0); elseif (x <= -1.35e-163) tmp = t_1; elseif (x <= 8e-224) tmp = Float64(y * Float64(z * Float64(t * -9.0))); elseif (x <= 9.8e-113) tmp = t_1; elseif (x <= 2.75e+42) tmp = Float64(Float64(t * Float64(y * z)) * -9.0); else tmp = Float64(x * 2.0); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = b * (a * 27.0);
tmp = 0.0;
if (x <= -2.4e+76)
tmp = x * 2.0;
elseif (x <= -1.35e-163)
tmp = t_1;
elseif (x <= 8e-224)
tmp = y * (z * (t * -9.0));
elseif (x <= 9.8e-113)
tmp = t_1;
elseif (x <= 2.75e+42)
tmp = (t * (y * z)) * -9.0;
else
tmp = x * 2.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.4e+76], N[(x * 2.0), $MachinePrecision], If[LessEqual[x, -1.35e-163], t$95$1, If[LessEqual[x, 8e-224], N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.8e-113], t$95$1, If[LessEqual[x, 2.75e+42], N[(N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision] * -9.0), $MachinePrecision], N[(x * 2.0), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;x \leq -2.4 \cdot 10^{+76}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{-163}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 8 \cdot 10^{-224}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;x \leq 9.8 \cdot 10^{-113}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.75 \cdot 10^{+42}:\\
\;\;\;\;\left(t \cdot \left(y \cdot z\right)\right) \cdot -9\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if x < -2.4e76 or 2.75000000000000001e42 < x Initial program 98.1%
sub-neg98.1%
sub-neg98.1%
associate-*l*94.5%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in x around inf 58.0%
if -2.4e76 < x < -1.35000000000000007e-163 or 8.0000000000000002e-224 < x < 9.8000000000000006e-113Initial program 97.2%
sub-neg97.2%
sub-neg97.2%
associate-*l*96.1%
associate-*l*96.1%
Simplified96.1%
Taylor expanded in y around 0 97.1%
*-commutative97.1%
associate-*l*97.2%
*-commutative97.2%
associate-*r*97.2%
*-commutative97.2%
associate-*r*96.1%
*-commutative96.1%
Simplified96.1%
Taylor expanded in t around 0 96.1%
Taylor expanded in a around inf 52.9%
*-commutative52.9%
*-commutative52.9%
associate-*l*52.9%
*-commutative52.9%
Simplified52.9%
if -1.35000000000000007e-163 < x < 8.0000000000000002e-224Initial program 94.8%
sub-neg94.8%
sub-neg94.8%
associate-*l*94.9%
associate-*l*94.9%
Simplified94.9%
Taylor expanded in x around 0 94.8%
Taylor expanded in a around 0 64.4%
associate-*r*64.4%
*-commutative64.4%
associate-*l*64.5%
*-commutative64.5%
Simplified64.5%
if 9.8000000000000006e-113 < x < 2.75000000000000001e42Initial program 99.7%
sub-neg99.7%
sub-neg99.7%
associate-*l*91.7%
associate-*l*91.7%
Simplified91.7%
Taylor expanded in y around inf 66.1%
Final simplification58.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (* a 27.0))))
(if (<= x -5.2e+78)
(* x 2.0)
(if (<= x -1.36e-163)
t_1
(if (<= x 3.95e-224)
(* y (* z (* t -9.0)))
(if (<= x 9.4e-113)
t_1
(if (<= x 1.35e+45) (* (* y z) (* t -9.0)) (* x 2.0))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a * 27.0);
double tmp;
if (x <= -5.2e+78) {
tmp = x * 2.0;
} else if (x <= -1.36e-163) {
tmp = t_1;
} else if (x <= 3.95e-224) {
tmp = y * (z * (t * -9.0));
} else if (x <= 9.4e-113) {
tmp = t_1;
} else if (x <= 1.35e+45) {
tmp = (y * z) * (t * -9.0);
} else {
tmp = x * 2.0;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a * 27.0d0)
if (x <= (-5.2d+78)) then
tmp = x * 2.0d0
else if (x <= (-1.36d-163)) then
tmp = t_1
else if (x <= 3.95d-224) then
tmp = y * (z * (t * (-9.0d0)))
else if (x <= 9.4d-113) then
tmp = t_1
else if (x <= 1.35d+45) then
tmp = (y * z) * (t * (-9.0d0))
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a * 27.0);
double tmp;
if (x <= -5.2e+78) {
tmp = x * 2.0;
} else if (x <= -1.36e-163) {
tmp = t_1;
} else if (x <= 3.95e-224) {
tmp = y * (z * (t * -9.0));
} else if (x <= 9.4e-113) {
tmp = t_1;
} else if (x <= 1.35e+45) {
tmp = (y * z) * (t * -9.0);
} else {
tmp = x * 2.0;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = b * (a * 27.0) tmp = 0 if x <= -5.2e+78: tmp = x * 2.0 elif x <= -1.36e-163: tmp = t_1 elif x <= 3.95e-224: tmp = y * (z * (t * -9.0)) elif x <= 9.4e-113: tmp = t_1 elif x <= 1.35e+45: tmp = (y * z) * (t * -9.0) else: tmp = x * 2.0 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a * 27.0)) tmp = 0.0 if (x <= -5.2e+78) tmp = Float64(x * 2.0); elseif (x <= -1.36e-163) tmp = t_1; elseif (x <= 3.95e-224) tmp = Float64(y * Float64(z * Float64(t * -9.0))); elseif (x <= 9.4e-113) tmp = t_1; elseif (x <= 1.35e+45) tmp = Float64(Float64(y * z) * Float64(t * -9.0)); else tmp = Float64(x * 2.0); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = b * (a * 27.0);
tmp = 0.0;
if (x <= -5.2e+78)
tmp = x * 2.0;
elseif (x <= -1.36e-163)
tmp = t_1;
elseif (x <= 3.95e-224)
tmp = y * (z * (t * -9.0));
elseif (x <= 9.4e-113)
tmp = t_1;
elseif (x <= 1.35e+45)
tmp = (y * z) * (t * -9.0);
else
tmp = x * 2.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.2e+78], N[(x * 2.0), $MachinePrecision], If[LessEqual[x, -1.36e-163], t$95$1, If[LessEqual[x, 3.95e-224], N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.4e-113], t$95$1, If[LessEqual[x, 1.35e+45], N[(N[(y * z), $MachinePrecision] * N[(t * -9.0), $MachinePrecision]), $MachinePrecision], N[(x * 2.0), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;x \leq -5.2 \cdot 10^{+78}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -1.36 \cdot 10^{-163}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 3.95 \cdot 10^{-224}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;x \leq 9.4 \cdot 10^{-113}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{+45}:\\
\;\;\;\;\left(y \cdot z\right) \cdot \left(t \cdot -9\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if x < -5.2e78 or 1.34999999999999992e45 < x Initial program 98.1%
sub-neg98.1%
sub-neg98.1%
associate-*l*94.5%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in x around inf 58.0%
if -5.2e78 < x < -1.36e-163 or 3.9499999999999999e-224 < x < 9.4000000000000004e-113Initial program 97.2%
sub-neg97.2%
sub-neg97.2%
associate-*l*96.1%
associate-*l*96.1%
Simplified96.1%
Taylor expanded in y around 0 97.1%
*-commutative97.1%
associate-*l*97.2%
*-commutative97.2%
associate-*r*97.2%
*-commutative97.2%
associate-*r*96.1%
*-commutative96.1%
Simplified96.1%
Taylor expanded in t around 0 96.1%
Taylor expanded in a around inf 52.9%
*-commutative52.9%
*-commutative52.9%
associate-*l*52.9%
*-commutative52.9%
Simplified52.9%
if -1.36e-163 < x < 3.9499999999999999e-224Initial program 94.8%
sub-neg94.8%
sub-neg94.8%
associate-*l*94.9%
associate-*l*94.9%
Simplified94.9%
Taylor expanded in x around 0 94.8%
Taylor expanded in a around 0 64.4%
associate-*r*64.4%
*-commutative64.4%
associate-*l*64.5%
*-commutative64.5%
Simplified64.5%
if 9.4000000000000004e-113 < x < 1.34999999999999992e45Initial program 99.7%
sub-neg99.7%
sub-neg99.7%
associate-*l*91.7%
associate-*l*91.7%
Simplified91.7%
Taylor expanded in x around 0 85.5%
Taylor expanded in a around 0 66.1%
associate-*r*66.1%
Simplified66.1%
Final simplification58.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= b -2.7e-98) (not (<= b 2.7e+60))) (- (* 27.0 (* a b)) (* 9.0 (* t (* y z)))) (- (* x 2.0) (* y (* t (* 9.0 z))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.7e-98) || !(b <= 2.7e+60)) {
tmp = (27.0 * (a * b)) - (9.0 * (t * (y * z)));
} else {
tmp = (x * 2.0) - (y * (t * (9.0 * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-2.7d-98)) .or. (.not. (b <= 2.7d+60))) then
tmp = (27.0d0 * (a * b)) - (9.0d0 * (t * (y * z)))
else
tmp = (x * 2.0d0) - (y * (t * (9.0d0 * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.7e-98) || !(b <= 2.7e+60)) {
tmp = (27.0 * (a * b)) - (9.0 * (t * (y * z)));
} else {
tmp = (x * 2.0) - (y * (t * (9.0 * z)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (b <= -2.7e-98) or not (b <= 2.7e+60): tmp = (27.0 * (a * b)) - (9.0 * (t * (y * z))) else: tmp = (x * 2.0) - (y * (t * (9.0 * z))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2.7e-98) || !(b <= 2.7e+60)) tmp = Float64(Float64(27.0 * Float64(a * b)) - Float64(9.0 * Float64(t * Float64(y * z)))); else tmp = Float64(Float64(x * 2.0) - Float64(y * Float64(t * Float64(9.0 * z)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((b <= -2.7e-98) || ~((b <= 2.7e+60)))
tmp = (27.0 * (a * b)) - (9.0 * (t * (y * z)));
else
tmp = (x * 2.0) - (y * (t * (9.0 * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.7e-98], N[Not[LessEqual[b, 2.7e+60]], $MachinePrecision]], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(y * N[(t * N[(9.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.7 \cdot 10^{-98} \lor \neg \left(b \leq 2.7 \cdot 10^{+60}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right) - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - y \cdot \left(t \cdot \left(9 \cdot z\right)\right)\\
\end{array}
\end{array}
if b < -2.6999999999999999e-98 or 2.6999999999999999e60 < b Initial program 96.8%
sub-neg96.8%
sub-neg96.8%
associate-*l*92.4%
associate-*l*92.4%
Simplified92.4%
Taylor expanded in x around 0 76.8%
if -2.6999999999999999e-98 < b < 2.6999999999999999e60Initial program 98.3%
sub-neg98.3%
sub-neg98.3%
associate-*l*96.8%
associate-*l*96.9%
Simplified96.9%
+-commutative96.9%
associate-+r-96.9%
*-commutative96.9%
associate-*l*96.8%
associate-*l*96.8%
associate-*r*96.9%
Applied egg-rr96.9%
Taylor expanded in b around 0 82.9%
Final simplification79.9%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z -1.75e+83) (- (* x 2.0) (* y (* t (* 9.0 z)))) (+ (* a (* 27.0 b)) (- (* x 2.0) (* (* 9.0 t) (* y z))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.75e+83) {
tmp = (x * 2.0) - (y * (t * (9.0 * z)));
} else {
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((9.0 * t) * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.75d+83)) then
tmp = (x * 2.0d0) - (y * (t * (9.0d0 * z)))
else
tmp = (a * (27.0d0 * b)) + ((x * 2.0d0) - ((9.0d0 * t) * (y * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.75e+83) {
tmp = (x * 2.0) - (y * (t * (9.0 * z)));
} else {
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((9.0 * t) * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -1.75e+83: tmp = (x * 2.0) - (y * (t * (9.0 * z))) else: tmp = (a * (27.0 * b)) + ((x * 2.0) - ((9.0 * t) * (y * z))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.75e+83) tmp = Float64(Float64(x * 2.0) - Float64(y * Float64(t * Float64(9.0 * z)))); else tmp = Float64(Float64(a * Float64(27.0 * b)) + Float64(Float64(x * 2.0) - Float64(Float64(9.0 * t) * Float64(y * z)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -1.75e+83)
tmp = (x * 2.0) - (y * (t * (9.0 * z)));
else
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((9.0 * t) * (y * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.75e+83], N[(N[(x * 2.0), $MachinePrecision] - N[(y * N[(t * N[(9.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(N[(9.0 * t), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+83}:\\
\;\;\;\;x \cdot 2 - y \cdot \left(t \cdot \left(9 \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right) + \left(x \cdot 2 - \left(9 \cdot t\right) \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -1.74999999999999989e83Initial program 92.1%
sub-neg92.1%
sub-neg92.1%
associate-*l*82.9%
associate-*l*83.0%
Simplified83.0%
+-commutative83.0%
associate-+r-83.0%
*-commutative83.0%
associate-*l*82.9%
associate-*l*82.8%
associate-*r*82.9%
Applied egg-rr82.9%
Taylor expanded in b around 0 56.1%
if -1.74999999999999989e83 < z Initial program 98.9%
sub-neg98.9%
sub-neg98.9%
associate-*l*97.5%
associate-*l*97.5%
Simplified97.5%
Taylor expanded in y around 0 98.9%
associate-*r*98.9%
Simplified98.9%
Final simplification90.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* 27.0 b))))
(if (<= t 2e-135)
(+ t_1 (- (* x 2.0) (* z (* 9.0 (* y t)))))
(+ t_1 (- (* x 2.0) (* (* 9.0 t) (* y z)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (27.0 * b);
double tmp;
if (t <= 2e-135) {
tmp = t_1 + ((x * 2.0) - (z * (9.0 * (y * t))));
} else {
tmp = t_1 + ((x * 2.0) - ((9.0 * t) * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * (27.0d0 * b)
if (t <= 2d-135) then
tmp = t_1 + ((x * 2.0d0) - (z * (9.0d0 * (y * t))))
else
tmp = t_1 + ((x * 2.0d0) - ((9.0d0 * t) * (y * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (27.0 * b);
double tmp;
if (t <= 2e-135) {
tmp = t_1 + ((x * 2.0) - (z * (9.0 * (y * t))));
} else {
tmp = t_1 + ((x * 2.0) - ((9.0 * t) * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = a * (27.0 * b) tmp = 0 if t <= 2e-135: tmp = t_1 + ((x * 2.0) - (z * (9.0 * (y * t)))) else: tmp = t_1 + ((x * 2.0) - ((9.0 * t) * (y * z))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(27.0 * b)) tmp = 0.0 if (t <= 2e-135) tmp = Float64(t_1 + Float64(Float64(x * 2.0) - Float64(z * Float64(9.0 * Float64(y * t))))); else tmp = Float64(t_1 + Float64(Float64(x * 2.0) - Float64(Float64(9.0 * t) * Float64(y * z)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = a * (27.0 * b);
tmp = 0.0;
if (t <= 2e-135)
tmp = t_1 + ((x * 2.0) - (z * (9.0 * (y * t))));
else
tmp = t_1 + ((x * 2.0) - ((9.0 * t) * (y * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 2e-135], N[(t$95$1 + N[(N[(x * 2.0), $MachinePrecision] - N[(z * N[(9.0 * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[(x * 2.0), $MachinePrecision] - N[(N[(9.0 * t), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right)\\
\mathbf{if}\;t \leq 2 \cdot 10^{-135}:\\
\;\;\;\;t_1 + \left(x \cdot 2 - z \cdot \left(9 \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 + \left(x \cdot 2 - \left(9 \cdot t\right) \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if t < 2.0000000000000001e-135Initial program 96.9%
sub-neg96.9%
sub-neg96.9%
associate-*l*95.3%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in y around 0 96.9%
*-commutative96.9%
associate-*l*96.9%
*-commutative96.9%
associate-*r*96.9%
*-commutative96.9%
associate-*r*95.9%
*-commutative95.9%
Simplified95.9%
Taylor expanded in t around 0 95.9%
if 2.0000000000000001e-135 < t Initial program 98.8%
sub-neg98.8%
sub-neg98.8%
associate-*l*93.5%
associate-*l*93.5%
Simplified93.5%
Taylor expanded in y around 0 98.7%
associate-*r*98.7%
Simplified98.7%
Final simplification96.9%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= a -5.2e+193) (not (<= a 3.5e-129))) (+ (* x 2.0) (* 27.0 (* a b))) (- (* x 2.0) (* y (* z (* 9.0 t))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -5.2e+193) || !(a <= 3.5e-129)) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (y * (z * (9.0 * t)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-5.2d+193)) .or. (.not. (a <= 3.5d-129))) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = (x * 2.0d0) - (y * (z * (9.0d0 * t)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -5.2e+193) || !(a <= 3.5e-129)) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (y * (z * (9.0 * t)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (a <= -5.2e+193) or not (a <= 3.5e-129): tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = (x * 2.0) - (y * (z * (9.0 * t))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -5.2e+193) || !(a <= 3.5e-129)) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(Float64(x * 2.0) - Float64(y * Float64(z * Float64(9.0 * t)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((a <= -5.2e+193) || ~((a <= 3.5e-129)))
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = (x * 2.0) - (y * (z * (9.0 * t)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -5.2e+193], N[Not[LessEqual[a, 3.5e-129]], $MachinePrecision]], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(y * N[(z * N[(9.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.2 \cdot 10^{+193} \lor \neg \left(a \leq 3.5 \cdot 10^{-129}\right):\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - y \cdot \left(z \cdot \left(9 \cdot t\right)\right)\\
\end{array}
\end{array}
if a < -5.20000000000000026e193 or 3.4999999999999997e-129 < a Initial program 97.2%
sub-neg97.2%
sub-neg97.2%
associate-*l*96.5%
associate-*l*96.5%
Simplified96.5%
Taylor expanded in y around 0 73.6%
if -5.20000000000000026e193 < a < 3.4999999999999997e-129Initial program 97.8%
sub-neg97.8%
sub-neg97.8%
associate-*l*93.3%
associate-*l*93.3%
Simplified93.3%
+-commutative93.3%
associate-+r-93.3%
*-commutative93.3%
associate-*l*93.3%
associate-*l*93.2%
associate-*r*93.3%
Applied egg-rr93.3%
Taylor expanded in b around 0 80.9%
Taylor expanded in y around 0 84.6%
associate-*r*84.7%
*-commutative84.7%
associate-*l*80.8%
Simplified80.8%
Final simplification77.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= a -4.4e+193) (not (<= a 3.5e-129))) (+ (* x 2.0) (* 27.0 (* a b))) (- (* x 2.0) (* y (* t (* 9.0 z))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.4e+193) || !(a <= 3.5e-129)) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (y * (t * (9.0 * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-4.4d+193)) .or. (.not. (a <= 3.5d-129))) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = (x * 2.0d0) - (y * (t * (9.0d0 * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.4e+193) || !(a <= 3.5e-129)) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (y * (t * (9.0 * z)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (a <= -4.4e+193) or not (a <= 3.5e-129): tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = (x * 2.0) - (y * (t * (9.0 * z))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -4.4e+193) || !(a <= 3.5e-129)) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(Float64(x * 2.0) - Float64(y * Float64(t * Float64(9.0 * z)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((a <= -4.4e+193) || ~((a <= 3.5e-129)))
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = (x * 2.0) - (y * (t * (9.0 * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -4.4e+193], N[Not[LessEqual[a, 3.5e-129]], $MachinePrecision]], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(y * N[(t * N[(9.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.4 \cdot 10^{+193} \lor \neg \left(a \leq 3.5 \cdot 10^{-129}\right):\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - y \cdot \left(t \cdot \left(9 \cdot z\right)\right)\\
\end{array}
\end{array}
if a < -4.39999999999999972e193 or 3.4999999999999997e-129 < a Initial program 97.2%
sub-neg97.2%
sub-neg97.2%
associate-*l*96.5%
associate-*l*96.5%
Simplified96.5%
Taylor expanded in y around 0 73.6%
if -4.39999999999999972e193 < a < 3.4999999999999997e-129Initial program 97.8%
sub-neg97.8%
sub-neg97.8%
associate-*l*93.3%
associate-*l*93.3%
Simplified93.3%
+-commutative93.3%
associate-+r-93.3%
*-commutative93.3%
associate-*l*93.3%
associate-*l*93.2%
associate-*r*93.3%
Applied egg-rr93.3%
Taylor expanded in b around 0 80.9%
Final simplification77.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z -16000000000000.0) (* y (* z (* t -9.0))) (if (<= z 0.52) (+ (* x 2.0) (* 27.0 (* a b))) (* (* t (* y z)) -9.0))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -16000000000000.0) {
tmp = y * (z * (t * -9.0));
} else if (z <= 0.52) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (t * (y * z)) * -9.0;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-16000000000000.0d0)) then
tmp = y * (z * (t * (-9.0d0)))
else if (z <= 0.52d0) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = (t * (y * z)) * (-9.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -16000000000000.0) {
tmp = y * (z * (t * -9.0));
} else if (z <= 0.52) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (t * (y * z)) * -9.0;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -16000000000000.0: tmp = y * (z * (t * -9.0)) elif z <= 0.52: tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = (t * (y * z)) * -9.0 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -16000000000000.0) tmp = Float64(y * Float64(z * Float64(t * -9.0))); elseif (z <= 0.52) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(Float64(t * Float64(y * z)) * -9.0); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -16000000000000.0)
tmp = y * (z * (t * -9.0));
elseif (z <= 0.52)
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = (t * (y * z)) * -9.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -16000000000000.0], N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.52], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision] * -9.0), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -16000000000000:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq 0.52:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot \left(y \cdot z\right)\right) \cdot -9\\
\end{array}
\end{array}
if z < -1.6e13Initial program 93.8%
sub-neg93.8%
sub-neg93.8%
associate-*l*85.1%
associate-*l*85.2%
Simplified85.2%
Taylor expanded in x around 0 78.2%
Taylor expanded in a around 0 58.0%
associate-*r*58.0%
*-commutative58.0%
associate-*l*45.7%
*-commutative45.7%
Simplified45.7%
if -1.6e13 < z < 0.52000000000000002Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*99.2%
associate-*l*99.1%
Simplified99.1%
Taylor expanded in y around 0 76.2%
if 0.52000000000000002 < z Initial program 96.2%
sub-neg96.2%
sub-neg96.2%
associate-*l*94.4%
associate-*l*94.4%
Simplified94.4%
Taylor expanded in y around inf 63.0%
Final simplification65.9%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= x -2.8e+78) (not (<= x 4.1e+96))) (* x 2.0) (* 27.0 (* a b))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -2.8e+78) || !(x <= 4.1e+96)) {
tmp = x * 2.0;
} else {
tmp = 27.0 * (a * b);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((x <= (-2.8d+78)) .or. (.not. (x <= 4.1d+96))) then
tmp = x * 2.0d0
else
tmp = 27.0d0 * (a * b)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -2.8e+78) || !(x <= 4.1e+96)) {
tmp = x * 2.0;
} else {
tmp = 27.0 * (a * b);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (x <= -2.8e+78) or not (x <= 4.1e+96): tmp = x * 2.0 else: tmp = 27.0 * (a * b) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((x <= -2.8e+78) || !(x <= 4.1e+96)) tmp = Float64(x * 2.0); else tmp = Float64(27.0 * Float64(a * b)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((x <= -2.8e+78) || ~((x <= 4.1e+96)))
tmp = x * 2.0;
else
tmp = 27.0 * (a * b);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -2.8e+78], N[Not[LessEqual[x, 4.1e+96]], $MachinePrecision]], N[(x * 2.0), $MachinePrecision], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.8 \cdot 10^{+78} \lor \neg \left(x \leq 4.1 \cdot 10^{+96}\right):\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if x < -2.8000000000000001e78 or 4.09999999999999998e96 < x Initial program 97.9%
sub-neg97.9%
sub-neg97.9%
associate-*l*93.9%
associate-*l*93.9%
Simplified93.9%
Taylor expanded in x around inf 60.3%
if -2.8000000000000001e78 < x < 4.09999999999999998e96Initial program 97.4%
sub-neg97.4%
sub-neg97.4%
associate-*l*95.1%
associate-*l*95.1%
Simplified95.1%
Taylor expanded in y around 0 97.4%
*-commutative97.4%
associate-*l*97.4%
*-commutative97.4%
associate-*r*97.4%
*-commutative97.4%
associate-*r*95.1%
*-commutative95.1%
Simplified95.1%
Taylor expanded in t around 0 95.1%
Taylor expanded in a around inf 42.1%
Final simplification48.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= x -2.1e+77) (not (<= x 6.2e+101))) (* x 2.0) (* a (* 27.0 b))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -2.1e+77) || !(x <= 6.2e+101)) {
tmp = x * 2.0;
} else {
tmp = a * (27.0 * b);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((x <= (-2.1d+77)) .or. (.not. (x <= 6.2d+101))) then
tmp = x * 2.0d0
else
tmp = a * (27.0d0 * b)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -2.1e+77) || !(x <= 6.2e+101)) {
tmp = x * 2.0;
} else {
tmp = a * (27.0 * b);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (x <= -2.1e+77) or not (x <= 6.2e+101): tmp = x * 2.0 else: tmp = a * (27.0 * b) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((x <= -2.1e+77) || !(x <= 6.2e+101)) tmp = Float64(x * 2.0); else tmp = Float64(a * Float64(27.0 * b)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((x <= -2.1e+77) || ~((x <= 6.2e+101)))
tmp = x * 2.0;
else
tmp = a * (27.0 * b);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -2.1e+77], N[Not[LessEqual[x, 6.2e+101]], $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])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{+77} \lor \neg \left(x \leq 6.2 \cdot 10^{+101}\right):\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if x < -2.0999999999999999e77 or 6.19999999999999998e101 < x Initial program 97.9%
sub-neg97.9%
sub-neg97.9%
associate-*l*93.9%
associate-*l*93.9%
Simplified93.9%
Taylor expanded in x around inf 60.3%
if -2.0999999999999999e77 < x < 6.19999999999999998e101Initial program 97.4%
sub-neg97.4%
sub-neg97.4%
associate-*l*95.1%
associate-*l*95.1%
Simplified95.1%
Taylor expanded in y around 0 97.4%
*-commutative97.4%
associate-*l*97.4%
*-commutative97.4%
associate-*r*97.4%
*-commutative97.4%
associate-*r*95.1%
*-commutative95.1%
Simplified95.1%
Taylor expanded in t around 0 95.1%
Taylor expanded in a around inf 42.1%
associate-*r*42.1%
*-commutative42.1%
associate-*r*42.1%
Simplified42.1%
Final simplification48.9%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= x -4.5e+76) (not (<= x 4.7e+95))) (* x 2.0) (* b (* a 27.0))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -4.5e+76) || !(x <= 4.7e+95)) {
tmp = x * 2.0;
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((x <= (-4.5d+76)) .or. (.not. (x <= 4.7d+95))) then
tmp = x * 2.0d0
else
tmp = b * (a * 27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -4.5e+76) || !(x <= 4.7e+95)) {
tmp = x * 2.0;
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (x <= -4.5e+76) or not (x <= 4.7e+95): tmp = x * 2.0 else: tmp = b * (a * 27.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((x <= -4.5e+76) || !(x <= 4.7e+95)) tmp = Float64(x * 2.0); else tmp = Float64(b * Float64(a * 27.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((x <= -4.5e+76) || ~((x <= 4.7e+95)))
tmp = x * 2.0;
else
tmp = b * (a * 27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -4.5e+76], N[Not[LessEqual[x, 4.7e+95]], $MachinePrecision]], N[(x * 2.0), $MachinePrecision], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.5 \cdot 10^{+76} \lor \neg \left(x \leq 4.7 \cdot 10^{+95}\right):\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if x < -4.4999999999999997e76 or 4.69999999999999972e95 < x Initial program 97.9%
sub-neg97.9%
sub-neg97.9%
associate-*l*93.9%
associate-*l*93.9%
Simplified93.9%
Taylor expanded in x around inf 60.3%
if -4.4999999999999997e76 < x < 4.69999999999999972e95Initial program 97.4%
sub-neg97.4%
sub-neg97.4%
associate-*l*95.1%
associate-*l*95.1%
Simplified95.1%
Taylor expanded in y around 0 97.4%
*-commutative97.4%
associate-*l*97.4%
*-commutative97.4%
associate-*r*97.4%
*-commutative97.4%
associate-*r*95.1%
*-commutative95.1%
Simplified95.1%
Taylor expanded in t around 0 95.1%
Taylor expanded in a around inf 42.1%
*-commutative42.1%
*-commutative42.1%
associate-*l*42.1%
*-commutative42.1%
Simplified42.1%
Final simplification48.9%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (* x 2.0))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * 2.0d0
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): return x * 2.0
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(x * 2.0) end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
tmp = x * 2.0;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := N[(x * 2.0), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
x \cdot 2
\end{array}
Initial program 97.6%
sub-neg97.6%
sub-neg97.6%
associate-*l*94.7%
associate-*l*94.7%
Simplified94.7%
Taylor expanded in x around inf 29.9%
Final simplification29.9%
(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 2024018
(FPCore (x y z t a b)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, A"
:precision binary64
:herbie-target
(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)))