
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -2.8e+55) (not (<= z 2e-49))) (/ (- (* y (+ (* 9.0 (/ x z)) (/ b (* z y)))) (* 4.0 (* a t))) c) (/ (+ b (fma x (* y 9.0) (* t (* a (* z -4.0))))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.8e+55) || !(z <= 2e-49)) {
tmp = ((y * ((9.0 * (x / z)) + (b / (z * y)))) - (4.0 * (a * t))) / c;
} else {
tmp = (b + fma(x, (y * 9.0), (t * (a * (z * -4.0))))) / (z * c);
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -2.8e+55) || !(z <= 2e-49)) tmp = Float64(Float64(Float64(y * Float64(Float64(9.0 * Float64(x / z)) + Float64(b / Float64(z * y)))) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(b + fma(x, Float64(y * 9.0), Float64(t * Float64(a * Float64(z * -4.0))))) / Float64(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_] := If[Or[LessEqual[z, -2.8e+55], N[Not[LessEqual[z, 2e-49]], $MachinePrecision]], N[(N[(N[(y * N[(N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(b / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(x * N[(y * 9.0), $MachinePrecision] + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+55} \lor \neg \left(z \leq 2 \cdot 10^{-49}\right):\\
\;\;\;\;\frac{y \cdot \left(9 \cdot \frac{x}{z} + \frac{b}{z \cdot y}\right) - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \mathsf{fma}\left(x, y \cdot 9, t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -2.8000000000000001e55 or 1.99999999999999987e-49 < z Initial program 67.9%
associate-+l-67.9%
*-commutative67.9%
associate-*r*68.5%
*-commutative68.5%
associate-+l-68.5%
associate-*l*68.4%
associate-*l*71.8%
*-commutative71.8%
Simplified71.8%
Taylor expanded in x around 0 83.2%
Taylor expanded in c around 0 89.7%
Taylor expanded in y around inf 92.8%
if -2.8000000000000001e55 < z < 1.99999999999999987e-49Initial program 96.8%
associate-+l-96.8%
*-commutative96.8%
associate-*r*96.3%
*-commutative96.3%
associate-+l-96.3%
Simplified96.3%
Final simplification94.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 (<= z -2.8e+55) (not (<= z 2e-49))) (/ (- (* y (+ (* 9.0 (/ x z)) (/ b (* z y)))) (* 4.0 (* a t))) c) (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.8e+55) || !(z <= 2e-49)) {
tmp = ((y * ((9.0 * (x / z)) + (b / (z * y)))) - (4.0 * (a * t))) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-2.8d+55)) .or. (.not. (z <= 2d-49))) then
tmp = ((y * ((9.0d0 * (x / z)) + (b / (z * y)))) - (4.0d0 * (a * t))) / c
else
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.8e+55) || !(z <= 2e-49)) {
tmp = ((y * ((9.0 * (x / z)) + (b / (z * y)))) - (4.0 * (a * t))) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -2.8e+55) or not (z <= 2e-49): tmp = ((y * ((9.0 * (x / z)) + (b / (z * y)))) - (4.0 * (a * t))) / c else: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -2.8e+55) || !(z <= 2e-49)) tmp = Float64(Float64(Float64(y * Float64(Float64(9.0 * Float64(x / z)) + Float64(b / Float64(z * y)))) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -2.8e+55) || ~((z <= 2e-49)))
tmp = ((y * ((9.0 * (x / z)) + (b / (z * y)))) - (4.0 * (a * t))) / c;
else
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -2.8e+55], N[Not[LessEqual[z, 2e-49]], $MachinePrecision]], N[(N[(N[(y * N[(N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(b / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+55} \lor \neg \left(z \leq 2 \cdot 10^{-49}\right):\\
\;\;\;\;\frac{y \cdot \left(9 \cdot \frac{x}{z} + \frac{b}{z \cdot y}\right) - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -2.8000000000000001e55 or 1.99999999999999987e-49 < z Initial program 67.9%
associate-+l-67.9%
*-commutative67.9%
associate-*r*68.5%
*-commutative68.5%
associate-+l-68.5%
associate-*l*68.4%
associate-*l*71.8%
*-commutative71.8%
Simplified71.8%
Taylor expanded in x around 0 83.2%
Taylor expanded in c around 0 89.7%
Taylor expanded in y around inf 92.8%
if -2.8000000000000001e55 < z < 1.99999999999999987e-49Initial program 96.8%
Final simplification94.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 (<= y -7.2e-89)
(* x (* y (/ 9.0 (* z c))))
(if (<= y 1.15e-168)
(/ b (* z c))
(if (<= y 6.8e+72)
(/ (* a (* t -4.0)) c)
(if (<= y 1.35e+90)
(* b (/ 1.0 (* z c)))
(* 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 (y <= -7.2e-89) {
tmp = x * (y * (9.0 / (z * c)));
} else if (y <= 1.15e-168) {
tmp = b / (z * c);
} else if (y <= 6.8e+72) {
tmp = (a * (t * -4.0)) / c;
} else if (y <= 1.35e+90) {
tmp = b * (1.0 / (z * c));
} else {
tmp = 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 (y <= (-7.2d-89)) then
tmp = x * (y * (9.0d0 / (z * c)))
else if (y <= 1.15d-168) then
tmp = b / (z * c)
else if (y <= 6.8d+72) then
tmp = (a * (t * (-4.0d0))) / c
else if (y <= 1.35d+90) then
tmp = b * (1.0d0 / (z * c))
else
tmp = 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 (y <= -7.2e-89) {
tmp = x * (y * (9.0 / (z * c)));
} else if (y <= 1.15e-168) {
tmp = b / (z * c);
} else if (y <= 6.8e+72) {
tmp = (a * (t * -4.0)) / c;
} else if (y <= 1.35e+90) {
tmp = b * (1.0 / (z * c));
} else {
tmp = 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 y <= -7.2e-89: tmp = x * (y * (9.0 / (z * c))) elif y <= 1.15e-168: tmp = b / (z * c) elif y <= 6.8e+72: tmp = (a * (t * -4.0)) / c elif y <= 1.35e+90: tmp = b * (1.0 / (z * c)) else: tmp = 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 (y <= -7.2e-89) tmp = Float64(x * Float64(y * Float64(9.0 / Float64(z * c)))); elseif (y <= 1.15e-168) tmp = Float64(b / Float64(z * c)); elseif (y <= 6.8e+72) tmp = Float64(Float64(a * Float64(t * -4.0)) / c); elseif (y <= 1.35e+90) tmp = Float64(b * Float64(1.0 / Float64(z * c))); else tmp = Float64(y * Float64(9.0 * Float64(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 (y <= -7.2e-89)
tmp = x * (y * (9.0 / (z * c)));
elseif (y <= 1.15e-168)
tmp = b / (z * c);
elseif (y <= 6.8e+72)
tmp = (a * (t * -4.0)) / c;
elseif (y <= 1.35e+90)
tmp = b * (1.0 / (z * c));
else
tmp = 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[LessEqual[y, -7.2e-89], N[(x * N[(y * N[(9.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e-168], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e+72], N[(N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[y, 1.35e+90], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(9.0 * N[(x / N[(z * c), $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}\;y \leq -7.2 \cdot 10^{-89}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{9}{z \cdot c}\right)\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-168}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+72}:\\
\;\;\;\;\frac{a \cdot \left(t \cdot -4\right)}{c}\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+90}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(9 \cdot \frac{x}{z \cdot c}\right)\\
\end{array}
\end{array}
if y < -7.20000000000000014e-89Initial program 79.6%
associate-+l-79.6%
*-commutative79.6%
associate-*r*79.6%
*-commutative79.6%
associate-+l-79.6%
Simplified82.1%
Taylor expanded in x around inf 45.4%
*-commutative45.4%
associate-/l*46.7%
associate-*l*46.7%
*-commutative46.7%
associate-*r/46.7%
*-commutative46.7%
associate-/l*46.7%
*-commutative46.7%
Simplified46.7%
if -7.20000000000000014e-89 < y < 1.14999999999999993e-168Initial program 86.1%
associate-+l-86.1%
*-commutative86.1%
associate-*r*86.4%
*-commutative86.4%
associate-+l-86.4%
Simplified86.4%
Taylor expanded in b around inf 54.0%
*-commutative54.0%
Simplified54.0%
if 1.14999999999999993e-168 < y < 6.7999999999999997e72Initial program 84.0%
associate-+l-84.0%
*-commutative84.0%
associate-*r*81.8%
*-commutative81.8%
associate-+l-81.8%
associate-*l*81.8%
associate-*l*80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in x around 0 81.6%
Taylor expanded in z around inf 54.3%
associate-*r/54.3%
*-commutative54.3%
associate-*l*54.3%
Simplified54.3%
if 6.7999999999999997e72 < y < 1.35e90Initial program 100.0%
associate-+l-100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-+l-100.0%
Simplified100.0%
Taylor expanded in b around inf 100.0%
*-commutative100.0%
Simplified100.0%
div-inv100.0%
*-commutative100.0%
Applied egg-rr100.0%
if 1.35e90 < y Initial program 78.8%
associate-+l-78.8%
*-commutative78.8%
associate-*r*81.3%
*-commutative81.3%
associate-+l-81.3%
Simplified81.3%
Taylor expanded in x around inf 63.6%
associate-/l*66.1%
*-commutative66.1%
Simplified66.1%
associate-*r*66.2%
clear-num66.2%
un-div-inv67.8%
*-commutative67.8%
Applied egg-rr67.8%
associate-/r/68.7%
associate-*r/68.8%
Simplified68.8%
Final simplification54.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -1.05e-52) (not (<= z 1.3e-83))) (/ (- (/ (+ b (* 9.0 (* y x))) z) (* 4.0 (* a t))) c) (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.05e-52) || !(z <= 1.3e-83)) {
tmp = (((b + (9.0 * (y * x))) / z) - (4.0 * (a * t))) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-1.05d-52)) .or. (.not. (z <= 1.3d-83))) then
tmp = (((b + (9.0d0 * (y * x))) / z) - (4.0d0 * (a * t))) / c
else
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.05e-52) || !(z <= 1.3e-83)) {
tmp = (((b + (9.0 * (y * x))) / z) - (4.0 * (a * t))) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1.05e-52) or not (z <= 1.3e-83): tmp = (((b + (9.0 * (y * x))) / z) - (4.0 * (a * t))) / c else: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1.05e-52) || !(z <= 1.3e-83)) tmp = Float64(Float64(Float64(Float64(b + Float64(9.0 * Float64(y * x))) / z) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -1.05e-52) || ~((z <= 1.3e-83)))
tmp = (((b + (9.0 * (y * x))) / z) - (4.0 * (a * t))) / c;
else
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.05e-52], N[Not[LessEqual[z, 1.3e-83]], $MachinePrecision]], N[(N[(N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{-52} \lor \neg \left(z \leq 1.3 \cdot 10^{-83}\right):\\
\;\;\;\;\frac{\frac{b + 9 \cdot \left(y \cdot x\right)}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.0499999999999999e-52 or 1.30000000000000004e-83 < z Initial program 74.0%
associate-+l-74.0%
*-commutative74.0%
associate-*r*74.2%
*-commutative74.2%
associate-+l-74.2%
associate-*l*74.1%
associate-*l*77.1%
*-commutative77.1%
Simplified77.1%
Taylor expanded in x around 0 84.6%
Taylor expanded in c around 0 90.9%
Taylor expanded in z around 0 90.9%
if -1.0499999999999999e-52 < z < 1.30000000000000004e-83Initial program 97.6%
Final simplification93.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 4.0 (* a t))))
(if (<= z -1e-52)
(/ (- (/ (+ b (* 9.0 (* y x))) z) t_1) c)
(if (<= z 1.3e-133)
(/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))
(/ (- (+ (* 9.0 (/ (* y x) z)) (/ b z)) t_1) c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 4.0 * (a * t);
double tmp;
if (z <= -1e-52) {
tmp = (((b + (9.0 * (y * x))) / z) - t_1) / c;
} else if (z <= 1.3e-133) {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = (((9.0 * ((y * x) / z)) + (b / z)) - t_1) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = 4.0d0 * (a * t)
if (z <= (-1d-52)) then
tmp = (((b + (9.0d0 * (y * x))) / z) - t_1) / c
else if (z <= 1.3d-133) then
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (z * c)
else
tmp = (((9.0d0 * ((y * x) / z)) + (b / z)) - t_1) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 4.0 * (a * t);
double tmp;
if (z <= -1e-52) {
tmp = (((b + (9.0 * (y * x))) / z) - t_1) / c;
} else if (z <= 1.3e-133) {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = (((9.0 * ((y * x) / z)) + (b / z)) - t_1) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = 4.0 * (a * t) tmp = 0 if z <= -1e-52: tmp = (((b + (9.0 * (y * x))) / z) - t_1) / c elif z <= 1.3e-133: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c) else: tmp = (((9.0 * ((y * x) / z)) + (b / z)) - t_1) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(4.0 * Float64(a * t)) tmp = 0.0 if (z <= -1e-52) tmp = Float64(Float64(Float64(Float64(b + Float64(9.0 * Float64(y * x))) / z) - t_1) / c); elseif (z <= 1.3e-133) tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); else tmp = Float64(Float64(Float64(Float64(9.0 * Float64(Float64(y * x) / z)) + Float64(b / z)) - t_1) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = 4.0 * (a * t);
tmp = 0.0;
if (z <= -1e-52)
tmp = (((b + (9.0 * (y * x))) / z) - t_1) / c;
elseif (z <= 1.3e-133)
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
else
tmp = (((9.0 * ((y * x) / z)) + (b / z)) - t_1) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e-52], N[(N[(N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - t$95$1), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 1.3e-133], 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], N[(N[(N[(N[(9.0 * N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] / c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(a \cdot t\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{-52}:\\
\;\;\;\;\frac{\frac{b + 9 \cdot \left(y \cdot x\right)}{z} - t\_1}{c}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-133}:\\
\;\;\;\;\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{else}:\\
\;\;\;\;\frac{\left(9 \cdot \frac{y \cdot x}{z} + \frac{b}{z}\right) - t\_1}{c}\\
\end{array}
\end{array}
if z < -1e-52Initial program 73.4%
associate-+l-73.4%
*-commutative73.4%
associate-*r*73.8%
*-commutative73.8%
associate-+l-73.8%
associate-*l*73.7%
associate-*l*77.1%
*-commutative77.1%
Simplified77.1%
Taylor expanded in x around 0 84.5%
Taylor expanded in c around 0 88.5%
Taylor expanded in z around 0 88.5%
if -1e-52 < z < 1.3e-133Initial program 97.4%
if 1.3e-133 < z Initial program 77.1%
associate-+l-77.1%
*-commutative77.1%
associate-*r*76.9%
*-commutative76.9%
associate-+l-76.9%
associate-*l*76.9%
associate-*l*79.2%
*-commutative79.2%
Simplified79.2%
Taylor expanded in x around 0 86.1%
Taylor expanded in c around 0 93.7%
Final simplification93.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -1.45e-201) (not (<= z 1.6e-181))) (/ (- (/ (+ b (* 9.0 (* y x))) z) (* 4.0 (* a t))) c) (/ (+ (* 9.0 (/ (* y x) 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 ((z <= -1.45e-201) || !(z <= 1.6e-181)) {
tmp = (((b + (9.0 * (y * x))) / z) - (4.0 * (a * t))) / c;
} else {
tmp = ((9.0 * ((y * x) / c)) + (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 ((z <= (-1.45d-201)) .or. (.not. (z <= 1.6d-181))) then
tmp = (((b + (9.0d0 * (y * x))) / z) - (4.0d0 * (a * t))) / c
else
tmp = ((9.0d0 * ((y * x) / c)) + (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 ((z <= -1.45e-201) || !(z <= 1.6e-181)) {
tmp = (((b + (9.0 * (y * x))) / z) - (4.0 * (a * t))) / c;
} else {
tmp = ((9.0 * ((y * x) / 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]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1.45e-201) or not (z <= 1.6e-181): tmp = (((b + (9.0 * (y * x))) / z) - (4.0 * (a * t))) / c else: tmp = ((9.0 * ((y * x) / 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 ((z <= -1.45e-201) || !(z <= 1.6e-181)) tmp = Float64(Float64(Float64(Float64(b + Float64(9.0 * Float64(y * x))) / z) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y * x) / c)) + 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 ((z <= -1.45e-201) || ~((z <= 1.6e-181)))
tmp = (((b + (9.0 * (y * x))) / z) - (4.0 * (a * t))) / c;
else
tmp = ((9.0 * ((y * x) / c)) + (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[Or[LessEqual[z, -1.45e-201], N[Not[LessEqual[z, 1.6e-181]], $MachinePrecision]], N[(N[(N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(N[(9.0 * N[(N[(y * x), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(b / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{-201} \lor \neg \left(z \leq 1.6 \cdot 10^{-181}\right):\\
\;\;\;\;\frac{\frac{b + 9 \cdot \left(y \cdot x\right)}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{9 \cdot \frac{y \cdot x}{c} + \frac{b}{c}}{z}\\
\end{array}
\end{array}
if z < -1.4500000000000001e-201 or 1.6000000000000001e-181 < z Initial program 79.6%
associate-+l-79.6%
*-commutative79.6%
associate-*r*79.7%
*-commutative79.7%
associate-+l-79.7%
associate-*l*79.6%
associate-*l*80.1%
*-commutative80.1%
Simplified80.1%
Taylor expanded in x around 0 82.6%
Taylor expanded in c around 0 89.4%
Taylor expanded in z around 0 89.8%
if -1.4500000000000001e-201 < z < 1.6000000000000001e-181Initial program 97.7%
associate-+l-97.7%
*-commutative97.7%
associate-*r*97.7%
*-commutative97.7%
associate-+l-97.7%
associate-*l*97.6%
associate-*l*89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in x around 0 67.0%
Taylor expanded in z around 0 91.1%
Final simplification90.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 -9.8e-92)
(* x (* y (/ 9.0 (* z c))))
(if (<= y 6.2e-169)
(/ b (* z c))
(if (<= y 1.9e+72) (/ (* a (* t -4.0)) c) (* 9.0 (* x (/ y (* 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 (y <= -9.8e-92) {
tmp = x * (y * (9.0 / (z * c)));
} else if (y <= 6.2e-169) {
tmp = b / (z * c);
} else if (y <= 1.9e+72) {
tmp = (a * (t * -4.0)) / c;
} else {
tmp = 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.
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 <= (-9.8d-92)) then
tmp = x * (y * (9.0d0 / (z * c)))
else if (y <= 6.2d-169) then
tmp = b / (z * c)
else if (y <= 1.9d+72) then
tmp = (a * (t * (-4.0d0))) / c
else
tmp = 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;
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 <= -9.8e-92) {
tmp = x * (y * (9.0 / (z * c)));
} else if (y <= 6.2e-169) {
tmp = b / (z * c);
} else if (y <= 1.9e+72) {
tmp = (a * (t * -4.0)) / c;
} else {
tmp = 9.0 * (x * (y / (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 y <= -9.8e-92: tmp = x * (y * (9.0 / (z * c))) elif y <= 6.2e-169: tmp = b / (z * c) elif y <= 1.9e+72: tmp = (a * (t * -4.0)) / c else: tmp = 9.0 * (x * (y / (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 (y <= -9.8e-92) tmp = Float64(x * Float64(y * Float64(9.0 / Float64(z * c)))); elseif (y <= 6.2e-169) tmp = Float64(b / Float64(z * c)); elseif (y <= 1.9e+72) tmp = Float64(Float64(a * Float64(t * -4.0)) / c); else tmp = Float64(9.0 * Float64(x * Float64(y / 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 (y <= -9.8e-92)
tmp = x * (y * (9.0 / (z * c)));
elseif (y <= 6.2e-169)
tmp = b / (z * c);
elseif (y <= 1.9e+72)
tmp = (a * (t * -4.0)) / c;
else
tmp = 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. 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, -9.8e-92], N[(x * N[(y * N[(9.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e-169], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e+72], N[(N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(9.0 * N[(x * N[(y / N[(z * c), $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}\;y \leq -9.8 \cdot 10^{-92}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{9}{z \cdot c}\right)\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-169}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+72}:\\
\;\;\;\;\frac{a \cdot \left(t \cdot -4\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\end{array}
\end{array}
if y < -9.8e-92Initial program 79.6%
associate-+l-79.6%
*-commutative79.6%
associate-*r*79.6%
*-commutative79.6%
associate-+l-79.6%
Simplified82.1%
Taylor expanded in x around inf 45.4%
*-commutative45.4%
associate-/l*46.7%
associate-*l*46.7%
*-commutative46.7%
associate-*r/46.7%
*-commutative46.7%
associate-/l*46.7%
*-commutative46.7%
Simplified46.7%
if -9.8e-92 < y < 6.2000000000000004e-169Initial program 86.1%
associate-+l-86.1%
*-commutative86.1%
associate-*r*86.4%
*-commutative86.4%
associate-+l-86.4%
Simplified86.4%
Taylor expanded in b around inf 54.0%
*-commutative54.0%
Simplified54.0%
if 6.2000000000000004e-169 < y < 1.90000000000000003e72Initial program 84.0%
associate-+l-84.0%
*-commutative84.0%
associate-*r*81.8%
*-commutative81.8%
associate-+l-81.8%
associate-*l*81.8%
associate-*l*80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in x around 0 81.6%
Taylor expanded in z around inf 54.3%
associate-*r/54.3%
*-commutative54.3%
associate-*l*54.3%
Simplified54.3%
if 1.90000000000000003e72 < y Initial program 79.9%
associate-+l-79.9%
*-commutative79.9%
associate-*r*82.3%
*-commutative82.3%
associate-+l-82.3%
Simplified82.2%
Taylor expanded in x around inf 63.0%
associate-/l*65.4%
*-commutative65.4%
Simplified65.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 9.0 (* x (/ y (* z c))))))
(if (<= y -7.2e-89)
t_1
(if (<= y 3.5e-169)
(/ b (* z c))
(if (<= y 3.1e+72) (/ (* a (* t -4.0)) c) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (x * (y / (z * c)));
double tmp;
if (y <= -7.2e-89) {
tmp = t_1;
} else if (y <= 3.5e-169) {
tmp = b / (z * c);
} else if (y <= 3.1e+72) {
tmp = (a * (t * -4.0)) / c;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = 9.0d0 * (x * (y / (z * c)))
if (y <= (-7.2d-89)) then
tmp = t_1
else if (y <= 3.5d-169) then
tmp = b / (z * c)
else if (y <= 3.1d+72) then
tmp = (a * (t * (-4.0d0))) / c
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (x * (y / (z * c)));
double tmp;
if (y <= -7.2e-89) {
tmp = t_1;
} else if (y <= 3.5e-169) {
tmp = b / (z * c);
} else if (y <= 3.1e+72) {
tmp = (a * (t * -4.0)) / c;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = 9.0 * (x * (y / (z * c))) tmp = 0 if y <= -7.2e-89: tmp = t_1 elif y <= 3.5e-169: tmp = b / (z * c) elif y <= 3.1e+72: tmp = (a * (t * -4.0)) / c else: tmp = t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))) tmp = 0.0 if (y <= -7.2e-89) tmp = t_1; elseif (y <= 3.5e-169) tmp = Float64(b / Float64(z * c)); elseif (y <= 3.1e+72) tmp = Float64(Float64(a * Float64(t * -4.0)) / c); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = 9.0 * (x * (y / (z * c)));
tmp = 0.0;
if (y <= -7.2e-89)
tmp = t_1;
elseif (y <= 3.5e-169)
tmp = b / (z * c);
elseif (y <= 3.1e+72)
tmp = (a * (t * -4.0)) / c;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.2e-89], t$95$1, If[LessEqual[y, 3.5e-169], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e+72], N[(N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{if}\;y \leq -7.2 \cdot 10^{-89}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-169}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+72}:\\
\;\;\;\;\frac{a \cdot \left(t \cdot -4\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7.20000000000000014e-89 or 3.09999999999999988e72 < y Initial program 79.7%
associate-+l-79.7%
*-commutative79.7%
associate-*r*80.5%
*-commutative80.5%
associate-+l-80.5%
Simplified82.2%
Taylor expanded in x around inf 51.3%
associate-/l*53.0%
*-commutative53.0%
Simplified53.0%
if -7.20000000000000014e-89 < y < 3.5000000000000003e-169Initial program 86.1%
associate-+l-86.1%
*-commutative86.1%
associate-*r*86.4%
*-commutative86.4%
associate-+l-86.4%
Simplified86.4%
Taylor expanded in b around inf 54.0%
*-commutative54.0%
Simplified54.0%
if 3.5000000000000003e-169 < y < 3.09999999999999988e72Initial program 84.0%
associate-+l-84.0%
*-commutative84.0%
associate-*r*81.8%
*-commutative81.8%
associate-+l-81.8%
associate-*l*81.8%
associate-*l*80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in x around 0 81.6%
Taylor expanded in z around inf 54.3%
associate-*r/54.3%
*-commutative54.3%
associate-*l*54.3%
Simplified54.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 (<= y -8.5e-27) (* x (- (* 9.0 (/ y (* z c))) (* 4.0 (/ (* a t) (* x c))))) (/ (- (/ (+ b (* 9.0 (* y x))) z) (* 4.0 (* a 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 <= -8.5e-27) {
tmp = x * ((9.0 * (y / (z * c))) - (4.0 * ((a * t) / (x * c))));
} else {
tmp = (((b + (9.0 * (y * x))) / z) - (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.
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 <= (-8.5d-27)) then
tmp = x * ((9.0d0 * (y / (z * c))) - (4.0d0 * ((a * t) / (x * c))))
else
tmp = (((b + (9.0d0 * (y * x))) / z) - (4.0d0 * (a * 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 <= -8.5e-27) {
tmp = x * ((9.0 * (y / (z * c))) - (4.0 * ((a * t) / (x * c))));
} else {
tmp = (((b + (9.0 * (y * x))) / z) - (4.0 * (a * 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 <= -8.5e-27: tmp = x * ((9.0 * (y / (z * c))) - (4.0 * ((a * t) / (x * c)))) else: tmp = (((b + (9.0 * (y * x))) / z) - (4.0 * (a * 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 <= -8.5e-27) tmp = Float64(x * Float64(Float64(9.0 * Float64(y / Float64(z * c))) - Float64(4.0 * Float64(Float64(a * t) / Float64(x * c))))); else tmp = Float64(Float64(Float64(Float64(b + Float64(9.0 * Float64(y * x))) / z) - Float64(4.0 * Float64(a * 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 <= -8.5e-27)
tmp = x * ((9.0 * (y / (z * c))) - (4.0 * ((a * t) / (x * c))));
else
tmp = (((b + (9.0 * (y * x))) / z) - (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. 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, -8.5e-27], N[(x * N[(N[(9.0 * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / N[(x * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - N[(4.0 * N[(a * t), $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}\;y \leq -8.5 \cdot 10^{-27}:\\
\;\;\;\;x \cdot \left(9 \cdot \frac{y}{z \cdot c} - 4 \cdot \frac{a \cdot t}{x \cdot c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b + 9 \cdot \left(y \cdot x\right)}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\end{array}
\end{array}
if y < -8.50000000000000033e-27Initial program 77.4%
associate-+l-77.4%
*-commutative77.4%
associate-*r*75.9%
*-commutative75.9%
associate-+l-75.9%
associate-*l*75.8%
associate-*l*76.0%
*-commutative76.0%
Simplified76.0%
Taylor expanded in x around inf 66.7%
Taylor expanded in b around 0 63.8%
if -8.50000000000000033e-27 < y Initial program 84.6%
associate-+l-84.6%
*-commutative84.6%
associate-*r*85.2%
*-commutative85.2%
associate-+l-85.2%
associate-*l*85.2%
associate-*l*83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in x around 0 80.7%
Taylor expanded in c around 0 88.8%
Taylor expanded in z around 0 89.9%
Final simplification83.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 (<= z -4.8e+80) (not (<= z 9.4e-73))) (/ (- (/ b z) (* 4.0 (* a t))) c) (/ (+ b (* 9.0 (* y 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 <= -4.8e+80) || !(z <= 9.4e-73)) {
tmp = ((b / z) - (4.0 * (a * t))) / c;
} else {
tmp = (b + (9.0 * (y * 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 <= (-4.8d+80)) .or. (.not. (z <= 9.4d-73))) then
tmp = ((b / z) - (4.0d0 * (a * t))) / c
else
tmp = (b + (9.0d0 * (y * 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 <= -4.8e+80) || !(z <= 9.4e-73)) {
tmp = ((b / z) - (4.0 * (a * t))) / c;
} else {
tmp = (b + (9.0 * (y * 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 <= -4.8e+80) or not (z <= 9.4e-73): tmp = ((b / z) - (4.0 * (a * t))) / c else: tmp = (b + (9.0 * (y * 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 <= -4.8e+80) || !(z <= 9.4e-73)) tmp = Float64(Float64(Float64(b / z) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(b + Float64(9.0 * Float64(y * 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 <= -4.8e+80) || ~((z <= 9.4e-73)))
tmp = ((b / z) - (4.0 * (a * t))) / c;
else
tmp = (b + (9.0 * (y * 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, -4.8e+80], N[Not[LessEqual[z, 9.4e-73]], $MachinePrecision]], N[(N[(N[(b / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(9.0 * N[(y * 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 -4.8 \cdot 10^{+80} \lor \neg \left(z \leq 9.4 \cdot 10^{-73}\right):\\
\;\;\;\;\frac{\frac{b}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(y \cdot x\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -4.79999999999999958e80 or 9.39999999999999988e-73 < z Initial program 70.2%
associate-+l-70.2%
*-commutative70.2%
associate-*r*70.7%
*-commutative70.7%
associate-+l-70.7%
associate-*l*70.7%
associate-*l*74.0%
*-commutative74.0%
Simplified74.0%
Taylor expanded in x around 0 83.6%
Taylor expanded in c around 0 90.7%
Taylor expanded in x around 0 79.1%
if -4.79999999999999958e80 < z < 9.39999999999999988e-73Initial program 95.2%
associate-+l-95.2%
*-commutative95.2%
associate-*r*94.8%
*-commutative94.8%
associate-+l-94.8%
Simplified94.7%
Taylor expanded in t around 0 81.0%
+-commutative81.0%
*-commutative81.0%
Simplified81.0%
Final simplification80.1%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -1.5e+81) (not (<= z 3.05e+180))) (* -4.0 (/ (* a t) c)) (/ (+ b (* 9.0 (* y 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 <= -1.5e+81) || !(z <= 3.05e+180)) {
tmp = -4.0 * ((a * t) / c);
} else {
tmp = (b + (9.0 * (y * 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 <= (-1.5d+81)) .or. (.not. (z <= 3.05d+180))) then
tmp = (-4.0d0) * ((a * t) / c)
else
tmp = (b + (9.0d0 * (y * 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 <= -1.5e+81) || !(z <= 3.05e+180)) {
tmp = -4.0 * ((a * t) / c);
} else {
tmp = (b + (9.0 * (y * 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 <= -1.5e+81) or not (z <= 3.05e+180): tmp = -4.0 * ((a * t) / c) else: tmp = (b + (9.0 * (y * 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 <= -1.5e+81) || !(z <= 3.05e+180)) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); else tmp = Float64(Float64(b + Float64(9.0 * Float64(y * 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 <= -1.5e+81) || ~((z <= 3.05e+180)))
tmp = -4.0 * ((a * t) / c);
else
tmp = (b + (9.0 * (y * 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, -1.5e+81], N[Not[LessEqual[z, 3.05e+180]], $MachinePrecision]], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(9.0 * N[(y * 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 -1.5 \cdot 10^{+81} \lor \neg \left(z \leq 3.05 \cdot 10^{+180}\right):\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(y \cdot x\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.49999999999999999e81 or 3.05e180 < z Initial program 60.0%
associate-+l-60.0%
*-commutative60.0%
associate-*r*61.0%
*-commutative61.0%
associate-+l-61.0%
Simplified63.7%
Taylor expanded in t around inf 76.4%
if -1.49999999999999999e81 < z < 3.05e180Initial program 91.9%
associate-+l-91.9%
*-commutative91.9%
associate-*r*91.5%
*-commutative91.5%
associate-+l-91.5%
Simplified91.5%
Taylor expanded in t around 0 75.6%
+-commutative75.6%
*-commutative75.6%
Simplified75.6%
Final simplification75.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 4.0 (* a t))))
(if (<= z -5.7e+60)
(/ (- (* x (* 9.0 (/ y z))) t_1) c)
(if (<= z 1.45e-73)
(/ (+ b (* 9.0 (* y x))) (* z c))
(/ (- (/ b z) t_1) c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 4.0 * (a * t);
double tmp;
if (z <= -5.7e+60) {
tmp = ((x * (9.0 * (y / z))) - t_1) / c;
} else if (z <= 1.45e-73) {
tmp = (b + (9.0 * (y * x))) / (z * c);
} else {
tmp = ((b / z) - t_1) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = 4.0d0 * (a * t)
if (z <= (-5.7d+60)) then
tmp = ((x * (9.0d0 * (y / z))) - t_1) / c
else if (z <= 1.45d-73) then
tmp = (b + (9.0d0 * (y * x))) / (z * c)
else
tmp = ((b / z) - t_1) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 4.0 * (a * t);
double tmp;
if (z <= -5.7e+60) {
tmp = ((x * (9.0 * (y / z))) - t_1) / c;
} else if (z <= 1.45e-73) {
tmp = (b + (9.0 * (y * x))) / (z * c);
} else {
tmp = ((b / z) - t_1) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = 4.0 * (a * t) tmp = 0 if z <= -5.7e+60: tmp = ((x * (9.0 * (y / z))) - t_1) / c elif z <= 1.45e-73: tmp = (b + (9.0 * (y * x))) / (z * c) else: tmp = ((b / z) - t_1) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(4.0 * Float64(a * t)) tmp = 0.0 if (z <= -5.7e+60) tmp = Float64(Float64(Float64(x * Float64(9.0 * Float64(y / z))) - t_1) / c); elseif (z <= 1.45e-73) tmp = Float64(Float64(b + Float64(9.0 * Float64(y * x))) / Float64(z * c)); else tmp = Float64(Float64(Float64(b / z) - t_1) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = 4.0 * (a * t);
tmp = 0.0;
if (z <= -5.7e+60)
tmp = ((x * (9.0 * (y / z))) - t_1) / c;
elseif (z <= 1.45e-73)
tmp = (b + (9.0 * (y * x))) / (z * c);
else
tmp = ((b / z) - t_1) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.7e+60], N[(N[(N[(x * N[(9.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 1.45e-73], N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b / z), $MachinePrecision] - t$95$1), $MachinePrecision] / c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(a \cdot t\right)\\
\mathbf{if}\;z \leq -5.7 \cdot 10^{+60}:\\
\;\;\;\;\frac{x \cdot \left(9 \cdot \frac{y}{z}\right) - t\_1}{c}\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-73}:\\
\;\;\;\;\frac{b + 9 \cdot \left(y \cdot x\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z} - t\_1}{c}\\
\end{array}
\end{array}
if z < -5.69999999999999978e60Initial program 62.9%
associate-+l-62.9%
*-commutative62.9%
associate-*r*64.6%
*-commutative64.6%
associate-+l-64.6%
associate-*l*64.5%
associate-*l*68.7%
*-commutative68.7%
Simplified68.7%
Taylor expanded in x around 0 82.1%
Taylor expanded in c around 0 86.1%
Taylor expanded in x around inf 74.5%
associate-*r/84.2%
*-commutative84.2%
associate-*r*84.3%
*-commutative84.3%
Simplified84.3%
if -5.69999999999999978e60 < z < 1.45e-73Initial program 96.5%
associate-+l-96.5%
*-commutative96.5%
associate-*r*96.1%
*-commutative96.1%
associate-+l-96.1%
Simplified96.0%
Taylor expanded in t around 0 81.6%
+-commutative81.6%
*-commutative81.6%
Simplified81.6%
if 1.45e-73 < z Initial program 74.4%
associate-+l-74.4%
*-commutative74.4%
associate-*r*74.2%
*-commutative74.2%
associate-+l-74.2%
associate-*l*74.2%
associate-*l*76.7%
*-commutative76.7%
Simplified76.7%
Taylor expanded in x around 0 84.5%
Taylor expanded in c around 0 93.0%
Taylor expanded in x around 0 78.4%
Final simplification81.1%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -3.25e+63) (not (<= z 1.14e-95))) (* -4.0 (/ (* a t) c)) (* b (/ 1.0 (* z c)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -3.25e+63) || !(z <= 1.14e-95)) {
tmp = -4.0 * ((a * t) / c);
} else {
tmp = b * (1.0 / (z * c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-3.25d+63)) .or. (.not. (z <= 1.14d-95))) then
tmp = (-4.0d0) * ((a * t) / c)
else
tmp = b * (1.0d0 / (z * c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -3.25e+63) || !(z <= 1.14e-95)) {
tmp = -4.0 * ((a * t) / c);
} else {
tmp = b * (1.0 / (z * c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -3.25e+63) or not (z <= 1.14e-95): tmp = -4.0 * ((a * t) / c) else: tmp = b * (1.0 / (z * c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -3.25e+63) || !(z <= 1.14e-95)) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); else tmp = Float64(b * Float64(1.0 / Float64(z * c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -3.25e+63) || ~((z <= 1.14e-95)))
tmp = -4.0 * ((a * t) / c);
else
tmp = b * (1.0 / (z * c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -3.25e+63], N[Not[LessEqual[z, 1.14e-95]], $MachinePrecision]], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.25 \cdot 10^{+63} \lor \neg \left(z \leq 1.14 \cdot 10^{-95}\right):\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{else}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\end{array}
\end{array}
if z < -3.24999999999999996e63 or 1.14000000000000002e-95 < z Initial program 70.7%
associate-+l-70.7%
*-commutative70.7%
associate-*r*71.2%
*-commutative71.2%
associate-+l-71.2%
Simplified72.6%
Taylor expanded in t around inf 58.9%
if -3.24999999999999996e63 < z < 1.14000000000000002e-95Initial program 96.5%
associate-+l-96.5%
*-commutative96.5%
associate-*r*96.0%
*-commutative96.0%
associate-+l-96.0%
Simplified96.0%
Taylor expanded in b around inf 50.2%
*-commutative50.2%
Simplified50.2%
div-inv50.9%
*-commutative50.9%
Applied egg-rr50.9%
Final simplification55.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 -9.5e+61) (not (<= z 5e-95))) (* -4.0 (/ (* a t) c)) (/ 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 tmp;
if ((z <= -9.5e+61) || !(z <= 5e-95)) {
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.
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+61)) .or. (.not. (z <= 5d-95))) 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;
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+61) || !(z <= 5e-95)) {
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]) [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+61) or not (z <= 5e-95): 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]) 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+61) || !(z <= 5e-95)) tmp = Float64(-4.0 * Float64(Float64(a * 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])){:}
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+61) || ~((z <= 5e-95)))
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. 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, -9.5e+61], N[Not[LessEqual[z, 5e-95]], $MachinePrecision]], N[(-4.0 * N[(N[(a * t), $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])\\\\
[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^{+61} \lor \neg \left(z \leq 5 \cdot 10^{-95}\right):\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if z < -9.49999999999999959e61 or 4.9999999999999998e-95 < z Initial program 70.7%
associate-+l-70.7%
*-commutative70.7%
associate-*r*71.2%
*-commutative71.2%
associate-+l-71.2%
Simplified72.6%
Taylor expanded in t around inf 58.9%
if -9.49999999999999959e61 < z < 4.9999999999999998e-95Initial program 96.5%
associate-+l-96.5%
*-commutative96.5%
associate-*r*96.0%
*-commutative96.0%
associate-+l-96.0%
Simplified96.0%
Taylor expanded in b around inf 50.2%
*-commutative50.2%
Simplified50.2%
Final simplification54.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= t -1e-11) (not (<= t 1.05e-23))) (* -4.0 (* a (/ t c))) (/ 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 tmp;
if ((t <= -1e-11) || !(t <= 1.05e-23)) {
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.
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 ((t <= (-1d-11)) .or. (.not. (t <= 1.05d-23))) 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;
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 ((t <= -1e-11) || !(t <= 1.05e-23)) {
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]) [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 (t <= -1e-11) or not (t <= 1.05e-23): 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]) 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 ((t <= -1e-11) || !(t <= 1.05e-23)) 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])){:}
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 ((t <= -1e-11) || ~((t <= 1.05e-23)))
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. 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[t, -1e-11], N[Not[LessEqual[t, 1.05e-23]], $MachinePrecision]], 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])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-11} \lor \neg \left(t \leq 1.05 \cdot 10^{-23}\right):\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if t < -9.99999999999999939e-12 or 1.05e-23 < t Initial program 79.5%
associate-+l-79.5%
*-commutative79.5%
associate-*r*82.8%
*-commutative82.8%
associate-+l-82.8%
Simplified84.2%
Taylor expanded in t around inf 51.0%
associate-/l*55.7%
Simplified55.7%
if -9.99999999999999939e-12 < t < 1.05e-23Initial program 86.4%
associate-+l-86.4%
*-commutative86.4%
associate-*r*82.9%
*-commutative82.9%
associate-+l-82.9%
Simplified82.9%
Taylor expanded in b around inf 42.6%
*-commutative42.6%
Simplified42.6%
Final simplification49.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 (/ 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 82.8%
associate-+l-82.8%
*-commutative82.8%
associate-*r*82.8%
*-commutative82.8%
associate-+l-82.8%
Simplified83.6%
Taylor expanded in b around inf 37.5%
*-commutative37.5%
Simplified37.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* c z)))
(t_2 (* 4.0 (/ (* a t) c)))
(t_3 (* (* x 9.0) y))
(t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
(t_5 (/ t_4 (* z c)))
(t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
(if (< t_5 -1.100156740804105e-171)
t_6
(if (< t_5 0.0)
(/ (/ t_4 z) c)
(if (< t_5 1.1708877911747488e-53)
t_6
(if (< t_5 2.876823679546137e+130)
(- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
(if (< t_5 1.3838515042456319e+158)
t_6
(- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = b / (c * z)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (x * 9.0d0) * y
t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
t_5 = t_4 / (z * c)
t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
if (t_5 < (-1.100156740804105d-171)) then
tmp = t_6
else if (t_5 < 0.0d0) then
tmp = (t_4 / z) / c
else if (t_5 < 1.1708877911747488d-53) then
tmp = t_6
else if (t_5 < 2.876823679546137d+130) then
tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
else if (t_5 < 1.3838515042456319d+158) then
tmp = t_6
else
tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (c * z) t_2 = 4.0 * ((a * t) / c) t_3 = (x * 9.0) * y t_4 = (t_3 - (((z * 4.0) * t) * a)) + b t_5 = t_4 / (z * c) t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c) tmp = 0 if t_5 < -1.100156740804105e-171: tmp = t_6 elif t_5 < 0.0: tmp = (t_4 / z) / c elif t_5 < 1.1708877911747488e-53: tmp = t_6 elif t_5 < 2.876823679546137e+130: tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2 elif t_5 < 1.3838515042456319e+158: tmp = t_6 else: tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(c * z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(x * 9.0) * y) t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) t_5 = Float64(t_4 / Float64(z * c)) t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c)) tmp = 0.0 if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = Float64(Float64(t_4 / z) / c); elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2); elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (c * z); t_2 = 4.0 * ((a * t) / c); t_3 = (x * 9.0) * y; t_4 = (t_3 - (((z * 4.0) * t) * a)) + b; t_5 = t_4 / (z * c); t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c); tmp = 0.0; if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = (t_4 / z) / c; elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2; elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t\_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t\_4}{z \cdot c}\\
t_6 := \frac{\left(t\_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t\_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 0:\\
\;\;\;\;\frac{\frac{t\_4}{z}}{c}\\
\mathbf{elif}\;t\_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t\_1\right) - t\_2\\
\mathbf{elif}\;t\_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t\_1\right) - t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024182
(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)))