
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -2.5e+179) (not (<= z 0.065))) (/ (* y (+ (* 9.0 (/ x z)) (/ (* t (+ (* -4.0 a) (/ b (* z t)))) y))) 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);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.5e+179) || !(z <= 0.065)) {
tmp = (y * ((9.0 * (x / z)) + ((t * ((-4.0 * a) + (b / (z * t)))) / y))) / 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.
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.5d+179)) .or. (.not. (z <= 0.065d0))) then
tmp = (y * ((9.0d0 * (x / z)) + ((t * (((-4.0d0) * a) + (b / (z * t)))) / y))) / 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;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.5e+179) || !(z <= 0.065)) {
tmp = (y * ((9.0 * (x / z)) + ((t * ((-4.0 * a) + (b / (z * t)))) / y))) / 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]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -2.5e+179) or not (z <= 0.065): tmp = (y * ((9.0 * (x / z)) + ((t * ((-4.0 * a) + (b / (z * t)))) / y))) / 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]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -2.5e+179) || !(z <= 0.065)) tmp = Float64(Float64(y * Float64(Float64(9.0 * Float64(x / z)) + Float64(Float64(t * Float64(Float64(-4.0 * a) + Float64(b / Float64(z * t)))) / y))) / 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -2.5e+179) || ~((z <= 0.065)))
tmp = (y * ((9.0 * (x / z)) + ((t * ((-4.0 * a) + (b / (z * t)))) / y))) / 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. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -2.5e+179], N[Not[LessEqual[z, 0.065]], $MachinePrecision]], N[(N[(y * N[(N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(N[(t * N[(N[(-4.0 * a), $MachinePrecision] + N[(b / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+179} \lor \neg \left(z \leq 0.065\right):\\
\;\;\;\;\frac{y \cdot \left(9 \cdot \frac{x}{z} + \frac{t \cdot \left(-4 \cdot a + \frac{b}{z \cdot t}\right)}{y}\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.5e179 or 0.065000000000000002 < z Initial program 46.3%
associate-+l-46.3%
*-commutative46.3%
associate-*r*48.4%
*-commutative48.4%
associate-+l-48.4%
associate-*l*48.4%
associate-*l*53.4%
*-commutative53.4%
Simplified53.4%
Taylor expanded in t around inf 66.4%
Taylor expanded in c around 0 77.3%
Taylor expanded in y around inf 86.6%
if -2.5e179 < z < 0.065000000000000002Initial program 94.0%
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
(if (<= z -2e+90)
(/ (* t (+ (* -4.0 a) (/ b (* z t)))) c)
(if (<= z -530000000000.0)
(* y (+ (* 9.0 (/ x (* z c))) (/ b (* c (* z y)))))
(if (<= z -7.8e-91)
(* t (+ (* -4.0 (/ a c)) (/ b (* (* z t) c))))
(if (<= z 1.95e-35)
(/ (+ b (* 9.0 (* y x))) (* 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 <= -2e+90) {
tmp = (t * ((-4.0 * a) + (b / (z * t)))) / c;
} else if (z <= -530000000000.0) {
tmp = y * ((9.0 * (x / (z * c))) + (b / (c * (z * y))));
} else if (z <= -7.8e-91) {
tmp = t * ((-4.0 * (a / c)) + (b / ((z * t) * c)));
} else if (z <= 1.95e-35) {
tmp = (b + (9.0 * (y * x))) / (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 <= (-2d+90)) then
tmp = (t * (((-4.0d0) * a) + (b / (z * t)))) / c
else if (z <= (-530000000000.0d0)) then
tmp = y * ((9.0d0 * (x / (z * c))) + (b / (c * (z * y))))
else if (z <= (-7.8d-91)) then
tmp = t * (((-4.0d0) * (a / c)) + (b / ((z * t) * c)))
else if (z <= 1.95d-35) then
tmp = (b + (9.0d0 * (y * x))) / (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 <= -2e+90) {
tmp = (t * ((-4.0 * a) + (b / (z * t)))) / c;
} else if (z <= -530000000000.0) {
tmp = y * ((9.0 * (x / (z * c))) + (b / (c * (z * y))));
} else if (z <= -7.8e-91) {
tmp = t * ((-4.0 * (a / c)) + (b / ((z * t) * c)));
} else if (z <= 1.95e-35) {
tmp = (b + (9.0 * (y * x))) / (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 <= -2e+90: tmp = (t * ((-4.0 * a) + (b / (z * t)))) / c elif z <= -530000000000.0: tmp = y * ((9.0 * (x / (z * c))) + (b / (c * (z * y)))) elif z <= -7.8e-91: tmp = t * ((-4.0 * (a / c)) + (b / ((z * t) * c))) elif z <= 1.95e-35: tmp = (b + (9.0 * (y * x))) / (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 <= -2e+90) tmp = Float64(Float64(t * Float64(Float64(-4.0 * a) + Float64(b / Float64(z * t)))) / c); elseif (z <= -530000000000.0) tmp = Float64(y * Float64(Float64(9.0 * Float64(x / Float64(z * c))) + Float64(b / Float64(c * Float64(z * y))))); elseif (z <= -7.8e-91) tmp = Float64(t * Float64(Float64(-4.0 * Float64(a / c)) + Float64(b / Float64(Float64(z * t) * c)))); elseif (z <= 1.95e-35) tmp = Float64(Float64(b + Float64(9.0 * Float64(y * x))) / 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 <= -2e+90)
tmp = (t * ((-4.0 * a) + (b / (z * t)))) / c;
elseif (z <= -530000000000.0)
tmp = y * ((9.0 * (x / (z * c))) + (b / (c * (z * y))));
elseif (z <= -7.8e-91)
tmp = t * ((-4.0 * (a / c)) + (b / ((z * t) * c)));
elseif (z <= 1.95e-35)
tmp = (b + (9.0 * (y * x))) / (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, -2e+90], N[(N[(t * N[(N[(-4.0 * a), $MachinePrecision] + N[(b / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, -530000000000.0], N[(y * N[(N[(9.0 * N[(x / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.8e-91], N[(t * N[(N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(N[(z * t), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.95e-35], N[(N[(b + N[(9.0 * N[(y * x), $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 -2 \cdot 10^{+90}:\\
\;\;\;\;\frac{t \cdot \left(-4 \cdot a + \frac{b}{z \cdot t}\right)}{c}\\
\mathbf{elif}\;z \leq -530000000000:\\
\;\;\;\;y \cdot \left(9 \cdot \frac{x}{z \cdot c} + \frac{b}{c \cdot \left(z \cdot y\right)}\right)\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-91}:\\
\;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c} + \frac{b}{\left(z \cdot t\right) \cdot c}\right)\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-35}:\\
\;\;\;\;\frac{b + 9 \cdot \left(y \cdot x\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.99999999999999993e90Initial program 56.5%
associate-+l-56.5%
*-commutative56.5%
associate-*r*49.4%
*-commutative49.4%
associate-+l-49.4%
associate-*l*49.4%
associate-*l*58.9%
*-commutative58.9%
Simplified58.9%
Taylor expanded in t around inf 75.0%
Taylor expanded in c around 0 81.5%
Taylor expanded in x around 0 75.1%
if -1.99999999999999993e90 < z < -5.3e11Initial program 91.5%
associate-+l-91.5%
*-commutative91.5%
associate-*r*91.6%
*-commutative91.6%
associate-+l-91.6%
associate-*l*91.7%
associate-*l*91.6%
*-commutative91.6%
Simplified91.6%
Taylor expanded in z around 0 83.7%
Taylor expanded in a around 0 61.7%
Taylor expanded in y around inf 46.3%
if -5.3e11 < z < -7.79999999999999987e-91Initial program 88.1%
associate-+l-88.1%
*-commutative88.1%
associate-*r*89.6%
*-commutative89.6%
associate-+l-89.6%
associate-*l*89.7%
associate-*l*89.8%
*-commutative89.8%
Simplified89.8%
Taylor expanded in t around inf 81.5%
Taylor expanded in x around 0 66.3%
if -7.79999999999999987e-91 < z < 1.9499999999999999e-35Initial program 95.0%
associate-+l-95.0%
*-commutative95.0%
associate-*r*95.8%
*-commutative95.8%
associate-+l-95.8%
associate-*l*95.7%
associate-*l*92.4%
*-commutative92.4%
Simplified92.4%
Taylor expanded in z around 0 86.2%
*-commutative86.2%
Simplified86.2%
if 1.9499999999999999e-35 < z Initial program 55.8%
associate-+l-55.8%
*-commutative55.8%
associate-*r*60.3%
*-commutative60.3%
associate-+l-60.3%
associate-*l*60.3%
associate-*l*63.6%
*-commutative63.6%
Simplified63.6%
Taylor expanded in x around 0 77.6%
Taylor expanded in x around 0 70.4%
Final simplification77.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
(let* ((t_1 (- (* x (* (/ 9.0 c) (/ y z))) (* 4.0 (/ (* t a) c))))
(t_2 (* 9.0 (* y x))))
(if (<= z -1e+129)
t_1
(if (<= z -2.3e-89)
(/ (- t_2 (* 4.0 (* a (* z t)))) (* z c))
(if (<= z 1.55e-36) (/ (+ b t_2) (* z c)) t_1)))))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 / c) * (y / z))) - (4.0 * ((t * a) / c));
double t_2 = 9.0 * (y * x);
double tmp;
if (z <= -1e+129) {
tmp = t_1;
} else if (z <= -2.3e-89) {
tmp = (t_2 - (4.0 * (a * (z * t)))) / (z * c);
} else if (z <= 1.55e-36) {
tmp = (b + t_2) / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x * ((9.0d0 / c) * (y / z))) - (4.0d0 * ((t * a) / c))
t_2 = 9.0d0 * (y * x)
if (z <= (-1d+129)) then
tmp = t_1
else if (z <= (-2.3d-89)) then
tmp = (t_2 - (4.0d0 * (a * (z * t)))) / (z * c)
else if (z <= 1.55d-36) then
tmp = (b + t_2) / (z * c)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * ((9.0 / c) * (y / z))) - (4.0 * ((t * a) / c));
double t_2 = 9.0 * (y * x);
double tmp;
if (z <= -1e+129) {
tmp = t_1;
} else if (z <= -2.3e-89) {
tmp = (t_2 - (4.0 * (a * (z * t)))) / (z * c);
} else if (z <= 1.55e-36) {
tmp = (b + t_2) / (z * c);
} else {
tmp = t_1;
}
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 / c) * (y / z))) - (4.0 * ((t * a) / c)) t_2 = 9.0 * (y * x) tmp = 0 if z <= -1e+129: tmp = t_1 elif z <= -2.3e-89: tmp = (t_2 - (4.0 * (a * (z * t)))) / (z * c) elif z <= 1.55e-36: tmp = (b + t_2) / (z * c) else: tmp = t_1 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 * Float64(Float64(9.0 / c) * Float64(y / z))) - Float64(4.0 * Float64(Float64(t * a) / c))) t_2 = Float64(9.0 * Float64(y * x)) tmp = 0.0 if (z <= -1e+129) tmp = t_1; elseif (z <= -2.3e-89) tmp = Float64(Float64(t_2 - Float64(4.0 * Float64(a * Float64(z * t)))) / Float64(z * c)); elseif (z <= 1.55e-36) tmp = Float64(Float64(b + t_2) / Float64(z * c)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (x * ((9.0 / c) * (y / z))) - (4.0 * ((t * a) / c));
t_2 = 9.0 * (y * x);
tmp = 0.0;
if (z <= -1e+129)
tmp = t_1;
elseif (z <= -2.3e-89)
tmp = (t_2 - (4.0 * (a * (z * t)))) / (z * c);
elseif (z <= 1.55e-36)
tmp = (b + t_2) / (z * c);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * N[(N[(9.0 / c), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e+129], t$95$1, If[LessEqual[z, -2.3e-89], N[(N[(t$95$2 - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e-36], N[(N[(b + t$95$2), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{9}{c} \cdot \frac{y}{z}\right) - 4 \cdot \frac{t \cdot a}{c}\\
t_2 := 9 \cdot \left(y \cdot x\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{+129}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-89}:\\
\;\;\;\;\frac{t\_2 - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{z \cdot c}\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-36}:\\
\;\;\;\;\frac{b + t\_2}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1e129 or 1.5499999999999999e-36 < z Initial program 52.9%
associate-+l-52.9%
*-commutative52.9%
associate-*r*53.7%
*-commutative53.7%
associate-+l-53.7%
associate-*l*53.7%
associate-*l*59.0%
*-commutative59.0%
Simplified59.0%
Taylor expanded in x around 0 75.4%
Taylor expanded in x around inf 63.3%
associate-*r/63.2%
associate-*r*63.2%
*-commutative63.2%
associate-*r/68.9%
associate-*l*68.9%
associate-*r/68.9%
times-frac77.1%
Simplified77.1%
if -1e129 < z < -2.3e-89Initial program 91.3%
associate-+l-91.3%
*-commutative91.3%
associate-*r*89.5%
*-commutative89.5%
associate-+l-89.5%
associate-*l*89.6%
associate-*l*92.1%
*-commutative92.1%
Simplified92.1%
Taylor expanded in b around 0 79.6%
if -2.3e-89 < z < 1.5499999999999999e-36Initial program 95.0%
associate-+l-95.0%
*-commutative95.0%
associate-*r*95.8%
*-commutative95.8%
associate-+l-95.8%
associate-*l*95.7%
associate-*l*92.4%
*-commutative92.4%
Simplified92.4%
Taylor expanded in z around 0 86.2%
*-commutative86.2%
Simplified86.2%
Final simplification81.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 -3.8e+180)
(* (* t (* -4.0 a)) (/ 1.0 c))
(if (or (<= z -1.15e-20) (and (not (<= z -1.6e-55)) (<= z 9.8e+36)))
(/ (+ b (* 9.0 (* y x))) (* 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 <= -3.8e+180) {
tmp = (t * (-4.0 * a)) * (1.0 / c);
} else if ((z <= -1.15e-20) || (!(z <= -1.6e-55) && (z <= 9.8e+36))) {
tmp = (b + (9.0 * (y * x))) / (z * c);
} else {
tmp = -4.0 * ((t * a) / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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.8d+180)) then
tmp = (t * ((-4.0d0) * a)) * (1.0d0 / c)
else if ((z <= (-1.15d-20)) .or. (.not. (z <= (-1.6d-55))) .and. (z <= 9.8d+36)) then
tmp = (b + (9.0d0 * (y * x))) / (z * c)
else
tmp = (-4.0d0) * ((t * a) / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -3.8e+180) {
tmp = (t * (-4.0 * a)) * (1.0 / c);
} else if ((z <= -1.15e-20) || (!(z <= -1.6e-55) && (z <= 9.8e+36))) {
tmp = (b + (9.0 * (y * x))) / (z * c);
} else {
tmp = -4.0 * ((t * a) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -3.8e+180: tmp = (t * (-4.0 * a)) * (1.0 / c) elif (z <= -1.15e-20) or (not (z <= -1.6e-55) and (z <= 9.8e+36)): tmp = (b + (9.0 * (y * x))) / (z * c) else: tmp = -4.0 * ((t * a) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -3.8e+180) tmp = Float64(Float64(t * Float64(-4.0 * a)) * Float64(1.0 / c)); elseif ((z <= -1.15e-20) || (!(z <= -1.6e-55) && (z <= 9.8e+36))) tmp = Float64(Float64(b + Float64(9.0 * Float64(y * x))) / Float64(z * c)); else tmp = 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 <= -3.8e+180)
tmp = (t * (-4.0 * a)) * (1.0 / c);
elseif ((z <= -1.15e-20) || (~((z <= -1.6e-55)) && (z <= 9.8e+36)))
tmp = (b + (9.0 * (y * x))) / (z * c);
else
tmp = -4.0 * ((t * a) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -3.8e+180], N[(N[(t * N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1.15e-20], And[N[Not[LessEqual[z, -1.6e-55]], $MachinePrecision], LessEqual[z, 9.8e+36]]], N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / 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 -3.8 \cdot 10^{+180}:\\
\;\;\;\;\left(t \cdot \left(-4 \cdot a\right)\right) \cdot \frac{1}{c}\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-20} \lor \neg \left(z \leq -1.6 \cdot 10^{-55}\right) \land z \leq 9.8 \cdot 10^{+36}:\\
\;\;\;\;\frac{b + 9 \cdot \left(y \cdot x\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\
\end{array}
\end{array}
if z < -3.8e180Initial program 36.2%
associate-+l-36.2%
*-commutative36.2%
associate-*r*32.3%
*-commutative32.3%
associate-+l-32.3%
associate-*l*32.3%
associate-*l*39.9%
*-commutative39.9%
Simplified39.9%
Taylor expanded in t around inf 68.6%
Taylor expanded in c around 0 80.5%
Taylor expanded in t around inf 67.8%
associate-*r*67.8%
*-commutative67.8%
Simplified67.8%
div-inv67.9%
*-commutative67.9%
Applied egg-rr67.9%
if -3.8e180 < z < -1.15e-20 or -1.6000000000000001e-55 < z < 9.79999999999999962e36Initial program 93.7%
associate-+l-93.7%
*-commutative93.7%
associate-*r*93.1%
*-commutative93.1%
associate-+l-93.1%
associate-*l*93.0%
associate-*l*91.9%
*-commutative91.9%
Simplified91.9%
Taylor expanded in z around 0 78.1%
*-commutative78.1%
Simplified78.1%
if -1.15e-20 < z < -1.6000000000000001e-55 or 9.79999999999999962e36 < z Initial program 52.2%
associate-+l-52.2%
*-commutative52.2%
associate-*r*57.7%
*-commutative57.7%
associate-+l-57.7%
associate-*l*57.7%
associate-*l*61.4%
*-commutative61.4%
Simplified61.4%
Taylor expanded in z around inf 63.3%
*-commutative63.3%
Simplified63.3%
Final simplification73.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 -2.5e+179) (not (<= z 1.2e+28))) (- (* x (* (/ 9.0 c) (/ y z))) (* 4.0 (/ (* t a) 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);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.5e+179) || !(z <= 1.2e+28)) {
tmp = (x * ((9.0 / c) * (y / z))) - (4.0 * ((t * a) / 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.
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.5d+179)) .or. (.not. (z <= 1.2d+28))) then
tmp = (x * ((9.0d0 / c) * (y / z))) - (4.0d0 * ((t * a) / 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;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.5e+179) || !(z <= 1.2e+28)) {
tmp = (x * ((9.0 / c) * (y / z))) - (4.0 * ((t * a) / 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]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -2.5e+179) or not (z <= 1.2e+28): tmp = (x * ((9.0 / c) * (y / z))) - (4.0 * ((t * a) / 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]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -2.5e+179) || !(z <= 1.2e+28)) tmp = Float64(Float64(x * Float64(Float64(9.0 / c) * Float64(y / z))) - Float64(4.0 * Float64(Float64(t * a) / 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -2.5e+179) || ~((z <= 1.2e+28)))
tmp = (x * ((9.0 / c) * (y / z))) - (4.0 * ((t * a) / 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. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -2.5e+179], N[Not[LessEqual[z, 1.2e+28]], $MachinePrecision]], N[(N[(x * N[(N[(9.0 / c), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+179} \lor \neg \left(z \leq 1.2 \cdot 10^{+28}\right):\\
\;\;\;\;x \cdot \left(\frac{9}{c} \cdot \frac{y}{z}\right) - 4 \cdot \frac{t \cdot a}{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.5e179 or 1.19999999999999991e28 < z Initial program 43.3%
associate-+l-43.3%
*-commutative43.3%
associate-*r*45.6%
*-commutative45.6%
associate-+l-45.6%
associate-*l*45.6%
associate-*l*51.0%
*-commutative51.0%
Simplified51.0%
Taylor expanded in x around 0 71.7%
Taylor expanded in x around inf 63.8%
associate-*r/63.8%
associate-*r*63.8%
*-commutative63.8%
associate-*r/70.9%
associate-*l*70.9%
associate-*r/70.9%
times-frac80.0%
Simplified80.0%
if -2.5e179 < z < 1.19999999999999991e28Initial program 93.7%
Final simplification89.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 (or (<= z -2.5e+179) (not (<= z 9e+28))) (- (* x (* (/ 9.0 c) (/ y z))) (* 4.0 (/ (* t a) c))) (/ (+ b (- (* x (* y 9.0)) (* (* z 4.0) (* t a)))) (* 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 <= -2.5e+179) || !(z <= 9e+28)) {
tmp = (x * ((9.0 / c) * (y / z))) - (4.0 * ((t * a) / c));
} else {
tmp = (b + ((x * (y * 9.0)) - ((z * 4.0) * (t * a)))) / (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 <= (-2.5d+179)) .or. (.not. (z <= 9d+28))) then
tmp = (x * ((9.0d0 / c) * (y / z))) - (4.0d0 * ((t * a) / c))
else
tmp = (b + ((x * (y * 9.0d0)) - ((z * 4.0d0) * (t * a)))) / (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 <= -2.5e+179) || !(z <= 9e+28)) {
tmp = (x * ((9.0 / c) * (y / z))) - (4.0 * ((t * a) / c));
} else {
tmp = (b + ((x * (y * 9.0)) - ((z * 4.0) * (t * a)))) / (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 <= -2.5e+179) or not (z <= 9e+28): tmp = (x * ((9.0 / c) * (y / z))) - (4.0 * ((t * a) / c)) else: tmp = (b + ((x * (y * 9.0)) - ((z * 4.0) * (t * a)))) / (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 <= -2.5e+179) || !(z <= 9e+28)) tmp = Float64(Float64(x * Float64(Float64(9.0 / c) * Float64(y / z))) - Float64(4.0 * Float64(Float64(t * a) / c))); else tmp = Float64(Float64(b + Float64(Float64(x * Float64(y * 9.0)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / 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 <= -2.5e+179) || ~((z <= 9e+28)))
tmp = (x * ((9.0 / c) * (y / z))) - (4.0 * ((t * a) / c));
else
tmp = (b + ((x * (y * 9.0)) - ((z * 4.0) * (t * a)))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -2.5e+179], N[Not[LessEqual[z, 9e+28]], $MachinePrecision]], N[(N[(x * N[(N[(9.0 / c), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(N[(x * N[(y * 9.0), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+179} \lor \neg \left(z \leq 9 \cdot 10^{+28}\right):\\
\;\;\;\;x \cdot \left(\frac{9}{c} \cdot \frac{y}{z}\right) - 4 \cdot \frac{t \cdot a}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(y \cdot 9\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -2.5e179 or 8.9999999999999994e28 < z Initial program 43.3%
associate-+l-43.3%
*-commutative43.3%
associate-*r*45.6%
*-commutative45.6%
associate-+l-45.6%
associate-*l*45.6%
associate-*l*51.0%
*-commutative51.0%
Simplified51.0%
Taylor expanded in x around 0 71.7%
Taylor expanded in x around inf 63.8%
associate-*r/63.8%
associate-*r*63.8%
*-commutative63.8%
associate-*r/70.9%
associate-*l*70.9%
associate-*r/70.9%
times-frac80.0%
Simplified80.0%
if -2.5e179 < z < 8.9999999999999994e28Initial program 93.7%
associate-+l-93.7%
*-commutative93.7%
associate-*r*93.3%
*-commutative93.3%
associate-+l-93.3%
associate-*l*93.2%
associate-*l*92.1%
*-commutative92.1%
Simplified92.1%
Final simplification88.4%
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 (/ (* t a) c)))
(if (<= z -1.4e+116)
(/ (* t (+ (* -4.0 a) (/ b (* z t)))) c)
(if (<= z -2.4e-90)
(+ (* 9.0 (/ (* y x) (* z c))) (* -4.0 t_1))
(if (<= z 4.4e-35)
(/ (+ b (* 9.0 (* y x))) (* z c))
(- (/ b (* z c)) (* 4.0 t_1)))))))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 = (t * a) / c;
double tmp;
if (z <= -1.4e+116) {
tmp = (t * ((-4.0 * a) + (b / (z * t)))) / c;
} else if (z <= -2.4e-90) {
tmp = (9.0 * ((y * x) / (z * c))) + (-4.0 * t_1);
} else if (z <= 4.4e-35) {
tmp = (b + (9.0 * (y * x))) / (z * c);
} else {
tmp = (b / (z * c)) - (4.0 * t_1);
}
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 = (t * a) / c
if (z <= (-1.4d+116)) then
tmp = (t * (((-4.0d0) * a) + (b / (z * t)))) / c
else if (z <= (-2.4d-90)) then
tmp = (9.0d0 * ((y * x) / (z * c))) + ((-4.0d0) * t_1)
else if (z <= 4.4d-35) then
tmp = (b + (9.0d0 * (y * x))) / (z * c)
else
tmp = (b / (z * c)) - (4.0d0 * t_1)
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 = (t * a) / c;
double tmp;
if (z <= -1.4e+116) {
tmp = (t * ((-4.0 * a) + (b / (z * t)))) / c;
} else if (z <= -2.4e-90) {
tmp = (9.0 * ((y * x) / (z * c))) + (-4.0 * t_1);
} else if (z <= 4.4e-35) {
tmp = (b + (9.0 * (y * x))) / (z * c);
} else {
tmp = (b / (z * c)) - (4.0 * t_1);
}
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 = (t * a) / c tmp = 0 if z <= -1.4e+116: tmp = (t * ((-4.0 * a) + (b / (z * t)))) / c elif z <= -2.4e-90: tmp = (9.0 * ((y * x) / (z * c))) + (-4.0 * t_1) elif z <= 4.4e-35: tmp = (b + (9.0 * (y * x))) / (z * c) else: tmp = (b / (z * c)) - (4.0 * t_1) 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(t * a) / c) tmp = 0.0 if (z <= -1.4e+116) tmp = Float64(Float64(t * Float64(Float64(-4.0 * a) + Float64(b / Float64(z * t)))) / c); elseif (z <= -2.4e-90) tmp = Float64(Float64(9.0 * Float64(Float64(y * x) / Float64(z * c))) + Float64(-4.0 * t_1)); elseif (z <= 4.4e-35) tmp = Float64(Float64(b + Float64(9.0 * Float64(y * x))) / Float64(z * c)); else tmp = Float64(Float64(b / Float64(z * c)) - Float64(4.0 * t_1)); 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 = (t * a) / c;
tmp = 0.0;
if (z <= -1.4e+116)
tmp = (t * ((-4.0 * a) + (b / (z * t)))) / c;
elseif (z <= -2.4e-90)
tmp = (9.0 * ((y * x) / (z * c))) + (-4.0 * t_1);
elseif (z <= 4.4e-35)
tmp = (b + (9.0 * (y * x))) / (z * c);
else
tmp = (b / (z * c)) - (4.0 * 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.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -1.4e+116], N[(N[(t * N[(N[(-4.0 * a), $MachinePrecision] + N[(b / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, -2.4e-90], N[(N[(9.0 * N[(N[(y * x), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e-35], N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision] - N[(4.0 * t$95$1), $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 := \frac{t \cdot a}{c}\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+116}:\\
\;\;\;\;\frac{t \cdot \left(-4 \cdot a + \frac{b}{z \cdot t}\right)}{c}\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-90}:\\
\;\;\;\;9 \cdot \frac{y \cdot x}{z \cdot c} + -4 \cdot t\_1\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-35}:\\
\;\;\;\;\frac{b + 9 \cdot \left(y \cdot x\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c} - 4 \cdot t\_1\\
\end{array}
\end{array}
if z < -1.40000000000000002e116Initial program 50.7%
associate-+l-50.7%
*-commutative50.7%
associate-*r*45.2%
*-commutative45.2%
associate-+l-45.2%
associate-*l*45.2%
associate-*l*53.4%
*-commutative53.4%
Simplified53.4%
Taylor expanded in t around inf 71.7%
Taylor expanded in c around 0 79.1%
Taylor expanded in x around 0 74.4%
if -1.40000000000000002e116 < z < -2.4000000000000002e-90Initial program 90.8%
associate-+l-90.8%
*-commutative90.8%
associate-*r*89.0%
*-commutative89.0%
associate-+l-89.0%
associate-*l*89.0%
associate-*l*91.7%
*-commutative91.7%
Simplified91.7%
Taylor expanded in b around 0 83.6%
Taylor expanded in x around 0 76.2%
if -2.4000000000000002e-90 < z < 4.39999999999999987e-35Initial program 95.0%
associate-+l-95.0%
*-commutative95.0%
associate-*r*95.8%
*-commutative95.8%
associate-+l-95.8%
associate-*l*95.7%
associate-*l*92.4%
*-commutative92.4%
Simplified92.4%
Taylor expanded in z around 0 86.2%
*-commutative86.2%
Simplified86.2%
if 4.39999999999999987e-35 < z Initial program 55.8%
associate-+l-55.8%
*-commutative55.8%
associate-*r*60.3%
*-commutative60.3%
associate-+l-60.3%
associate-*l*60.3%
associate-*l*63.6%
*-commutative63.6%
Simplified63.6%
Taylor expanded in x around 0 77.6%
Taylor expanded in x around 0 70.4%
Final simplification79.3%
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.3e-89) (not (<= z 6.6e-37))) (- (* x (* (/ 9.0 c) (/ y z))) (* 4.0 (/ (* t a) c))) (/ (+ b (* 9.0 (* y x))) (* 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 <= -2.3e-89) || !(z <= 6.6e-37)) {
tmp = (x * ((9.0 / c) * (y / z))) - (4.0 * ((t * a) / 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.
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.3d-89)) .or. (.not. (z <= 6.6d-37))) then
tmp = (x * ((9.0d0 / c) * (y / z))) - (4.0d0 * ((t * a) / 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;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.3e-89) || !(z <= 6.6e-37)) {
tmp = (x * ((9.0 / c) * (y / z))) - (4.0 * ((t * a) / 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]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -2.3e-89) or not (z <= 6.6e-37): tmp = (x * ((9.0 / c) * (y / z))) - (4.0 * ((t * a) / 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]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -2.3e-89) || !(z <= 6.6e-37)) tmp = Float64(Float64(x * Float64(Float64(9.0 / c) * Float64(y / z))) - Float64(4.0 * Float64(Float64(t * a) / 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -2.3e-89) || ~((z <= 6.6e-37)))
tmp = (x * ((9.0 / c) * (y / z))) - (4.0 * ((t * a) / 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. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -2.3e-89], N[Not[LessEqual[z, 6.6e-37]], $MachinePrecision]], N[(N[(x * N[(N[(9.0 / c), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{-89} \lor \neg \left(z \leq 6.6 \cdot 10^{-37}\right):\\
\;\;\;\;x \cdot \left(\frac{9}{c} \cdot \frac{y}{z}\right) - 4 \cdot \frac{t \cdot a}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(y \cdot x\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -2.3e-89 or 6.59999999999999964e-37 < z Initial program 63.7%
associate-+l-63.7%
*-commutative63.7%
associate-*r*63.8%
*-commutative63.8%
associate-+l-63.8%
associate-*l*63.8%
associate-*l*68.3%
*-commutative68.3%
Simplified68.3%
Taylor expanded in x around 0 77.9%
Taylor expanded in x around inf 65.9%
associate-*r/65.9%
associate-*r*65.9%
*-commutative65.9%
associate-*r/70.7%
associate-*l*70.7%
associate-*r/70.7%
times-frac75.9%
Simplified75.9%
if -2.3e-89 < z < 6.59999999999999964e-37Initial program 95.0%
associate-+l-95.0%
*-commutative95.0%
associate-*r*95.8%
*-commutative95.8%
associate-+l-95.8%
associate-*l*95.7%
associate-*l*92.4%
*-commutative92.4%
Simplified92.4%
Taylor expanded in z around 0 86.2%
*-commutative86.2%
Simplified86.2%
Final simplification80.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 (<= x -1.5e+101)
(* 9.0 (* (/ y z) (/ x c)))
(if (<= x -2.6e-303)
(* -4.0 (* t (/ a c)))
(if (<= x 2.4e-120) (* (/ b c) (/ 1.0 z)) (* 9.0 (/ (* x (/ y c)) 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 <= -1.5e+101) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (x <= -2.6e-303) {
tmp = -4.0 * (t * (a / c));
} else if (x <= 2.4e-120) {
tmp = (b / c) * (1.0 / z);
} else {
tmp = 9.0 * ((x * (y / c)) / z);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 <= (-1.5d+101)) then
tmp = 9.0d0 * ((y / z) * (x / c))
else if (x <= (-2.6d-303)) then
tmp = (-4.0d0) * (t * (a / c))
else if (x <= 2.4d-120) then
tmp = (b / c) * (1.0d0 / z)
else
tmp = 9.0d0 * ((x * (y / c)) / z)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -1.5e+101) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (x <= -2.6e-303) {
tmp = -4.0 * (t * (a / c));
} else if (x <= 2.4e-120) {
tmp = (b / c) * (1.0 / z);
} else {
tmp = 9.0 * ((x * (y / c)) / z);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if x <= -1.5e+101: tmp = 9.0 * ((y / z) * (x / c)) elif x <= -2.6e-303: tmp = -4.0 * (t * (a / c)) elif x <= 2.4e-120: tmp = (b / c) * (1.0 / z) else: tmp = 9.0 * ((x * (y / c)) / z) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (x <= -1.5e+101) tmp = Float64(9.0 * Float64(Float64(y / z) * Float64(x / c))); elseif (x <= -2.6e-303) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (x <= 2.4e-120) tmp = Float64(Float64(b / c) * Float64(1.0 / z)); else tmp = Float64(9.0 * Float64(Float64(x * Float64(y / c)) / 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 <= -1.5e+101)
tmp = 9.0 * ((y / z) * (x / c));
elseif (x <= -2.6e-303)
tmp = -4.0 * (t * (a / c));
elseif (x <= 2.4e-120)
tmp = (b / c) * (1.0 / z);
else
tmp = 9.0 * ((x * (y / c)) / z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[x, -1.5e+101], N[(9.0 * N[(N[(y / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.6e-303], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.4e-120], N[(N[(b / c), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(N[(x * N[(y / c), $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}\;x \leq -1.5 \cdot 10^{+101}:\\
\;\;\;\;9 \cdot \left(\frac{y}{z} \cdot \frac{x}{c}\right)\\
\mathbf{elif}\;x \leq -2.6 \cdot 10^{-303}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{-120}:\\
\;\;\;\;\frac{b}{c} \cdot \frac{1}{z}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \frac{x \cdot \frac{y}{c}}{z}\\
\end{array}
\end{array}
if x < -1.49999999999999997e101Initial program 79.5%
associate-+l-79.5%
*-commutative79.5%
associate-*r*79.4%
*-commutative79.4%
associate-+l-79.4%
associate-*l*79.3%
associate-*l*76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in z around 0 76.9%
associate-/l*82.3%
Applied egg-rr82.3%
Taylor expanded in x around inf 61.4%
associate-*r/61.5%
associate-*r*61.6%
Simplified61.6%
associate-*l*61.5%
associate-*r/61.4%
*-commutative61.4%
times-frac77.0%
Applied egg-rr77.0%
if -1.49999999999999997e101 < x < -2.60000000000000005e-303Initial program 72.8%
associate-+l-72.8%
*-commutative72.8%
associate-*r*73.0%
*-commutative73.0%
associate-+l-73.0%
associate-*l*73.0%
associate-*l*78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in z around 0 76.3%
Taylor expanded in a around inf 51.6%
*-commutative51.6%
associate-/l*51.5%
Simplified51.5%
if -2.60000000000000005e-303 < x < 2.3999999999999999e-120Initial program 85.6%
associate-+l-85.6%
*-commutative85.6%
associate-*r*85.3%
*-commutative85.3%
associate-+l-85.3%
associate-*l*85.3%
associate-*l*85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in b around inf 55.8%
associate-/r*59.3%
Simplified59.3%
div-inv59.3%
Applied egg-rr59.3%
if 2.3999999999999999e-120 < x Initial program 79.4%
associate-+l-79.4%
*-commutative79.4%
associate-*r*80.5%
*-commutative80.5%
associate-+l-80.5%
associate-*l*80.5%
associate-*l*79.5%
*-commutative79.5%
Simplified79.5%
Taylor expanded in x around inf 47.5%
associate-/r*47.6%
associate-/l*48.3%
Simplified48.3%
Final simplification55.3%
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 -1.5e+101)
(* 9.0 (* y (/ (/ x c) z)))
(if (<= x -4.2e-296)
(* -4.0 (* t (/ a c)))
(if (<= x 2.1e-116) (* (/ b c) (/ 1.0 z)) (* 9.0 (/ (* x (/ y c)) 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 <= -1.5e+101) {
tmp = 9.0 * (y * ((x / c) / z));
} else if (x <= -4.2e-296) {
tmp = -4.0 * (t * (a / c));
} else if (x <= 2.1e-116) {
tmp = (b / c) * (1.0 / z);
} else {
tmp = 9.0 * ((x * (y / c)) / z);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 <= (-1.5d+101)) then
tmp = 9.0d0 * (y * ((x / c) / z))
else if (x <= (-4.2d-296)) then
tmp = (-4.0d0) * (t * (a / c))
else if (x <= 2.1d-116) then
tmp = (b / c) * (1.0d0 / z)
else
tmp = 9.0d0 * ((x * (y / c)) / z)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -1.5e+101) {
tmp = 9.0 * (y * ((x / c) / z));
} else if (x <= -4.2e-296) {
tmp = -4.0 * (t * (a / c));
} else if (x <= 2.1e-116) {
tmp = (b / c) * (1.0 / z);
} else {
tmp = 9.0 * ((x * (y / c)) / z);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if x <= -1.5e+101: tmp = 9.0 * (y * ((x / c) / z)) elif x <= -4.2e-296: tmp = -4.0 * (t * (a / c)) elif x <= 2.1e-116: tmp = (b / c) * (1.0 / z) else: tmp = 9.0 * ((x * (y / c)) / z) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (x <= -1.5e+101) tmp = Float64(9.0 * Float64(y * Float64(Float64(x / c) / z))); elseif (x <= -4.2e-296) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (x <= 2.1e-116) tmp = Float64(Float64(b / c) * Float64(1.0 / z)); else tmp = Float64(9.0 * Float64(Float64(x * Float64(y / c)) / 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 <= -1.5e+101)
tmp = 9.0 * (y * ((x / c) / z));
elseif (x <= -4.2e-296)
tmp = -4.0 * (t * (a / c));
elseif (x <= 2.1e-116)
tmp = (b / c) * (1.0 / z);
else
tmp = 9.0 * ((x * (y / c)) / z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[x, -1.5e+101], N[(9.0 * N[(y * N[(N[(x / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.2e-296], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.1e-116], N[(N[(b / c), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(N[(x * N[(y / c), $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}\;x \leq -1.5 \cdot 10^{+101}:\\
\;\;\;\;9 \cdot \left(y \cdot \frac{\frac{x}{c}}{z}\right)\\
\mathbf{elif}\;x \leq -4.2 \cdot 10^{-296}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-116}:\\
\;\;\;\;\frac{b}{c} \cdot \frac{1}{z}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \frac{x \cdot \frac{y}{c}}{z}\\
\end{array}
\end{array}
if x < -1.49999999999999997e101Initial program 79.5%
associate-+l-79.5%
*-commutative79.5%
associate-*r*79.4%
*-commutative79.4%
associate-+l-79.4%
associate-*l*79.3%
associate-*l*76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in z around 0 76.9%
Taylor expanded in x around inf 61.4%
associate-*r/61.5%
associate-*r*61.6%
associate-*l/64.2%
associate-*r/64.3%
associate-*l*64.2%
*-commutative64.2%
associate-/r*68.6%
Simplified68.6%
Taylor expanded in x around 0 64.2%
associate-/r*78.2%
Simplified78.2%
if -1.49999999999999997e101 < x < -4.1999999999999999e-296Initial program 72.5%
associate-+l-72.5%
*-commutative72.5%
associate-*r*72.7%
*-commutative72.7%
associate-+l-72.7%
associate-*l*72.7%
associate-*l*78.1%
*-commutative78.1%
Simplified78.1%
Taylor expanded in z around 0 77.2%
Taylor expanded in a around inf 52.2%
*-commutative52.2%
associate-/l*52.0%
Simplified52.0%
if -4.1999999999999999e-296 < x < 2.0999999999999999e-116Initial program 85.9%
associate-+l-85.9%
*-commutative85.9%
associate-*r*85.6%
*-commutative85.6%
associate-+l-85.6%
associate-*l*85.6%
associate-*l*85.9%
*-commutative85.9%
Simplified85.9%
Taylor expanded in b around inf 56.8%
associate-/r*58.0%
Simplified58.0%
div-inv58.1%
Applied egg-rr58.1%
if 2.0999999999999999e-116 < x Initial program 79.4%
associate-+l-79.4%
*-commutative79.4%
associate-*r*80.5%
*-commutative80.5%
associate-+l-80.5%
associate-*l*80.5%
associate-*l*79.5%
*-commutative79.5%
Simplified79.5%
Taylor expanded in x around inf 47.5%
associate-/r*47.6%
associate-/l*48.3%
Simplified48.3%
Final simplification55.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 (<= x -2.75e+101)
(* 9.0 (* y (/ (/ x c) z)))
(if (<= x -1.35e-298)
(* -4.0 (* t (/ a c)))
(if (<= x 2.1e-116) (* (/ b c) (/ 1.0 z)) (* 9.0 (* x (/ (/ y c) 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 <= -2.75e+101) {
tmp = 9.0 * (y * ((x / c) / z));
} else if (x <= -1.35e-298) {
tmp = -4.0 * (t * (a / c));
} else if (x <= 2.1e-116) {
tmp = (b / c) * (1.0 / z);
} else {
tmp = 9.0 * (x * ((y / c) / z));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 <= (-2.75d+101)) then
tmp = 9.0d0 * (y * ((x / c) / z))
else if (x <= (-1.35d-298)) then
tmp = (-4.0d0) * (t * (a / c))
else if (x <= 2.1d-116) then
tmp = (b / c) * (1.0d0 / z)
else
tmp = 9.0d0 * (x * ((y / c) / z))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -2.75e+101) {
tmp = 9.0 * (y * ((x / c) / z));
} else if (x <= -1.35e-298) {
tmp = -4.0 * (t * (a / c));
} else if (x <= 2.1e-116) {
tmp = (b / c) * (1.0 / z);
} else {
tmp = 9.0 * (x * ((y / c) / z));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if x <= -2.75e+101: tmp = 9.0 * (y * ((x / c) / z)) elif x <= -1.35e-298: tmp = -4.0 * (t * (a / c)) elif x <= 2.1e-116: tmp = (b / c) * (1.0 / z) else: tmp = 9.0 * (x * ((y / c) / z)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (x <= -2.75e+101) tmp = Float64(9.0 * Float64(y * Float64(Float64(x / c) / z))); elseif (x <= -1.35e-298) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (x <= 2.1e-116) tmp = Float64(Float64(b / c) * Float64(1.0 / z)); else tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c) / z))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (x <= -2.75e+101)
tmp = 9.0 * (y * ((x / c) / z));
elseif (x <= -1.35e-298)
tmp = -4.0 * (t * (a / c));
elseif (x <= 2.1e-116)
tmp = (b / c) * (1.0 / z);
else
tmp = 9.0 * (x * ((y / c) / z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[x, -2.75e+101], N[(9.0 * N[(y * N[(N[(x / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.35e-298], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.1e-116], N[(N[(b / c), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.75 \cdot 10^{+101}:\\
\;\;\;\;9 \cdot \left(y \cdot \frac{\frac{x}{c}}{z}\right)\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{-298}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-116}:\\
\;\;\;\;\frac{b}{c} \cdot \frac{1}{z}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\
\end{array}
\end{array}
if x < -2.75000000000000009e101Initial program 79.5%
associate-+l-79.5%
*-commutative79.5%
associate-*r*79.4%
*-commutative79.4%
associate-+l-79.4%
associate-*l*79.3%
associate-*l*76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in z around 0 76.9%
Taylor expanded in x around inf 61.4%
associate-*r/61.5%
associate-*r*61.6%
associate-*l/64.2%
associate-*r/64.3%
associate-*l*64.2%
*-commutative64.2%
associate-/r*68.6%
Simplified68.6%
Taylor expanded in x around 0 64.2%
associate-/r*78.2%
Simplified78.2%
if -2.75000000000000009e101 < x < -1.3500000000000001e-298Initial program 72.8%
associate-+l-72.8%
*-commutative72.8%
associate-*r*73.0%
*-commutative73.0%
associate-+l-73.0%
associate-*l*73.0%
associate-*l*78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in z around 0 76.3%
Taylor expanded in a around inf 51.6%
*-commutative51.6%
associate-/l*51.5%
Simplified51.5%
if -1.3500000000000001e-298 < x < 2.0999999999999999e-116Initial program 85.6%
associate-+l-85.6%
*-commutative85.6%
associate-*r*85.3%
*-commutative85.3%
associate-+l-85.3%
associate-*l*85.3%
associate-*l*85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in b around inf 55.8%
associate-/r*59.3%
Simplified59.3%
div-inv59.3%
Applied egg-rr59.3%
if 2.0999999999999999e-116 < x Initial program 79.4%
associate-+l-79.4%
*-commutative79.4%
associate-*r*80.5%
*-commutative80.5%
associate-+l-80.5%
associate-*l*80.5%
associate-*l*79.5%
*-commutative79.5%
Simplified79.5%
Taylor expanded in x around inf 47.5%
associate-/l*50.9%
associate-/r*50.9%
Simplified50.9%
Final simplification56.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
(let* ((t_1 (* 9.0 (* x (/ (/ y c) z)))))
(if (<= x -1.5e+101)
t_1
(if (<= x -8.4e-305)
(* -4.0 (* t (/ a c)))
(if (<= x 1.08e-116) (* (/ b c) (/ 1.0 z)) t_1)))))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 / c) / z));
double tmp;
if (x <= -1.5e+101) {
tmp = t_1;
} else if (x <= -8.4e-305) {
tmp = -4.0 * (t * (a / c));
} else if (x <= 1.08e-116) {
tmp = (b / c) * (1.0 / z);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 / c) / z))
if (x <= (-1.5d+101)) then
tmp = t_1
else if (x <= (-8.4d-305)) then
tmp = (-4.0d0) * (t * (a / c))
else if (x <= 1.08d-116) then
tmp = (b / c) * (1.0d0 / z)
else
tmp = t_1
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 = 9.0 * (x * ((y / c) / z));
double tmp;
if (x <= -1.5e+101) {
tmp = t_1;
} else if (x <= -8.4e-305) {
tmp = -4.0 * (t * (a / c));
} else if (x <= 1.08e-116) {
tmp = (b / c) * (1.0 / z);
} else {
tmp = t_1;
}
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 = 9.0 * (x * ((y / c) / z)) tmp = 0 if x <= -1.5e+101: tmp = t_1 elif x <= -8.4e-305: tmp = -4.0 * (t * (a / c)) elif x <= 1.08e-116: tmp = (b / c) * (1.0 / z) else: tmp = t_1 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(9.0 * Float64(x * Float64(Float64(y / c) / z))) tmp = 0.0 if (x <= -1.5e+101) tmp = t_1; elseif (x <= -8.4e-305) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (x <= 1.08e-116) tmp = Float64(Float64(b / c) * Float64(1.0 / z)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = 9.0 * (x * ((y / c) / z));
tmp = 0.0;
if (x <= -1.5e+101)
tmp = t_1;
elseif (x <= -8.4e-305)
tmp = -4.0 * (t * (a / c));
elseif (x <= 1.08e-116)
tmp = (b / c) * (1.0 / z);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(9.0 * N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.5e+101], t$95$1, If[LessEqual[x, -8.4e-305], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.08e-116], N[(N[(b / c), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[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{\frac{y}{c}}{z}\right)\\
\mathbf{if}\;x \leq -1.5 \cdot 10^{+101}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -8.4 \cdot 10^{-305}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;x \leq 1.08 \cdot 10^{-116}:\\
\;\;\;\;\frac{b}{c} \cdot \frac{1}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.49999999999999997e101 or 1.08000000000000001e-116 < x Initial program 79.5%
associate-+l-79.5%
*-commutative79.5%
associate-*r*80.2%
*-commutative80.2%
associate-+l-80.2%
associate-*l*80.2%
associate-*l*78.7%
*-commutative78.7%
Simplified78.7%
Taylor expanded in x around inf 51.3%
associate-/l*55.8%
associate-/r*56.8%
Simplified56.8%
if -1.49999999999999997e101 < x < -8.3999999999999999e-305Initial program 72.8%
associate-+l-72.8%
*-commutative72.8%
associate-*r*73.0%
*-commutative73.0%
associate-+l-73.0%
associate-*l*73.0%
associate-*l*78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in z around 0 76.3%
Taylor expanded in a around inf 51.6%
*-commutative51.6%
associate-/l*51.5%
Simplified51.5%
if -8.3999999999999999e-305 < x < 1.08000000000000001e-116Initial program 85.6%
associate-+l-85.6%
*-commutative85.6%
associate-*r*85.3%
*-commutative85.3%
associate-+l-85.3%
associate-*l*85.3%
associate-*l*85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in b around inf 55.8%
associate-/r*59.3%
Simplified59.3%
div-inv59.3%
Applied egg-rr59.3%
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 (<= x -2.6e+102)
t_1
(if (<= x -1.7e-297)
(* -4.0 (* t (/ a c)))
(if (<= x 2.7e-117) (* (/ b c) (/ 1.0 z)) t_1)))))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 (x <= -2.6e+102) {
tmp = t_1;
} else if (x <= -1.7e-297) {
tmp = -4.0 * (t * (a / c));
} else if (x <= 2.7e-117) {
tmp = (b / c) * (1.0 / z);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 (x <= (-2.6d+102)) then
tmp = t_1
else if (x <= (-1.7d-297)) then
tmp = (-4.0d0) * (t * (a / c))
else if (x <= 2.7d-117) then
tmp = (b / c) * (1.0d0 / z)
else
tmp = t_1
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 = 9.0 * (x * (y / (z * c)));
double tmp;
if (x <= -2.6e+102) {
tmp = t_1;
} else if (x <= -1.7e-297) {
tmp = -4.0 * (t * (a / c));
} else if (x <= 2.7e-117) {
tmp = (b / c) * (1.0 / z);
} else {
tmp = t_1;
}
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 = 9.0 * (x * (y / (z * c))) tmp = 0 if x <= -2.6e+102: tmp = t_1 elif x <= -1.7e-297: tmp = -4.0 * (t * (a / c)) elif x <= 2.7e-117: tmp = (b / c) * (1.0 / z) else: tmp = t_1 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(9.0 * Float64(x * Float64(y / Float64(z * c)))) tmp = 0.0 if (x <= -2.6e+102) tmp = t_1; elseif (x <= -1.7e-297) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (x <= 2.7e-117) tmp = Float64(Float64(b / c) * Float64(1.0 / z)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = 9.0 * (x * (y / (z * c)));
tmp = 0.0;
if (x <= -2.6e+102)
tmp = t_1;
elseif (x <= -1.7e-297)
tmp = -4.0 * (t * (a / c));
elseif (x <= 2.7e-117)
tmp = (b / c) * (1.0 / z);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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[x, -2.6e+102], t$95$1, If[LessEqual[x, -1.7e-297], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.7e-117], N[(N[(b / c), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[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}\;x \leq -2.6 \cdot 10^{+102}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.7 \cdot 10^{-297}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{-117}:\\
\;\;\;\;\frac{b}{c} \cdot \frac{1}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.60000000000000006e102 or 2.70000000000000003e-117 < x Initial program 79.5%
associate-+l-79.5%
*-commutative79.5%
associate-*r*80.2%
*-commutative80.2%
associate-+l-80.2%
associate-*l*80.2%
associate-*l*78.7%
*-commutative78.7%
Simplified78.7%
Taylor expanded in x around inf 51.3%
associate-/l*55.8%
associate-/r*56.8%
Simplified56.8%
Taylor expanded in y around 0 55.8%
if -2.60000000000000006e102 < x < -1.69999999999999991e-297Initial program 72.8%
associate-+l-72.8%
*-commutative72.8%
associate-*r*73.0%
*-commutative73.0%
associate-+l-73.0%
associate-*l*73.0%
associate-*l*78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in z around 0 76.3%
Taylor expanded in a around inf 51.6%
*-commutative51.6%
associate-/l*51.5%
Simplified51.5%
if -1.69999999999999991e-297 < x < 2.70000000000000003e-117Initial program 85.6%
associate-+l-85.6%
*-commutative85.6%
associate-*r*85.3%
*-commutative85.3%
associate-+l-85.3%
associate-*l*85.3%
associate-*l*85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in b around inf 55.8%
associate-/r*59.3%
Simplified59.3%
div-inv59.3%
Applied egg-rr59.3%
Final simplification55.1%
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.3e-62) (not (<= z 1.4e-36))) (- (/ b (* z c)) (* 4.0 (/ (* t a) c))) (/ (+ b (* 9.0 (* y x))) (* 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.3e-62) || !(z <= 1.4e-36)) {
tmp = (b / (z * c)) - (4.0 * ((t * a) / 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.
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.3d-62)) .or. (.not. (z <= 1.4d-36))) then
tmp = (b / (z * c)) - (4.0d0 * ((t * a) / 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;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.3e-62) || !(z <= 1.4e-36)) {
tmp = (b / (z * c)) - (4.0 * ((t * a) / 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]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1.3e-62) or not (z <= 1.4e-36): tmp = (b / (z * c)) - (4.0 * ((t * a) / 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]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1.3e-62) || !(z <= 1.4e-36)) tmp = Float64(Float64(b / Float64(z * c)) - Float64(4.0 * Float64(Float64(t * a) / 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -1.3e-62) || ~((z <= 1.4e-36)))
tmp = (b / (z * c)) - (4.0 * ((t * a) / 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. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.3e-62], N[Not[LessEqual[z, 1.4e-36]], $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[(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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{-62} \lor \neg \left(z \leq 1.4 \cdot 10^{-36}\right):\\
\;\;\;\;\frac{b}{z \cdot c} - 4 \cdot \frac{t \cdot a}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(y \cdot x\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.3e-62 or 1.4000000000000001e-36 < z Initial program 62.0%
associate-+l-62.0%
*-commutative62.0%
associate-*r*62.1%
*-commutative62.1%
associate-+l-62.1%
associate-*l*62.2%
associate-*l*66.8%
*-commutative66.8%
Simplified66.8%
Taylor expanded in x around 0 76.9%
Taylor expanded in x around 0 67.4%
if -1.3e-62 < z < 1.4000000000000001e-36Initial program 95.3%
associate-+l-95.3%
*-commutative95.3%
associate-*r*96.0%
*-commutative96.0%
associate-+l-96.0%
associate-*l*95.9%
associate-*l*92.8%
*-commutative92.8%
Simplified92.8%
Taylor expanded in z around 0 85.3%
*-commutative85.3%
Simplified85.3%
Final simplification76.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 -7.2e-90)
(/ (* t (+ (* -4.0 a) (/ b (* z t)))) c)
(if (<= z 2.95e-36)
(/ (+ b (* 9.0 (* y x))) (* 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 <= -7.2e-90) {
tmp = (t * ((-4.0 * a) + (b / (z * t)))) / c;
} else if (z <= 2.95e-36) {
tmp = (b + (9.0 * (y * x))) / (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 <= (-7.2d-90)) then
tmp = (t * (((-4.0d0) * a) + (b / (z * t)))) / c
else if (z <= 2.95d-36) then
tmp = (b + (9.0d0 * (y * x))) / (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 <= -7.2e-90) {
tmp = (t * ((-4.0 * a) + (b / (z * t)))) / c;
} else if (z <= 2.95e-36) {
tmp = (b + (9.0 * (y * x))) / (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 <= -7.2e-90: tmp = (t * ((-4.0 * a) + (b / (z * t)))) / c elif z <= 2.95e-36: tmp = (b + (9.0 * (y * x))) / (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 <= -7.2e-90) tmp = Float64(Float64(t * Float64(Float64(-4.0 * a) + Float64(b / Float64(z * t)))) / c); elseif (z <= 2.95e-36) tmp = Float64(Float64(b + Float64(9.0 * Float64(y * x))) / 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 <= -7.2e-90)
tmp = (t * ((-4.0 * a) + (b / (z * t)))) / c;
elseif (z <= 2.95e-36)
tmp = (b + (9.0 * (y * x))) / (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, -7.2e-90], N[(N[(t * N[(N[(-4.0 * a), $MachinePrecision] + N[(b / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 2.95e-36], N[(N[(b + N[(9.0 * N[(y * x), $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 -7.2 \cdot 10^{-90}:\\
\;\;\;\;\frac{t \cdot \left(-4 \cdot a + \frac{b}{z \cdot t}\right)}{c}\\
\mathbf{elif}\;z \leq 2.95 \cdot 10^{-36}:\\
\;\;\;\;\frac{b + 9 \cdot \left(y \cdot x\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c} - 4 \cdot \frac{t \cdot a}{c}\\
\end{array}
\end{array}
if z < -7.19999999999999961e-90Initial program 70.5%
associate-+l-70.5%
*-commutative70.5%
associate-*r*66.8%
*-commutative66.8%
associate-+l-66.8%
associate-*l*66.8%
associate-*l*72.3%
*-commutative72.3%
Simplified72.3%
Taylor expanded in t around inf 75.4%
Taylor expanded in c around 0 80.0%
Taylor expanded in x around 0 68.5%
if -7.19999999999999961e-90 < z < 2.94999999999999998e-36Initial program 95.0%
associate-+l-95.0%
*-commutative95.0%
associate-*r*95.8%
*-commutative95.8%
associate-+l-95.8%
associate-*l*95.7%
associate-*l*92.4%
*-commutative92.4%
Simplified92.4%
Taylor expanded in z around 0 86.2%
*-commutative86.2%
Simplified86.2%
if 2.94999999999999998e-36 < z Initial program 55.8%
associate-+l-55.8%
*-commutative55.8%
associate-*r*60.3%
*-commutative60.3%
associate-+l-60.3%
associate-*l*60.3%
associate-*l*63.6%
*-commutative63.6%
Simplified63.6%
Taylor expanded in x around 0 77.6%
Taylor expanded in x around 0 70.4%
Final simplification77.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= a -6.2e-16) (not (<= a 3.9))) (* -4.0 (* t (/ a c))) (/ (/ b c) 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 ((a <= -6.2e-16) || !(a <= 3.9)) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = (b / c) / z;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((a <= (-6.2d-16)) .or. (.not. (a <= 3.9d0))) then
tmp = (-4.0d0) * (t * (a / c))
else
tmp = (b / c) / z
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a <= -6.2e-16) || !(a <= 3.9)) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = (b / c) / 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 (a <= -6.2e-16) or not (a <= 3.9): tmp = -4.0 * (t * (a / c)) else: tmp = (b / c) / 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 ((a <= -6.2e-16) || !(a <= 3.9)) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); else tmp = Float64(Float64(b / c) / z); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((a <= -6.2e-16) || ~((a <= 3.9)))
tmp = -4.0 * (t * (a / c));
else
tmp = (b / c) / z;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[a, -6.2e-16], N[Not[LessEqual[a, 3.9]], $MachinePrecision]], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.2 \cdot 10^{-16} \lor \neg \left(a \leq 3.9\right):\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\end{array}
\end{array}
if a < -6.2000000000000002e-16 or 3.89999999999999991 < a Initial program 82.9%
associate-+l-82.9%
*-commutative82.9%
associate-*r*79.0%
*-commutative79.0%
associate-+l-79.0%
associate-*l*79.0%
associate-*l*80.6%
*-commutative80.6%
Simplified80.6%
Taylor expanded in z around 0 80.4%
Taylor expanded in a around inf 54.9%
*-commutative54.9%
associate-/l*56.3%
Simplified56.3%
if -6.2000000000000002e-16 < a < 3.89999999999999991Initial program 74.3%
associate-+l-74.3%
*-commutative74.3%
associate-*r*78.9%
*-commutative78.9%
associate-+l-78.9%
associate-*l*78.9%
associate-*l*78.9%
*-commutative78.9%
Simplified78.9%
Taylor expanded in b around inf 44.7%
associate-/r*46.1%
Simplified46.1%
Final simplification51.1%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= b -2.9e+66) (not (<= b 3.8e+86))) (/ (/ b c) z) (* -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 ((b <= -2.9e+66) || !(b <= 3.8e+86)) {
tmp = (b / c) / z;
} 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 ((b <= (-2.9d+66)) .or. (.not. (b <= 3.8d+86))) then
tmp = (b / c) / z
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 ((b <= -2.9e+66) || !(b <= 3.8e+86)) {
tmp = (b / c) / z;
} 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 (b <= -2.9e+66) or not (b <= 3.8e+86): tmp = (b / c) / z 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 ((b <= -2.9e+66) || !(b <= 3.8e+86)) tmp = Float64(Float64(b / c) / z); 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 ((b <= -2.9e+66) || ~((b <= 3.8e+86)))
tmp = (b / c) / z;
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[Or[LessEqual[b, -2.9e+66], N[Not[LessEqual[b, 3.8e+86]], $MachinePrecision]], N[(N[(b / c), $MachinePrecision] / z), $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}\;b \leq -2.9 \cdot 10^{+66} \lor \neg \left(b \leq 3.8 \cdot 10^{+86}\right):\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if b < -2.89999999999999986e66 or 3.79999999999999978e86 < b Initial program 75.0%
associate-+l-75.0%
*-commutative75.0%
associate-*r*75.0%
*-commutative75.0%
associate-+l-75.0%
associate-*l*75.0%
associate-*l*74.9%
*-commutative74.9%
Simplified74.9%
Taylor expanded in b around inf 51.9%
associate-/r*58.9%
Simplified58.9%
if -2.89999999999999986e66 < b < 3.79999999999999978e86Initial program 80.5%
associate-+l-80.5%
*-commutative80.5%
associate-*r*81.2%
*-commutative81.2%
associate-+l-81.2%
associate-*l*81.2%
associate-*l*82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in z around 0 83.8%
Taylor expanded in a around inf 47.5%
associate-/l*42.1%
Simplified42.1%
Final simplification48.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 (<= y 1.25e-110) (/ b (* z c)) (/ (/ b c) 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 (y <= 1.25e-110) {
tmp = b / (z * c);
} else {
tmp = (b / c) / z;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (y <= 1.25d-110) then
tmp = b / (z * c)
else
tmp = (b / c) / z
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= 1.25e-110) {
tmp = b / (z * c);
} else {
tmp = (b / c) / z;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if y <= 1.25e-110: tmp = b / (z * c) else: tmp = (b / c) / z return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (y <= 1.25e-110) tmp = Float64(b / Float64(z * c)); else tmp = Float64(Float64(b / c) / z); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (y <= 1.25e-110)
tmp = b / (z * c);
else
tmp = (b / c) / z;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[y, 1.25e-110], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.25 \cdot 10^{-110}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\end{array}
\end{array}
if y < 1.25e-110Initial program 79.2%
associate-+l-79.2%
*-commutative79.2%
associate-*r*79.3%
*-commutative79.3%
associate-+l-79.3%
associate-*l*79.3%
associate-*l*81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in b around inf 36.1%
*-commutative36.1%
Simplified36.1%
if 1.25e-110 < y Initial program 77.3%
associate-+l-77.3%
*-commutative77.3%
associate-*r*78.3%
*-commutative78.3%
associate-+l-78.3%
associate-*l*78.3%
associate-*l*77.2%
*-commutative77.2%
Simplified77.2%
Taylor expanded in b around inf 22.7%
associate-/r*25.8%
Simplified25.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 (/ 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 78.5%
associate-+l-78.5%
*-commutative78.5%
associate-*r*78.9%
*-commutative78.9%
associate-+l-78.9%
associate-*l*78.9%
associate-*l*79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in b around inf 31.4%
*-commutative31.4%
Simplified31.4%
(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 2024106
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:alt
(if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))