
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* x 9.0) y)))
(if (<= t_1 -1e+243)
(* (/ (* 9.0 y) z) (/ x c))
(if (<= t_1 2e+290)
(* (/ 1.0 c) (/ (+ (* x (* 9.0 y)) (- b (* z (* 4.0 (* t a))))) z))
(*
y
(-
(/ (fma -4.0 (* a (/ t c)) (/ b (* z c))) y)
(* (/ x z) (/ -9.0 c))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * 9.0) * y;
double tmp;
if (t_1 <= -1e+243) {
tmp = ((9.0 * y) / z) * (x / c);
} else if (t_1 <= 2e+290) {
tmp = (1.0 / c) * (((x * (9.0 * y)) + (b - (z * (4.0 * (t * a))))) / z);
} else {
tmp = y * ((fma(-4.0, (a * (t / c)), (b / (z * c))) / y) - ((x / z) * (-9.0 / c)));
}
return tmp;
}
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(x * 9.0) * y) tmp = 0.0 if (t_1 <= -1e+243) tmp = Float64(Float64(Float64(9.0 * y) / z) * Float64(x / c)); elseif (t_1 <= 2e+290) tmp = Float64(Float64(1.0 / c) * Float64(Float64(Float64(x * Float64(9.0 * y)) + Float64(b - Float64(z * Float64(4.0 * Float64(t * a))))) / z)); else tmp = Float64(y * Float64(Float64(fma(-4.0, Float64(a * Float64(t / c)), Float64(b / Float64(z * c))) / y) - Float64(Float64(x / z) * Float64(-9.0 / c)))); end return tmp end
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[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+243], N[(N[(N[(9.0 * y), $MachinePrecision] / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+290], N[(N[(1.0 / c), $MachinePrecision] * N[(N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] + N[(b - N[(z * N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], 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[(x / z), $MachinePrecision] * N[(-9.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+243}:\\
\;\;\;\;\frac{9 \cdot y}{z} \cdot \frac{x}{c}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;\frac{1}{c} \cdot \frac{x \cdot \left(9 \cdot y\right) + \left(b - z \cdot \left(4 \cdot \left(t \cdot a\right)\right)\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\frac{\mathsf{fma}\left(-4, a \cdot \frac{t}{c}, \frac{b}{z \cdot c}\right)}{y} - \frac{x}{z} \cdot \frac{-9}{c}\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1.0000000000000001e243Initial program 77.8%
Simplified73.9%
Taylor expanded in x around inf 74.1%
associate-/l*85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in x around 0 74.1%
associate-*r/74.0%
associate-*r*74.1%
*-commutative74.1%
associate-*r*74.1%
*-commutative74.1%
*-commutative74.1%
times-frac92.5%
Simplified92.5%
if -1.0000000000000001e243 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2.00000000000000012e290Initial program 85.2%
associate-+l-85.2%
*-commutative85.2%
associate-*r*82.7%
*-commutative82.7%
associate-+l-82.7%
associate-*l*82.8%
associate-*l*86.3%
*-commutative86.3%
Simplified86.3%
*-un-lft-identity86.3%
*-commutative86.3%
times-frac91.9%
associate-*r*91.9%
associate-*r*87.4%
associate-+l-87.4%
associate-*r*87.4%
associate-*r*91.9%
associate-*l*92.3%
Applied egg-rr92.3%
if 2.00000000000000012e290 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 37.9%
Simplified51.9%
Taylor expanded in y around -inf 59.3%
Simplified79.3%
Final simplification91.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* x 9.0) y)))
(if (<= t_1 -4e+232)
(* 9.0 (* y (/ (/ x c) z)))
(if (<= t_1 1e+215)
(/ (+ b (- (* x (* 9.0 y)) (* z (* 4.0 (* t a))))) (* z c))
(* 9.0 (* (/ x z) (/ y c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * 9.0) * y;
double tmp;
if (t_1 <= -4e+232) {
tmp = 9.0 * (y * ((x / c) / z));
} else if (t_1 <= 1e+215) {
tmp = (b + ((x * (9.0 * y)) - (z * (4.0 * (t * a))))) / (z * c);
} else {
tmp = 9.0 * ((x / z) * (y / c));
}
return tmp;
}
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 = (x * 9.0d0) * y
if (t_1 <= (-4d+232)) then
tmp = 9.0d0 * (y * ((x / c) / z))
else if (t_1 <= 1d+215) then
tmp = (b + ((x * (9.0d0 * y)) - (z * (4.0d0 * (t * a))))) / (z * c)
else
tmp = 9.0d0 * ((x / z) * (y / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * 9.0) * y;
double tmp;
if (t_1 <= -4e+232) {
tmp = 9.0 * (y * ((x / c) / z));
} else if (t_1 <= 1e+215) {
tmp = (b + ((x * (9.0 * y)) - (z * (4.0 * (t * a))))) / (z * c);
} else {
tmp = 9.0 * ((x / z) * (y / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = (x * 9.0) * y tmp = 0 if t_1 <= -4e+232: tmp = 9.0 * (y * ((x / c) / z)) elif t_1 <= 1e+215: tmp = (b + ((x * (9.0 * y)) - (z * (4.0 * (t * a))))) / (z * c) else: tmp = 9.0 * ((x / z) * (y / c)) return tmp
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(x * 9.0) * y) tmp = 0.0 if (t_1 <= -4e+232) tmp = Float64(9.0 * Float64(y * Float64(Float64(x / c) / z))); elseif (t_1 <= 1e+215) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(z * Float64(4.0 * Float64(t * a))))) / Float64(z * c)); else tmp = Float64(9.0 * Float64(Float64(x / z) * Float64(y / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (x * 9.0) * y;
tmp = 0.0;
if (t_1 <= -4e+232)
tmp = 9.0 * (y * ((x / c) / z));
elseif (t_1 <= 1e+215)
tmp = (b + ((x * (9.0 * y)) - (z * (4.0 * (t * a))))) / (z * c);
else
tmp = 9.0 * ((x / z) * (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.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+232], N[(9.0 * N[(y * N[(N[(x / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+215], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(z * N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(N[(x / z), $MachinePrecision] * 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])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+232}:\\
\;\;\;\;9 \cdot \left(y \cdot \frac{\frac{x}{c}}{z}\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+215}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - z \cdot \left(4 \cdot \left(t \cdot a\right)\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -4.00000000000000023e232Initial program 75.1%
associate-+l-75.1%
*-commutative75.1%
associate-*r*71.4%
*-commutative71.4%
associate-+l-71.4%
associate-*l*71.4%
associate-*l*75.1%
*-commutative75.1%
Simplified75.1%
*-un-lft-identity75.1%
times-frac82.2%
associate-+l-82.2%
associate-*l*82.2%
Applied egg-rr82.2%
Taylor expanded in x around inf 71.6%
*-commutative71.6%
associate-/l*82.0%
associate-/r*92.5%
Simplified92.5%
if -4.00000000000000023e232 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.99999999999999907e214Initial program 86.3%
associate-+l-86.3%
*-commutative86.3%
associate-*r*83.6%
*-commutative83.6%
associate-+l-83.6%
associate-*l*83.6%
associate-*l*87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in z around 0 87.2%
associate-*r*88.3%
*-commutative88.3%
associate-*l*87.8%
*-commutative87.8%
*-commutative87.8%
Simplified87.8%
if 9.99999999999999907e214 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 53.5%
Simplified61.4%
Taylor expanded in x around inf 61.0%
*-commutative61.0%
times-frac80.6%
Simplified80.6%
Final simplification87.6%
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 (<= (* (* x 9.0) y) -1e+243) (* (/ (* 9.0 y) z) (/ x c)) (* (/ 1.0 c) (/ (+ (* x (* 9.0 y)) (- b (* z (* 4.0 (* t a))))) z))))
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 (((x * 9.0) * y) <= -1e+243) {
tmp = ((9.0 * y) / z) * (x / c);
} else {
tmp = (1.0 / c) * (((x * (9.0 * y)) + (b - (z * (4.0 * (t * a))))) / z);
}
return tmp;
}
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 (((x * 9.0d0) * y) <= (-1d+243)) then
tmp = ((9.0d0 * y) / z) * (x / c)
else
tmp = (1.0d0 / c) * (((x * (9.0d0 * y)) + (b - (z * (4.0d0 * (t * a))))) / z)
end if
code = tmp
end function
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 (((x * 9.0) * y) <= -1e+243) {
tmp = ((9.0 * y) / z) * (x / c);
} else {
tmp = (1.0 / c) * (((x * (9.0 * y)) + (b - (z * (4.0 * (t * a))))) / z);
}
return tmp;
}
[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 ((x * 9.0) * y) <= -1e+243: tmp = ((9.0 * y) / z) * (x / c) else: tmp = (1.0 / c) * (((x * (9.0 * y)) + (b - (z * (4.0 * (t * a))))) / z) return tmp
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 (Float64(Float64(x * 9.0) * y) <= -1e+243) tmp = Float64(Float64(Float64(9.0 * y) / z) * Float64(x / c)); else tmp = Float64(Float64(1.0 / c) * Float64(Float64(Float64(x * Float64(9.0 * y)) + Float64(b - Float64(z * Float64(4.0 * Float64(t * a))))) / z)); end return tmp end
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 (((x * 9.0) * y) <= -1e+243)
tmp = ((9.0 * y) / z) * (x / c);
else
tmp = (1.0 / c) * (((x * (9.0 * y)) + (b - (z * (4.0 * (t * a))))) / 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. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision], -1e+243], N[(N[(N[(9.0 * y), $MachinePrecision] / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / c), $MachinePrecision] * N[(N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] + N[(b - N[(z * N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(x \cdot 9\right) \cdot y \leq -1 \cdot 10^{+243}:\\
\;\;\;\;\frac{9 \cdot y}{z} \cdot \frac{x}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{c} \cdot \frac{x \cdot \left(9 \cdot y\right) + \left(b - z \cdot \left(4 \cdot \left(t \cdot a\right)\right)\right)}{z}\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1.0000000000000001e243Initial program 77.8%
Simplified73.9%
Taylor expanded in x around inf 74.1%
associate-/l*85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in x around 0 74.1%
associate-*r/74.0%
associate-*r*74.1%
*-commutative74.1%
associate-*r*74.1%
*-commutative74.1%
*-commutative74.1%
times-frac92.5%
Simplified92.5%
if -1.0000000000000001e243 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 82.4%
associate-+l-82.4%
*-commutative82.4%
associate-*r*80.4%
*-commutative80.4%
associate-+l-80.4%
associate-*l*80.4%
associate-*l*83.8%
*-commutative83.8%
Simplified83.8%
*-un-lft-identity83.8%
*-commutative83.8%
times-frac89.5%
associate-*r*89.5%
associate-*r*84.8%
associate-+l-84.8%
associate-*r*84.8%
associate-*r*89.5%
associate-*l*89.9%
Applied egg-rr89.9%
Final simplification90.2%
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 -4500000000.0)
(/ (* (/ 1.0 c) b) z)
(if (<= b 1e-270)
(* -4.0 (* t (/ a c)))
(if (<= b 3.7e-177)
(* 9.0 (/ y (* c (/ z x))))
(if (<= b 1.4e+105) (* (/ 1.0 c) (* (* t a) -4.0)) (/ b (* z 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 <= -4500000000.0) {
tmp = ((1.0 / c) * b) / z;
} else if (b <= 1e-270) {
tmp = -4.0 * (t * (a / c));
} else if (b <= 3.7e-177) {
tmp = 9.0 * (y / (c * (z / x)));
} else if (b <= 1.4e+105) {
tmp = (1.0 / c) * ((t * a) * -4.0);
} else {
tmp = b / (z * c);
}
return tmp;
}
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 <= (-4500000000.0d0)) then
tmp = ((1.0d0 / c) * b) / z
else if (b <= 1d-270) then
tmp = (-4.0d0) * (t * (a / c))
else if (b <= 3.7d-177) then
tmp = 9.0d0 * (y / (c * (z / x)))
else if (b <= 1.4d+105) then
tmp = (1.0d0 / c) * ((t * a) * (-4.0d0))
else
tmp = b / (z * c)
end if
code = tmp
end function
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 <= -4500000000.0) {
tmp = ((1.0 / c) * b) / z;
} else if (b <= 1e-270) {
tmp = -4.0 * (t * (a / c));
} else if (b <= 3.7e-177) {
tmp = 9.0 * (y / (c * (z / x)));
} else if (b <= 1.4e+105) {
tmp = (1.0 / c) * ((t * a) * -4.0);
} else {
tmp = b / (z * c);
}
return tmp;
}
[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 <= -4500000000.0: tmp = ((1.0 / c) * b) / z elif b <= 1e-270: tmp = -4.0 * (t * (a / c)) elif b <= 3.7e-177: tmp = 9.0 * (y / (c * (z / x))) elif b <= 1.4e+105: tmp = (1.0 / c) * ((t * a) * -4.0) else: tmp = b / (z * c) return tmp
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 <= -4500000000.0) tmp = Float64(Float64(Float64(1.0 / c) * b) / z); elseif (b <= 1e-270) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (b <= 3.7e-177) tmp = Float64(9.0 * Float64(y / Float64(c * Float64(z / x)))); elseif (b <= 1.4e+105) tmp = Float64(Float64(1.0 / c) * Float64(Float64(t * a) * -4.0)); else tmp = Float64(b / Float64(z * c)); end return tmp end
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 <= -4500000000.0)
tmp = ((1.0 / c) * b) / z;
elseif (b <= 1e-270)
tmp = -4.0 * (t * (a / c));
elseif (b <= 3.7e-177)
tmp = 9.0 * (y / (c * (z / x)));
elseif (b <= 1.4e+105)
tmp = (1.0 / c) * ((t * a) * -4.0);
else
tmp = 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. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -4500000000.0], N[(N[(N[(1.0 / c), $MachinePrecision] * b), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 1e-270], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.7e-177], N[(9.0 * N[(y / N[(c * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.4e+105], N[(N[(1.0 / c), $MachinePrecision] * N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], 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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4500000000:\\
\;\;\;\;\frac{\frac{1}{c} \cdot b}{z}\\
\mathbf{elif}\;b \leq 10^{-270}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;b \leq 3.7 \cdot 10^{-177}:\\
\;\;\;\;9 \cdot \frac{y}{c \cdot \frac{z}{x}}\\
\mathbf{elif}\;b \leq 1.4 \cdot 10^{+105}:\\
\;\;\;\;\frac{1}{c} \cdot \left(\left(t \cdot a\right) \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if b < -4.5e9Initial program 89.5%
Simplified86.2%
Taylor expanded in b around inf 78.2%
*-commutative78.2%
Simplified78.2%
*-un-lft-identity78.2%
times-frac80.0%
Applied egg-rr80.0%
associate-*l/80.1%
*-un-lft-identity80.1%
Applied egg-rr80.1%
div-inv80.1%
*-un-lft-identity80.1%
times-frac78.2%
Applied egg-rr78.2%
/-rgt-identity78.2%
associate-*r/80.1%
Simplified80.1%
if -4.5e9 < b < 1e-270Initial program 86.9%
Simplified80.4%
Taylor expanded in t around inf 56.7%
associate-*r/56.7%
associate-*r*56.7%
associate-*l/55.6%
associate-*r/55.6%
associate-*l*55.6%
Simplified55.6%
if 1e-270 < b < 3.69999999999999993e-177Initial program 74.4%
Simplified78.4%
Taylor expanded in x around inf 56.8%
*-commutative56.8%
times-frac60.2%
Simplified60.2%
clear-num60.2%
frac-times63.9%
*-un-lft-identity63.9%
Applied egg-rr63.9%
if 3.69999999999999993e-177 < b < 1.4000000000000001e105Initial program 71.3%
associate-+l-71.3%
*-commutative71.3%
associate-*r*68.9%
*-commutative68.9%
associate-+l-68.9%
associate-*l*68.9%
associate-*l*71.5%
*-commutative71.5%
Simplified71.5%
*-un-lft-identity71.5%
*-commutative71.5%
times-frac86.0%
associate-*r*86.0%
associate-*r*78.2%
associate-+l-78.2%
associate-*r*78.2%
associate-*r*86.0%
associate-*l*86.0%
Applied egg-rr86.0%
Taylor expanded in z around inf 49.4%
if 1.4000000000000001e105 < b Initial program 83.1%
Simplified88.5%
Taylor expanded in b around inf 59.6%
*-commutative59.6%
Simplified59.6%
Final simplification61.0%
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 -23000000000.0)
(/ (* (/ 1.0 c) b) z)
(if (<= b 1e-270)
(* -4.0 (* t (/ a c)))
(if (<= b 7.1e-171)
(* 9.0 (/ y (* c (/ z x))))
(if (<= b 7.2e+102) (* -4.0 (/ (* t a) c)) (/ b (* z 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 <= -23000000000.0) {
tmp = ((1.0 / c) * b) / z;
} else if (b <= 1e-270) {
tmp = -4.0 * (t * (a / c));
} else if (b <= 7.1e-171) {
tmp = 9.0 * (y / (c * (z / x)));
} else if (b <= 7.2e+102) {
tmp = -4.0 * ((t * a) / c);
} else {
tmp = b / (z * c);
}
return tmp;
}
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 <= (-23000000000.0d0)) then
tmp = ((1.0d0 / c) * b) / z
else if (b <= 1d-270) then
tmp = (-4.0d0) * (t * (a / c))
else if (b <= 7.1d-171) then
tmp = 9.0d0 * (y / (c * (z / x)))
else if (b <= 7.2d+102) then
tmp = (-4.0d0) * ((t * a) / c)
else
tmp = b / (z * c)
end if
code = tmp
end function
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 <= -23000000000.0) {
tmp = ((1.0 / c) * b) / z;
} else if (b <= 1e-270) {
tmp = -4.0 * (t * (a / c));
} else if (b <= 7.1e-171) {
tmp = 9.0 * (y / (c * (z / x)));
} else if (b <= 7.2e+102) {
tmp = -4.0 * ((t * a) / c);
} else {
tmp = b / (z * c);
}
return tmp;
}
[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 <= -23000000000.0: tmp = ((1.0 / c) * b) / z elif b <= 1e-270: tmp = -4.0 * (t * (a / c)) elif b <= 7.1e-171: tmp = 9.0 * (y / (c * (z / x))) elif b <= 7.2e+102: tmp = -4.0 * ((t * a) / c) else: tmp = b / (z * c) return tmp
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 <= -23000000000.0) tmp = Float64(Float64(Float64(1.0 / c) * b) / z); elseif (b <= 1e-270) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (b <= 7.1e-171) tmp = Float64(9.0 * Float64(y / Float64(c * Float64(z / x)))); elseif (b <= 7.2e+102) tmp = Float64(-4.0 * Float64(Float64(t * a) / c)); else tmp = Float64(b / Float64(z * c)); end return tmp end
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 <= -23000000000.0)
tmp = ((1.0 / c) * b) / z;
elseif (b <= 1e-270)
tmp = -4.0 * (t * (a / c));
elseif (b <= 7.1e-171)
tmp = 9.0 * (y / (c * (z / x)));
elseif (b <= 7.2e+102)
tmp = -4.0 * ((t * a) / c);
else
tmp = 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. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -23000000000.0], N[(N[(N[(1.0 / c), $MachinePrecision] * b), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 1e-270], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.1e-171], N[(9.0 * N[(y / N[(c * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.2e+102], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], 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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -23000000000:\\
\;\;\;\;\frac{\frac{1}{c} \cdot b}{z}\\
\mathbf{elif}\;b \leq 10^{-270}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;b \leq 7.1 \cdot 10^{-171}:\\
\;\;\;\;9 \cdot \frac{y}{c \cdot \frac{z}{x}}\\
\mathbf{elif}\;b \leq 7.2 \cdot 10^{+102}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if b < -2.3e10Initial program 89.5%
Simplified86.2%
Taylor expanded in b around inf 78.2%
*-commutative78.2%
Simplified78.2%
*-un-lft-identity78.2%
times-frac80.0%
Applied egg-rr80.0%
associate-*l/80.1%
*-un-lft-identity80.1%
Applied egg-rr80.1%
div-inv80.1%
*-un-lft-identity80.1%
times-frac78.2%
Applied egg-rr78.2%
/-rgt-identity78.2%
associate-*r/80.1%
Simplified80.1%
if -2.3e10 < b < 1e-270Initial program 86.9%
Simplified80.4%
Taylor expanded in t around inf 56.7%
associate-*r/56.7%
associate-*r*56.7%
associate-*l/55.6%
associate-*r/55.6%
associate-*l*55.6%
Simplified55.6%
if 1e-270 < b < 7.09999999999999997e-171Initial program 74.4%
Simplified78.4%
Taylor expanded in x around inf 56.8%
*-commutative56.8%
times-frac60.2%
Simplified60.2%
clear-num60.2%
frac-times63.9%
*-un-lft-identity63.9%
Applied egg-rr63.9%
if 7.09999999999999997e-171 < b < 7.2000000000000003e102Initial program 71.3%
Simplified70.6%
Taylor expanded in t around inf 49.4%
if 7.2000000000000003e102 < b Initial program 83.1%
Simplified88.5%
Taylor expanded in b around inf 59.6%
*-commutative59.6%
Simplified59.6%
Final simplification60.9%
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 4.6e+101) (/ (+ b (- (* 9.0 (* x y)) (* (* t a) (* z 4.0)))) (* z c)) (+ (/ b (* z c)) (* -4.0 (/ (* t a) 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 <= 4.6e+101) {
tmp = (b + ((9.0 * (x * y)) - ((t * a) * (z * 4.0)))) / (z * c);
} else {
tmp = (b / (z * c)) + (-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.
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 <= 4.6d+101) then
tmp = (b + ((9.0d0 * (x * y)) - ((t * a) * (z * 4.0d0)))) / (z * c)
else
tmp = (b / (z * c)) + ((-4.0d0) * ((t * a) / c))
end if
code = tmp
end function
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 <= 4.6e+101) {
tmp = (b + ((9.0 * (x * y)) - ((t * a) * (z * 4.0)))) / (z * c);
} else {
tmp = (b / (z * c)) + (-4.0 * ((t * a) / c));
}
return tmp;
}
[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 <= 4.6e+101: tmp = (b + ((9.0 * (x * y)) - ((t * a) * (z * 4.0)))) / (z * c) else: tmp = (b / (z * c)) + (-4.0 * ((t * a) / c)) return tmp
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 <= 4.6e+101) tmp = Float64(Float64(b + Float64(Float64(9.0 * Float64(x * y)) - Float64(Float64(t * a) * Float64(z * 4.0)))) / Float64(z * c)); else tmp = Float64(Float64(b / Float64(z * c)) + Float64(-4.0 * Float64(Float64(t * a) / c))); end return tmp end
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 <= 4.6e+101)
tmp = (b + ((9.0 * (x * y)) - ((t * a) * (z * 4.0)))) / (z * c);
else
tmp = (b / (z * c)) + (-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. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, 4.6e+101], N[(N[(b + N[(N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(t * a), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 4.6 \cdot 10^{+101}:\\
\;\;\;\;\frac{b + \left(9 \cdot \left(x \cdot y\right) - \left(t \cdot a\right) \cdot \left(z \cdot 4\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c} + -4 \cdot \frac{t \cdot a}{c}\\
\end{array}
\end{array}
if z < 4.6000000000000003e101Initial program 87.5%
associate-+l-87.5%
*-commutative87.5%
associate-*r*84.5%
*-commutative84.5%
associate-+l-84.5%
associate-*l*84.5%
associate-*l*87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in x around 0 87.6%
if 4.6000000000000003e101 < z Initial program 51.7%
associate-+l-51.7%
*-commutative51.7%
associate-*r*54.2%
*-commutative54.2%
associate-+l-54.2%
associate-*l*54.2%
associate-*l*59.1%
*-commutative59.1%
Simplified59.1%
Taylor expanded in x around 0 54.4%
Taylor expanded in b around 0 76.1%
Final simplification85.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= z 1.35e+101) (/ (+ b (- (* 9.0 (* x y)) (* z (* 4.0 (* t a))))) (* z c)) (+ (/ b (* z c)) (* -4.0 (/ (* t a) c)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= 1.35e+101) {
tmp = (b + ((9.0 * (x * y)) - (z * (4.0 * (t * a))))) / (z * c);
} else {
tmp = (b / (z * c)) + (-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.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= 1.35d+101) then
tmp = (b + ((9.0d0 * (x * y)) - (z * (4.0d0 * (t * a))))) / (z * c)
else
tmp = (b / (z * c)) + ((-4.0d0) * ((t * a) / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= 1.35e+101) {
tmp = (b + ((9.0 * (x * y)) - (z * (4.0 * (t * a))))) / (z * c);
} else {
tmp = (b / (z * c)) + (-4.0 * ((t * a) / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= 1.35e+101: tmp = (b + ((9.0 * (x * y)) - (z * (4.0 * (t * a))))) / (z * c) else: tmp = (b / (z * c)) + (-4.0 * ((t * a) / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= 1.35e+101) tmp = Float64(Float64(b + Float64(Float64(9.0 * Float64(x * y)) - Float64(z * Float64(4.0 * Float64(t * a))))) / Float64(z * c)); else tmp = Float64(Float64(b / Float64(z * c)) + Float64(-4.0 * Float64(Float64(t * a) / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= 1.35e+101)
tmp = (b + ((9.0 * (x * y)) - (z * (4.0 * (t * a))))) / (z * c);
else
tmp = (b / (z * c)) + (-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. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, 1.35e+101], N[(N[(b + N[(N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(z * N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.35 \cdot 10^{+101}:\\
\;\;\;\;\frac{b + \left(9 \cdot \left(x \cdot y\right) - z \cdot \left(4 \cdot \left(t \cdot a\right)\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c} + -4 \cdot \frac{t \cdot a}{c}\\
\end{array}
\end{array}
if z < 1.35000000000000003e101Initial program 87.5%
associate-+l-87.5%
*-commutative87.5%
associate-*r*84.5%
*-commutative84.5%
associate-+l-84.5%
associate-*l*84.5%
associate-*l*87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in z around 0 87.9%
associate-*r*88.1%
*-commutative88.1%
associate-*l*87.6%
*-commutative87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in x around 0 87.6%
if 1.35000000000000003e101 < z Initial program 51.7%
associate-+l-51.7%
*-commutative51.7%
associate-*r*54.2%
*-commutative54.2%
associate-+l-54.2%
associate-*l*54.2%
associate-*l*59.1%
*-commutative59.1%
Simplified59.1%
Taylor expanded in x around 0 54.4%
Taylor expanded in b around 0 76.1%
Final simplification85.8%
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 -1.05e-7) (not (<= z 9e+53))) (+ (/ b (* z c)) (* -4.0 (/ (* t a) c))) (/ (+ b (* 9.0 (* x y))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.05e-7) || !(z <= 9e+53)) {
tmp = (b / (z * c)) + (-4.0 * ((t * a) / c));
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-1.05d-7)) .or. (.not. (z <= 9d+53))) then
tmp = (b / (z * c)) + ((-4.0d0) * ((t * a) / c))
else
tmp = (b + (9.0d0 * (x * y))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.05e-7) || !(z <= 9e+53)) {
tmp = (b / (z * c)) + (-4.0 * ((t * a) / c));
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1.05e-7) or not (z <= 9e+53): tmp = (b / (z * c)) + (-4.0 * ((t * a) / c)) else: tmp = (b + (9.0 * (x * y))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1.05e-7) || !(z <= 9e+53)) tmp = Float64(Float64(b / Float64(z * c)) + Float64(-4.0 * Float64(Float64(t * a) / c))); else tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -1.05e-7) || ~((z <= 9e+53)))
tmp = (b / (z * c)) + (-4.0 * ((t * a) / c));
else
tmp = (b + (9.0 * (x * y))) / (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. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.05e-7], N[Not[LessEqual[z, 9e+53]], $MachinePrecision]], N[(N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(9.0 * N[(x * y), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{-7} \lor \neg \left(z \leq 9 \cdot 10^{+53}\right):\\
\;\;\;\;\frac{b}{z \cdot c} + -4 \cdot \frac{t \cdot a}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.05e-7 or 9.0000000000000004e53 < z Initial program 66.7%
associate-+l-66.7%
*-commutative66.7%
associate-*r*64.8%
*-commutative64.8%
associate-+l-64.8%
associate-*l*64.8%
associate-*l*70.8%
*-commutative70.8%
Simplified70.8%
Taylor expanded in x around 0 61.5%
Taylor expanded in b around 0 73.3%
if -1.05e-7 < z < 9.0000000000000004e53Initial program 95.5%
Simplified93.2%
Taylor expanded in t around 0 82.5%
*-commutative82.5%
Simplified82.5%
Final simplification78.2%
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 -9.5e+20) (* -4.0 (* t (/ a c))) (if (<= z 5e+99) (/ (+ b (* 9.0 (* x y))) (* z c)) (* -4.0 (* a (/ t 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 <= -9.5e+20) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 5e+99) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = -4.0 * (a * (t / c));
}
return tmp;
}
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 <= (-9.5d+20)) then
tmp = (-4.0d0) * (t * (a / c))
else if (z <= 5d+99) then
tmp = (b + (9.0d0 * (x * y))) / (z * c)
else
tmp = (-4.0d0) * (a * (t / c))
end if
code = tmp
end function
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 <= -9.5e+20) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 5e+99) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = -4.0 * (a * (t / c));
}
return tmp;
}
[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 <= -9.5e+20: tmp = -4.0 * (t * (a / c)) elif z <= 5e+99: tmp = (b + (9.0 * (x * y))) / (z * c) else: tmp = -4.0 * (a * (t / c)) return tmp
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 <= -9.5e+20) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (z <= 5e+99) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); else tmp = Float64(-4.0 * Float64(a * Float64(t / c))); end return tmp end
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 <= -9.5e+20)
tmp = -4.0 * (t * (a / c));
elseif (z <= 5e+99)
tmp = (b + (9.0 * (x * y))) / (z * c);
else
tmp = -4.0 * (a * (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. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -9.5e+20], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+99], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a * 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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+20}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+99}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if z < -9.5e20Initial program 72.6%
Simplified66.2%
Taylor expanded in t around inf 55.3%
associate-*r/55.3%
associate-*r*55.3%
associate-*l/57.7%
associate-*r/57.7%
associate-*l*57.6%
Simplified57.6%
if -9.5e20 < z < 5.00000000000000008e99Initial program 94.5%
Simplified93.1%
Taylor expanded in t around 0 81.5%
*-commutative81.5%
Simplified81.5%
if 5.00000000000000008e99 < z Initial program 51.7%
Simplified56.7%
Taylor expanded in t around inf 59.2%
associate-/l*59.2%
Simplified59.2%
Final simplification71.6%
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 -105000000000.0) (/ (* (/ 1.0 c) b) z) (if (<= b 3.55e+115) (/ (* (* t a) -4.0) c) (/ b (* z 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 <= -105000000000.0) {
tmp = ((1.0 / c) * b) / z;
} else if (b <= 3.55e+115) {
tmp = ((t * a) * -4.0) / c;
} else {
tmp = b / (z * c);
}
return tmp;
}
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 <= (-105000000000.0d0)) then
tmp = ((1.0d0 / c) * b) / z
else if (b <= 3.55d+115) then
tmp = ((t * a) * (-4.0d0)) / c
else
tmp = b / (z * c)
end if
code = tmp
end function
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 <= -105000000000.0) {
tmp = ((1.0 / c) * b) / z;
} else if (b <= 3.55e+115) {
tmp = ((t * a) * -4.0) / c;
} else {
tmp = b / (z * c);
}
return tmp;
}
[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 <= -105000000000.0: tmp = ((1.0 / c) * b) / z elif b <= 3.55e+115: tmp = ((t * a) * -4.0) / c else: tmp = b / (z * c) return tmp
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 <= -105000000000.0) tmp = Float64(Float64(Float64(1.0 / c) * b) / z); elseif (b <= 3.55e+115) tmp = Float64(Float64(Float64(t * a) * -4.0) / c); else tmp = Float64(b / Float64(z * c)); end return tmp end
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 <= -105000000000.0)
tmp = ((1.0 / c) * b) / z;
elseif (b <= 3.55e+115)
tmp = ((t * a) * -4.0) / c;
else
tmp = 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. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -105000000000.0], N[(N[(N[(1.0 / c), $MachinePrecision] * b), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 3.55e+115], N[(N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision] / c), $MachinePrecision], 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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -105000000000:\\
\;\;\;\;\frac{\frac{1}{c} \cdot b}{z}\\
\mathbf{elif}\;b \leq 3.55 \cdot 10^{+115}:\\
\;\;\;\;\frac{\left(t \cdot a\right) \cdot -4}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if b < -1.05e11Initial program 89.5%
Simplified86.2%
Taylor expanded in b around inf 78.2%
*-commutative78.2%
Simplified78.2%
*-un-lft-identity78.2%
times-frac80.0%
Applied egg-rr80.0%
associate-*l/80.1%
*-un-lft-identity80.1%
Applied egg-rr80.1%
div-inv80.1%
*-un-lft-identity80.1%
times-frac78.2%
Applied egg-rr78.2%
/-rgt-identity78.2%
associate-*r/80.1%
Simplified80.1%
if -1.05e11 < b < 3.5499999999999998e115Initial program 79.0%
associate-+l-79.0%
*-commutative79.0%
associate-*r*75.7%
*-commutative75.7%
associate-+l-75.7%
associate-*l*75.8%
associate-*l*79.9%
*-commutative79.9%
Simplified79.9%
*-un-lft-identity79.9%
*-commutative79.9%
times-frac88.3%
associate-*r*88.3%
associate-*r*83.5%
associate-+l-83.5%
associate-*r*83.5%
associate-*r*88.3%
associate-*l*88.9%
Applied egg-rr88.9%
Taylor expanded in z around inf 51.3%
associate-*l/51.3%
*-un-lft-identity51.3%
Applied egg-rr51.3%
if 3.5499999999999998e115 < b Initial program 83.1%
Simplified88.5%
Taylor expanded in b around inf 59.6%
*-commutative59.6%
Simplified59.6%
Final simplification58.9%
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 -21000000000.0) (/ (/ b c) z) (if (<= b 7.7e+102) (/ (* (* t a) -4.0) c) (/ b (* z 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 <= -21000000000.0) {
tmp = (b / c) / z;
} else if (b <= 7.7e+102) {
tmp = ((t * a) * -4.0) / c;
} else {
tmp = b / (z * c);
}
return tmp;
}
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 <= (-21000000000.0d0)) then
tmp = (b / c) / z
else if (b <= 7.7d+102) then
tmp = ((t * a) * (-4.0d0)) / c
else
tmp = b / (z * c)
end if
code = tmp
end function
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 <= -21000000000.0) {
tmp = (b / c) / z;
} else if (b <= 7.7e+102) {
tmp = ((t * a) * -4.0) / c;
} else {
tmp = b / (z * c);
}
return tmp;
}
[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 <= -21000000000.0: tmp = (b / c) / z elif b <= 7.7e+102: tmp = ((t * a) * -4.0) / c else: tmp = b / (z * c) return tmp
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 <= -21000000000.0) tmp = Float64(Float64(b / c) / z); elseif (b <= 7.7e+102) tmp = Float64(Float64(Float64(t * a) * -4.0) / c); else tmp = Float64(b / Float64(z * c)); end return tmp end
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 <= -21000000000.0)
tmp = (b / c) / z;
elseif (b <= 7.7e+102)
tmp = ((t * a) * -4.0) / c;
else
tmp = 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. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -21000000000.0], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 7.7e+102], N[(N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision] / c), $MachinePrecision], 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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -21000000000:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;b \leq 7.7 \cdot 10^{+102}:\\
\;\;\;\;\frac{\left(t \cdot a\right) \cdot -4}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if b < -2.1e10Initial program 89.5%
Simplified86.2%
Taylor expanded in b around inf 78.2%
*-commutative78.2%
Simplified78.2%
*-un-lft-identity78.2%
times-frac80.0%
Applied egg-rr80.0%
associate-*l/80.1%
*-un-lft-identity80.1%
Applied egg-rr80.1%
if -2.1e10 < b < 7.70000000000000013e102Initial program 79.0%
associate-+l-79.0%
*-commutative79.0%
associate-*r*75.7%
*-commutative75.7%
associate-+l-75.7%
associate-*l*75.8%
associate-*l*79.9%
*-commutative79.9%
Simplified79.9%
*-un-lft-identity79.9%
*-commutative79.9%
times-frac88.3%
associate-*r*88.3%
associate-*r*83.5%
associate-+l-83.5%
associate-*r*83.5%
associate-*r*88.3%
associate-*l*88.9%
Applied egg-rr88.9%
Taylor expanded in z around inf 51.3%
associate-*l/51.3%
*-un-lft-identity51.3%
Applied egg-rr51.3%
if 7.70000000000000013e102 < b Initial program 83.1%
Simplified88.5%
Taylor expanded in b around inf 59.6%
*-commutative59.6%
Simplified59.6%
Final simplification58.8%
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 -15500000000.0) (/ (/ b c) z) (if (<= b 8.5e+102) (* -4.0 (/ (* t a) c)) (/ b (* z 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 <= -15500000000.0) {
tmp = (b / c) / z;
} else if (b <= 8.5e+102) {
tmp = -4.0 * ((t * a) / c);
} else {
tmp = b / (z * c);
}
return tmp;
}
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 <= (-15500000000.0d0)) then
tmp = (b / c) / z
else if (b <= 8.5d+102) then
tmp = (-4.0d0) * ((t * a) / c)
else
tmp = b / (z * c)
end if
code = tmp
end function
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 <= -15500000000.0) {
tmp = (b / c) / z;
} else if (b <= 8.5e+102) {
tmp = -4.0 * ((t * a) / c);
} else {
tmp = b / (z * c);
}
return tmp;
}
[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 <= -15500000000.0: tmp = (b / c) / z elif b <= 8.5e+102: tmp = -4.0 * ((t * a) / c) else: tmp = b / (z * c) return tmp
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 <= -15500000000.0) tmp = Float64(Float64(b / c) / z); elseif (b <= 8.5e+102) tmp = Float64(-4.0 * Float64(Float64(t * a) / c)); else tmp = Float64(b / Float64(z * c)); end return tmp end
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 <= -15500000000.0)
tmp = (b / c) / z;
elseif (b <= 8.5e+102)
tmp = -4.0 * ((t * a) / c);
else
tmp = 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. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -15500000000.0], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 8.5e+102], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], 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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -15500000000:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;b \leq 8.5 \cdot 10^{+102}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if b < -1.55e10Initial program 89.5%
Simplified86.2%
Taylor expanded in b around inf 78.2%
*-commutative78.2%
Simplified78.2%
*-un-lft-identity78.2%
times-frac80.0%
Applied egg-rr80.0%
associate-*l/80.1%
*-un-lft-identity80.1%
Applied egg-rr80.1%
if -1.55e10 < b < 8.4999999999999996e102Initial program 79.0%
Simplified76.4%
Taylor expanded in t around inf 51.3%
if 8.4999999999999996e102 < b Initial program 83.1%
Simplified88.5%
Taylor expanded in b around inf 59.6%
*-commutative59.6%
Simplified59.6%
Final simplification58.8%
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 -430000000000.0) (/ (/ b c) z) (if (<= b 2.3e+110) (* -4.0 (* t (/ a c))) (/ b (* z 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 <= -430000000000.0) {
tmp = (b / c) / z;
} else if (b <= 2.3e+110) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = b / (z * c);
}
return tmp;
}
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 <= (-430000000000.0d0)) then
tmp = (b / c) / z
else if (b <= 2.3d+110) then
tmp = (-4.0d0) * (t * (a / c))
else
tmp = b / (z * c)
end if
code = tmp
end function
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 <= -430000000000.0) {
tmp = (b / c) / z;
} else if (b <= 2.3e+110) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = b / (z * c);
}
return tmp;
}
[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 <= -430000000000.0: tmp = (b / c) / z elif b <= 2.3e+110: tmp = -4.0 * (t * (a / c)) else: tmp = b / (z * c) return tmp
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 <= -430000000000.0) tmp = Float64(Float64(b / c) / z); elseif (b <= 2.3e+110) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); else tmp = Float64(b / Float64(z * c)); end return tmp end
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 <= -430000000000.0)
tmp = (b / c) / z;
elseif (b <= 2.3e+110)
tmp = -4.0 * (t * (a / c));
else
tmp = 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. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -430000000000.0], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 2.3e+110], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -430000000000:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;b \leq 2.3 \cdot 10^{+110}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if b < -4.3e11Initial program 89.5%
Simplified86.2%
Taylor expanded in b around inf 78.2%
*-commutative78.2%
Simplified78.2%
*-un-lft-identity78.2%
times-frac80.0%
Applied egg-rr80.0%
associate-*l/80.1%
*-un-lft-identity80.1%
Applied egg-rr80.1%
if -4.3e11 < b < 2.3e110Initial program 79.0%
Simplified76.4%
Taylor expanded in t around inf 51.3%
associate-*r/51.3%
associate-*r*51.3%
associate-*l/49.3%
associate-*r/49.3%
associate-*l*49.3%
Simplified49.3%
if 2.3e110 < b Initial program 83.1%
Simplified88.5%
Taylor expanded in b around inf 59.6%
*-commutative59.6%
Simplified59.6%
Final simplification57.5%
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 -14500000000.0) (/ (/ b c) z) (if (<= b 5.2e+108) (* -4.0 (* a (/ t c))) (/ b (* z 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 <= -14500000000.0) {
tmp = (b / c) / z;
} else if (b <= 5.2e+108) {
tmp = -4.0 * (a * (t / c));
} else {
tmp = b / (z * c);
}
return tmp;
}
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 <= (-14500000000.0d0)) then
tmp = (b / c) / z
else if (b <= 5.2d+108) then
tmp = (-4.0d0) * (a * (t / c))
else
tmp = b / (z * c)
end if
code = tmp
end function
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 <= -14500000000.0) {
tmp = (b / c) / z;
} else if (b <= 5.2e+108) {
tmp = -4.0 * (a * (t / c));
} else {
tmp = b / (z * c);
}
return tmp;
}
[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 <= -14500000000.0: tmp = (b / c) / z elif b <= 5.2e+108: tmp = -4.0 * (a * (t / c)) else: tmp = b / (z * c) return tmp
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 <= -14500000000.0) tmp = Float64(Float64(b / c) / z); elseif (b <= 5.2e+108) tmp = Float64(-4.0 * Float64(a * Float64(t / c))); else tmp = Float64(b / Float64(z * c)); end return tmp end
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 <= -14500000000.0)
tmp = (b / c) / z;
elseif (b <= 5.2e+108)
tmp = -4.0 * (a * (t / c));
else
tmp = 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. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -14500000000.0], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 5.2e+108], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -14500000000:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;b \leq 5.2 \cdot 10^{+108}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if b < -1.45e10Initial program 89.5%
Simplified86.2%
Taylor expanded in b around inf 78.2%
*-commutative78.2%
Simplified78.2%
*-un-lft-identity78.2%
times-frac80.0%
Applied egg-rr80.0%
associate-*l/80.1%
*-un-lft-identity80.1%
Applied egg-rr80.1%
if -1.45e10 < b < 5.2000000000000005e108Initial program 79.0%
Simplified76.4%
Taylor expanded in t around inf 51.3%
associate-/l*51.0%
Simplified51.0%
if 5.2000000000000005e108 < b Initial program 83.1%
Simplified88.5%
Taylor expanded in b around inf 59.6%
*-commutative59.6%
Simplified59.6%
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);
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.
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;
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]) 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]) 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])){:}
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. 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])\\
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 81.9%
Simplified80.2%
Taylor expanded in b around inf 38.7%
*-commutative38.7%
Simplified38.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 2024146
(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)))