
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
(t_2 (/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* z c))))
(if (<= t_1 -2e-275)
t_2
(if (<= t_1 0.0)
(/ (+ (* -4.0 (/ (* a (* z t)) c)) (+ (* 9.0 (* x (/ y c))) (/ b c))) z)
(if (<= t_1 INFINITY) t_2 (* a (/ (+ (* t -4.0) (/ b (* z a))) c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
double t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c);
double tmp;
if (t_1 <= -2e-275) {
tmp = t_2;
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * ((a * (z * t)) / c)) + ((9.0 * (x * (y / c))) + (b / c))) / z;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = a * (((t * -4.0) + (b / (z * a))) / c);
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
double t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c);
double tmp;
if (t_1 <= -2e-275) {
tmp = t_2;
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * ((a * (z * t)) / c)) + ((9.0 * (x * (y / c))) + (b / c))) / z;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = a * (((t * -4.0) + (b / (z * a))) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c) t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c) tmp = 0 if t_1 <= -2e-275: tmp = t_2 elif t_1 <= 0.0: tmp = ((-4.0 * ((a * (z * t)) / c)) + ((9.0 * (x * (y / c))) + (b / c))) / z elif t_1 <= math.inf: tmp = t_2 else: tmp = a * (((t * -4.0) + (b / (z * a))) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) t_2 = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(z * c)) tmp = 0.0 if (t_1 <= -2e-275) tmp = t_2; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(-4.0 * Float64(Float64(a * Float64(z * t)) / c)) + Float64(Float64(9.0 * Float64(x * Float64(y / c))) + Float64(b / c))) / z); elseif (t_1 <= Inf) tmp = t_2; else tmp = Float64(a * Float64(Float64(Float64(t * -4.0) + Float64(b / Float64(z * a))) / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c);
tmp = 0.0;
if (t_1 <= -2e-275)
tmp = t_2;
elseif (t_1 <= 0.0)
tmp = ((-4.0 * ((a * (z * t)) / c)) + ((9.0 * (x * (y / c))) + (b / c))) / z;
elseif (t_1 <= Inf)
tmp = t_2;
else
tmp = a * (((t * -4.0) + (b / (z * a))) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-275], t$95$2, If[LessEqual[t$95$1, 0.0], N[(N[(N[(-4.0 * N[(N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(x * N[(y / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$2, N[(a * N[(N[(N[(t * -4.0), $MachinePrecision] + N[(b / N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\
t_2 := \frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-275}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{-4 \cdot \frac{a \cdot \left(z \cdot t\right)}{c} + \left(9 \cdot \left(x \cdot \frac{y}{c}\right) + \frac{b}{c}\right)}{z}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t \cdot -4 + \frac{b}{z \cdot a}}{c}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -1.99999999999999987e-275 or -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 89.3%
associate-+l-89.3%
*-commutative89.3%
associate-*r*88.1%
*-commutative88.1%
associate-+l-88.1%
associate-*l*88.1%
associate-*l*90.5%
*-commutative90.5%
Simplified90.5%
if -1.99999999999999987e-275 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -0.0Initial program 8.7%
associate-+l-8.7%
*-commutative8.7%
associate-*r*13.6%
*-commutative13.6%
associate-+l-13.6%
associate-*l*13.6%
associate-*l*15.0%
*-commutative15.0%
Simplified15.0%
Taylor expanded in z around 0 93.5%
associate-/l*93.5%
Applied egg-rr93.5%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*6.9%
*-commutative6.9%
associate-+l-6.9%
associate-*l*6.9%
associate-*l*6.9%
*-commutative6.9%
Simplified6.9%
Taylor expanded in x around 0 0.2%
Taylor expanded in a around inf 71.3%
Taylor expanded in c around 0 71.1%
Final simplification89.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
(t_2 (/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* z c))))
(if (<= t_1 -2e-275)
t_2
(if (<= t_1 0.0)
(/ (+ (/ b c) (* 9.0 (/ (* x y) c))) z)
(if (<= t_1 INFINITY) t_2 (* a (/ (+ (* t -4.0) (/ b (* z a))) c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
double t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c);
double tmp;
if (t_1 <= -2e-275) {
tmp = t_2;
} else if (t_1 <= 0.0) {
tmp = ((b / c) + (9.0 * ((x * y) / c))) / z;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = a * (((t * -4.0) + (b / (z * a))) / c);
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
double t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c);
double tmp;
if (t_1 <= -2e-275) {
tmp = t_2;
} else if (t_1 <= 0.0) {
tmp = ((b / c) + (9.0 * ((x * y) / c))) / z;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = a * (((t * -4.0) + (b / (z * a))) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c) t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c) tmp = 0 if t_1 <= -2e-275: tmp = t_2 elif t_1 <= 0.0: tmp = ((b / c) + (9.0 * ((x * y) / c))) / z elif t_1 <= math.inf: tmp = t_2 else: tmp = a * (((t * -4.0) + (b / (z * a))) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) t_2 = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(z * c)) tmp = 0.0 if (t_1 <= -2e-275) tmp = t_2; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(b / c) + Float64(9.0 * Float64(Float64(x * y) / c))) / z); elseif (t_1 <= Inf) tmp = t_2; else tmp = Float64(a * Float64(Float64(Float64(t * -4.0) + Float64(b / Float64(z * a))) / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c);
tmp = 0.0;
if (t_1 <= -2e-275)
tmp = t_2;
elseif (t_1 <= 0.0)
tmp = ((b / c) + (9.0 * ((x * y) / c))) / z;
elseif (t_1 <= Inf)
tmp = t_2;
else
tmp = a * (((t * -4.0) + (b / (z * a))) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-275], t$95$2, If[LessEqual[t$95$1, 0.0], N[(N[(N[(b / c), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$2, N[(a * N[(N[(N[(t * -4.0), $MachinePrecision] + N[(b / N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\
t_2 := \frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-275}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{\frac{b}{c} + 9 \cdot \frac{x \cdot y}{c}}{z}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t \cdot -4 + \frac{b}{z \cdot a}}{c}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -1.99999999999999987e-275 or -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 89.3%
associate-+l-89.3%
*-commutative89.3%
associate-*r*88.1%
*-commutative88.1%
associate-+l-88.1%
associate-*l*88.1%
associate-*l*90.5%
*-commutative90.5%
Simplified90.5%
if -1.99999999999999987e-275 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -0.0Initial program 8.7%
associate-+l-8.7%
*-commutative8.7%
associate-*r*13.6%
*-commutative13.6%
associate-+l-13.6%
associate-*l*13.6%
associate-*l*15.0%
*-commutative15.0%
Simplified15.0%
Taylor expanded in z around 0 93.5%
Taylor expanded in a around 0 75.2%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*6.9%
*-commutative6.9%
associate-+l-6.9%
associate-*l*6.9%
associate-*l*6.9%
*-commutative6.9%
Simplified6.9%
Taylor expanded in x around 0 0.2%
Taylor expanded in a around inf 71.3%
Taylor expanded in c around 0 71.1%
Final simplification88.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c)))) (t_2 (/ (/ b c) z)))
(if (<= b -3.5e+100)
t_2
(if (<= b -320000.0)
t_1
(if (<= b -1.65e-32)
(* 9.0 (* y (/ (/ x c) z)))
(if (<= b -3.6e-76)
t_1
(if (<= b -1.46e-111)
(/ (* 9.0 (* x y)) (* z c))
(if (<= b 1.1e-192)
(* a (/ (* t -4.0) c))
(if (<= b 4.4e+133) (* 9.0 (* (/ y c) (/ x z))) t_2)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (t * (a / c));
double t_2 = (b / c) / z;
double tmp;
if (b <= -3.5e+100) {
tmp = t_2;
} else if (b <= -320000.0) {
tmp = t_1;
} else if (b <= -1.65e-32) {
tmp = 9.0 * (y * ((x / c) / z));
} else if (b <= -3.6e-76) {
tmp = t_1;
} else if (b <= -1.46e-111) {
tmp = (9.0 * (x * y)) / (z * c);
} else if (b <= 1.1e-192) {
tmp = a * ((t * -4.0) / c);
} else if (b <= 4.4e+133) {
tmp = 9.0 * ((y / c) * (x / z));
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * (t * (a / c))
t_2 = (b / c) / z
if (b <= (-3.5d+100)) then
tmp = t_2
else if (b <= (-320000.0d0)) then
tmp = t_1
else if (b <= (-1.65d-32)) then
tmp = 9.0d0 * (y * ((x / c) / z))
else if (b <= (-3.6d-76)) then
tmp = t_1
else if (b <= (-1.46d-111)) then
tmp = (9.0d0 * (x * y)) / (z * c)
else if (b <= 1.1d-192) then
tmp = a * ((t * (-4.0d0)) / c)
else if (b <= 4.4d+133) then
tmp = 9.0d0 * ((y / c) * (x / z))
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (t * (a / c));
double t_2 = (b / c) / z;
double tmp;
if (b <= -3.5e+100) {
tmp = t_2;
} else if (b <= -320000.0) {
tmp = t_1;
} else if (b <= -1.65e-32) {
tmp = 9.0 * (y * ((x / c) / z));
} else if (b <= -3.6e-76) {
tmp = t_1;
} else if (b <= -1.46e-111) {
tmp = (9.0 * (x * y)) / (z * c);
} else if (b <= 1.1e-192) {
tmp = a * ((t * -4.0) / c);
} else if (b <= 4.4e+133) {
tmp = 9.0 * ((y / c) * (x / z));
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (t * (a / c)) t_2 = (b / c) / z tmp = 0 if b <= -3.5e+100: tmp = t_2 elif b <= -320000.0: tmp = t_1 elif b <= -1.65e-32: tmp = 9.0 * (y * ((x / c) / z)) elif b <= -3.6e-76: tmp = t_1 elif b <= -1.46e-111: tmp = (9.0 * (x * y)) / (z * c) elif b <= 1.1e-192: tmp = a * ((t * -4.0) / c) elif b <= 4.4e+133: tmp = 9.0 * ((y / c) * (x / z)) else: tmp = t_2 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(t * Float64(a / c))) t_2 = Float64(Float64(b / c) / z) tmp = 0.0 if (b <= -3.5e+100) tmp = t_2; elseif (b <= -320000.0) tmp = t_1; elseif (b <= -1.65e-32) tmp = Float64(9.0 * Float64(y * Float64(Float64(x / c) / z))); elseif (b <= -3.6e-76) tmp = t_1; elseif (b <= -1.46e-111) tmp = Float64(Float64(9.0 * Float64(x * y)) / Float64(z * c)); elseif (b <= 1.1e-192) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); elseif (b <= 4.4e+133) tmp = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (t * (a / c));
t_2 = (b / c) / z;
tmp = 0.0;
if (b <= -3.5e+100)
tmp = t_2;
elseif (b <= -320000.0)
tmp = t_1;
elseif (b <= -1.65e-32)
tmp = 9.0 * (y * ((x / c) / z));
elseif (b <= -3.6e-76)
tmp = t_1;
elseif (b <= -1.46e-111)
tmp = (9.0 * (x * y)) / (z * c);
elseif (b <= 1.1e-192)
tmp = a * ((t * -4.0) / c);
elseif (b <= 4.4e+133)
tmp = 9.0 * ((y / c) * (x / z));
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[b, -3.5e+100], t$95$2, If[LessEqual[b, -320000.0], t$95$1, If[LessEqual[b, -1.65e-32], N[(9.0 * N[(y * N[(N[(x / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -3.6e-76], t$95$1, If[LessEqual[b, -1.46e-111], N[(N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.1e-192], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.4e+133], N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\
t_2 := \frac{\frac{b}{c}}{z}\\
\mathbf{if}\;b \leq -3.5 \cdot 10^{+100}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -320000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.65 \cdot 10^{-32}:\\
\;\;\;\;9 \cdot \left(y \cdot \frac{\frac{x}{c}}{z}\right)\\
\mathbf{elif}\;b \leq -3.6 \cdot 10^{-76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.46 \cdot 10^{-111}:\\
\;\;\;\;\frac{9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{elif}\;b \leq 1.1 \cdot 10^{-192}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{elif}\;b \leq 4.4 \cdot 10^{+133}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -3.49999999999999976e100 or 4.4e133 < b Initial program 76.2%
associate-+l-76.2%
*-commutative76.2%
associate-*r*77.3%
*-commutative77.3%
associate-+l-77.3%
associate-*l*77.3%
associate-*l*79.6%
*-commutative79.6%
Simplified79.6%
Taylor expanded in b around inf 61.0%
associate-/r*68.8%
Simplified68.8%
if -3.49999999999999976e100 < b < -3.2e5 or -1.65000000000000013e-32 < b < -3.6e-76Initial program 79.0%
associate-+l-79.0%
*-commutative79.0%
associate-*r*69.3%
*-commutative69.3%
associate-+l-69.3%
associate-*l*69.2%
associate-*l*79.0%
*-commutative79.0%
Simplified79.0%
Taylor expanded in a around inf 68.9%
Taylor expanded in a around inf 60.3%
*-commutative60.3%
associate-/l*60.5%
Simplified60.5%
if -3.2e5 < b < -1.65000000000000013e-32Initial program 72.9%
associate-+l-72.9%
*-commutative72.9%
associate-*r*86.1%
*-commutative86.1%
associate-+l-86.1%
associate-*l*86.1%
associate-*l*86.1%
*-commutative86.1%
Simplified86.1%
Taylor expanded in a around inf 45.4%
Taylor expanded in x around inf 86.3%
associate-*r/85.9%
*-commutative85.9%
associate-*r/86.3%
*-commutative86.3%
associate-/l*85.6%
*-commutative85.6%
associate-/r*85.8%
Simplified85.8%
if -3.6e-76 < b < -1.46e-111Initial program 91.6%
associate-+l-91.6%
*-commutative91.6%
associate-*r*91.6%
*-commutative91.6%
associate-+l-91.6%
associate-*l*91.5%
associate-*l*91.5%
*-commutative91.5%
Simplified91.5%
Taylor expanded in a around inf 91.6%
Taylor expanded in a around 0 81.8%
associate-*r*81.8%
*-commutative81.8%
associate-*r*81.7%
Simplified81.7%
Taylor expanded in x around inf 73.1%
if -1.46e-111 < b < 1.10000000000000003e-192Initial program 74.7%
associate-+l-74.7%
*-commutative74.7%
associate-*r*77.9%
*-commutative77.9%
associate-+l-77.9%
associate-*l*77.9%
associate-*l*77.6%
*-commutative77.6%
Simplified77.6%
Taylor expanded in z around inf 63.1%
*-commutative63.1%
associate-/l*61.8%
associate-*r*61.8%
associate-*l/61.8%
Simplified61.8%
if 1.10000000000000003e-192 < b < 4.4e133Initial program 83.9%
associate-+l-83.9%
*-commutative83.9%
associate-*r*79.8%
*-commutative79.8%
associate-+l-79.8%
associate-*l*79.8%
associate-*l*82.6%
*-commutative82.6%
Simplified82.6%
Taylor expanded in z around 0 78.8%
associate-/l*73.5%
Applied egg-rr73.5%
Taylor expanded in x around 0 78.8%
*-commutative78.8%
associate-/l*76.6%
Simplified76.6%
Taylor expanded in y around inf 43.3%
*-commutative43.3%
times-frac44.1%
Simplified44.1%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c)))) (t_2 (/ (/ b c) z)))
(if (<= b -3.6e+100)
t_2
(if (<= b -3850.0)
t_1
(if (<= b -1.15e-41)
(* 9.0 (* y (/ (/ x c) z)))
(if (<= b -2.6e-66)
t_1
(if (<= b -9e-112)
(* 9.0 (* x (/ (/ y c) z)))
(if (<= b 1.8e-194)
(* a (/ (* t -4.0) c))
(if (<= b 4.4e+133) (* 9.0 (* (/ y c) (/ x z))) t_2)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (t * (a / c));
double t_2 = (b / c) / z;
double tmp;
if (b <= -3.6e+100) {
tmp = t_2;
} else if (b <= -3850.0) {
tmp = t_1;
} else if (b <= -1.15e-41) {
tmp = 9.0 * (y * ((x / c) / z));
} else if (b <= -2.6e-66) {
tmp = t_1;
} else if (b <= -9e-112) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (b <= 1.8e-194) {
tmp = a * ((t * -4.0) / c);
} else if (b <= 4.4e+133) {
tmp = 9.0 * ((y / c) * (x / z));
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * (t * (a / c))
t_2 = (b / c) / z
if (b <= (-3.6d+100)) then
tmp = t_2
else if (b <= (-3850.0d0)) then
tmp = t_1
else if (b <= (-1.15d-41)) then
tmp = 9.0d0 * (y * ((x / c) / z))
else if (b <= (-2.6d-66)) then
tmp = t_1
else if (b <= (-9d-112)) then
tmp = 9.0d0 * (x * ((y / c) / z))
else if (b <= 1.8d-194) then
tmp = a * ((t * (-4.0d0)) / c)
else if (b <= 4.4d+133) then
tmp = 9.0d0 * ((y / c) * (x / z))
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (t * (a / c));
double t_2 = (b / c) / z;
double tmp;
if (b <= -3.6e+100) {
tmp = t_2;
} else if (b <= -3850.0) {
tmp = t_1;
} else if (b <= -1.15e-41) {
tmp = 9.0 * (y * ((x / c) / z));
} else if (b <= -2.6e-66) {
tmp = t_1;
} else if (b <= -9e-112) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (b <= 1.8e-194) {
tmp = a * ((t * -4.0) / c);
} else if (b <= 4.4e+133) {
tmp = 9.0 * ((y / c) * (x / z));
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (t * (a / c)) t_2 = (b / c) / z tmp = 0 if b <= -3.6e+100: tmp = t_2 elif b <= -3850.0: tmp = t_1 elif b <= -1.15e-41: tmp = 9.0 * (y * ((x / c) / z)) elif b <= -2.6e-66: tmp = t_1 elif b <= -9e-112: tmp = 9.0 * (x * ((y / c) / z)) elif b <= 1.8e-194: tmp = a * ((t * -4.0) / c) elif b <= 4.4e+133: tmp = 9.0 * ((y / c) * (x / z)) else: tmp = t_2 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(t * Float64(a / c))) t_2 = Float64(Float64(b / c) / z) tmp = 0.0 if (b <= -3.6e+100) tmp = t_2; elseif (b <= -3850.0) tmp = t_1; elseif (b <= -1.15e-41) tmp = Float64(9.0 * Float64(y * Float64(Float64(x / c) / z))); elseif (b <= -2.6e-66) tmp = t_1; elseif (b <= -9e-112) tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c) / z))); elseif (b <= 1.8e-194) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); elseif (b <= 4.4e+133) tmp = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (t * (a / c));
t_2 = (b / c) / z;
tmp = 0.0;
if (b <= -3.6e+100)
tmp = t_2;
elseif (b <= -3850.0)
tmp = t_1;
elseif (b <= -1.15e-41)
tmp = 9.0 * (y * ((x / c) / z));
elseif (b <= -2.6e-66)
tmp = t_1;
elseif (b <= -9e-112)
tmp = 9.0 * (x * ((y / c) / z));
elseif (b <= 1.8e-194)
tmp = a * ((t * -4.0) / c);
elseif (b <= 4.4e+133)
tmp = 9.0 * ((y / c) * (x / z));
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[b, -3.6e+100], t$95$2, If[LessEqual[b, -3850.0], t$95$1, If[LessEqual[b, -1.15e-41], N[(9.0 * N[(y * N[(N[(x / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2.6e-66], t$95$1, If[LessEqual[b, -9e-112], N[(9.0 * N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.8e-194], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.4e+133], N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\
t_2 := \frac{\frac{b}{c}}{z}\\
\mathbf{if}\;b \leq -3.6 \cdot 10^{+100}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -3850:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.15 \cdot 10^{-41}:\\
\;\;\;\;9 \cdot \left(y \cdot \frac{\frac{x}{c}}{z}\right)\\
\mathbf{elif}\;b \leq -2.6 \cdot 10^{-66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -9 \cdot 10^{-112}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\
\mathbf{elif}\;b \leq 1.8 \cdot 10^{-194}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{elif}\;b \leq 4.4 \cdot 10^{+133}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -3.6e100 or 4.4e133 < b Initial program 76.2%
associate-+l-76.2%
*-commutative76.2%
associate-*r*77.3%
*-commutative77.3%
associate-+l-77.3%
associate-*l*77.3%
associate-*l*79.6%
*-commutative79.6%
Simplified79.6%
Taylor expanded in b around inf 61.0%
associate-/r*68.8%
Simplified68.8%
if -3.6e100 < b < -3850 or -1.15000000000000005e-41 < b < -2.5999999999999999e-66Initial program 79.0%
associate-+l-79.0%
*-commutative79.0%
associate-*r*69.3%
*-commutative69.3%
associate-+l-69.3%
associate-*l*69.2%
associate-*l*79.0%
*-commutative79.0%
Simplified79.0%
Taylor expanded in a around inf 68.9%
Taylor expanded in a around inf 60.3%
*-commutative60.3%
associate-/l*60.5%
Simplified60.5%
if -3850 < b < -1.15000000000000005e-41Initial program 72.9%
associate-+l-72.9%
*-commutative72.9%
associate-*r*86.1%
*-commutative86.1%
associate-+l-86.1%
associate-*l*86.1%
associate-*l*86.1%
*-commutative86.1%
Simplified86.1%
Taylor expanded in a around inf 45.4%
Taylor expanded in x around inf 86.3%
associate-*r/85.9%
*-commutative85.9%
associate-*r/86.3%
*-commutative86.3%
associate-/l*85.6%
*-commutative85.6%
associate-/r*85.8%
Simplified85.8%
if -2.5999999999999999e-66 < b < -9.00000000000000024e-112Initial program 91.6%
associate-+l-91.6%
*-commutative91.6%
associate-*r*91.6%
*-commutative91.6%
associate-+l-91.6%
associate-*l*91.5%
associate-*l*91.5%
*-commutative91.5%
Simplified91.5%
Taylor expanded in x around inf 73.0%
associate-/l*73.0%
associate-/r*73.1%
Simplified73.1%
if -9.00000000000000024e-112 < b < 1.8e-194Initial program 74.7%
associate-+l-74.7%
*-commutative74.7%
associate-*r*77.9%
*-commutative77.9%
associate-+l-77.9%
associate-*l*77.9%
associate-*l*77.6%
*-commutative77.6%
Simplified77.6%
Taylor expanded in z around inf 63.1%
*-commutative63.1%
associate-/l*61.8%
associate-*r*61.8%
associate-*l/61.8%
Simplified61.8%
if 1.8e-194 < b < 4.4e133Initial program 83.9%
associate-+l-83.9%
*-commutative83.9%
associate-*r*79.8%
*-commutative79.8%
associate-+l-79.8%
associate-*l*79.8%
associate-*l*82.6%
*-commutative82.6%
Simplified82.6%
Taylor expanded in z around 0 78.8%
associate-/l*73.5%
Applied egg-rr73.5%
Taylor expanded in x around 0 78.8%
*-commutative78.8%
associate-/l*76.6%
Simplified76.6%
Taylor expanded in y around inf 43.3%
*-commutative43.3%
times-frac44.1%
Simplified44.1%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (/ b c) z)) (t_2 (* 9.0 (* x (/ (/ y c) z)))))
(if (<= b -5.8e+100)
t_1
(if (<= b -114.0)
(* -4.0 (* t (/ a c)))
(if (<= b -1.3e-111)
t_2
(if (<= b 2.15e-192)
(* a (/ (* t -4.0) c))
(if (<= b 4.4e+133) t_2 t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b / c) / z;
double t_2 = 9.0 * (x * ((y / c) / z));
double tmp;
if (b <= -5.8e+100) {
tmp = t_1;
} else if (b <= -114.0) {
tmp = -4.0 * (t * (a / c));
} else if (b <= -1.3e-111) {
tmp = t_2;
} else if (b <= 2.15e-192) {
tmp = a * ((t * -4.0) / c);
} else if (b <= 4.4e+133) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b / c) / z
t_2 = 9.0d0 * (x * ((y / c) / z))
if (b <= (-5.8d+100)) then
tmp = t_1
else if (b <= (-114.0d0)) then
tmp = (-4.0d0) * (t * (a / c))
else if (b <= (-1.3d-111)) then
tmp = t_2
else if (b <= 2.15d-192) then
tmp = a * ((t * (-4.0d0)) / c)
else if (b <= 4.4d+133) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b / c) / z;
double t_2 = 9.0 * (x * ((y / c) / z));
double tmp;
if (b <= -5.8e+100) {
tmp = t_1;
} else if (b <= -114.0) {
tmp = -4.0 * (t * (a / c));
} else if (b <= -1.3e-111) {
tmp = t_2;
} else if (b <= 2.15e-192) {
tmp = a * ((t * -4.0) / c);
} else if (b <= 4.4e+133) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = (b / c) / z t_2 = 9.0 * (x * ((y / c) / z)) tmp = 0 if b <= -5.8e+100: tmp = t_1 elif b <= -114.0: tmp = -4.0 * (t * (a / c)) elif b <= -1.3e-111: tmp = t_2 elif b <= 2.15e-192: tmp = a * ((t * -4.0) / c) elif b <= 4.4e+133: tmp = t_2 else: tmp = t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b / c) / z) t_2 = Float64(9.0 * Float64(x * Float64(Float64(y / c) / z))) tmp = 0.0 if (b <= -5.8e+100) tmp = t_1; elseif (b <= -114.0) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (b <= -1.3e-111) tmp = t_2; elseif (b <= 2.15e-192) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); elseif (b <= 4.4e+133) tmp = t_2; else tmp = t_1; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (b / c) / z;
t_2 = 9.0 * (x * ((y / c) / z));
tmp = 0.0;
if (b <= -5.8e+100)
tmp = t_1;
elseif (b <= -114.0)
tmp = -4.0 * (t * (a / c));
elseif (b <= -1.3e-111)
tmp = t_2;
elseif (b <= 2.15e-192)
tmp = a * ((t * -4.0) / c);
elseif (b <= 4.4e+133)
tmp = t_2;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.8e+100], t$95$1, If[LessEqual[b, -114.0], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.3e-111], t$95$2, If[LessEqual[b, 2.15e-192], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.4e+133], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{c}}{z}\\
t_2 := 9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\
\mathbf{if}\;b \leq -5.8 \cdot 10^{+100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -114:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;b \leq -1.3 \cdot 10^{-111}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 2.15 \cdot 10^{-192}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{elif}\;b \leq 4.4 \cdot 10^{+133}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -5.8000000000000001e100 or 4.4e133 < b Initial program 76.2%
associate-+l-76.2%
*-commutative76.2%
associate-*r*77.3%
*-commutative77.3%
associate-+l-77.3%
associate-*l*77.3%
associate-*l*79.6%
*-commutative79.6%
Simplified79.6%
Taylor expanded in b around inf 61.0%
associate-/r*68.8%
Simplified68.8%
if -5.8000000000000001e100 < b < -114Initial program 77.2%
associate-+l-77.2%
*-commutative77.2%
associate-*r*70.0%
*-commutative70.0%
associate-+l-70.0%
associate-*l*69.8%
associate-*l*77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in a around inf 62.3%
Taylor expanded in a around inf 62.6%
*-commutative62.6%
associate-/l*62.8%
Simplified62.8%
if -114 < b < -1.29999999999999991e-111 or 2.14999999999999999e-192 < b < 4.4e133Initial program 83.9%
associate-+l-83.9%
*-commutative83.9%
associate-*r*80.9%
*-commutative80.9%
associate-+l-80.9%
associate-*l*80.9%
associate-*l*84.0%
*-commutative84.0%
Simplified84.0%
Taylor expanded in x around inf 47.5%
associate-/l*47.4%
associate-/r*48.2%
Simplified48.2%
if -1.29999999999999991e-111 < b < 2.14999999999999999e-192Initial program 74.7%
associate-+l-74.7%
*-commutative74.7%
associate-*r*77.9%
*-commutative77.9%
associate-+l-77.9%
associate-*l*77.9%
associate-*l*77.6%
*-commutative77.6%
Simplified77.6%
Taylor expanded in z around inf 63.1%
*-commutative63.1%
associate-/l*61.8%
associate-*r*61.8%
associate-*l/61.8%
Simplified61.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* a (/ (+ (* t -4.0) (/ b (* z a))) c))))
(if (<= a -7e-167)
t_1
(if (<= a 2.5e+50)
(/ (+ b (* x (* 9.0 y))) (* z c))
(if (or (<= a 1.08e+219) (not (<= a 3e+232)))
t_1
(* 9.0 (* y (/ (/ x c) z))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (((t * -4.0) + (b / (z * a))) / c);
double tmp;
if (a <= -7e-167) {
tmp = t_1;
} else if (a <= 2.5e+50) {
tmp = (b + (x * (9.0 * y))) / (z * c);
} else if ((a <= 1.08e+219) || !(a <= 3e+232)) {
tmp = t_1;
} else {
tmp = 9.0 * (y * ((x / c) / z));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = a * (((t * (-4.0d0)) + (b / (z * a))) / c)
if (a <= (-7d-167)) then
tmp = t_1
else if (a <= 2.5d+50) then
tmp = (b + (x * (9.0d0 * y))) / (z * c)
else if ((a <= 1.08d+219) .or. (.not. (a <= 3d+232))) then
tmp = t_1
else
tmp = 9.0d0 * (y * ((x / c) / z))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (((t * -4.0) + (b / (z * a))) / c);
double tmp;
if (a <= -7e-167) {
tmp = t_1;
} else if (a <= 2.5e+50) {
tmp = (b + (x * (9.0 * y))) / (z * c);
} else if ((a <= 1.08e+219) || !(a <= 3e+232)) {
tmp = t_1;
} else {
tmp = 9.0 * (y * ((x / c) / z));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = a * (((t * -4.0) + (b / (z * a))) / c) tmp = 0 if a <= -7e-167: tmp = t_1 elif a <= 2.5e+50: tmp = (b + (x * (9.0 * y))) / (z * c) elif (a <= 1.08e+219) or not (a <= 3e+232): tmp = t_1 else: tmp = 9.0 * (y * ((x / c) / z)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(a * Float64(Float64(Float64(t * -4.0) + Float64(b / Float64(z * a))) / c)) tmp = 0.0 if (a <= -7e-167) tmp = t_1; elseif (a <= 2.5e+50) tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(z * c)); elseif ((a <= 1.08e+219) || !(a <= 3e+232)) tmp = t_1; else tmp = Float64(9.0 * Float64(y * Float64(Float64(x / c) / z))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = a * (((t * -4.0) + (b / (z * a))) / c);
tmp = 0.0;
if (a <= -7e-167)
tmp = t_1;
elseif (a <= 2.5e+50)
tmp = (b + (x * (9.0 * y))) / (z * c);
elseif ((a <= 1.08e+219) || ~((a <= 3e+232)))
tmp = t_1;
else
tmp = 9.0 * (y * ((x / c) / z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a * N[(N[(N[(t * -4.0), $MachinePrecision] + N[(b / N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7e-167], t$95$1, If[LessEqual[a, 2.5e+50], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 1.08e+219], N[Not[LessEqual[a, 3e+232]], $MachinePrecision]], t$95$1, N[(9.0 * N[(y * N[(N[(x / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := a \cdot \frac{t \cdot -4 + \frac{b}{z \cdot a}}{c}\\
\mathbf{if}\;a \leq -7 \cdot 10^{-167}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{+50}:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c}\\
\mathbf{elif}\;a \leq 1.08 \cdot 10^{+219} \lor \neg \left(a \leq 3 \cdot 10^{+232}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(y \cdot \frac{\frac{x}{c}}{z}\right)\\
\end{array}
\end{array}
if a < -6.9999999999999998e-167 or 2.5e50 < a < 1.08000000000000005e219 or 3.00000000000000003e232 < a Initial program 79.6%
associate-+l-79.6%
*-commutative79.6%
associate-*r*76.3%
*-commutative76.3%
associate-+l-76.3%
associate-*l*76.3%
associate-*l*79.0%
*-commutative79.0%
Simplified79.0%
Taylor expanded in x around 0 62.8%
Taylor expanded in a around inf 69.4%
Taylor expanded in c around 0 75.0%
if -6.9999999999999998e-167 < a < 2.5e50Initial program 76.5%
associate-+l-76.5%
*-commutative76.5%
associate-*r*80.8%
*-commutative80.8%
associate-+l-80.8%
associate-*l*80.7%
associate-*l*82.2%
*-commutative82.2%
Simplified82.2%
Taylor expanded in a around inf 67.6%
Taylor expanded in a around 0 66.5%
associate-*r*66.6%
*-commutative66.6%
associate-*r*66.5%
Simplified66.5%
if 1.08000000000000005e219 < a < 3.00000000000000003e232Initial program 100.0%
associate-+l-100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-+l-100.0%
associate-*l*100.0%
associate-*l*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in a around inf 100.0%
Taylor expanded in x around inf 100.0%
associate-*r/100.0%
*-commutative100.0%
associate-*r/100.0%
*-commutative100.0%
associate-/l*99.5%
*-commutative99.5%
associate-/r*99.5%
Simplified99.5%
Final simplification71.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* a (/ (+ (* t -4.0) (/ b (* z a))) c))))
(if (<= t -9e+76)
t_1
(if (<= t -2.1e+43)
(* 9.0 (* x (/ (/ y c) z)))
(if (<= t -3.8e-54)
(+ (* -4.0 (/ (* t a) c)) (/ b (* z c)))
(if (<= t 1.5e-265) (/ (+ (/ b c) (* 9.0 (/ (* x y) c))) z) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (((t * -4.0) + (b / (z * a))) / c);
double tmp;
if (t <= -9e+76) {
tmp = t_1;
} else if (t <= -2.1e+43) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (t <= -3.8e-54) {
tmp = (-4.0 * ((t * a) / c)) + (b / (z * c));
} else if (t <= 1.5e-265) {
tmp = ((b / c) + (9.0 * ((x * y) / c))) / z;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = a * (((t * (-4.0d0)) + (b / (z * a))) / c)
if (t <= (-9d+76)) then
tmp = t_1
else if (t <= (-2.1d+43)) then
tmp = 9.0d0 * (x * ((y / c) / z))
else if (t <= (-3.8d-54)) then
tmp = ((-4.0d0) * ((t * a) / c)) + (b / (z * c))
else if (t <= 1.5d-265) then
tmp = ((b / c) + (9.0d0 * ((x * y) / c))) / z
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (((t * -4.0) + (b / (z * a))) / c);
double tmp;
if (t <= -9e+76) {
tmp = t_1;
} else if (t <= -2.1e+43) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (t <= -3.8e-54) {
tmp = (-4.0 * ((t * a) / c)) + (b / (z * c));
} else if (t <= 1.5e-265) {
tmp = ((b / c) + (9.0 * ((x * y) / c))) / z;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = a * (((t * -4.0) + (b / (z * a))) / c) tmp = 0 if t <= -9e+76: tmp = t_1 elif t <= -2.1e+43: tmp = 9.0 * (x * ((y / c) / z)) elif t <= -3.8e-54: tmp = (-4.0 * ((t * a) / c)) + (b / (z * c)) elif t <= 1.5e-265: tmp = ((b / c) + (9.0 * ((x * y) / c))) / z else: tmp = t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(a * Float64(Float64(Float64(t * -4.0) + Float64(b / Float64(z * a))) / c)) tmp = 0.0 if (t <= -9e+76) tmp = t_1; elseif (t <= -2.1e+43) tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c) / z))); elseif (t <= -3.8e-54) tmp = Float64(Float64(-4.0 * Float64(Float64(t * a) / c)) + Float64(b / Float64(z * c))); elseif (t <= 1.5e-265) tmp = Float64(Float64(Float64(b / c) + Float64(9.0 * Float64(Float64(x * y) / c))) / z); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = a * (((t * -4.0) + (b / (z * a))) / c);
tmp = 0.0;
if (t <= -9e+76)
tmp = t_1;
elseif (t <= -2.1e+43)
tmp = 9.0 * (x * ((y / c) / z));
elseif (t <= -3.8e-54)
tmp = (-4.0 * ((t * a) / c)) + (b / (z * c));
elseif (t <= 1.5e-265)
tmp = ((b / c) + (9.0 * ((x * y) / c))) / z;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a * N[(N[(N[(t * -4.0), $MachinePrecision] + N[(b / N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9e+76], t$95$1, If[LessEqual[t, -2.1e+43], N[(9.0 * N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.8e-54], N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e-265], N[(N[(N[(b / c), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := a \cdot \frac{t \cdot -4 + \frac{b}{z \cdot a}}{c}\\
\mathbf{if}\;t \leq -9 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.1 \cdot 10^{+43}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-54}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c} + \frac{b}{z \cdot c}\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{-265}:\\
\;\;\;\;\frac{\frac{b}{c} + 9 \cdot \frac{x \cdot y}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.9999999999999995e76 or 1.4999999999999999e-265 < t Initial program 77.3%
associate-+l-77.3%
*-commutative77.3%
associate-*r*79.1%
*-commutative79.1%
associate-+l-79.1%
associate-*l*79.1%
associate-*l*79.5%
*-commutative79.5%
Simplified79.5%
Taylor expanded in x around 0 57.2%
Taylor expanded in a around inf 61.7%
Taylor expanded in c around 0 66.6%
if -8.9999999999999995e76 < t < -2.10000000000000002e43Initial program 40.0%
associate-+l-40.0%
*-commutative40.0%
associate-*r*40.0%
*-commutative40.0%
associate-+l-40.0%
associate-*l*40.0%
associate-*l*40.0%
*-commutative40.0%
Simplified40.0%
Taylor expanded in x around inf 39.4%
associate-/l*51.3%
associate-/r*68.1%
Simplified68.1%
if -2.10000000000000002e43 < t < -3.8000000000000002e-54Initial program 80.3%
associate-+l-80.3%
*-commutative80.3%
associate-*r*75.3%
*-commutative75.3%
associate-+l-75.3%
associate-*l*75.2%
associate-*l*80.1%
*-commutative80.1%
Simplified80.1%
Taylor expanded in x around 0 74.9%
Taylor expanded in b around 0 74.3%
if -3.8000000000000002e-54 < t < 1.4999999999999999e-265Initial program 88.2%
associate-+l-88.2%
*-commutative88.2%
associate-*r*82.8%
*-commutative82.8%
associate-+l-82.8%
associate-*l*82.7%
associate-*l*89.8%
*-commutative89.8%
Simplified89.8%
Taylor expanded in z around 0 85.8%
Taylor expanded in a around 0 77.1%
Final simplification69.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* a (/ (* t -4.0) c))))
(if (<= t -8.8e+83)
t_1
(if (<= t -9e+41)
(* 9.0 (* y (/ (/ x c) z)))
(if (<= t -20.0)
(* b (/ (/ 1.0 z) c))
(if (<= t 1e-75)
(* 9.0 (* x (/ (/ y c) z)))
(if (<= t 1.65e+15) (/ b (* z c)) t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * ((t * -4.0) / c);
double tmp;
if (t <= -8.8e+83) {
tmp = t_1;
} else if (t <= -9e+41) {
tmp = 9.0 * (y * ((x / c) / z));
} else if (t <= -20.0) {
tmp = b * ((1.0 / z) / c);
} else if (t <= 1e-75) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (t <= 1.65e+15) {
tmp = b / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = a * ((t * (-4.0d0)) / c)
if (t <= (-8.8d+83)) then
tmp = t_1
else if (t <= (-9d+41)) then
tmp = 9.0d0 * (y * ((x / c) / z))
else if (t <= (-20.0d0)) then
tmp = b * ((1.0d0 / z) / c)
else if (t <= 1d-75) then
tmp = 9.0d0 * (x * ((y / c) / z))
else if (t <= 1.65d+15) then
tmp = b / (z * c)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * ((t * -4.0) / c);
double tmp;
if (t <= -8.8e+83) {
tmp = t_1;
} else if (t <= -9e+41) {
tmp = 9.0 * (y * ((x / c) / z));
} else if (t <= -20.0) {
tmp = b * ((1.0 / z) / c);
} else if (t <= 1e-75) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (t <= 1.65e+15) {
tmp = b / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = a * ((t * -4.0) / c) tmp = 0 if t <= -8.8e+83: tmp = t_1 elif t <= -9e+41: tmp = 9.0 * (y * ((x / c) / z)) elif t <= -20.0: tmp = b * ((1.0 / z) / c) elif t <= 1e-75: tmp = 9.0 * (x * ((y / c) / z)) elif t <= 1.65e+15: tmp = b / (z * c) else: tmp = t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(a * Float64(Float64(t * -4.0) / c)) tmp = 0.0 if (t <= -8.8e+83) tmp = t_1; elseif (t <= -9e+41) tmp = Float64(9.0 * Float64(y * Float64(Float64(x / c) / z))); elseif (t <= -20.0) tmp = Float64(b * Float64(Float64(1.0 / z) / c)); elseif (t <= 1e-75) tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c) / z))); elseif (t <= 1.65e+15) tmp = Float64(b / Float64(z * c)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = a * ((t * -4.0) / c);
tmp = 0.0;
if (t <= -8.8e+83)
tmp = t_1;
elseif (t <= -9e+41)
tmp = 9.0 * (y * ((x / c) / z));
elseif (t <= -20.0)
tmp = b * ((1.0 / z) / c);
elseif (t <= 1e-75)
tmp = 9.0 * (x * ((y / c) / z));
elseif (t <= 1.65e+15)
tmp = b / (z * c);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.8e+83], t$95$1, If[LessEqual[t, -9e+41], N[(9.0 * N[(y * N[(N[(x / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -20.0], N[(b * N[(N[(1.0 / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e-75], N[(9.0 * N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e+15], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := a \cdot \frac{t \cdot -4}{c}\\
\mathbf{if}\;t \leq -8.8 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -9 \cdot 10^{+41}:\\
\;\;\;\;9 \cdot \left(y \cdot \frac{\frac{x}{c}}{z}\right)\\
\mathbf{elif}\;t \leq -20:\\
\;\;\;\;b \cdot \frac{\frac{1}{z}}{c}\\
\mathbf{elif}\;t \leq 10^{-75}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{+15}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.79999999999999995e83 or 1.65e15 < t Initial program 74.3%
associate-+l-74.3%
*-commutative74.3%
associate-*r*78.7%
*-commutative78.7%
associate-+l-78.7%
associate-*l*78.7%
associate-*l*76.8%
*-commutative76.8%
Simplified76.8%
Taylor expanded in z around inf 53.3%
*-commutative53.3%
associate-/l*59.5%
associate-*r*59.5%
associate-*l/59.5%
Simplified59.5%
if -8.79999999999999995e83 < t < -9.0000000000000002e41Initial program 52.3%
associate-+l-52.3%
*-commutative52.3%
associate-*r*52.3%
*-commutative52.3%
associate-+l-52.3%
associate-*l*52.2%
associate-*l*52.2%
*-commutative52.2%
Simplified52.2%
Taylor expanded in a around inf 52.1%
Taylor expanded in x around inf 51.8%
associate-*r/51.9%
*-commutative51.9%
associate-*r/51.8%
*-commutative51.8%
associate-/l*45.1%
*-commutative45.1%
associate-/r*48.3%
Simplified48.3%
if -9.0000000000000002e41 < t < -20Initial program 89.4%
associate-+l-89.4%
*-commutative89.4%
associate-*r*89.4%
*-commutative89.4%
associate-+l-89.4%
associate-*l*89.4%
associate-*l*89.4%
*-commutative89.4%
Simplified89.4%
Taylor expanded in b around inf 57.3%
*-commutative57.3%
Simplified57.3%
div-inv57.1%
Applied egg-rr57.1%
Taylor expanded in z around 0 57.1%
associate-/l/57.3%
Simplified57.3%
if -20 < t < 9.9999999999999996e-76Initial program 84.2%
associate-+l-84.2%
*-commutative84.2%
associate-*r*79.0%
*-commutative79.0%
associate-+l-79.0%
associate-*l*78.9%
associate-*l*86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in x around inf 47.6%
associate-/l*46.5%
associate-/r*49.0%
Simplified49.0%
if 9.9999999999999996e-76 < t < 1.65e15Initial program 89.9%
associate-+l-89.9%
*-commutative89.9%
associate-*r*84.7%
*-commutative84.7%
associate-+l-84.7%
associate-*l*84.6%
associate-*l*89.8%
*-commutative89.8%
Simplified89.8%
Taylor expanded in b around inf 58.6%
*-commutative58.6%
Simplified58.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -1.05e+89)
(* a (/ (* t -4.0) c))
(if (or (<= z -0.033) (and (not (<= z -5.5e-29)) (<= z 2e+164)))
(/ (+ b (* x (* 9.0 y))) (* z c))
(* -4.0 (* t (/ a c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -1.05e+89) {
tmp = a * ((t * -4.0) / c);
} else if ((z <= -0.033) || (!(z <= -5.5e-29) && (z <= 2e+164))) {
tmp = (b + (x * (9.0 * y))) / (z * c);
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if (z <= (-1.05d+89)) then
tmp = a * ((t * (-4.0d0)) / c)
else if ((z <= (-0.033d0)) .or. (.not. (z <= (-5.5d-29))) .and. (z <= 2d+164)) then
tmp = (b + (x * (9.0d0 * y))) / (z * c)
else
tmp = (-4.0d0) * (t * (a / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -1.05e+89) {
tmp = a * ((t * -4.0) / c);
} else if ((z <= -0.033) || (!(z <= -5.5e-29) && (z <= 2e+164))) {
tmp = (b + (x * (9.0 * y))) / (z * c);
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -1.05e+89: tmp = a * ((t * -4.0) / c) elif (z <= -0.033) or (not (z <= -5.5e-29) and (z <= 2e+164)): tmp = (b + (x * (9.0 * y))) / (z * c) else: tmp = -4.0 * (t * (a / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -1.05e+89) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); elseif ((z <= -0.033) || (!(z <= -5.5e-29) && (z <= 2e+164))) tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(z * c)); else tmp = Float64(-4.0 * Float64(t * Float64(a / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -1.05e+89)
tmp = a * ((t * -4.0) / c);
elseif ((z <= -0.033) || (~((z <= -5.5e-29)) && (z <= 2e+164)))
tmp = (b + (x * (9.0 * y))) / (z * c);
else
tmp = -4.0 * (t * (a / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -1.05e+89], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -0.033], And[N[Not[LessEqual[z, -5.5e-29]], $MachinePrecision], LessEqual[z, 2e+164]]], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+89}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{elif}\;z \leq -0.033 \lor \neg \left(z \leq -5.5 \cdot 10^{-29}\right) \land z \leq 2 \cdot 10^{+164}:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\end{array}
\end{array}
if z < -1.04999999999999993e89Initial program 47.0%
associate-+l-47.0%
*-commutative47.0%
associate-*r*48.9%
*-commutative48.9%
associate-+l-48.9%
associate-*l*48.9%
associate-*l*52.9%
*-commutative52.9%
Simplified52.9%
Taylor expanded in z around inf 60.5%
*-commutative60.5%
associate-/l*57.1%
associate-*r*57.1%
associate-*l/57.1%
Simplified57.1%
if -1.04999999999999993e89 < z < -0.033000000000000002 or -5.4999999999999999e-29 < z < 2e164Initial program 92.3%
associate-+l-92.3%
*-commutative92.3%
associate-*r*91.9%
*-commutative91.9%
associate-+l-91.9%
associate-*l*91.8%
associate-*l*92.2%
*-commutative92.2%
Simplified92.2%
Taylor expanded in a around inf 88.1%
Taylor expanded in a around 0 75.6%
associate-*r*75.7%
*-commutative75.7%
associate-*r*75.6%
Simplified75.6%
if -0.033000000000000002 < z < -5.4999999999999999e-29 or 2e164 < z Initial program 63.4%
associate-+l-63.4%
*-commutative63.4%
associate-*r*61.0%
*-commutative61.0%
associate-+l-61.0%
associate-*l*61.0%
associate-*l*68.1%
*-commutative68.1%
Simplified68.1%
Taylor expanded in a around inf 60.7%
Taylor expanded in a around inf 61.3%
*-commutative61.3%
associate-/l*66.0%
Simplified66.0%
Final simplification70.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -5.4e+88)
(* a (/ (* t -4.0) c))
(if (or (<= z -0.24) (and (not (<= z -7.2e-28)) (<= z 1.95e+164)))
(/ (+ b (* 9.0 (* x y))) (* z c))
(* -4.0 (* t (/ a c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -5.4e+88) {
tmp = a * ((t * -4.0) / c);
} else if ((z <= -0.24) || (!(z <= -7.2e-28) && (z <= 1.95e+164))) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if (z <= (-5.4d+88)) then
tmp = a * ((t * (-4.0d0)) / c)
else if ((z <= (-0.24d0)) .or. (.not. (z <= (-7.2d-28))) .and. (z <= 1.95d+164)) then
tmp = (b + (9.0d0 * (x * y))) / (z * c)
else
tmp = (-4.0d0) * (t * (a / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -5.4e+88) {
tmp = a * ((t * -4.0) / c);
} else if ((z <= -0.24) || (!(z <= -7.2e-28) && (z <= 1.95e+164))) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -5.4e+88: tmp = a * ((t * -4.0) / c) elif (z <= -0.24) or (not (z <= -7.2e-28) and (z <= 1.95e+164)): tmp = (b + (9.0 * (x * y))) / (z * c) else: tmp = -4.0 * (t * (a / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -5.4e+88) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); elseif ((z <= -0.24) || (!(z <= -7.2e-28) && (z <= 1.95e+164))) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); else tmp = Float64(-4.0 * Float64(t * Float64(a / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -5.4e+88)
tmp = a * ((t * -4.0) / c);
elseif ((z <= -0.24) || (~((z <= -7.2e-28)) && (z <= 1.95e+164)))
tmp = (b + (9.0 * (x * y))) / (z * c);
else
tmp = -4.0 * (t * (a / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -5.4e+88], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -0.24], And[N[Not[LessEqual[z, -7.2e-28]], $MachinePrecision], LessEqual[z, 1.95e+164]]], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+88}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{elif}\;z \leq -0.24 \lor \neg \left(z \leq -7.2 \cdot 10^{-28}\right) \land z \leq 1.95 \cdot 10^{+164}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\end{array}
\end{array}
if z < -5.40000000000000031e88Initial program 47.0%
associate-+l-47.0%
*-commutative47.0%
associate-*r*48.9%
*-commutative48.9%
associate-+l-48.9%
associate-*l*48.9%
associate-*l*52.9%
*-commutative52.9%
Simplified52.9%
Taylor expanded in z around inf 60.5%
*-commutative60.5%
associate-/l*57.1%
associate-*r*57.1%
associate-*l/57.1%
Simplified57.1%
if -5.40000000000000031e88 < z < -0.23999999999999999 or -7.1999999999999997e-28 < z < 1.94999999999999993e164Initial program 92.3%
associate-+l-92.3%
*-commutative92.3%
associate-*r*91.9%
*-commutative91.9%
associate-+l-91.9%
associate-*l*91.8%
associate-*l*92.2%
*-commutative92.2%
Simplified92.2%
Taylor expanded in z around 0 75.6%
*-commutative75.6%
Simplified75.6%
if -0.23999999999999999 < z < -7.1999999999999997e-28 or 1.94999999999999993e164 < z Initial program 63.4%
associate-+l-63.4%
*-commutative63.4%
associate-*r*61.0%
*-commutative61.0%
associate-+l-61.0%
associate-*l*61.0%
associate-*l*68.1%
*-commutative68.1%
Simplified68.1%
Taylor expanded in a around inf 60.7%
Taylor expanded in a around inf 61.3%
*-commutative61.3%
associate-/l*66.0%
Simplified66.0%
Final simplification70.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 9.0 (* x y))))
(if (<= b -3.2e+17)
(* a (/ (+ (* t -4.0) (/ b (* z a))) c))
(if (<= b 4.3e+78)
(/ (- t_1 (* 4.0 (* a (* z t)))) (* z c))
(/ (+ b t_1) (* z c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (x * y);
double tmp;
if (b <= -3.2e+17) {
tmp = a * (((t * -4.0) + (b / (z * a))) / c);
} else if (b <= 4.3e+78) {
tmp = (t_1 - (4.0 * (a * (z * t)))) / (z * c);
} else {
tmp = (b + t_1) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = 9.0d0 * (x * y)
if (b <= (-3.2d+17)) then
tmp = a * (((t * (-4.0d0)) + (b / (z * a))) / c)
else if (b <= 4.3d+78) then
tmp = (t_1 - (4.0d0 * (a * (z * t)))) / (z * c)
else
tmp = (b + t_1) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (x * y);
double tmp;
if (b <= -3.2e+17) {
tmp = a * (((t * -4.0) + (b / (z * a))) / c);
} else if (b <= 4.3e+78) {
tmp = (t_1 - (4.0 * (a * (z * t)))) / (z * c);
} else {
tmp = (b + t_1) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = 9.0 * (x * y) tmp = 0 if b <= -3.2e+17: tmp = a * (((t * -4.0) + (b / (z * a))) / c) elif b <= 4.3e+78: tmp = (t_1 - (4.0 * (a * (z * t)))) / (z * c) else: tmp = (b + t_1) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(9.0 * Float64(x * y)) tmp = 0.0 if (b <= -3.2e+17) tmp = Float64(a * Float64(Float64(Float64(t * -4.0) + Float64(b / Float64(z * a))) / c)); elseif (b <= 4.3e+78) tmp = Float64(Float64(t_1 - Float64(4.0 * Float64(a * Float64(z * t)))) / Float64(z * c)); else tmp = Float64(Float64(b + t_1) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = 9.0 * (x * y);
tmp = 0.0;
if (b <= -3.2e+17)
tmp = a * (((t * -4.0) + (b / (z * a))) / c);
elseif (b <= 4.3e+78)
tmp = (t_1 - (4.0 * (a * (z * t)))) / (z * c);
else
tmp = (b + t_1) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.2e+17], N[(a * N[(N[(N[(t * -4.0), $MachinePrecision] + N[(b / N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.3e+78], N[(N[(t$95$1 - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(b + t$95$1), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(x \cdot y\right)\\
\mathbf{if}\;b \leq -3.2 \cdot 10^{+17}:\\
\;\;\;\;a \cdot \frac{t \cdot -4 + \frac{b}{z \cdot a}}{c}\\
\mathbf{elif}\;b \leq 4.3 \cdot 10^{+78}:\\
\;\;\;\;\frac{t\_1 - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + t\_1}{z \cdot c}\\
\end{array}
\end{array}
if b < -3.2e17Initial program 74.3%
associate-+l-74.3%
*-commutative74.3%
associate-*r*71.3%
*-commutative71.3%
associate-+l-71.3%
associate-*l*71.2%
associate-*l*75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in x around 0 68.3%
Taylor expanded in a around inf 68.2%
Taylor expanded in c around 0 78.7%
if -3.2e17 < b < 4.29999999999999981e78Initial program 80.7%
associate-+l-80.7%
*-commutative80.7%
associate-*r*80.3%
*-commutative80.3%
associate-+l-80.3%
associate-*l*80.2%
associate-*l*82.0%
*-commutative82.0%
Simplified82.0%
Taylor expanded in b around 0 73.2%
if 4.29999999999999981e78 < b Initial program 77.9%
associate-+l-77.9%
*-commutative77.9%
associate-*r*82.2%
*-commutative82.2%
associate-+l-82.2%
associate-*l*82.2%
associate-*l*82.2%
*-commutative82.2%
Simplified82.2%
Taylor expanded in z around 0 75.6%
*-commutative75.6%
Simplified75.6%
Final simplification75.0%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= b -4.8e+100) (not (<= b 4.45e+133))) (/ (/ b c) z) (* a (/ (* t -4.0) c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -4.8e+100) || !(b <= 4.45e+133)) {
tmp = (b / c) / z;
} else {
tmp = a * ((t * -4.0) / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if ((b <= (-4.8d+100)) .or. (.not. (b <= 4.45d+133))) then
tmp = (b / c) / z
else
tmp = a * ((t * (-4.0d0)) / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -4.8e+100) || !(b <= 4.45e+133)) {
tmp = (b / c) / z;
} else {
tmp = a * ((t * -4.0) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -4.8e+100) or not (b <= 4.45e+133): tmp = (b / c) / z else: tmp = a * ((t * -4.0) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -4.8e+100) || !(b <= 4.45e+133)) tmp = Float64(Float64(b / c) / z); else tmp = Float64(a * Float64(Float64(t * -4.0) / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((b <= -4.8e+100) || ~((b <= 4.45e+133)))
tmp = (b / c) / z;
else
tmp = a * ((t * -4.0) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -4.8e+100], N[Not[LessEqual[b, 4.45e+133]], $MachinePrecision]], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.8 \cdot 10^{+100} \lor \neg \left(b \leq 4.45 \cdot 10^{+133}\right):\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\end{array}
\end{array}
if b < -4.80000000000000023e100 or 4.45000000000000012e133 < b Initial program 76.2%
associate-+l-76.2%
*-commutative76.2%
associate-*r*77.3%
*-commutative77.3%
associate-+l-77.3%
associate-*l*77.3%
associate-*l*79.6%
*-commutative79.6%
Simplified79.6%
Taylor expanded in b around inf 61.0%
associate-/r*68.8%
Simplified68.8%
if -4.80000000000000023e100 < b < 4.45000000000000012e133Initial program 79.8%
associate-+l-79.8%
*-commutative79.8%
associate-*r*78.9%
*-commutative78.9%
associate-+l-78.9%
associate-*l*78.9%
associate-*l*81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in z around inf 46.2%
*-commutative46.2%
associate-/l*47.4%
associate-*r*47.4%
associate-*l/47.4%
Simplified47.4%
Final simplification54.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= b -2.7e+100) (not (<= b 8.5e+135))) (/ (/ b c) z) (* -4.0 (* t (/ a c)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -2.7e+100) || !(b <= 8.5e+135)) {
tmp = (b / c) / z;
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if ((b <= (-2.7d+100)) .or. (.not. (b <= 8.5d+135))) then
tmp = (b / c) / z
else
tmp = (-4.0d0) * (t * (a / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -2.7e+100) || !(b <= 8.5e+135)) {
tmp = (b / c) / z;
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -2.7e+100) or not (b <= 8.5e+135): tmp = (b / c) / z else: tmp = -4.0 * (t * (a / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -2.7e+100) || !(b <= 8.5e+135)) tmp = Float64(Float64(b / c) / z); else tmp = Float64(-4.0 * Float64(t * Float64(a / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((b <= -2.7e+100) || ~((b <= 8.5e+135)))
tmp = (b / c) / z;
else
tmp = -4.0 * (t * (a / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -2.7e+100], N[Not[LessEqual[b, 8.5e+135]], $MachinePrecision]], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.7 \cdot 10^{+100} \lor \neg \left(b \leq 8.5 \cdot 10^{+135}\right):\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\end{array}
\end{array}
if b < -2.69999999999999998e100 or 8.49999999999999992e135 < b Initial program 76.2%
associate-+l-76.2%
*-commutative76.2%
associate-*r*77.3%
*-commutative77.3%
associate-+l-77.3%
associate-*l*77.3%
associate-*l*79.6%
*-commutative79.6%
Simplified79.6%
Taylor expanded in b around inf 61.0%
associate-/r*68.8%
Simplified68.8%
if -2.69999999999999998e100 < b < 8.49999999999999992e135Initial program 79.8%
associate-+l-79.8%
*-commutative79.8%
associate-*r*78.9%
*-commutative78.9%
associate-+l-78.9%
associate-*l*78.9%
associate-*l*81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in a around inf 75.2%
Taylor expanded in a around inf 46.2%
*-commutative46.2%
associate-/l*45.2%
Simplified45.2%
Final simplification53.1%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ (/ b c) z))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return (b / c) / z;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
code = (b / c) / z
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (b / c) / z;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): return (b / c) / z
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) return Float64(Float64(b / c) / z) end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = (b / c) / z;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{\frac{b}{c}}{z}
\end{array}
Initial program 78.6%
associate-+l-78.6%
*-commutative78.6%
associate-*r*78.4%
*-commutative78.4%
associate-+l-78.4%
associate-*l*78.3%
associate-*l*80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in b around inf 29.5%
associate-/r*30.7%
Simplified30.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ b (* z c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
code = b / (z * c)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): return b / (z * c)
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = b / (z * c);
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 78.6%
associate-+l-78.6%
*-commutative78.6%
associate-*r*78.4%
*-commutative78.4%
associate-+l-78.4%
associate-*l*78.3%
associate-*l*80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in b around inf 29.5%
*-commutative29.5%
Simplified29.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* c z)))
(t_2 (* 4.0 (/ (* a t) c)))
(t_3 (* (* x 9.0) y))
(t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
(t_5 (/ t_4 (* z c)))
(t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
(if (< t_5 -1.100156740804105e-171)
t_6
(if (< t_5 0.0)
(/ (/ t_4 z) c)
(if (< t_5 1.1708877911747488e-53)
t_6
(if (< t_5 2.876823679546137e+130)
(- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
(if (< t_5 1.3838515042456319e+158)
t_6
(- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = b / (c * z)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (x * 9.0d0) * y
t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
t_5 = t_4 / (z * c)
t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
if (t_5 < (-1.100156740804105d-171)) then
tmp = t_6
else if (t_5 < 0.0d0) then
tmp = (t_4 / z) / c
else if (t_5 < 1.1708877911747488d-53) then
tmp = t_6
else if (t_5 < 2.876823679546137d+130) then
tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
else if (t_5 < 1.3838515042456319d+158) then
tmp = t_6
else
tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (c * z) t_2 = 4.0 * ((a * t) / c) t_3 = (x * 9.0) * y t_4 = (t_3 - (((z * 4.0) * t) * a)) + b t_5 = t_4 / (z * c) t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c) tmp = 0 if t_5 < -1.100156740804105e-171: tmp = t_6 elif t_5 < 0.0: tmp = (t_4 / z) / c elif t_5 < 1.1708877911747488e-53: tmp = t_6 elif t_5 < 2.876823679546137e+130: tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2 elif t_5 < 1.3838515042456319e+158: tmp = t_6 else: tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(c * z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(x * 9.0) * y) t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) t_5 = Float64(t_4 / Float64(z * c)) t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c)) tmp = 0.0 if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = Float64(Float64(t_4 / z) / c); elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2); elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (c * z); t_2 = 4.0 * ((a * t) / c); t_3 = (x * 9.0) * y; t_4 = (t_3 - (((z * 4.0) * t) * a)) + b; t_5 = t_4 / (z * c); t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c); tmp = 0.0; if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = (t_4 / z) / c; elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2; elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t\_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t\_4}{z \cdot c}\\
t_6 := \frac{\left(t\_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t\_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 0:\\
\;\;\;\;\frac{\frac{t\_4}{z}}{c}\\
\mathbf{elif}\;t\_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t\_1\right) - t\_2\\
\mathbf{elif}\;t\_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t\_1\right) - t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024085
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:alt
(if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))