
(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 18 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 (if (or (<= z -3.5e+59) (not (<= z 1.4e+37))) (* (+ (* -4.0 (* a t)) (+ (* 9.0 (/ 1.0 (/ (/ z y) x))) (/ b z))) (/ 1.0 c)) (/ (/ (+ b (fma x (* 9.0 y) (* a (* z (* -4.0 t))))) 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 tmp;
if ((z <= -3.5e+59) || !(z <= 1.4e+37)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * (1.0 / ((z / y) / x))) + (b / z))) * (1.0 / c);
} else {
tmp = ((b + fma(x, (9.0 * y), (a * (z * (-4.0 * t))))) / 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) tmp = 0.0 if ((z <= -3.5e+59) || !(z <= 1.4e+37)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(Float64(9.0 * Float64(1.0 / Float64(Float64(z / y) / x))) + Float64(b / z))) * Float64(1.0 / c)); else tmp = Float64(Float64(Float64(b + fma(x, Float64(9.0 * y), Float64(a * Float64(z * Float64(-4.0 * t))))) / c) / z); end return 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[z, -3.5e+59], N[Not[LessEqual[z, 1.4e+37]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(1.0 / N[(N[(z / y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision] + N[(a * N[(z * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+59} \lor \neg \left(z \leq 1.4 \cdot 10^{+37}\right):\\
\;\;\;\;\left(-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{1}{\frac{\frac{z}{y}}{x}} + \frac{b}{z}\right)\right) \cdot \frac{1}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b + \mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(z \cdot \left(-4 \cdot t\right)\right)\right)}{c}}{z}\\
\end{array}
\end{array}
if z < -3.5e59 or 1.3999999999999999e37 < z Initial program 62.2%
associate-+l-62.2%
*-commutative62.2%
associate-*r*61.3%
*-commutative61.3%
associate-+l-61.3%
*-commutative61.3%
associate-*r*62.2%
*-commutative62.2%
associate-*l*62.2%
associate-*l*67.8%
Simplified67.8%
Applied egg-rr74.6%
Taylor expanded in x around 0 89.1%
clear-num89.1%
inv-pow89.1%
Applied egg-rr89.1%
unpow-189.1%
*-commutative89.1%
associate-/r*92.9%
Simplified92.9%
if -3.5e59 < z < 1.3999999999999999e37Initial program 92.4%
associate-+l-92.4%
*-commutative92.4%
associate-*r*93.2%
*-commutative93.2%
associate-+l-93.2%
*-commutative93.2%
associate-*r*92.4%
*-commutative92.4%
associate-*l*92.5%
associate-*l*89.6%
Simplified89.6%
Applied egg-rr93.8%
associate-*l/93.9%
*-un-lft-identity93.9%
Applied egg-rr93.9%
Final simplification93.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 (* -4.0 (* a t)))
(t_2 (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c)))
(t_3 (/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* a t)))) (* z c))))
(if (<= t_2 -2e-94)
t_3
(if (<= t_2 0.0)
(/ (+ t_1 (/ b z)) c)
(if (<= t_2 INFINITY)
t_3
(* (/ 1.0 c) (+ t_1 (/ (* 9.0 x) (/ z y)))))))))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 * (a * t);
double t_2 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
double t_3 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (a * t)))) / (z * c);
double tmp;
if (t_2 <= -2e-94) {
tmp = t_3;
} else if (t_2 <= 0.0) {
tmp = (t_1 + (b / z)) / c;
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = (1.0 / c) * (t_1 + ((9.0 * x) / (z / y)));
}
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 = -4.0 * (a * t);
double t_2 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
double t_3 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (a * t)))) / (z * c);
double tmp;
if (t_2 <= -2e-94) {
tmp = t_3;
} else if (t_2 <= 0.0) {
tmp = (t_1 + (b / z)) / c;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = (1.0 / c) * (t_1 + ((9.0 * x) / (z / y)));
}
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 * (a * t) t_2 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c) t_3 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (a * t)))) / (z * c) tmp = 0 if t_2 <= -2e-94: tmp = t_3 elif t_2 <= 0.0: tmp = (t_1 + (b / z)) / c elif t_2 <= math.inf: tmp = t_3 else: tmp = (1.0 / c) * (t_1 + ((9.0 * x) / (z / y))) 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(a * t)) t_2 = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)) t_3 = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(a * t)))) / Float64(z * c)) tmp = 0.0 if (t_2 <= -2e-94) tmp = t_3; elseif (t_2 <= 0.0) tmp = Float64(Float64(t_1 + Float64(b / z)) / c); elseif (t_2 <= Inf) tmp = t_3; else tmp = Float64(Float64(1.0 / c) * Float64(t_1 + Float64(Float64(9.0 * x) / Float64(z / y)))); 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 * (a * t);
t_2 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
t_3 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (a * t)))) / (z * c);
tmp = 0.0;
if (t_2 <= -2e-94)
tmp = t_3;
elseif (t_2 <= 0.0)
tmp = (t_1 + (b / z)) / c;
elseif (t_2 <= Inf)
tmp = t_3;
else
tmp = (1.0 / c) * (t_1 + ((9.0 * x) / (z / y)));
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[(a * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-94], t$95$3, If[LessEqual[t$95$2, 0.0], N[(N[(t$95$1 + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$3, N[(N[(1.0 / c), $MachinePrecision] * N[(t$95$1 + N[(N[(9.0 * x), $MachinePrecision] / N[(z / y), $MachinePrecision]), $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 := -4 \cdot \left(a \cdot t\right)\\
t_2 := \frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
t_3 := \frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(a \cdot t\right)\right)}{z \cdot c}\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{-94}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;\frac{t_1 + \frac{b}{z}}{c}\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{c} \cdot \left(t_1 + \frac{9 \cdot x}{\frac{z}{y}}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -1.9999999999999999e-94 or -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < +inf.0Initial program 90.8%
associate-+l-90.8%
*-commutative90.8%
associate-*r*90.8%
*-commutative90.8%
associate-+l-90.8%
*-commutative90.8%
associate-*r*90.8%
*-commutative90.8%
associate-*l*90.9%
associate-*l*92.3%
Simplified92.3%
if -1.9999999999999999e-94 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -0.0Initial program 46.2%
associate-+l-46.2%
*-commutative46.2%
associate-*r*45.2%
*-commutative45.2%
associate-+l-45.2%
*-commutative45.2%
associate-*r*46.2%
*-commutative46.2%
associate-*l*46.2%
associate-*l*46.2%
Simplified46.2%
Applied egg-rr99.3%
Taylor expanded in x around 0 99.4%
Taylor expanded in x around 0 81.1%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*1.2%
*-commutative1.2%
associate-+l-1.2%
*-commutative1.2%
associate-*r*0.0%
*-commutative0.0%
associate-*l*0.0%
associate-*l*1.2%
Simplified1.2%
Applied egg-rr11.7%
Taylor expanded in x around 0 53.9%
Taylor expanded in x around inf 49.7%
associate-/l*70.6%
associate-*r/70.7%
Simplified70.7%
Final simplification89.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 (if (or (<= z -1e+15) (not (<= z 0.3))) (* (+ (* -4.0 (* a t)) (+ (* 9.0 (/ 1.0 (/ (/ z y) x))) (/ b z))) (/ 1.0 c)) (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* 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 tmp;
if ((z <= -1e+15) || !(z <= 0.3)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * (1.0 / ((z / y) / x))) + (b / z))) * (1.0 / c);
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (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) :: tmp
if ((z <= (-1d+15)) .or. (.not. (z <= 0.3d0))) then
tmp = (((-4.0d0) * (a * t)) + ((9.0d0 * (1.0d0 / ((z / y) / x))) + (b / z))) * (1.0d0 / c)
else
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (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 tmp;
if ((z <= -1e+15) || !(z <= 0.3)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * (1.0 / ((z / y) / x))) + (b / z))) * (1.0 / c);
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (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): tmp = 0 if (z <= -1e+15) or not (z <= 0.3): tmp = ((-4.0 * (a * t)) + ((9.0 * (1.0 / ((z / y) / x))) + (b / z))) * (1.0 / c) else: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (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) tmp = 0.0 if ((z <= -1e+15) || !(z <= 0.3)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(Float64(9.0 * Float64(1.0 / Float64(Float64(z / y) / x))) + Float64(b / z))) * Float64(1.0 / c)); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / 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)
tmp = 0.0;
if ((z <= -1e+15) || ~((z <= 0.3)))
tmp = ((-4.0 * (a * t)) + ((9.0 * (1.0 / ((z / y) / x))) + (b / z))) * (1.0 / c);
else
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (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_] := If[Or[LessEqual[z, -1e+15], N[Not[LessEqual[z, 0.3]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(1.0 / N[(N[(z / y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}
\mathbf{if}\;z \leq -1 \cdot 10^{+15} \lor \neg \left(z \leq 0.3\right):\\
\;\;\;\;\left(-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{1}{\frac{\frac{z}{y}}{x}} + \frac{b}{z}\right)\right) \cdot \frac{1}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1e15 or 0.299999999999999989 < z Initial program 62.4%
associate-+l-62.4%
*-commutative62.4%
associate-*r*62.3%
*-commutative62.3%
associate-+l-62.3%
*-commutative62.3%
associate-*r*62.4%
*-commutative62.4%
associate-*l*62.4%
associate-*l*68.0%
Simplified68.0%
Applied egg-rr74.8%
Taylor expanded in x around 0 89.0%
clear-num88.9%
inv-pow88.9%
Applied egg-rr88.9%
unpow-188.9%
*-commutative88.9%
associate-/r*92.4%
Simplified92.4%
if -1e15 < z < 0.299999999999999989Initial program 96.5%
Final simplification94.2%
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 (<= z -5e+16) (not (<= z 0.34))) (* (/ 1.0 c) (+ (* -4.0 (* a t)) (+ (/ b z) (* 9.0 (/ (* y x) z))))) (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* 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 tmp;
if ((z <= -5e+16) || !(z <= 0.34)) {
tmp = (1.0 / c) * ((-4.0 * (a * t)) + ((b / z) + (9.0 * ((y * x) / z))));
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (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) :: tmp
if ((z <= (-5d+16)) .or. (.not. (z <= 0.34d0))) then
tmp = (1.0d0 / c) * (((-4.0d0) * (a * t)) + ((b / z) + (9.0d0 * ((y * x) / z))))
else
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (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 tmp;
if ((z <= -5e+16) || !(z <= 0.34)) {
tmp = (1.0 / c) * ((-4.0 * (a * t)) + ((b / z) + (9.0 * ((y * x) / z))));
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (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): tmp = 0 if (z <= -5e+16) or not (z <= 0.34): tmp = (1.0 / c) * ((-4.0 * (a * t)) + ((b / z) + (9.0 * ((y * x) / z)))) else: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (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) tmp = 0.0 if ((z <= -5e+16) || !(z <= 0.34)) tmp = Float64(Float64(1.0 / c) * Float64(Float64(-4.0 * Float64(a * t)) + Float64(Float64(b / z) + Float64(9.0 * Float64(Float64(y * x) / z))))); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / 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)
tmp = 0.0;
if ((z <= -5e+16) || ~((z <= 0.34)))
tmp = (1.0 / c) * ((-4.0 * (a * t)) + ((b / z) + (9.0 * ((y * x) / z))));
else
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (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_] := If[Or[LessEqual[z, -5e+16], N[Not[LessEqual[z, 0.34]], $MachinePrecision]], N[(N[(1.0 / c), $MachinePrecision] * N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(N[(b / z), $MachinePrecision] + N[(9.0 * N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}
\mathbf{if}\;z \leq -5 \cdot 10^{+16} \lor \neg \left(z \leq 0.34\right):\\
\;\;\;\;\frac{1}{c} \cdot \left(-4 \cdot \left(a \cdot t\right) + \left(\frac{b}{z} + 9 \cdot \frac{y \cdot x}{z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -5e16 or 0.340000000000000024 < z Initial program 62.4%
associate-+l-62.4%
*-commutative62.4%
associate-*r*62.3%
*-commutative62.3%
associate-+l-62.3%
*-commutative62.3%
associate-*r*62.4%
*-commutative62.4%
associate-*l*62.4%
associate-*l*68.0%
Simplified68.0%
Applied egg-rr74.8%
Taylor expanded in x around 0 89.0%
if -5e16 < z < 0.340000000000000024Initial program 96.5%
Final simplification92.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 (* a t)) (/ b z)) c)))
(if (<= x -2.5e+169)
(* (/ 1.0 c) (* 9.0 (/ x (/ z y))))
(if (<= x -3.9e+127)
t_1
(if (<= x -7.5e+75)
(* 9.0 (* x (/ y (* z c))))
(if (<= x -5.8e+43)
(* -4.0 (/ a (/ c t)))
(if (<= x 1.95e-102) t_1 (* (/ 9.0 z) (/ x (/ c y))))))))))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 * (a * t)) + (b / z)) / c;
double tmp;
if (x <= -2.5e+169) {
tmp = (1.0 / c) * (9.0 * (x / (z / y)));
} else if (x <= -3.9e+127) {
tmp = t_1;
} else if (x <= -7.5e+75) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (x <= -5.8e+43) {
tmp = -4.0 * (a / (c / t));
} else if (x <= 1.95e-102) {
tmp = t_1;
} else {
tmp = (9.0 / z) * (x / (c / y));
}
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 = (((-4.0d0) * (a * t)) + (b / z)) / c
if (x <= (-2.5d+169)) then
tmp = (1.0d0 / c) * (9.0d0 * (x / (z / y)))
else if (x <= (-3.9d+127)) then
tmp = t_1
else if (x <= (-7.5d+75)) then
tmp = 9.0d0 * (x * (y / (z * c)))
else if (x <= (-5.8d+43)) then
tmp = (-4.0d0) * (a / (c / t))
else if (x <= 1.95d-102) then
tmp = t_1
else
tmp = (9.0d0 / z) * (x / (c / y))
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 * (a * t)) + (b / z)) / c;
double tmp;
if (x <= -2.5e+169) {
tmp = (1.0 / c) * (9.0 * (x / (z / y)));
} else if (x <= -3.9e+127) {
tmp = t_1;
} else if (x <= -7.5e+75) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (x <= -5.8e+43) {
tmp = -4.0 * (a / (c / t));
} else if (x <= 1.95e-102) {
tmp = t_1;
} else {
tmp = (9.0 / z) * (x / (c / y));
}
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 * (a * t)) + (b / z)) / c tmp = 0 if x <= -2.5e+169: tmp = (1.0 / c) * (9.0 * (x / (z / y))) elif x <= -3.9e+127: tmp = t_1 elif x <= -7.5e+75: tmp = 9.0 * (x * (y / (z * c))) elif x <= -5.8e+43: tmp = -4.0 * (a / (c / t)) elif x <= 1.95e-102: tmp = t_1 else: tmp = (9.0 / z) * (x / (c / y)) 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(-4.0 * Float64(a * t)) + Float64(b / z)) / c) tmp = 0.0 if (x <= -2.5e+169) tmp = Float64(Float64(1.0 / c) * Float64(9.0 * Float64(x / Float64(z / y)))); elseif (x <= -3.9e+127) tmp = t_1; elseif (x <= -7.5e+75) tmp = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))); elseif (x <= -5.8e+43) tmp = Float64(-4.0 * Float64(a / Float64(c / t))); elseif (x <= 1.95e-102) tmp = t_1; else tmp = Float64(Float64(9.0 / z) * Float64(x / Float64(c / y))); 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 * (a * t)) + (b / z)) / c;
tmp = 0.0;
if (x <= -2.5e+169)
tmp = (1.0 / c) * (9.0 * (x / (z / y)));
elseif (x <= -3.9e+127)
tmp = t_1;
elseif (x <= -7.5e+75)
tmp = 9.0 * (x * (y / (z * c)));
elseif (x <= -5.8e+43)
tmp = -4.0 * (a / (c / t));
elseif (x <= 1.95e-102)
tmp = t_1;
else
tmp = (9.0 / z) * (x / (c / y));
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[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[x, -2.5e+169], N[(N[(1.0 / c), $MachinePrecision] * N[(9.0 * N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.9e+127], t$95$1, If[LessEqual[x, -7.5e+75], N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.8e+43], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.95e-102], t$95$1, N[(N[(9.0 / z), $MachinePrecision] * N[(x / N[(c / y), $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 := \frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{if}\;x \leq -2.5 \cdot 10^{+169}:\\
\;\;\;\;\frac{1}{c} \cdot \left(9 \cdot \frac{x}{\frac{z}{y}}\right)\\
\mathbf{elif}\;x \leq -3.9 \cdot 10^{+127}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{+75}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{elif}\;x \leq -5.8 \cdot 10^{+43}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{elif}\;x \leq 1.95 \cdot 10^{-102}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{9}{z} \cdot \frac{x}{\frac{c}{y}}\\
\end{array}
\end{array}
if x < -2.50000000000000009e169Initial program 75.6%
associate-+l-75.6%
*-commutative75.6%
associate-*r*75.2%
*-commutative75.2%
associate-+l-75.2%
*-commutative75.2%
associate-*r*75.6%
*-commutative75.6%
associate-*l*75.6%
associate-*l*75.6%
Simplified75.6%
Applied egg-rr79.9%
Taylor expanded in x around inf 59.2%
associate-/l*67.7%
Simplified67.7%
if -2.50000000000000009e169 < x < -3.89999999999999981e127 or -5.8000000000000004e43 < x < 1.95e-102Initial program 79.6%
associate-+l-79.6%
*-commutative79.6%
associate-*r*80.4%
*-commutative80.4%
associate-+l-80.4%
*-commutative80.4%
associate-*r*79.6%
*-commutative79.6%
associate-*l*79.6%
associate-*l*82.0%
Simplified82.0%
Applied egg-rr78.2%
Taylor expanded in x around 0 88.4%
Taylor expanded in x around 0 78.6%
if -3.89999999999999981e127 < x < -7.4999999999999995e75Initial program 100.0%
associate-+l-100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-+l-100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in x around inf 75.0%
expm1-log1p-u50.0%
expm1-udef50.0%
times-frac50.0%
Applied egg-rr50.0%
expm1-def50.0%
expm1-log1p75.0%
times-frac75.0%
*-commutative75.0%
associate-*r/75.0%
*-commutative75.0%
Simplified75.0%
if -7.4999999999999995e75 < x < -5.8000000000000004e43Initial program 100.0%
associate-+l-100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-+l-100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in z around inf 67.0%
*-commutative67.0%
associate-/l*67.0%
Simplified67.0%
if 1.95e-102 < x Initial program 73.1%
associate-+l-73.1%
*-commutative73.1%
associate-*r*71.9%
*-commutative71.9%
associate-+l-71.9%
*-commutative71.9%
associate-*r*73.1%
*-commutative73.1%
associate-*l*73.1%
associate-*l*73.2%
Simplified73.2%
Applied egg-rr78.8%
Taylor expanded in x around inf 48.4%
associate-*r/48.4%
*-commutative48.4%
times-frac50.0%
associate-/l*50.0%
Simplified50.0%
Final simplification67.2%
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 (* y (* 9.0 x))) (* z c)))
(t_2 (/ (+ (* -4.0 (* a t)) (/ b z)) c)))
(if (<= z -4.1e-52)
t_2
(if (<= z 1.7e-190)
t_1
(if (<= z 4e-50)
(/ 1.0 (/ (* z c) (+ b (* (* -4.0 a) (* z t)))))
(if (<= z 2.2e-19) t_1 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 = (b + (y * (9.0 * x))) / (z * c);
double t_2 = ((-4.0 * (a * t)) + (b / z)) / c;
double tmp;
if (z <= -4.1e-52) {
tmp = t_2;
} else if (z <= 1.7e-190) {
tmp = t_1;
} else if (z <= 4e-50) {
tmp = 1.0 / ((z * c) / (b + ((-4.0 * a) * (z * t))));
} else if (z <= 2.2e-19) {
tmp = t_1;
} 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 = (b + (y * (9.0d0 * x))) / (z * c)
t_2 = (((-4.0d0) * (a * t)) + (b / z)) / c
if (z <= (-4.1d-52)) then
tmp = t_2
else if (z <= 1.7d-190) then
tmp = t_1
else if (z <= 4d-50) then
tmp = 1.0d0 / ((z * c) / (b + (((-4.0d0) * a) * (z * t))))
else if (z <= 2.2d-19) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && 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 + (y * (9.0 * x))) / (z * c);
double t_2 = ((-4.0 * (a * t)) + (b / z)) / c;
double tmp;
if (z <= -4.1e-52) {
tmp = t_2;
} else if (z <= 1.7e-190) {
tmp = t_1;
} else if (z <= 4e-50) {
tmp = 1.0 / ((z * c) / (b + ((-4.0 * a) * (z * t))));
} else if (z <= 2.2e-19) {
tmp = t_1;
} 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 = (b + (y * (9.0 * x))) / (z * c) t_2 = ((-4.0 * (a * t)) + (b / z)) / c tmp = 0 if z <= -4.1e-52: tmp = t_2 elif z <= 1.7e-190: tmp = t_1 elif z <= 4e-50: tmp = 1.0 / ((z * c) / (b + ((-4.0 * a) * (z * t)))) elif z <= 2.2e-19: tmp = t_1 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(Float64(b + Float64(y * Float64(9.0 * x))) / Float64(z * c)) t_2 = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c) tmp = 0.0 if (z <= -4.1e-52) tmp = t_2; elseif (z <= 1.7e-190) tmp = t_1; elseif (z <= 4e-50) tmp = Float64(1.0 / Float64(Float64(z * c) / Float64(b + Float64(Float64(-4.0 * a) * Float64(z * t))))); elseif (z <= 2.2e-19) tmp = t_1; 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 = (b + (y * (9.0 * x))) / (z * c);
t_2 = ((-4.0 * (a * t)) + (b / z)) / c;
tmp = 0.0;
if (z <= -4.1e-52)
tmp = t_2;
elseif (z <= 1.7e-190)
tmp = t_1;
elseif (z <= 4e-50)
tmp = 1.0 / ((z * c) / (b + ((-4.0 * a) * (z * t))));
elseif (z <= 2.2e-19)
tmp = t_1;
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[(N[(b + N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -4.1e-52], t$95$2, If[LessEqual[z, 1.7e-190], t$95$1, If[LessEqual[z, 4e-50], N[(1.0 / N[(N[(z * c), $MachinePrecision] / N[(b + N[(N[(-4.0 * a), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e-19], t$95$1, 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 := \frac{b + y \cdot \left(9 \cdot x\right)}{z \cdot c}\\
t_2 := \frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{if}\;z \leq -4.1 \cdot 10^{-52}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-190}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-50}:\\
\;\;\;\;\frac{1}{\frac{z \cdot c}{b + \left(-4 \cdot a\right) \cdot \left(z \cdot t\right)}}\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-19}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -4.09999999999999988e-52 or 2.1999999999999998e-19 < z Initial program 64.5%
associate-+l-64.5%
*-commutative64.5%
associate-*r*64.5%
*-commutative64.5%
associate-+l-64.5%
*-commutative64.5%
associate-*r*64.5%
*-commutative64.5%
associate-*l*64.5%
associate-*l*69.7%
Simplified69.7%
Applied egg-rr76.0%
Taylor expanded in x around 0 89.2%
Taylor expanded in x around 0 72.0%
if -4.09999999999999988e-52 < z < 1.69999999999999991e-190 or 4.00000000000000003e-50 < z < 2.1999999999999998e-19Initial program 97.0%
associate-+l-97.0%
*-commutative97.0%
associate-*r*97.0%
*-commutative97.0%
associate-+l-97.0%
*-commutative97.0%
associate-*r*97.0%
*-commutative97.0%
associate-*l*97.1%
associate-*l*92.9%
Simplified92.9%
Taylor expanded in x around inf 91.9%
associate-*r*91.9%
Simplified91.9%
if 1.69999999999999991e-190 < z < 4.00000000000000003e-50Initial program 96.7%
associate-+l-96.7%
*-commutative96.7%
associate-*r*96.8%
*-commutative96.8%
associate-+l-96.8%
*-commutative96.8%
associate-*r*96.7%
*-commutative96.7%
associate-*l*96.8%
associate-*l*90.9%
Simplified90.9%
Taylor expanded in x around 0 80.4%
clear-num80.5%
inv-pow80.5%
*-commutative80.5%
*-commutative80.5%
Applied egg-rr80.5%
unpow-180.5%
*-commutative80.5%
cancel-sign-sub-inv80.5%
metadata-eval80.5%
associate-*r*80.5%
Simplified80.5%
Final simplification78.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 (* -4.0 (* a t))))
(if (or (<= x -1.32e+35) (not (<= x 4.2e-103)))
(* (/ 1.0 c) (+ t_1 (/ (* 9.0 x) (/ z y))))
(/ (+ t_1 (/ 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) {
double t_1 = -4.0 * (a * t);
double tmp;
if ((x <= -1.32e+35) || !(x <= 4.2e-103)) {
tmp = (1.0 / c) * (t_1 + ((9.0 * x) / (z / y)));
} else {
tmp = (t_1 + (b / 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 = (-4.0d0) * (a * t)
if ((x <= (-1.32d+35)) .or. (.not. (x <= 4.2d-103))) then
tmp = (1.0d0 / c) * (t_1 + ((9.0d0 * x) / (z / y)))
else
tmp = (t_1 + (b / 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 = -4.0 * (a * t);
double tmp;
if ((x <= -1.32e+35) || !(x <= 4.2e-103)) {
tmp = (1.0 / c) * (t_1 + ((9.0 * x) / (z / y)));
} else {
tmp = (t_1 + (b / 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 = -4.0 * (a * t) tmp = 0 if (x <= -1.32e+35) or not (x <= 4.2e-103): tmp = (1.0 / c) * (t_1 + ((9.0 * x) / (z / y))) else: tmp = (t_1 + (b / 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(-4.0 * Float64(a * t)) tmp = 0.0 if ((x <= -1.32e+35) || !(x <= 4.2e-103)) tmp = Float64(Float64(1.0 / c) * Float64(t_1 + Float64(Float64(9.0 * x) / Float64(z / y)))); else tmp = Float64(Float64(t_1 + Float64(b / 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 = -4.0 * (a * t);
tmp = 0.0;
if ((x <= -1.32e+35) || ~((x <= 4.2e-103)))
tmp = (1.0 / c) * (t_1 + ((9.0 * x) / (z / y)));
else
tmp = (t_1 + (b / 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[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x, -1.32e+35], N[Not[LessEqual[x, 4.2e-103]], $MachinePrecision]], N[(N[(1.0 / c), $MachinePrecision] * N[(t$95$1 + N[(N[(9.0 * x), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $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 := -4 \cdot \left(a \cdot t\right)\\
\mathbf{if}\;x \leq -1.32 \cdot 10^{+35} \lor \neg \left(x \leq 4.2 \cdot 10^{-103}\right):\\
\;\;\;\;\frac{1}{c} \cdot \left(t_1 + \frac{9 \cdot x}{\frac{z}{y}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1 + \frac{b}{z}}{c}\\
\end{array}
\end{array}
if x < -1.31999999999999995e35 or 4.20000000000000009e-103 < x Initial program 74.2%
associate-+l-74.2%
*-commutative74.2%
associate-*r*73.3%
*-commutative73.3%
associate-+l-73.3%
*-commutative73.3%
associate-*r*74.2%
*-commutative74.2%
associate-*l*74.3%
associate-*l*74.4%
Simplified74.4%
Applied egg-rr80.4%
Taylor expanded in x around 0 83.2%
Taylor expanded in x around inf 71.0%
associate-/l*74.7%
associate-*r/74.8%
Simplified74.8%
if -1.31999999999999995e35 < x < 4.20000000000000009e-103Initial program 80.7%
associate-+l-80.7%
*-commutative80.7%
associate-*r*81.6%
*-commutative81.6%
associate-+l-81.6%
*-commutative81.6%
associate-*r*80.7%
*-commutative80.7%
associate-*l*80.7%
associate-*l*83.2%
Simplified83.2%
Applied egg-rr77.8%
Taylor expanded in x around 0 87.7%
Taylor expanded in x around 0 78.1%
Final simplification76.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 (/ (+ b (* y (* 9.0 x))) (* z c)))
(t_2 (/ (+ (* -4.0 (* a t)) (/ b z)) c)))
(if (<= z -1.42e-52)
t_2
(if (<= z 8e-192)
t_1
(if (<= z 1.8e-44)
(/ (- b (* 4.0 (* a (* z t)))) (* z c))
(if (<= z 9e-21) t_1 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 = (b + (y * (9.0 * x))) / (z * c);
double t_2 = ((-4.0 * (a * t)) + (b / z)) / c;
double tmp;
if (z <= -1.42e-52) {
tmp = t_2;
} else if (z <= 8e-192) {
tmp = t_1;
} else if (z <= 1.8e-44) {
tmp = (b - (4.0 * (a * (z * t)))) / (z * c);
} else if (z <= 9e-21) {
tmp = t_1;
} 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 = (b + (y * (9.0d0 * x))) / (z * c)
t_2 = (((-4.0d0) * (a * t)) + (b / z)) / c
if (z <= (-1.42d-52)) then
tmp = t_2
else if (z <= 8d-192) then
tmp = t_1
else if (z <= 1.8d-44) then
tmp = (b - (4.0d0 * (a * (z * t)))) / (z * c)
else if (z <= 9d-21) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && 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 + (y * (9.0 * x))) / (z * c);
double t_2 = ((-4.0 * (a * t)) + (b / z)) / c;
double tmp;
if (z <= -1.42e-52) {
tmp = t_2;
} else if (z <= 8e-192) {
tmp = t_1;
} else if (z <= 1.8e-44) {
tmp = (b - (4.0 * (a * (z * t)))) / (z * c);
} else if (z <= 9e-21) {
tmp = t_1;
} 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 = (b + (y * (9.0 * x))) / (z * c) t_2 = ((-4.0 * (a * t)) + (b / z)) / c tmp = 0 if z <= -1.42e-52: tmp = t_2 elif z <= 8e-192: tmp = t_1 elif z <= 1.8e-44: tmp = (b - (4.0 * (a * (z * t)))) / (z * c) elif z <= 9e-21: tmp = t_1 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(Float64(b + Float64(y * Float64(9.0 * x))) / Float64(z * c)) t_2 = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c) tmp = 0.0 if (z <= -1.42e-52) tmp = t_2; elseif (z <= 8e-192) tmp = t_1; elseif (z <= 1.8e-44) tmp = Float64(Float64(b - Float64(4.0 * Float64(a * Float64(z * t)))) / Float64(z * c)); elseif (z <= 9e-21) tmp = t_1; 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 = (b + (y * (9.0 * x))) / (z * c);
t_2 = ((-4.0 * (a * t)) + (b / z)) / c;
tmp = 0.0;
if (z <= -1.42e-52)
tmp = t_2;
elseif (z <= 8e-192)
tmp = t_1;
elseif (z <= 1.8e-44)
tmp = (b - (4.0 * (a * (z * t)))) / (z * c);
elseif (z <= 9e-21)
tmp = t_1;
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[(N[(b + N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -1.42e-52], t$95$2, If[LessEqual[z, 8e-192], t$95$1, If[LessEqual[z, 1.8e-44], N[(N[(b - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e-21], t$95$1, 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 := \frac{b + y \cdot \left(9 \cdot x\right)}{z \cdot c}\\
t_2 := \frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{if}\;z \leq -1.42 \cdot 10^{-52}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-192}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-44}:\\
\;\;\;\;\frac{b - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{z \cdot c}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-21}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.4200000000000001e-52 or 8.99999999999999936e-21 < z Initial program 64.5%
associate-+l-64.5%
*-commutative64.5%
associate-*r*64.5%
*-commutative64.5%
associate-+l-64.5%
*-commutative64.5%
associate-*r*64.5%
*-commutative64.5%
associate-*l*64.5%
associate-*l*69.7%
Simplified69.7%
Applied egg-rr76.0%
Taylor expanded in x around 0 89.2%
Taylor expanded in x around 0 72.0%
if -1.4200000000000001e-52 < z < 8.0000000000000008e-192 or 1.7999999999999999e-44 < z < 8.99999999999999936e-21Initial program 97.0%
associate-+l-97.0%
*-commutative97.0%
associate-*r*97.0%
*-commutative97.0%
associate-+l-97.0%
*-commutative97.0%
associate-*r*97.0%
*-commutative97.0%
associate-*l*97.1%
associate-*l*92.9%
Simplified92.9%
Taylor expanded in x around inf 91.9%
associate-*r*91.9%
Simplified91.9%
if 8.0000000000000008e-192 < z < 1.7999999999999999e-44Initial program 96.7%
associate-+l-96.7%
*-commutative96.7%
associate-*r*96.8%
*-commutative96.8%
associate-+l-96.8%
*-commutative96.8%
associate-*r*96.7%
*-commutative96.7%
associate-*l*96.8%
associate-*l*90.9%
Simplified90.9%
Taylor expanded in x around 0 80.4%
Final simplification78.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 (* -4.0 (* a t))))
(if (or (<= x -5.9e+35) (not (<= x 4.5e-104)))
(/ (+ t_1 (* 9.0 (/ (* y x) z))) c)
(/ (+ t_1 (/ 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) {
double t_1 = -4.0 * (a * t);
double tmp;
if ((x <= -5.9e+35) || !(x <= 4.5e-104)) {
tmp = (t_1 + (9.0 * ((y * x) / z))) / c;
} else {
tmp = (t_1 + (b / 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 = (-4.0d0) * (a * t)
if ((x <= (-5.9d+35)) .or. (.not. (x <= 4.5d-104))) then
tmp = (t_1 + (9.0d0 * ((y * x) / z))) / c
else
tmp = (t_1 + (b / 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 = -4.0 * (a * t);
double tmp;
if ((x <= -5.9e+35) || !(x <= 4.5e-104)) {
tmp = (t_1 + (9.0 * ((y * x) / z))) / c;
} else {
tmp = (t_1 + (b / 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 = -4.0 * (a * t) tmp = 0 if (x <= -5.9e+35) or not (x <= 4.5e-104): tmp = (t_1 + (9.0 * ((y * x) / z))) / c else: tmp = (t_1 + (b / 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(-4.0 * Float64(a * t)) tmp = 0.0 if ((x <= -5.9e+35) || !(x <= 4.5e-104)) tmp = Float64(Float64(t_1 + Float64(9.0 * Float64(Float64(y * x) / z))) / c); else tmp = Float64(Float64(t_1 + Float64(b / 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 = -4.0 * (a * t);
tmp = 0.0;
if ((x <= -5.9e+35) || ~((x <= 4.5e-104)))
tmp = (t_1 + (9.0 * ((y * x) / z))) / c;
else
tmp = (t_1 + (b / 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[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x, -5.9e+35], N[Not[LessEqual[x, 4.5e-104]], $MachinePrecision]], N[(N[(t$95$1 + N[(9.0 * N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(t$95$1 + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $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 := -4 \cdot \left(a \cdot t\right)\\
\mathbf{if}\;x \leq -5.9 \cdot 10^{+35} \lor \neg \left(x \leq 4.5 \cdot 10^{-104}\right):\\
\;\;\;\;\frac{t_1 + 9 \cdot \frac{y \cdot x}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1 + \frac{b}{z}}{c}\\
\end{array}
\end{array}
if x < -5.89999999999999985e35 or 4.4999999999999997e-104 < x Initial program 74.2%
associate-+l-74.2%
*-commutative74.2%
associate-*r*73.3%
*-commutative73.3%
associate-+l-73.3%
*-commutative73.3%
associate-*r*74.2%
*-commutative74.2%
associate-*l*74.3%
associate-*l*74.4%
Simplified74.4%
Applied egg-rr80.4%
Taylor expanded in x around 0 83.2%
Taylor expanded in b around 0 71.0%
if -5.89999999999999985e35 < x < 4.4999999999999997e-104Initial program 80.7%
associate-+l-80.7%
*-commutative80.7%
associate-*r*81.6%
*-commutative81.6%
associate-+l-81.6%
*-commutative81.6%
associate-*r*80.7%
*-commutative80.7%
associate-*l*80.7%
associate-*l*83.2%
Simplified83.2%
Applied egg-rr77.8%
Taylor expanded in x around 0 87.7%
Taylor expanded in x around 0 78.1%
Final simplification74.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 (* -4.0 (/ t (/ c a)))))
(if (<= z -1.35e+155)
t_1
(if (<= z -6.2e+92)
(/ (* b (/ 1.0 c)) z)
(if (<= z -1.12e-35)
t_1
(if (<= z -1.45e-279)
(* 9.0 (* x (/ y (* z c))))
(if (<= z 2.06e-20) (/ 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 = -4.0 * (t / (c / a));
double tmp;
if (z <= -1.35e+155) {
tmp = t_1;
} else if (z <= -6.2e+92) {
tmp = (b * (1.0 / c)) / z;
} else if (z <= -1.12e-35) {
tmp = t_1;
} else if (z <= -1.45e-279) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (z <= 2.06e-20) {
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 = (-4.0d0) * (t / (c / a))
if (z <= (-1.35d+155)) then
tmp = t_1
else if (z <= (-6.2d+92)) then
tmp = (b * (1.0d0 / c)) / z
else if (z <= (-1.12d-35)) then
tmp = t_1
else if (z <= (-1.45d-279)) then
tmp = 9.0d0 * (x * (y / (z * c)))
else if (z <= 2.06d-20) 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 = -4.0 * (t / (c / a));
double tmp;
if (z <= -1.35e+155) {
tmp = t_1;
} else if (z <= -6.2e+92) {
tmp = (b * (1.0 / c)) / z;
} else if (z <= -1.12e-35) {
tmp = t_1;
} else if (z <= -1.45e-279) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (z <= 2.06e-20) {
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 = -4.0 * (t / (c / a)) tmp = 0 if z <= -1.35e+155: tmp = t_1 elif z <= -6.2e+92: tmp = (b * (1.0 / c)) / z elif z <= -1.12e-35: tmp = t_1 elif z <= -1.45e-279: tmp = 9.0 * (x * (y / (z * c))) elif z <= 2.06e-20: 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(-4.0 * Float64(t / Float64(c / a))) tmp = 0.0 if (z <= -1.35e+155) tmp = t_1; elseif (z <= -6.2e+92) tmp = Float64(Float64(b * Float64(1.0 / c)) / z); elseif (z <= -1.12e-35) tmp = t_1; elseif (z <= -1.45e-279) tmp = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))); elseif (z <= 2.06e-20) 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 = -4.0 * (t / (c / a));
tmp = 0.0;
if (z <= -1.35e+155)
tmp = t_1;
elseif (z <= -6.2e+92)
tmp = (b * (1.0 / c)) / z;
elseif (z <= -1.12e-35)
tmp = t_1;
elseif (z <= -1.45e-279)
tmp = 9.0 * (x * (y / (z * c)));
elseif (z <= 2.06e-20)
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[(-4.0 * N[(t / N[(c / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.35e+155], t$95$1, If[LessEqual[z, -6.2e+92], N[(N[(b * N[(1.0 / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -1.12e-35], t$95$1, If[LessEqual[z, -1.45e-279], N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.06e-20], 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 := -4 \cdot \frac{t}{\frac{c}{a}}\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{+155}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{+92}:\\
\;\;\;\;\frac{b \cdot \frac{1}{c}}{z}\\
\mathbf{elif}\;z \leq -1.12 \cdot 10^{-35}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{-279}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{elif}\;z \leq 2.06 \cdot 10^{-20}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.34999999999999997e155 or -6.2000000000000004e92 < z < -1.12e-35 or 2.06000000000000008e-20 < z Initial program 64.2%
associate-+l-64.2%
*-commutative64.2%
associate-*r*64.9%
*-commutative64.9%
associate-+l-64.9%
*-commutative64.9%
associate-*r*64.2%
*-commutative64.2%
associate-*l*64.1%
associate-*l*69.6%
Simplified69.6%
Applied egg-rr74.3%
Taylor expanded in x around 0 88.6%
clear-num88.5%
inv-pow88.5%
Applied egg-rr88.5%
unpow-188.5%
*-commutative88.5%
associate-/r*91.6%
Simplified91.6%
Taylor expanded in a around inf 54.5%
*-commutative54.5%
associate-/l*60.2%
Simplified60.2%
if -1.34999999999999997e155 < z < -6.2000000000000004e92Initial program 63.7%
associate-+l-63.7%
*-commutative63.7%
associate-*r*59.3%
*-commutative59.3%
associate-+l-59.3%
*-commutative59.3%
associate-*r*63.7%
*-commutative63.7%
associate-*l*63.7%
associate-*l*67.9%
Simplified67.9%
Applied egg-rr83.3%
Taylor expanded in b around inf 36.4%
associate-*l/44.6%
Applied egg-rr44.6%
if -1.12e-35 < z < -1.45e-279Initial program 97.2%
associate-+l-97.2%
*-commutative97.2%
associate-*r*97.2%
*-commutative97.2%
associate-+l-97.2%
*-commutative97.2%
associate-*r*97.2%
*-commutative97.2%
associate-*l*97.3%
associate-*l*94.7%
Simplified94.7%
Taylor expanded in x around inf 69.1%
expm1-log1p-u34.0%
expm1-udef32.6%
times-frac23.8%
Applied egg-rr23.8%
expm1-def23.8%
expm1-log1p55.5%
times-frac69.1%
*-commutative69.1%
associate-*r/59.5%
*-commutative59.5%
Simplified59.5%
if -1.45e-279 < z < 2.06000000000000008e-20Initial program 96.9%
associate-+l-96.9%
*-commutative96.9%
associate-*r*96.9%
*-commutative96.9%
associate-+l-96.9%
*-commutative96.9%
associate-*r*96.9%
*-commutative96.9%
associate-*l*96.9%
associate-*l*91.1%
Simplified91.1%
Taylor expanded in b around inf 61.8%
*-commutative61.8%
Simplified61.8%
Final simplification59.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
(let* ((t_1 (* -4.0 (/ t (/ c a)))))
(if (<= z -9e+139)
t_1
(if (<= z -6.2e+45)
(* 9.0 (* (/ y c) (/ x z)))
(if (<= z -2.7e-34)
t_1
(if (<= z -2.75e-279)
(* 9.0 (* x (/ y (* z c))))
(if (<= z 1.32e-21) (/ 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 = -4.0 * (t / (c / a));
double tmp;
if (z <= -9e+139) {
tmp = t_1;
} else if (z <= -6.2e+45) {
tmp = 9.0 * ((y / c) * (x / z));
} else if (z <= -2.7e-34) {
tmp = t_1;
} else if (z <= -2.75e-279) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (z <= 1.32e-21) {
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 = (-4.0d0) * (t / (c / a))
if (z <= (-9d+139)) then
tmp = t_1
else if (z <= (-6.2d+45)) then
tmp = 9.0d0 * ((y / c) * (x / z))
else if (z <= (-2.7d-34)) then
tmp = t_1
else if (z <= (-2.75d-279)) then
tmp = 9.0d0 * (x * (y / (z * c)))
else if (z <= 1.32d-21) 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 = -4.0 * (t / (c / a));
double tmp;
if (z <= -9e+139) {
tmp = t_1;
} else if (z <= -6.2e+45) {
tmp = 9.0 * ((y / c) * (x / z));
} else if (z <= -2.7e-34) {
tmp = t_1;
} else if (z <= -2.75e-279) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (z <= 1.32e-21) {
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 = -4.0 * (t / (c / a)) tmp = 0 if z <= -9e+139: tmp = t_1 elif z <= -6.2e+45: tmp = 9.0 * ((y / c) * (x / z)) elif z <= -2.7e-34: tmp = t_1 elif z <= -2.75e-279: tmp = 9.0 * (x * (y / (z * c))) elif z <= 1.32e-21: 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(-4.0 * Float64(t / Float64(c / a))) tmp = 0.0 if (z <= -9e+139) tmp = t_1; elseif (z <= -6.2e+45) tmp = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))); elseif (z <= -2.7e-34) tmp = t_1; elseif (z <= -2.75e-279) tmp = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))); elseif (z <= 1.32e-21) 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 = -4.0 * (t / (c / a));
tmp = 0.0;
if (z <= -9e+139)
tmp = t_1;
elseif (z <= -6.2e+45)
tmp = 9.0 * ((y / c) * (x / z));
elseif (z <= -2.7e-34)
tmp = t_1;
elseif (z <= -2.75e-279)
tmp = 9.0 * (x * (y / (z * c)));
elseif (z <= 1.32e-21)
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[(-4.0 * N[(t / N[(c / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e+139], t$95$1, If[LessEqual[z, -6.2e+45], N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.7e-34], t$95$1, If[LessEqual[z, -2.75e-279], N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.32e-21], 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 := -4 \cdot \frac{t}{\frac{c}{a}}\\
\mathbf{if}\;z \leq -9 \cdot 10^{+139}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{+45}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-34}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.75 \cdot 10^{-279}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{elif}\;z \leq 1.32 \cdot 10^{-21}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -8.9999999999999999e139 or -6.19999999999999975e45 < z < -2.70000000000000017e-34 or 1.32e-21 < z Initial program 61.3%
associate-+l-61.3%
*-commutative61.3%
associate-*r*62.8%
*-commutative62.8%
associate-+l-62.8%
*-commutative62.8%
associate-*r*61.3%
*-commutative61.3%
associate-*l*61.4%
associate-*l*67.7%
Simplified67.7%
Applied egg-rr73.8%
Taylor expanded in x around 0 88.4%
clear-num88.4%
inv-pow88.4%
Applied egg-rr88.4%
unpow-188.4%
*-commutative88.4%
associate-/r*91.5%
Simplified91.5%
Taylor expanded in a around inf 54.4%
*-commutative54.4%
associate-/l*59.5%
Simplified59.5%
if -8.9999999999999999e139 < z < -6.19999999999999975e45Initial program 77.4%
associate-+l-77.4%
*-commutative77.4%
associate-*r*69.6%
*-commutative69.6%
associate-+l-69.6%
*-commutative69.6%
associate-*r*77.4%
*-commutative77.4%
associate-*l*77.2%
associate-*l*77.4%
Simplified77.4%
Taylor expanded in x around inf 39.8%
*-commutative39.8%
times-frac48.3%
Applied egg-rr48.3%
if -2.70000000000000017e-34 < z < -2.7500000000000001e-279Initial program 97.2%
associate-+l-97.2%
*-commutative97.2%
associate-*r*97.2%
*-commutative97.2%
associate-+l-97.2%
*-commutative97.2%
associate-*r*97.2%
*-commutative97.2%
associate-*l*97.3%
associate-*l*94.7%
Simplified94.7%
Taylor expanded in x around inf 69.1%
expm1-log1p-u34.0%
expm1-udef32.6%
times-frac23.8%
Applied egg-rr23.8%
expm1-def23.8%
expm1-log1p55.5%
times-frac69.1%
*-commutative69.1%
associate-*r/59.5%
*-commutative59.5%
Simplified59.5%
if -2.7500000000000001e-279 < z < 1.32e-21Initial program 96.9%
associate-+l-96.9%
*-commutative96.9%
associate-*r*96.9%
*-commutative96.9%
associate-+l-96.9%
*-commutative96.9%
associate-*r*96.9%
*-commutative96.9%
associate-*l*96.9%
associate-*l*91.1%
Simplified91.1%
Taylor expanded in b around inf 61.8%
*-commutative61.8%
Simplified61.8%
Final simplification58.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 (* -4.0 (/ t (/ c a)))))
(if (<= z -1.35e+155)
t_1
(if (<= z -1.06e+46)
(* 9.0 (* (/ y z) (/ x c)))
(if (<= z -7.4e-32)
t_1
(if (<= z -2.9e-279)
(* 9.0 (* x (/ y (* z c))))
(if (<= z 2.8e-21) (/ 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 = -4.0 * (t / (c / a));
double tmp;
if (z <= -1.35e+155) {
tmp = t_1;
} else if (z <= -1.06e+46) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (z <= -7.4e-32) {
tmp = t_1;
} else if (z <= -2.9e-279) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (z <= 2.8e-21) {
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 = (-4.0d0) * (t / (c / a))
if (z <= (-1.35d+155)) then
tmp = t_1
else if (z <= (-1.06d+46)) then
tmp = 9.0d0 * ((y / z) * (x / c))
else if (z <= (-7.4d-32)) then
tmp = t_1
else if (z <= (-2.9d-279)) then
tmp = 9.0d0 * (x * (y / (z * c)))
else if (z <= 2.8d-21) 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 = -4.0 * (t / (c / a));
double tmp;
if (z <= -1.35e+155) {
tmp = t_1;
} else if (z <= -1.06e+46) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (z <= -7.4e-32) {
tmp = t_1;
} else if (z <= -2.9e-279) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (z <= 2.8e-21) {
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 = -4.0 * (t / (c / a)) tmp = 0 if z <= -1.35e+155: tmp = t_1 elif z <= -1.06e+46: tmp = 9.0 * ((y / z) * (x / c)) elif z <= -7.4e-32: tmp = t_1 elif z <= -2.9e-279: tmp = 9.0 * (x * (y / (z * c))) elif z <= 2.8e-21: 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(-4.0 * Float64(t / Float64(c / a))) tmp = 0.0 if (z <= -1.35e+155) tmp = t_1; elseif (z <= -1.06e+46) tmp = Float64(9.0 * Float64(Float64(y / z) * Float64(x / c))); elseif (z <= -7.4e-32) tmp = t_1; elseif (z <= -2.9e-279) tmp = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))); elseif (z <= 2.8e-21) 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 = -4.0 * (t / (c / a));
tmp = 0.0;
if (z <= -1.35e+155)
tmp = t_1;
elseif (z <= -1.06e+46)
tmp = 9.0 * ((y / z) * (x / c));
elseif (z <= -7.4e-32)
tmp = t_1;
elseif (z <= -2.9e-279)
tmp = 9.0 * (x * (y / (z * c)));
elseif (z <= 2.8e-21)
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[(-4.0 * N[(t / N[(c / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.35e+155], t$95$1, If[LessEqual[z, -1.06e+46], N[(9.0 * N[(N[(y / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.4e-32], t$95$1, If[LessEqual[z, -2.9e-279], N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e-21], 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 := -4 \cdot \frac{t}{\frac{c}{a}}\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{+155}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.06 \cdot 10^{+46}:\\
\;\;\;\;9 \cdot \left(\frac{y}{z} \cdot \frac{x}{c}\right)\\
\mathbf{elif}\;z \leq -7.4 \cdot 10^{-32}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-279}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-21}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.34999999999999997e155 or -1.05999999999999998e46 < z < -7.4e-32 or 2.80000000000000004e-21 < z Initial program 62.5%
associate-+l-62.5%
*-commutative62.5%
associate-*r*63.2%
*-commutative63.2%
associate-+l-63.2%
*-commutative63.2%
associate-*r*62.5%
*-commutative62.5%
associate-*l*62.5%
associate-*l*68.5%
Simplified68.5%
Applied egg-rr73.5%
Taylor expanded in x around 0 88.4%
clear-num88.3%
inv-pow88.3%
Applied egg-rr88.3%
unpow-188.3%
*-commutative88.3%
associate-/r*91.7%
Simplified91.7%
Taylor expanded in a around inf 55.9%
*-commutative55.9%
associate-/l*61.3%
Simplified61.3%
if -1.34999999999999997e155 < z < -1.05999999999999998e46Initial program 69.4%
associate-+l-69.4%
*-commutative69.4%
associate-*r*66.5%
*-commutative66.5%
associate-+l-66.5%
*-commutative66.5%
associate-*r*69.4%
*-commutative69.4%
associate-*l*69.3%
associate-*l*72.3%
Simplified72.3%
Taylor expanded in x around inf 36.0%
*-commutative36.0%
*-commutative36.0%
times-frac49.2%
Applied egg-rr49.2%
if -7.4e-32 < z < -2.9e-279Initial program 97.2%
associate-+l-97.2%
*-commutative97.2%
associate-*r*97.2%
*-commutative97.2%
associate-+l-97.2%
*-commutative97.2%
associate-*r*97.2%
*-commutative97.2%
associate-*l*97.3%
associate-*l*94.7%
Simplified94.7%
Taylor expanded in x around inf 69.1%
expm1-log1p-u34.0%
expm1-udef32.6%
times-frac23.8%
Applied egg-rr23.8%
expm1-def23.8%
expm1-log1p55.5%
times-frac69.1%
*-commutative69.1%
associate-*r/59.5%
*-commutative59.5%
Simplified59.5%
if -2.9e-279 < z < 2.80000000000000004e-21Initial program 96.9%
associate-+l-96.9%
*-commutative96.9%
associate-*r*96.9%
*-commutative96.9%
associate-+l-96.9%
*-commutative96.9%
associate-*r*96.9%
*-commutative96.9%
associate-*l*96.9%
associate-*l*91.1%
Simplified91.1%
Taylor expanded in b around inf 61.8%
*-commutative61.8%
Simplified61.8%
Final simplification59.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 (* -4.0 (/ t (/ c a)))))
(if (<= z -1.35e+155)
t_1
(if (<= z -2.5e+44)
(* 9.0 (* (/ y z) (/ x c)))
(if (<= z -1.55e-41)
t_1
(if (<= z -1.5e-279)
(* 9.0 (/ (* y x) (* z c)))
(if (<= z 1.7e-18) (/ 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 = -4.0 * (t / (c / a));
double tmp;
if (z <= -1.35e+155) {
tmp = t_1;
} else if (z <= -2.5e+44) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (z <= -1.55e-41) {
tmp = t_1;
} else if (z <= -1.5e-279) {
tmp = 9.0 * ((y * x) / (z * c));
} else if (z <= 1.7e-18) {
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 = (-4.0d0) * (t / (c / a))
if (z <= (-1.35d+155)) then
tmp = t_1
else if (z <= (-2.5d+44)) then
tmp = 9.0d0 * ((y / z) * (x / c))
else if (z <= (-1.55d-41)) then
tmp = t_1
else if (z <= (-1.5d-279)) then
tmp = 9.0d0 * ((y * x) / (z * c))
else if (z <= 1.7d-18) 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 = -4.0 * (t / (c / a));
double tmp;
if (z <= -1.35e+155) {
tmp = t_1;
} else if (z <= -2.5e+44) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (z <= -1.55e-41) {
tmp = t_1;
} else if (z <= -1.5e-279) {
tmp = 9.0 * ((y * x) / (z * c));
} else if (z <= 1.7e-18) {
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 = -4.0 * (t / (c / a)) tmp = 0 if z <= -1.35e+155: tmp = t_1 elif z <= -2.5e+44: tmp = 9.0 * ((y / z) * (x / c)) elif z <= -1.55e-41: tmp = t_1 elif z <= -1.5e-279: tmp = 9.0 * ((y * x) / (z * c)) elif z <= 1.7e-18: 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(-4.0 * Float64(t / Float64(c / a))) tmp = 0.0 if (z <= -1.35e+155) tmp = t_1; elseif (z <= -2.5e+44) tmp = Float64(9.0 * Float64(Float64(y / z) * Float64(x / c))); elseif (z <= -1.55e-41) tmp = t_1; elseif (z <= -1.5e-279) tmp = Float64(9.0 * Float64(Float64(y * x) / Float64(z * c))); elseif (z <= 1.7e-18) 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 = -4.0 * (t / (c / a));
tmp = 0.0;
if (z <= -1.35e+155)
tmp = t_1;
elseif (z <= -2.5e+44)
tmp = 9.0 * ((y / z) * (x / c));
elseif (z <= -1.55e-41)
tmp = t_1;
elseif (z <= -1.5e-279)
tmp = 9.0 * ((y * x) / (z * c));
elseif (z <= 1.7e-18)
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[(-4.0 * N[(t / N[(c / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.35e+155], t$95$1, If[LessEqual[z, -2.5e+44], N[(9.0 * N[(N[(y / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.55e-41], t$95$1, If[LessEqual[z, -1.5e-279], N[(9.0 * N[(N[(y * x), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e-18], 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 := -4 \cdot \frac{t}{\frac{c}{a}}\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{+155}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{+44}:\\
\;\;\;\;9 \cdot \left(\frac{y}{z} \cdot \frac{x}{c}\right)\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-41}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{-279}:\\
\;\;\;\;9 \cdot \frac{y \cdot x}{z \cdot c}\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-18}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.34999999999999997e155 or -2.4999999999999998e44 < z < -1.55e-41 or 1.70000000000000001e-18 < z Initial program 62.5%
associate-+l-62.5%
*-commutative62.5%
associate-*r*63.2%
*-commutative63.2%
associate-+l-63.2%
*-commutative63.2%
associate-*r*62.5%
*-commutative62.5%
associate-*l*62.5%
associate-*l*68.5%
Simplified68.5%
Applied egg-rr73.5%
Taylor expanded in x around 0 88.4%
clear-num88.3%
inv-pow88.3%
Applied egg-rr88.3%
unpow-188.3%
*-commutative88.3%
associate-/r*91.7%
Simplified91.7%
Taylor expanded in a around inf 55.9%
*-commutative55.9%
associate-/l*61.3%
Simplified61.3%
if -1.34999999999999997e155 < z < -2.4999999999999998e44Initial program 69.4%
associate-+l-69.4%
*-commutative69.4%
associate-*r*66.5%
*-commutative66.5%
associate-+l-66.5%
*-commutative66.5%
associate-*r*69.4%
*-commutative69.4%
associate-*l*69.3%
associate-*l*72.3%
Simplified72.3%
Taylor expanded in x around inf 36.0%
*-commutative36.0%
*-commutative36.0%
times-frac49.2%
Applied egg-rr49.2%
if -1.55e-41 < z < -1.5e-279Initial program 97.2%
associate-+l-97.2%
*-commutative97.2%
associate-*r*97.2%
*-commutative97.2%
associate-+l-97.2%
*-commutative97.2%
associate-*r*97.2%
*-commutative97.2%
associate-*l*97.3%
associate-*l*94.7%
Simplified94.7%
Taylor expanded in x around inf 69.1%
if -1.5e-279 < z < 1.70000000000000001e-18Initial program 96.9%
associate-+l-96.9%
*-commutative96.9%
associate-*r*96.9%
*-commutative96.9%
associate-+l-96.9%
*-commutative96.9%
associate-*r*96.9%
*-commutative96.9%
associate-*l*96.9%
associate-*l*91.1%
Simplified91.1%
Taylor expanded in b around inf 61.8%
*-commutative61.8%
Simplified61.8%
Final simplification60.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
(if (or (<= b -1.86e+53)
(not (or (<= b 0.000232) (and (not (<= b 4e+22)) (<= b 6.7e+140)))))
(/ (/ b c) z)
(* -4.0 (/ t (/ c a)))))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 <= -1.86e+53) || !((b <= 0.000232) || (!(b <= 4e+22) && (b <= 6.7e+140)))) {
tmp = (b / c) / z;
} else {
tmp = -4.0 * (t / (c / a));
}
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 <= (-1.86d+53)) .or. (.not. (b <= 0.000232d0) .or. (.not. (b <= 4d+22)) .and. (b <= 6.7d+140))) then
tmp = (b / c) / z
else
tmp = (-4.0d0) * (t / (c / a))
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 <= -1.86e+53) || !((b <= 0.000232) || (!(b <= 4e+22) && (b <= 6.7e+140)))) {
tmp = (b / c) / z;
} else {
tmp = -4.0 * (t / (c / a));
}
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 <= -1.86e+53) or not ((b <= 0.000232) or (not (b <= 4e+22) and (b <= 6.7e+140))): tmp = (b / c) / z else: tmp = -4.0 * (t / (c / a)) 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 <= -1.86e+53) || !((b <= 0.000232) || (!(b <= 4e+22) && (b <= 6.7e+140)))) tmp = Float64(Float64(b / c) / z); else tmp = Float64(-4.0 * Float64(t / Float64(c / a))); 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 <= -1.86e+53) || ~(((b <= 0.000232) || (~((b <= 4e+22)) && (b <= 6.7e+140)))))
tmp = (b / c) / z;
else
tmp = -4.0 * (t / (c / a));
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, -1.86e+53], N[Not[Or[LessEqual[b, 0.000232], And[N[Not[LessEqual[b, 4e+22]], $MachinePrecision], LessEqual[b, 6.7e+140]]]], $MachinePrecision]], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], N[(-4.0 * N[(t / N[(c / a), $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 -1.86 \cdot 10^{+53} \lor \neg \left(b \leq 0.000232 \lor \neg \left(b \leq 4 \cdot 10^{+22}\right) \land b \leq 6.7 \cdot 10^{+140}\right):\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\
\end{array}
\end{array}
if b < -1.85999999999999999e53 or 2.32e-4 < b < 4e22 or 6.7e140 < b Initial program 78.3%
associate-+l-78.3%
*-commutative78.3%
associate-*r*76.5%
*-commutative76.5%
associate-+l-76.5%
*-commutative76.5%
associate-*r*78.3%
*-commutative78.3%
associate-*l*78.3%
associate-*l*77.6%
Simplified77.6%
Applied egg-rr78.6%
Taylor expanded in b around inf 58.4%
div-inv58.4%
associate-/l/58.5%
associate-/r*63.5%
Applied egg-rr63.5%
if -1.85999999999999999e53 < b < 2.32e-4 or 4e22 < b < 6.7e140Initial program 76.9%
associate-+l-76.9%
*-commutative76.9%
associate-*r*78.0%
*-commutative78.0%
associate-+l-78.0%
*-commutative78.0%
associate-*r*76.9%
*-commutative76.9%
associate-*l*76.9%
associate-*l*79.5%
Simplified79.5%
Applied egg-rr79.5%
Taylor expanded in x around 0 88.7%
clear-num88.7%
inv-pow88.7%
Applied egg-rr88.7%
unpow-188.7%
*-commutative88.7%
associate-/r*86.3%
Simplified86.3%
Taylor expanded in a around inf 48.2%
*-commutative48.2%
associate-/l*52.9%
Simplified52.9%
Final simplification57.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
(let* ((t_1 (* -4.0 (/ t (/ c a)))) (t_2 (/ (/ b c) z)))
(if (<= b -1.05e+52)
t_2
(if (<= b 0.00029)
t_1
(if (<= b 5e+22) t_2 (if (<= b 3.3e+140) t_1 (/ (* b (/ 1.0 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 = -4.0 * (t / (c / a));
double t_2 = (b / c) / z;
double tmp;
if (b <= -1.05e+52) {
tmp = t_2;
} else if (b <= 0.00029) {
tmp = t_1;
} else if (b <= 5e+22) {
tmp = t_2;
} else if (b <= 3.3e+140) {
tmp = t_1;
} else {
tmp = (b * (1.0 / 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) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * (t / (c / a))
t_2 = (b / c) / z
if (b <= (-1.05d+52)) then
tmp = t_2
else if (b <= 0.00029d0) then
tmp = t_1
else if (b <= 5d+22) then
tmp = t_2
else if (b <= 3.3d+140) then
tmp = t_1
else
tmp = (b * (1.0d0 / 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 = -4.0 * (t / (c / a));
double t_2 = (b / c) / z;
double tmp;
if (b <= -1.05e+52) {
tmp = t_2;
} else if (b <= 0.00029) {
tmp = t_1;
} else if (b <= 5e+22) {
tmp = t_2;
} else if (b <= 3.3e+140) {
tmp = t_1;
} else {
tmp = (b * (1.0 / 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 = -4.0 * (t / (c / a)) t_2 = (b / c) / z tmp = 0 if b <= -1.05e+52: tmp = t_2 elif b <= 0.00029: tmp = t_1 elif b <= 5e+22: tmp = t_2 elif b <= 3.3e+140: tmp = t_1 else: tmp = (b * (1.0 / 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(-4.0 * Float64(t / Float64(c / a))) t_2 = Float64(Float64(b / c) / z) tmp = 0.0 if (b <= -1.05e+52) tmp = t_2; elseif (b <= 0.00029) tmp = t_1; elseif (b <= 5e+22) tmp = t_2; elseif (b <= 3.3e+140) tmp = t_1; else tmp = Float64(Float64(b * Float64(1.0 / 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 = -4.0 * (t / (c / a));
t_2 = (b / c) / z;
tmp = 0.0;
if (b <= -1.05e+52)
tmp = t_2;
elseif (b <= 0.00029)
tmp = t_1;
elseif (b <= 5e+22)
tmp = t_2;
elseif (b <= 3.3e+140)
tmp = t_1;
else
tmp = (b * (1.0 / 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[(-4.0 * N[(t / N[(c / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[b, -1.05e+52], t$95$2, If[LessEqual[b, 0.00029], t$95$1, If[LessEqual[b, 5e+22], t$95$2, If[LessEqual[b, 3.3e+140], t$95$1, N[(N[(b * N[(1.0 / c), $MachinePrecision]), $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])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \frac{t}{\frac{c}{a}}\\
t_2 := \frac{\frac{b}{c}}{z}\\
\mathbf{if}\;b \leq -1.05 \cdot 10^{+52}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 0.00029:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 5 \cdot 10^{+22}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 3.3 \cdot 10^{+140}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{b \cdot \frac{1}{c}}{z}\\
\end{array}
\end{array}
if b < -1.05e52 or 2.9e-4 < b < 4.9999999999999996e22Initial program 76.9%
associate-+l-76.9%
*-commutative76.9%
associate-*r*75.3%
*-commutative75.3%
associate-+l-75.3%
*-commutative75.3%
associate-*r*76.9%
*-commutative76.9%
associate-*l*76.9%
associate-*l*77.2%
Simplified77.2%
Applied egg-rr75.7%
Taylor expanded in b around inf 53.3%
div-inv53.3%
associate-/l/51.9%
associate-/r*56.8%
Applied egg-rr56.8%
if -1.05e52 < b < 2.9e-4 or 4.9999999999999996e22 < b < 3.3000000000000002e140Initial program 76.9%
associate-+l-76.9%
*-commutative76.9%
associate-*r*78.0%
*-commutative78.0%
associate-+l-78.0%
*-commutative78.0%
associate-*r*76.9%
*-commutative76.9%
associate-*l*76.9%
associate-*l*79.5%
Simplified79.5%
Applied egg-rr79.5%
Taylor expanded in x around 0 88.7%
clear-num88.7%
inv-pow88.7%
Applied egg-rr88.7%
unpow-188.7%
*-commutative88.7%
associate-/r*86.3%
Simplified86.3%
Taylor expanded in a around inf 48.2%
*-commutative48.2%
associate-/l*52.9%
Simplified52.9%
if 3.3000000000000002e140 < b Initial program 80.5%
associate-+l-80.5%
*-commutative80.5%
associate-*r*78.2%
*-commutative78.2%
associate-+l-78.2%
*-commutative78.2%
associate-*r*80.5%
*-commutative80.5%
associate-*l*80.5%
associate-*l*78.2%
Simplified78.2%
Applied egg-rr82.9%
Taylor expanded in b around inf 66.2%
associate-*l/73.6%
Applied egg-rr73.6%
Final simplification57.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 (<= z -7.8e-53) (not (<= z 3e-19))) (/ (+ (* -4.0 (* a t)) (/ b z)) c) (/ (+ b (* y (* 9.0 x))) (* 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 tmp;
if ((z <= -7.8e-53) || !(z <= 3e-19)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = (b + (y * (9.0 * x))) / (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) :: tmp
if ((z <= (-7.8d-53)) .or. (.not. (z <= 3d-19))) then
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
else
tmp = (b + (y * (9.0d0 * x))) / (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 tmp;
if ((z <= -7.8e-53) || !(z <= 3e-19)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = (b + (y * (9.0 * x))) / (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): tmp = 0 if (z <= -7.8e-53) or not (z <= 3e-19): tmp = ((-4.0 * (a * t)) + (b / z)) / c else: tmp = (b + (y * (9.0 * x))) / (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) tmp = 0.0 if ((z <= -7.8e-53) || !(z <= 3e-19)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); else tmp = Float64(Float64(b + Float64(y * Float64(9.0 * x))) / 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)
tmp = 0.0;
if ((z <= -7.8e-53) || ~((z <= 3e-19)))
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
else
tmp = (b + (y * (9.0 * x))) / (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_] := If[Or[LessEqual[z, -7.8e-53], N[Not[LessEqual[z, 3e-19]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $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}
\mathbf{if}\;z \leq -7.8 \cdot 10^{-53} \lor \neg \left(z \leq 3 \cdot 10^{-19}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + y \cdot \left(9 \cdot x\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -7.8000000000000004e-53 or 2.99999999999999993e-19 < z Initial program 64.5%
associate-+l-64.5%
*-commutative64.5%
associate-*r*64.5%
*-commutative64.5%
associate-+l-64.5%
*-commutative64.5%
associate-*r*64.5%
*-commutative64.5%
associate-*l*64.5%
associate-*l*69.7%
Simplified69.7%
Applied egg-rr76.0%
Taylor expanded in x around 0 89.2%
Taylor expanded in x around 0 72.0%
if -7.8000000000000004e-53 < z < 2.99999999999999993e-19Initial program 96.9%
associate-+l-96.9%
*-commutative96.9%
associate-*r*96.9%
*-commutative96.9%
associate-+l-96.9%
*-commutative96.9%
associate-*r*96.9%
*-commutative96.9%
associate-*l*97.0%
associate-*l*92.3%
Simplified92.3%
Taylor expanded in x around inf 84.5%
associate-*r*84.4%
Simplified84.4%
Final simplification76.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 (if (<= c 6.2e-89) (/ b (* z c)) (/ (/ 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) {
double tmp;
if (c <= 6.2e-89) {
tmp = b / (z * c);
} else {
tmp = (b / 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) :: tmp
if (c <= 6.2d-89) then
tmp = b / (z * c)
else
tmp = (b / 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 tmp;
if (c <= 6.2e-89) {
tmp = b / (z * c);
} else {
tmp = (b / 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): tmp = 0 if c <= 6.2e-89: tmp = b / (z * c) else: tmp = (b / 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) tmp = 0.0 if (c <= 6.2e-89) tmp = Float64(b / Float64(z * c)); else tmp = Float64(Float64(b / 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)
tmp = 0.0;
if (c <= 6.2e-89)
tmp = b / (z * c);
else
tmp = (b / 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_] := If[LessEqual[c, 6.2e-89], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], 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])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq 6.2 \cdot 10^{-89}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\end{array}
\end{array}
if c < 6.19999999999999993e-89Initial program 81.0%
associate-+l-81.0%
*-commutative81.0%
associate-*r*81.6%
*-commutative81.6%
associate-+l-81.6%
*-commutative81.6%
associate-*r*81.0%
*-commutative81.0%
associate-*l*81.0%
associate-*l*82.8%
Simplified82.8%
Taylor expanded in b around inf 34.9%
*-commutative34.9%
Simplified34.9%
if 6.19999999999999993e-89 < c Initial program 69.7%
associate-+l-69.7%
*-commutative69.7%
associate-*r*68.2%
*-commutative68.2%
associate-+l-68.2%
*-commutative68.2%
associate-*r*69.7%
*-commutative69.7%
associate-*l*69.8%
associate-*l*69.9%
Simplified69.9%
Applied egg-rr75.9%
Taylor expanded in b around inf 34.9%
div-inv34.9%
associate-/l/31.4%
associate-/r*36.3%
Applied egg-rr36.3%
Final simplification35.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 (/ 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 77.5%
associate-+l-77.5%
*-commutative77.5%
associate-*r*77.4%
*-commutative77.4%
associate-+l-77.4%
*-commutative77.4%
associate-*r*77.5%
*-commutative77.5%
associate-*l*77.5%
associate-*l*78.7%
Simplified78.7%
Taylor expanded in b around inf 33.8%
*-commutative33.8%
Simplified33.8%
Final simplification33.8%
(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 2023322
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:herbie-target
(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)))