
(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 19 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 (<= a -0.96) (not (<= a 1.06e-46))) (* (fma -4.0 t (fma 9.0 (* x (/ y (* a z))) (/ b (* a z)))) (/ a c)) (/ (+ (/ (* -4.0 (* z (* a t))) c) (+ (* 9.0 (/ (* x y) 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 ((a <= -0.96) || !(a <= 1.06e-46)) {
tmp = fma(-4.0, t, fma(9.0, (x * (y / (a * z))), (b / (a * z)))) * (a / c);
} else {
tmp = (((-4.0 * (z * (a * t))) / c) + ((9.0 * ((x * y) / c)) + (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 ((a <= -0.96) || !(a <= 1.06e-46)) tmp = Float64(fma(-4.0, t, fma(9.0, Float64(x * Float64(y / Float64(a * z))), Float64(b / Float64(a * z)))) * Float64(a / c)); else tmp = Float64(Float64(Float64(Float64(-4.0 * Float64(z * Float64(a * t))) / c) + Float64(Float64(9.0 * Float64(Float64(x * y) / c)) + Float64(b / 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[a, -0.96], N[Not[LessEqual[a, 1.06e-46]], $MachinePrecision]], N[(N[(-4.0 * t + N[(9.0 * N[(x * N[(y / N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b / N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(a / c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(-4.0 * N[(z * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(b / c), $MachinePrecision]), $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}
\mathbf{if}\;a \leq -0.96 \lor \neg \left(a \leq 1.06 \cdot 10^{-46}\right):\\
\;\;\;\;\mathsf{fma}\left(-4, t, \mathsf{fma}\left(9, x \cdot \frac{y}{a \cdot z}, \frac{b}{a \cdot z}\right)\right) \cdot \frac{a}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-4 \cdot \left(z \cdot \left(a \cdot t\right)\right)}{c} + \left(9 \cdot \frac{x \cdot y}{c} + \frac{b}{c}\right)}{z}\\
\end{array}
\end{array}
if a < -0.95999999999999996 or 1.06e-46 < a Initial program 73.9%
Simplified73.7%
Taylor expanded in a around inf 81.1%
Taylor expanded in c around 0 77.3%
*-commutative77.3%
associate-/l*86.9%
fma-define86.9%
fma-define86.9%
associate-/l*90.7%
*-commutative90.7%
*-commutative90.7%
Simplified90.7%
if -0.95999999999999996 < a < 1.06e-46Initial program 72.4%
Simplified80.8%
Taylor expanded in z around 0 77.5%
associate-*r/77.5%
associate-*r*88.8%
Applied egg-rr88.8%
Final simplification89.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))))
(if (<= t_1 -4e-158)
(/ (+ b (fma x (* 9.0 y) (* t (* a (* -4.0 z))))) (* z c))
(if (<= t_1 1e-209)
(/ (+ (+ (* 9.0 (/ (* x y) c)) (/ b c)) (* -4.0 (/ (* a (* t z)) c))) z)
(if (<= t_1 1e+285)
t_1
(*
y
(-
(/ (fma -4.0 (* a (/ t c)) (/ b (* z c))) y)
(/ (/ (* x -9.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 t_1 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
double tmp;
if (t_1 <= -4e-158) {
tmp = (b + fma(x, (9.0 * y), (t * (a * (-4.0 * z))))) / (z * c);
} else if (t_1 <= 1e-209) {
tmp = (((9.0 * ((x * y) / c)) + (b / c)) + (-4.0 * ((a * (t * z)) / c))) / z;
} else if (t_1 <= 1e+285) {
tmp = t_1;
} else {
tmp = y * ((fma(-4.0, (a * (t / c)), (b / (z * c))) / y) - (((x * -9.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) t_1 = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)) tmp = 0.0 if (t_1 <= -4e-158) tmp = Float64(Float64(b + fma(x, Float64(9.0 * y), Float64(t * Float64(a * Float64(-4.0 * z))))) / Float64(z * c)); elseif (t_1 <= 1e-209) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / c)) + Float64(b / c)) + Float64(-4.0 * Float64(Float64(a * Float64(t * z)) / c))) / z); elseif (t_1 <= 1e+285) tmp = t_1; else tmp = Float64(y * Float64(Float64(fma(-4.0, Float64(a * Float64(t / c)), Float64(b / Float64(z * c))) / y) - Float64(Float64(Float64(x * -9.0) / z) / c))); 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_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, -4e-158], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision] + N[(t * N[(a * N[(-4.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-209], N[(N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(b / c), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(N[(a * N[(t * z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 1e+285], t$95$1, N[(y * N[(N[(N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] - N[(N[(N[(x * -9.0), $MachinePrecision] / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \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}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{-158}:\\
\;\;\;\;\frac{b + \mathsf{fma}\left(x, 9 \cdot y, t \cdot \left(a \cdot \left(-4 \cdot z\right)\right)\right)}{z \cdot c}\\
\mathbf{elif}\;t\_1 \leq 10^{-209}:\\
\;\;\;\;\frac{\left(9 \cdot \frac{x \cdot y}{c} + \frac{b}{c}\right) + -4 \cdot \frac{a \cdot \left(t \cdot z\right)}{c}}{z}\\
\mathbf{elif}\;t\_1 \leq 10^{+285}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\frac{\mathsf{fma}\left(-4, a \cdot \frac{t}{c}, \frac{b}{z \cdot c}\right)}{y} - \frac{\frac{x \cdot -9}{z}}{c}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -4.00000000000000026e-158Initial program 87.0%
Simplified89.9%
if -4.00000000000000026e-158 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 1e-209Initial program 47.7%
Simplified47.1%
Taylor expanded in z around 0 99.8%
if 1e-209 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 9.9999999999999998e284Initial program 99.5%
if 9.9999999999999998e284 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 51.1%
Simplified62.5%
Taylor expanded in y around -inf 72.2%
Simplified74.5%
Final simplification87.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 (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))))
(if (<= t_1 -2e+299)
(/ (+ b (* t (- (* 9.0 (/ (* x y) t)) (* 4.0 (* a z))))) (* z c))
(if (<= t_1 2e+77)
(/ (+ (+ (* 9.0 (/ (* x y) c)) (/ b c)) (* -4.0 (/ (* a (* t z)) c))) z)
(if (<= t_1 INFINITY)
(/ (- b (- (* (* a t) (* z 4.0)) (* x (* 9.0 y)))) (* z c))
(* a (* -4.0 (/ t 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 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
double tmp;
if (t_1 <= -2e+299) {
tmp = (b + (t * ((9.0 * ((x * y) / t)) - (4.0 * (a * z))))) / (z * c);
} else if (t_1 <= 2e+77) {
tmp = (((9.0 * ((x * y) / c)) + (b / c)) + (-4.0 * ((a * (t * z)) / c))) / z;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (z * c);
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
double tmp;
if (t_1 <= -2e+299) {
tmp = (b + (t * ((9.0 * ((x * y) / t)) - (4.0 * (a * z))))) / (z * c);
} else if (t_1 <= 2e+77) {
tmp = (((9.0 * ((x * y) / c)) + (b / c)) + (-4.0 * ((a * (t * z)) / c))) / z;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (z * c);
} else {
tmp = a * (-4.0 * (t / 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 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c) tmp = 0 if t_1 <= -2e+299: tmp = (b + (t * ((9.0 * ((x * y) / t)) - (4.0 * (a * z))))) / (z * c) elif t_1 <= 2e+77: tmp = (((9.0 * ((x * y) / c)) + (b / c)) + (-4.0 * ((a * (t * z)) / c))) / z elif t_1 <= math.inf: tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (z * c) else: tmp = a * (-4.0 * (t / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)) tmp = 0.0 if (t_1 <= -2e+299) tmp = Float64(Float64(b + Float64(t * Float64(Float64(9.0 * Float64(Float64(x * y) / t)) - Float64(4.0 * Float64(a * z))))) / Float64(z * c)); elseif (t_1 <= 2e+77) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / c)) + Float64(b / c)) + Float64(-4.0 * Float64(Float64(a * Float64(t * z)) / c))) / z); elseif (t_1 <= Inf) tmp = Float64(Float64(b - Float64(Float64(Float64(a * t) * Float64(z * 4.0)) - Float64(x * Float64(9.0 * y)))) / Float64(z * c)); else tmp = Float64(a * Float64(-4.0 * Float64(t / 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 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
tmp = 0.0;
if (t_1 <= -2e+299)
tmp = (b + (t * ((9.0 * ((x * y) / t)) - (4.0 * (a * z))))) / (z * c);
elseif (t_1 <= 2e+77)
tmp = (((9.0 * ((x * y) / c)) + (b / c)) + (-4.0 * ((a * (t * z)) / c))) / z;
elseif (t_1 <= Inf)
tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (z * c);
else
tmp = a * (-4.0 * (t / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(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]}, If[LessEqual[t$95$1, -2e+299], N[(N[(b + N[(t * N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+77], N[(N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(b / c), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(N[(a * N[(t * z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(b - N[(N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision] - N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \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}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+299}:\\
\;\;\;\;\frac{b + t \cdot \left(9 \cdot \frac{x \cdot y}{t} - 4 \cdot \left(a \cdot z\right)\right)}{z \cdot c}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+77}:\\
\;\;\;\;\frac{\left(9 \cdot \frac{x \cdot y}{c} + \frac{b}{c}\right) + -4 \cdot \frac{a \cdot \left(t \cdot z\right)}{c}}{z}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{b - \left(\left(a \cdot t\right) \cdot \left(z \cdot 4\right) - x \cdot \left(9 \cdot y\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -2.0000000000000001e299Initial program 78.4%
associate-+l-78.4%
*-commutative78.4%
associate-*r*85.6%
*-commutative85.6%
associate-+l-85.6%
associate-*l*85.6%
associate-*l*83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in t around inf 83.7%
if -2.0000000000000001e299 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 1.99999999999999997e77Initial program 84.5%
Simplified83.3%
Taylor expanded in z around 0 94.7%
if 1.99999999999999997e77 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 78.9%
associate-+l-78.9%
*-commutative78.9%
associate-*r*85.5%
*-commutative85.5%
associate-+l-85.5%
associate-*l*85.5%
associate-*l*85.6%
*-commutative85.6%
Simplified85.6%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
Simplified9.4%
Taylor expanded in x around 0 4.1%
metadata-eval4.1%
cancel-sign-sub-inv4.1%
associate-*r*4.1%
*-commutative4.1%
Simplified4.1%
Taylor expanded in a around inf 80.0%
Taylor expanded in t around inf 80.0%
Final simplification88.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 (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))))
(if (<= t_1 -4e-158)
t_1
(if (<= t_1 0.0)
(/ (+ (/ b c) (* -4.0 (/ (* a (* t z)) c))) z)
(if (<= t_1 INFINITY)
(/ (- b (- (* (* a t) (* z 4.0)) (* x (* 9.0 y)))) (* z c))
(* a (* -4.0 (/ t 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 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
double tmp;
if (t_1 <= -4e-158) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((b / c) + (-4.0 * ((a * (t * z)) / c))) / z;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (z * c);
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
double tmp;
if (t_1 <= -4e-158) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((b / c) + (-4.0 * ((a * (t * z)) / c))) / z;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (z * c);
} else {
tmp = a * (-4.0 * (t / 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 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c) tmp = 0 if t_1 <= -4e-158: tmp = t_1 elif t_1 <= 0.0: tmp = ((b / c) + (-4.0 * ((a * (t * z)) / c))) / z elif t_1 <= math.inf: tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (z * c) else: tmp = a * (-4.0 * (t / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)) tmp = 0.0 if (t_1 <= -4e-158) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(b / c) + Float64(-4.0 * Float64(Float64(a * Float64(t * z)) / c))) / z); elseif (t_1 <= Inf) tmp = Float64(Float64(b - Float64(Float64(Float64(a * t) * Float64(z * 4.0)) - Float64(x * Float64(9.0 * y)))) / Float64(z * c)); else tmp = Float64(a * Float64(-4.0 * Float64(t / 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 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
tmp = 0.0;
if (t_1 <= -4e-158)
tmp = t_1;
elseif (t_1 <= 0.0)
tmp = ((b / c) + (-4.0 * ((a * (t * z)) / c))) / z;
elseif (t_1 <= Inf)
tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (z * c);
else
tmp = a * (-4.0 * (t / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(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]}, If[LessEqual[t$95$1, -4e-158], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(b / c), $MachinePrecision] + N[(-4.0 * N[(N[(a * N[(t * z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(b - N[(N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision] - N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \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}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{-158}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{\frac{b}{c} + -4 \cdot \frac{a \cdot \left(t \cdot z\right)}{c}}{z}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{b - \left(\left(a \cdot t\right) \cdot \left(z \cdot 4\right) - x \cdot \left(9 \cdot y\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -4.00000000000000026e-158Initial program 87.0%
if -4.00000000000000026e-158 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -0.0Initial program 40.7%
Simplified40.0%
Taylor expanded in x around 0 36.5%
metadata-eval36.5%
cancel-sign-sub-inv36.5%
associate-*r*36.5%
*-commutative36.5%
Simplified36.5%
Taylor expanded in z around 0 88.2%
if -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 83.8%
associate-+l-83.8%
*-commutative83.8%
associate-*r*88.9%
*-commutative88.9%
associate-+l-88.9%
associate-*l*88.8%
associate-*l*88.1%
*-commutative88.1%
Simplified88.1%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
Simplified9.4%
Taylor expanded in x around 0 4.1%
metadata-eval4.1%
cancel-sign-sub-inv4.1%
associate-*r*4.1%
*-commutative4.1%
Simplified4.1%
Taylor expanded in a around inf 80.0%
Taylor expanded in t around inf 80.0%
Final simplification86.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* a (* z c))))
(if (<= z -6.8e+16)
(* a (+ (* -4.0 (/ t c)) (+ (* 9.0 (/ (* x y) t_1)) (/ b t_1))))
(if (<= z 1.55e+87)
(/ (+ (+ (* 9.0 (/ (* x y) c)) (/ b c)) (* -4.0 (/ (* a (* t z)) c))) z)
(/ (+ (* -4.0 (* a t)) (/ 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 = a * (z * c);
double tmp;
if (z <= -6.8e+16) {
tmp = a * ((-4.0 * (t / c)) + ((9.0 * ((x * y) / t_1)) + (b / t_1)));
} else if (z <= 1.55e+87) {
tmp = (((9.0 * ((x * y) / c)) + (b / c)) + (-4.0 * ((a * (t * z)) / c))) / z;
} else {
tmp = ((-4.0 * (a * t)) + (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 = a * (z * c)
if (z <= (-6.8d+16)) then
tmp = a * (((-4.0d0) * (t / c)) + ((9.0d0 * ((x * y) / t_1)) + (b / t_1)))
else if (z <= 1.55d+87) then
tmp = (((9.0d0 * ((x * y) / c)) + (b / c)) + ((-4.0d0) * ((a * (t * z)) / c))) / z
else
tmp = (((-4.0d0) * (a * t)) + (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 = a * (z * c);
double tmp;
if (z <= -6.8e+16) {
tmp = a * ((-4.0 * (t / c)) + ((9.0 * ((x * y) / t_1)) + (b / t_1)));
} else if (z <= 1.55e+87) {
tmp = (((9.0 * ((x * y) / c)) + (b / c)) + (-4.0 * ((a * (t * z)) / c))) / z;
} else {
tmp = ((-4.0 * (a * t)) + (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 = a * (z * c) tmp = 0 if z <= -6.8e+16: tmp = a * ((-4.0 * (t / c)) + ((9.0 * ((x * y) / t_1)) + (b / t_1))) elif z <= 1.55e+87: tmp = (((9.0 * ((x * y) / c)) + (b / c)) + (-4.0 * ((a * (t * z)) / c))) / z else: tmp = ((-4.0 * (a * t)) + (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(a * Float64(z * c)) tmp = 0.0 if (z <= -6.8e+16) tmp = Float64(a * Float64(Float64(-4.0 * Float64(t / c)) + Float64(Float64(9.0 * Float64(Float64(x * y) / t_1)) + Float64(b / t_1)))); elseif (z <= 1.55e+87) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / c)) + Float64(b / c)) + Float64(-4.0 * Float64(Float64(a * Float64(t * z)) / c))) / z); else tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + 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 = a * (z * c);
tmp = 0.0;
if (z <= -6.8e+16)
tmp = a * ((-4.0 * (t / c)) + ((9.0 * ((x * y) / t_1)) + (b / t_1)));
elseif (z <= 1.55e+87)
tmp = (((9.0 * ((x * y) / c)) + (b / c)) + (-4.0 * ((a * (t * z)) / c))) / z;
else
tmp = ((-4.0 * (a * t)) + (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[(a * N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.8e+16], N[(a * N[(N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e+87], N[(N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(b / c), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(N[(a * N[(t * z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + 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 := a \cdot \left(z \cdot c\right)\\
\mathbf{if}\;z \leq -6.8 \cdot 10^{+16}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c} + \left(9 \cdot \frac{x \cdot y}{t\_1} + \frac{b}{t\_1}\right)\right)\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+87}:\\
\;\;\;\;\frac{\left(9 \cdot \frac{x \cdot y}{c} + \frac{b}{c}\right) + -4 \cdot \frac{a \cdot \left(t \cdot z\right)}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\end{array}
\end{array}
if z < -6.8e16Initial program 52.5%
Simplified62.7%
Taylor expanded in a around inf 74.5%
if -6.8e16 < z < 1.55e87Initial program 91.1%
Simplified91.0%
Taylor expanded in z around 0 92.5%
if 1.55e87 < z Initial program 49.0%
Simplified57.4%
Taylor expanded in x around 0 45.1%
metadata-eval45.1%
cancel-sign-sub-inv45.1%
associate-*r*45.1%
*-commutative45.1%
Simplified45.1%
Taylor expanded in a around inf 79.4%
Taylor expanded in c around 0 83.8%
Taylor expanded in a around 0 85.7%
Final simplification86.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -7.5e+22)
(* a (+ (* -4.0 (/ t c)) (/ b (* a (* z c)))))
(if (<= z 6.6e+161)
(/ (- b (- (* (* a t) (* z 4.0)) (* x (* 9.0 y)))) (* z c))
(/ (* a (+ (* -4.0 t) (/ b (* a 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.5e+22) {
tmp = a * ((-4.0 * (t / c)) + (b / (a * (z * c))));
} else if (z <= 6.6e+161) {
tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (z * c);
} else {
tmp = (a * ((-4.0 * t) + (b / (a * 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.5d+22)) then
tmp = a * (((-4.0d0) * (t / c)) + (b / (a * (z * c))))
else if (z <= 6.6d+161) then
tmp = (b - (((a * t) * (z * 4.0d0)) - (x * (9.0d0 * y)))) / (z * c)
else
tmp = (a * (((-4.0d0) * t) + (b / (a * 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.5e+22) {
tmp = a * ((-4.0 * (t / c)) + (b / (a * (z * c))));
} else if (z <= 6.6e+161) {
tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (z * c);
} else {
tmp = (a * ((-4.0 * t) + (b / (a * 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.5e+22: tmp = a * ((-4.0 * (t / c)) + (b / (a * (z * c)))) elif z <= 6.6e+161: tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (z * c) else: tmp = (a * ((-4.0 * t) + (b / (a * 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.5e+22) tmp = Float64(a * Float64(Float64(-4.0 * Float64(t / c)) + Float64(b / Float64(a * Float64(z * c))))); elseif (z <= 6.6e+161) tmp = Float64(Float64(b - Float64(Float64(Float64(a * t) * Float64(z * 4.0)) - Float64(x * Float64(9.0 * y)))) / Float64(z * c)); else tmp = Float64(Float64(a * Float64(Float64(-4.0 * t) + Float64(b / Float64(a * 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.5e+22)
tmp = a * ((-4.0 * (t / c)) + (b / (a * (z * c))));
elseif (z <= 6.6e+161)
tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (z * c);
else
tmp = (a * ((-4.0 * t) + (b / (a * 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[LessEqual[z, -7.5e+22], N[(a * N[(N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(a * N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.6e+161], N[(N[(b - N[(N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision] - N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(N[(-4.0 * t), $MachinePrecision] + N[(b / N[(a * z), $MachinePrecision]), $MachinePrecision]), $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}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+22}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c} + \frac{b}{a \cdot \left(z \cdot c\right)}\right)\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{+161}:\\
\;\;\;\;\frac{b - \left(\left(a \cdot t\right) \cdot \left(z \cdot 4\right) - x \cdot \left(9 \cdot y\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{a \cdot \left(-4 \cdot t + \frac{b}{a \cdot z}\right)}{c}\\
\end{array}
\end{array}
if z < -7.5000000000000002e22Initial program 52.5%
Simplified62.7%
Taylor expanded in x around 0 38.5%
metadata-eval38.5%
cancel-sign-sub-inv38.5%
associate-*r*38.5%
*-commutative38.5%
Simplified38.5%
Taylor expanded in a around inf 63.3%
if -7.5000000000000002e22 < z < 6.59999999999999995e161Initial program 88.4%
associate-+l-88.4%
*-commutative88.4%
associate-*r*90.1%
*-commutative90.1%
associate-+l-90.1%
associate-*l*90.1%
associate-*l*87.7%
*-commutative87.7%
Simplified87.7%
if 6.59999999999999995e161 < z Initial program 39.8%
Simplified43.4%
Taylor expanded in x around 0 36.6%
metadata-eval36.6%
cancel-sign-sub-inv36.6%
associate-*r*36.6%
*-commutative36.6%
Simplified36.6%
Taylor expanded in a around inf 77.9%
Taylor expanded in c around 0 90.2%
Final simplification81.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= a -1e-63)
(* t (- (/ (/ b (* t z)) c) (* a (/ 4.0 c))))
(if (<= a 6.5e-47)
(/ (+ (* 9.0 (/ (* x y) c)) (/ b c)) z)
(* a (+ (* -4.0 (/ t c)) (/ b (* a (* 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 (a <= -1e-63) {
tmp = t * (((b / (t * z)) / c) - (a * (4.0 / c)));
} else if (a <= 6.5e-47) {
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
} else {
tmp = a * ((-4.0 * (t / c)) + (b / (a * (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 (a <= (-1d-63)) then
tmp = t * (((b / (t * z)) / c) - (a * (4.0d0 / c)))
else if (a <= 6.5d-47) then
tmp = ((9.0d0 * ((x * y) / c)) + (b / c)) / z
else
tmp = a * (((-4.0d0) * (t / c)) + (b / (a * (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 (a <= -1e-63) {
tmp = t * (((b / (t * z)) / c) - (a * (4.0 / c)));
} else if (a <= 6.5e-47) {
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
} else {
tmp = a * ((-4.0 * (t / c)) + (b / (a * (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 a <= -1e-63: tmp = t * (((b / (t * z)) / c) - (a * (4.0 / c))) elif a <= 6.5e-47: tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z else: tmp = a * ((-4.0 * (t / c)) + (b / (a * (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 (a <= -1e-63) tmp = Float64(t * Float64(Float64(Float64(b / Float64(t * z)) / c) - Float64(a * Float64(4.0 / c)))); elseif (a <= 6.5e-47) tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / c)) + Float64(b / c)) / z); else tmp = Float64(a * Float64(Float64(-4.0 * Float64(t / c)) + Float64(b / Float64(a * 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 (a <= -1e-63)
tmp = t * (((b / (t * z)) / c) - (a * (4.0 / c)));
elseif (a <= 6.5e-47)
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
else
tmp = a * ((-4.0 * (t / c)) + (b / (a * (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[LessEqual[a, -1e-63], N[(t * N[(N[(N[(b / N[(t * z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] - N[(a * N[(4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e-47], N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(b / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(a * N[(N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(a * N[(z * c), $MachinePrecision]), $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}
\mathbf{if}\;a \leq -1 \cdot 10^{-63}:\\
\;\;\;\;t \cdot \left(\frac{\frac{b}{t \cdot z}}{c} - a \cdot \frac{4}{c}\right)\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-47}:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{c} + \frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c} + \frac{b}{a \cdot \left(z \cdot c\right)}\right)\\
\end{array}
\end{array}
if a < -1.00000000000000007e-63Initial program 72.3%
Simplified73.3%
Taylor expanded in x around 0 53.8%
metadata-eval53.8%
cancel-sign-sub-inv53.8%
associate-*r*53.8%
*-commutative53.8%
Simplified53.8%
Taylor expanded in t around -inf 64.2%
mul-1-neg64.2%
*-commutative64.2%
distribute-rgt-neg-in64.2%
+-commutative64.2%
mul-1-neg64.2%
unsub-neg64.2%
associate-*r/64.2%
*-commutative64.2%
associate-/l*64.1%
*-commutative64.1%
associate-/r*62.8%
*-commutative62.8%
Simplified62.8%
if -1.00000000000000007e-63 < a < 6.5000000000000004e-47Initial program 73.3%
Simplified81.6%
Taylor expanded in z around 0 77.2%
Taylor expanded in a around 0 75.1%
if 6.5000000000000004e-47 < a Initial program 73.9%
Simplified73.9%
Taylor expanded in x around 0 64.7%
metadata-eval64.7%
cancel-sign-sub-inv64.7%
associate-*r*64.7%
*-commutative64.7%
Simplified64.7%
Taylor expanded in a around inf 78.6%
Final simplification72.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= a -3e-72)
(* t (/ (- (/ (/ b z) t) (* a 4.0)) c))
(if (<= a 6e-46)
(/ (+ (* 9.0 (/ (* x y) c)) (/ b c)) z)
(* a (+ (* -4.0 (/ t c)) (/ b (* a (* 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 (a <= -3e-72) {
tmp = t * ((((b / z) / t) - (a * 4.0)) / c);
} else if (a <= 6e-46) {
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
} else {
tmp = a * ((-4.0 * (t / c)) + (b / (a * (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 (a <= (-3d-72)) then
tmp = t * ((((b / z) / t) - (a * 4.0d0)) / c)
else if (a <= 6d-46) then
tmp = ((9.0d0 * ((x * y) / c)) + (b / c)) / z
else
tmp = a * (((-4.0d0) * (t / c)) + (b / (a * (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 (a <= -3e-72) {
tmp = t * ((((b / z) / t) - (a * 4.0)) / c);
} else if (a <= 6e-46) {
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
} else {
tmp = a * ((-4.0 * (t / c)) + (b / (a * (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 a <= -3e-72: tmp = t * ((((b / z) / t) - (a * 4.0)) / c) elif a <= 6e-46: tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z else: tmp = a * ((-4.0 * (t / c)) + (b / (a * (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 (a <= -3e-72) tmp = Float64(t * Float64(Float64(Float64(Float64(b / z) / t) - Float64(a * 4.0)) / c)); elseif (a <= 6e-46) tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / c)) + Float64(b / c)) / z); else tmp = Float64(a * Float64(Float64(-4.0 * Float64(t / c)) + Float64(b / Float64(a * 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 (a <= -3e-72)
tmp = t * ((((b / z) / t) - (a * 4.0)) / c);
elseif (a <= 6e-46)
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
else
tmp = a * ((-4.0 * (t / c)) + (b / (a * (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[LessEqual[a, -3e-72], N[(t * N[(N[(N[(N[(b / z), $MachinePrecision] / t), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6e-46], N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(b / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(a * N[(N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(a * N[(z * c), $MachinePrecision]), $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}
\mathbf{if}\;a \leq -3 \cdot 10^{-72}:\\
\;\;\;\;t \cdot \frac{\frac{\frac{b}{z}}{t} - a \cdot 4}{c}\\
\mathbf{elif}\;a \leq 6 \cdot 10^{-46}:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{c} + \frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c} + \frac{b}{a \cdot \left(z \cdot c\right)}\right)\\
\end{array}
\end{array}
if a < -3e-72Initial program 71.3%
Simplified72.3%
Taylor expanded in x around 0 53.1%
metadata-eval53.1%
cancel-sign-sub-inv53.1%
associate-*r*53.1%
*-commutative53.1%
Simplified53.1%
Taylor expanded in t around -inf 63.4%
mul-1-neg63.4%
*-commutative63.4%
distribute-rgt-neg-in63.4%
+-commutative63.4%
mul-1-neg63.4%
unsub-neg63.4%
associate-*r/63.4%
*-commutative63.4%
associate-/l*63.3%
*-commutative63.3%
associate-/r*62.0%
*-commutative62.0%
Simplified62.0%
associate-*r/62.0%
sub-div64.8%
associate-/r*64.8%
Applied egg-rr64.8%
if -3e-72 < a < 5.99999999999999975e-46Initial program 73.9%
Simplified82.2%
Taylor expanded in z around 0 77.9%
Taylor expanded in a around 0 75.4%
if 5.99999999999999975e-46 < a Initial program 73.9%
Simplified73.9%
Taylor expanded in x around 0 64.7%
metadata-eval64.7%
cancel-sign-sub-inv64.7%
associate-*r*64.7%
*-commutative64.7%
Simplified64.7%
Taylor expanded in a around inf 78.6%
Final simplification73.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 -2.6e-37) (not (<= z 2.1e+45))) (/ (+ (* -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 <= -2.6e-37) || !(z <= 2.1e+45)) {
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 <= (-2.6d-37)) .or. (.not. (z <= 2.1d+45))) 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 <= -2.6e-37) || !(z <= 2.1e+45)) {
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 <= -2.6e-37) or not (z <= 2.1e+45): 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 <= -2.6e-37) || !(z <= 2.1e+45)) 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 <= -2.6e-37) || ~((z <= 2.1e+45)))
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, -2.6e-37], N[Not[LessEqual[z, 2.1e+45]], $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 -2.6 \cdot 10^{-37} \lor \neg \left(z \leq 2.1 \cdot 10^{+45}\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 < -2.5999999999999998e-37 or 2.09999999999999995e45 < z Initial program 54.5%
Simplified62.9%
Taylor expanded in x around 0 43.5%
metadata-eval43.5%
cancel-sign-sub-inv43.5%
associate-*r*43.5%
*-commutative43.5%
Simplified43.5%
Taylor expanded in a around inf 69.2%
Taylor expanded in c around 0 73.1%
Taylor expanded in a around 0 76.8%
if -2.5999999999999998e-37 < z < 2.09999999999999995e45Initial program 91.7%
Simplified91.7%
Taylor expanded in t around 0 78.7%
+-commutative78.7%
associate-*r*78.6%
*-commutative78.6%
Simplified78.6%
Final simplification77.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= y -3.1e+47)
(* x (* (/ 9.0 z) (/ y c)))
(if (<= y 2.05e+123)
(/ (+ (* -4.0 (* a t)) (/ b z)) c)
(* (/ 9.0 z) (* x (/ y 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 (y <= -3.1e+47) {
tmp = x * ((9.0 / z) * (y / c));
} else if (y <= 2.05e+123) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = (9.0 / z) * (x * (y / 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 (y <= (-3.1d+47)) then
tmp = x * ((9.0d0 / z) * (y / c))
else if (y <= 2.05d+123) then
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
else
tmp = (9.0d0 / z) * (x * (y / 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 (y <= -3.1e+47) {
tmp = x * ((9.0 / z) * (y / c));
} else if (y <= 2.05e+123) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = (9.0 / z) * (x * (y / 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 y <= -3.1e+47: tmp = x * ((9.0 / z) * (y / c)) elif y <= 2.05e+123: tmp = ((-4.0 * (a * t)) + (b / z)) / c else: tmp = (9.0 / z) * (x * (y / 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 (y <= -3.1e+47) tmp = Float64(x * Float64(Float64(9.0 / z) * Float64(y / c))); elseif (y <= 2.05e+123) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); else tmp = Float64(Float64(9.0 / z) * Float64(x * Float64(y / 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 (y <= -3.1e+47)
tmp = x * ((9.0 / z) * (y / c));
elseif (y <= 2.05e+123)
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
else
tmp = (9.0 / z) * (x * (y / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[y, -3.1e+47], N[(x * N[(N[(9.0 / z), $MachinePrecision] * N[(y / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.05e+123], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(9.0 / z), $MachinePrecision] * N[(x * N[(y / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+47}:\\
\;\;\;\;x \cdot \left(\frac{9}{z} \cdot \frac{y}{c}\right)\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{+123}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{9}{z} \cdot \left(x \cdot \frac{y}{c}\right)\\
\end{array}
\end{array}
if y < -3.1000000000000001e47Initial program 61.5%
Simplified66.0%
Taylor expanded in x around inf 41.7%
*-commutative41.7%
Simplified41.7%
Taylor expanded in x around 0 41.7%
associate-*r/41.8%
*-commutative41.8%
associate-*l*41.8%
*-commutative41.8%
*-commutative41.8%
associate-*r/43.8%
times-frac47.9%
Simplified47.9%
if -3.1000000000000001e47 < y < 2.04999999999999995e123Initial program 75.4%
Simplified80.6%
Taylor expanded in x around 0 61.4%
metadata-eval61.4%
cancel-sign-sub-inv61.4%
associate-*r*61.4%
*-commutative61.4%
Simplified61.4%
Taylor expanded in a around inf 67.5%
Taylor expanded in c around 0 68.1%
Taylor expanded in a around 0 76.1%
if 2.04999999999999995e123 < y Initial program 77.5%
Simplified77.2%
Taylor expanded in x around inf 52.1%
associate-*r/52.1%
*-commutative52.1%
times-frac54.3%
associate-/l*63.2%
Simplified63.2%
Final simplification68.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= y -90000000000000.0) (not (<= y 3.8e+122))) (* 9.0 (* x (/ (/ y c) z))) (* a (* -4.0 (/ t 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 ((y <= -90000000000000.0) || !(y <= 3.8e+122)) {
tmp = 9.0 * (x * ((y / c) / z));
} else {
tmp = a * (-4.0 * (t / 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 ((y <= (-90000000000000.0d0)) .or. (.not. (y <= 3.8d+122))) then
tmp = 9.0d0 * (x * ((y / c) / z))
else
tmp = a * ((-4.0d0) * (t / 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 ((y <= -90000000000000.0) || !(y <= 3.8e+122)) {
tmp = 9.0 * (x * ((y / c) / z));
} else {
tmp = a * (-4.0 * (t / 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 (y <= -90000000000000.0) or not (y <= 3.8e+122): tmp = 9.0 * (x * ((y / c) / z)) else: tmp = a * (-4.0 * (t / 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 ((y <= -90000000000000.0) || !(y <= 3.8e+122)) tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c) / z))); else tmp = Float64(a * Float64(-4.0 * Float64(t / 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 ((y <= -90000000000000.0) || ~((y <= 3.8e+122)))
tmp = 9.0 * (x * ((y / c) / z));
else
tmp = a * (-4.0 * (t / 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[y, -90000000000000.0], N[Not[LessEqual[y, 3.8e+122]], $MachinePrecision]], N[(9.0 * N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -90000000000000 \lor \neg \left(y \leq 3.8 \cdot 10^{+122}\right):\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if y < -9e13 or 3.7999999999999998e122 < y Initial program 69.6%
Simplified72.6%
Taylor expanded in x around inf 47.1%
*-commutative47.1%
Simplified47.1%
Taylor expanded in x around 0 47.1%
associate-/l*51.0%
associate-/r*54.8%
Simplified54.8%
if -9e13 < y < 3.7999999999999998e122Initial program 75.3%
Simplified80.2%
Taylor expanded in x around 0 61.8%
metadata-eval61.8%
cancel-sign-sub-inv61.8%
associate-*r*61.8%
*-commutative61.8%
Simplified61.8%
Taylor expanded in a around inf 68.2%
Taylor expanded in t around inf 48.0%
Final simplification50.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= y -1.95e+15) (not (<= y 8.6e+123))) (* 9.0 (* x (/ y (* z c)))) (* a (* -4.0 (/ t 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 ((y <= -1.95e+15) || !(y <= 8.6e+123)) {
tmp = 9.0 * (x * (y / (z * c)));
} else {
tmp = a * (-4.0 * (t / 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 ((y <= (-1.95d+15)) .or. (.not. (y <= 8.6d+123))) then
tmp = 9.0d0 * (x * (y / (z * c)))
else
tmp = a * ((-4.0d0) * (t / 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 ((y <= -1.95e+15) || !(y <= 8.6e+123)) {
tmp = 9.0 * (x * (y / (z * c)));
} else {
tmp = a * (-4.0 * (t / 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 (y <= -1.95e+15) or not (y <= 8.6e+123): tmp = 9.0 * (x * (y / (z * c))) else: tmp = a * (-4.0 * (t / 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 ((y <= -1.95e+15) || !(y <= 8.6e+123)) tmp = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))); else tmp = Float64(a * Float64(-4.0 * Float64(t / 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 ((y <= -1.95e+15) || ~((y <= 8.6e+123)))
tmp = 9.0 * (x * (y / (z * c)));
else
tmp = a * (-4.0 * (t / 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[y, -1.95e+15], N[Not[LessEqual[y, 8.6e+123]], $MachinePrecision]], N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{+15} \lor \neg \left(y \leq 8.6 \cdot 10^{+123}\right):\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if y < -1.95e15 or 8.59999999999999972e123 < y Initial program 69.6%
Simplified72.6%
Taylor expanded in x around inf 47.1%
*-commutative47.1%
Simplified47.1%
associate-/l*51.0%
Applied egg-rr51.0%
if -1.95e15 < y < 8.59999999999999972e123Initial program 75.3%
Simplified80.2%
Taylor expanded in x around 0 61.8%
metadata-eval61.8%
cancel-sign-sub-inv61.8%
associate-*r*61.8%
*-commutative61.8%
Simplified61.8%
Taylor expanded in a around inf 68.2%
Taylor expanded in t around inf 48.0%
Final simplification49.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 (<= y -9e+14) (* x (* (/ 9.0 z) (/ y c))) (if (<= y 4e+122) (* a (* -4.0 (/ t c))) (* (/ 9.0 z) (* x (/ y 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 (y <= -9e+14) {
tmp = x * ((9.0 / z) * (y / c));
} else if (y <= 4e+122) {
tmp = a * (-4.0 * (t / c));
} else {
tmp = (9.0 / z) * (x * (y / 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 (y <= (-9d+14)) then
tmp = x * ((9.0d0 / z) * (y / c))
else if (y <= 4d+122) then
tmp = a * ((-4.0d0) * (t / c))
else
tmp = (9.0d0 / z) * (x * (y / 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 (y <= -9e+14) {
tmp = x * ((9.0 / z) * (y / c));
} else if (y <= 4e+122) {
tmp = a * (-4.0 * (t / c));
} else {
tmp = (9.0 / z) * (x * (y / 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 y <= -9e+14: tmp = x * ((9.0 / z) * (y / c)) elif y <= 4e+122: tmp = a * (-4.0 * (t / c)) else: tmp = (9.0 / z) * (x * (y / 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 (y <= -9e+14) tmp = Float64(x * Float64(Float64(9.0 / z) * Float64(y / c))); elseif (y <= 4e+122) tmp = Float64(a * Float64(-4.0 * Float64(t / c))); else tmp = Float64(Float64(9.0 / z) * Float64(x * Float64(y / 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 (y <= -9e+14)
tmp = x * ((9.0 / z) * (y / c));
elseif (y <= 4e+122)
tmp = a * (-4.0 * (t / c));
else
tmp = (9.0 / z) * (x * (y / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[y, -9e+14], N[(x * N[(N[(9.0 / z), $MachinePrecision] * N[(y / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e+122], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(9.0 / z), $MachinePrecision] * N[(x * N[(y / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+14}:\\
\;\;\;\;x \cdot \left(\frac{9}{z} \cdot \frac{y}{c}\right)\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+122}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{9}{z} \cdot \left(x \cdot \frac{y}{c}\right)\\
\end{array}
\end{array}
if y < -9e14Initial program 63.6%
Simplified69.1%
Taylor expanded in x around inf 43.2%
*-commutative43.2%
Simplified43.2%
Taylor expanded in x around 0 43.2%
associate-*r/43.2%
*-commutative43.2%
associate-*l*43.2%
*-commutative43.2%
*-commutative43.2%
associate-*r/44.9%
times-frac48.4%
Simplified48.4%
if -9e14 < y < 4.00000000000000006e122Initial program 75.3%
Simplified80.2%
Taylor expanded in x around 0 61.8%
metadata-eval61.8%
cancel-sign-sub-inv61.8%
associate-*r*61.8%
*-commutative61.8%
Simplified61.8%
Taylor expanded in a around inf 68.2%
Taylor expanded in t around inf 48.0%
if 4.00000000000000006e122 < y Initial program 77.5%
Simplified77.2%
Taylor expanded in x around inf 52.1%
associate-*r/52.1%
*-commutative52.1%
times-frac54.3%
associate-/l*63.2%
Simplified63.2%
Final simplification50.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= y -3.9e+14) (* x (* (/ 9.0 z) (/ y c))) (if (<= y 3.6e+122) (* a (* -4.0 (/ t c))) (* 9.0 (* x (/ (/ y 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 (y <= -3.9e+14) {
tmp = x * ((9.0 / z) * (y / c));
} else if (y <= 3.6e+122) {
tmp = a * (-4.0 * (t / c));
} else {
tmp = 9.0 * (x * ((y / 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 (y <= (-3.9d+14)) then
tmp = x * ((9.0d0 / z) * (y / c))
else if (y <= 3.6d+122) then
tmp = a * ((-4.0d0) * (t / c))
else
tmp = 9.0d0 * (x * ((y / 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 (y <= -3.9e+14) {
tmp = x * ((9.0 / z) * (y / c));
} else if (y <= 3.6e+122) {
tmp = a * (-4.0 * (t / c));
} else {
tmp = 9.0 * (x * ((y / 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 y <= -3.9e+14: tmp = x * ((9.0 / z) * (y / c)) elif y <= 3.6e+122: tmp = a * (-4.0 * (t / c)) else: tmp = 9.0 * (x * ((y / 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 (y <= -3.9e+14) tmp = Float64(x * Float64(Float64(9.0 / z) * Float64(y / c))); elseif (y <= 3.6e+122) tmp = Float64(a * Float64(-4.0 * Float64(t / c))); else tmp = Float64(9.0 * Float64(x * Float64(Float64(y / 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 (y <= -3.9e+14)
tmp = x * ((9.0 / z) * (y / c));
elseif (y <= 3.6e+122)
tmp = a * (-4.0 * (t / c));
else
tmp = 9.0 * (x * ((y / 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[y, -3.9e+14], N[(x * N[(N[(9.0 / z), $MachinePrecision] * N[(y / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.6e+122], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.9 \cdot 10^{+14}:\\
\;\;\;\;x \cdot \left(\frac{9}{z} \cdot \frac{y}{c}\right)\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{+122}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\
\end{array}
\end{array}
if y < -3.9e14Initial program 63.6%
Simplified69.1%
Taylor expanded in x around inf 43.2%
*-commutative43.2%
Simplified43.2%
Taylor expanded in x around 0 43.2%
associate-*r/43.2%
*-commutative43.2%
associate-*l*43.2%
*-commutative43.2%
*-commutative43.2%
associate-*r/44.9%
times-frac48.4%
Simplified48.4%
if -3.9e14 < y < 3.6000000000000003e122Initial program 75.3%
Simplified80.2%
Taylor expanded in x around 0 61.8%
metadata-eval61.8%
cancel-sign-sub-inv61.8%
associate-*r*61.8%
*-commutative61.8%
Simplified61.8%
Taylor expanded in a around inf 68.2%
Taylor expanded in t around inf 48.0%
if 3.6000000000000003e122 < y Initial program 77.5%
Simplified77.2%
Taylor expanded in x around inf 52.1%
*-commutative52.1%
Simplified52.1%
Taylor expanded in x around 0 52.1%
associate-/l*59.0%
associate-/r*63.3%
Simplified63.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 (if (or (<= b -6e+147) (not (<= b 3.9e+27))) (/ (/ b c) z) (* a (* -4.0 (/ t c)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -6e+147) || !(b <= 3.9e+27)) {
tmp = (b / c) / z;
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((b <= (-6d+147)) .or. (.not. (b <= 3.9d+27))) then
tmp = (b / c) / z
else
tmp = a * ((-4.0d0) * (t / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -6e+147) || !(b <= 3.9e+27)) {
tmp = (b / c) / z;
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -6e+147) or not (b <= 3.9e+27): tmp = (b / c) / z else: tmp = a * (-4.0 * (t / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -6e+147) || !(b <= 3.9e+27)) tmp = Float64(Float64(b / c) / z); else tmp = Float64(a * Float64(-4.0 * Float64(t / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((b <= -6e+147) || ~((b <= 3.9e+27)))
tmp = (b / c) / z;
else
tmp = a * (-4.0 * (t / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -6e+147], N[Not[LessEqual[b, 3.9e+27]], $MachinePrecision]], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6 \cdot 10^{+147} \lor \neg \left(b \leq 3.9 \cdot 10^{+27}\right):\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if b < -5.99999999999999987e147 or 3.8999999999999999e27 < b Initial program 79.5%
Simplified78.3%
Taylor expanded in b around inf 56.9%
*-commutative56.9%
Simplified56.9%
Taylor expanded in b around 0 56.9%
associate-/r*65.5%
Simplified65.5%
if -5.99999999999999987e147 < b < 3.8999999999999999e27Initial program 70.2%
Simplified76.8%
Taylor expanded in x around 0 41.9%
metadata-eval41.9%
cancel-sign-sub-inv41.9%
associate-*r*41.9%
*-commutative41.9%
Simplified41.9%
Taylor expanded in a around inf 56.6%
Taylor expanded in t around inf 49.6%
Final simplification54.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= b -1.1e+107) (not (<= b 1.6e+28))) (/ (/ b c) z) (* -4.0 (* t (/ a c)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -1.1e+107) || !(b <= 1.6e+28)) {
tmp = (b / c) / z;
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((b <= (-1.1d+107)) .or. (.not. (b <= 1.6d+28))) then
tmp = (b / c) / z
else
tmp = (-4.0d0) * (t * (a / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -1.1e+107) || !(b <= 1.6e+28)) {
tmp = (b / c) / z;
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -1.1e+107) or not (b <= 1.6e+28): tmp = (b / c) / z else: tmp = -4.0 * (t * (a / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -1.1e+107) || !(b <= 1.6e+28)) tmp = Float64(Float64(b / c) / z); else tmp = Float64(-4.0 * Float64(t * Float64(a / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((b <= -1.1e+107) || ~((b <= 1.6e+28)))
tmp = (b / c) / z;
else
tmp = -4.0 * (t * (a / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -1.1e+107], N[Not[LessEqual[b, 1.6e+28]], $MachinePrecision]], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.1 \cdot 10^{+107} \lor \neg \left(b \leq 1.6 \cdot 10^{+28}\right):\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\end{array}
\end{array}
if b < -1.1e107 or 1.6e28 < b Initial program 78.1%
Simplified78.0%
Taylor expanded in b around inf 55.3%
*-commutative55.3%
Simplified55.3%
Taylor expanded in b around 0 55.3%
associate-/r*63.1%
Simplified63.1%
if -1.1e107 < b < 1.6e28Initial program 70.5%
Simplified76.9%
Taylor expanded in x around 0 41.5%
metadata-eval41.5%
cancel-sign-sub-inv41.5%
associate-*r*41.5%
*-commutative41.5%
Simplified41.5%
Taylor expanded in b around 0 48.0%
*-commutative48.0%
associate-/l*50.3%
Simplified50.3%
Final simplification54.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= b -1.2e+148) (* (/ b c) (/ 1.0 z)) (if (<= b 1.65e+28) (* a (* -4.0 (/ t 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 (b <= -1.2e+148) {
tmp = (b / c) * (1.0 / z);
} else if (b <= 1.65e+28) {
tmp = a * (-4.0 * (t / 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 (b <= (-1.2d+148)) then
tmp = (b / c) * (1.0d0 / z)
else if (b <= 1.65d+28) then
tmp = a * ((-4.0d0) * (t / 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 (b <= -1.2e+148) {
tmp = (b / c) * (1.0 / z);
} else if (b <= 1.65e+28) {
tmp = a * (-4.0 * (t / 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 b <= -1.2e+148: tmp = (b / c) * (1.0 / z) elif b <= 1.65e+28: tmp = a * (-4.0 * (t / 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 (b <= -1.2e+148) tmp = Float64(Float64(b / c) * Float64(1.0 / z)); elseif (b <= 1.65e+28) tmp = Float64(a * Float64(-4.0 * Float64(t / 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 (b <= -1.2e+148)
tmp = (b / c) * (1.0 / z);
elseif (b <= 1.65e+28)
tmp = a * (-4.0 * (t / 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[b, -1.2e+148], N[(N[(b / c), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.65e+28], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $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}\;b \leq -1.2 \cdot 10^{+148}:\\
\;\;\;\;\frac{b}{c} \cdot \frac{1}{z}\\
\mathbf{elif}\;b \leq 1.65 \cdot 10^{+28}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\end{array}
\end{array}
if b < -1.19999999999999997e148Initial program 80.7%
Simplified77.3%
Taylor expanded in b around inf 61.9%
*-commutative61.9%
Simplified61.9%
Taylor expanded in b around 0 61.9%
associate-/r*74.3%
Simplified74.3%
div-inv74.4%
Applied egg-rr74.4%
if -1.19999999999999997e148 < b < 1.65e28Initial program 70.2%
Simplified76.8%
Taylor expanded in x around 0 41.9%
metadata-eval41.9%
cancel-sign-sub-inv41.9%
associate-*r*41.9%
*-commutative41.9%
Simplified41.9%
Taylor expanded in a around inf 56.6%
Taylor expanded in t around inf 49.6%
if 1.65e28 < b Initial program 78.8%
Simplified78.9%
Taylor expanded in b around inf 54.0%
*-commutative54.0%
Simplified54.0%
Taylor expanded in b around 0 54.0%
associate-/r*60.3%
Simplified60.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 c) z))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return (b / c) / z;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = (b / c) / z
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (b / c) / z;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): return (b / c) / z
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) return Float64(Float64(b / c) / z) end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = (b / c) / z;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{\frac{b}{c}}{z}
\end{array}
Initial program 73.1%
Simplified77.3%
Taylor expanded in b around inf 31.7%
*-commutative31.7%
Simplified31.7%
Taylor expanded in b around 0 31.7%
associate-/r*33.4%
Simplified33.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 (/ 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 73.1%
Simplified77.3%
Taylor expanded in b around inf 31.7%
*-commutative31.7%
Simplified31.7%
(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 2024150
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:alt
(! :herbie-platform default (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) -220031348160821/200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 0) (/ (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 365902434742109/31250000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 28768236795461370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (+ (* (* 9 (/ y c)) (/ x z)) (/ b (* c z))) (* 4 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 138385150424563190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (- (+ (* 9 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4 (/ (* a t) c)))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))