
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -1.25e+23) (not (<= z 1e-19))) (/ (- (+ (* 9.0 (/ (* x y) z)) (/ b z)) (* 4.0 (* a t))) c) (/ (+ b (fma x (* 9.0 y) (* t (* a (* z -4.0))))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.25e+23) || !(z <= 1e-19)) {
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c;
} else {
tmp = (b + fma(x, (9.0 * y), (t * (a * (z * -4.0))))) / (z * c);
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1.25e+23) || !(z <= 1e-19)) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z)) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(b + fma(x, Float64(9.0 * y), Float64(t * Float64(a * Float64(z * -4.0))))) / Float64(z * c)); end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.25e+23], N[Not[LessEqual[z, 1e-19]], $MachinePrecision]], N[(N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision] + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+23} \lor \neg \left(z \leq 10^{-19}\right):\\
\;\;\;\;\frac{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \mathsf{fma}\left(x, 9 \cdot y, t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.25e23 or 9.9999999999999998e-20 < z Initial program 58.2%
associate-+l-58.2%
*-commutative58.2%
associate-*r*59.4%
*-commutative59.4%
associate-+l-59.4%
associate-*l*59.4%
associate-*l*64.0%
*-commutative64.0%
Simplified64.0%
Taylor expanded in y around inf 68.0%
Taylor expanded in c around 0 82.7%
Taylor expanded in y around 0 87.4%
if -1.25e23 < z < 9.9999999999999998e-20Initial program 93.7%
associate-+l-93.7%
*-commutative93.7%
associate-*r*94.5%
*-commutative94.5%
associate-+l-94.5%
Simplified94.4%
Final simplification91.1%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* a (/ (* t -4.0) c))))
(if (<= y -5.2e-39)
(* 9.0 (* (/ x c) (/ y z)))
(if (<= y 5e-157)
t_1
(if (<= y 1.08e-125)
(/ b (* z c))
(if (<= y 1.7e-63)
t_1
(if (<= y 5.4e-25)
(* 9.0 (/ (* x y) (* z c)))
(if (<= y 1.15e+79)
(* -4.0 (* t (/ a c)))
(* 9.0 (* y (/ x (* z c))))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * ((t * -4.0) / c);
double tmp;
if (y <= -5.2e-39) {
tmp = 9.0 * ((x / c) * (y / z));
} else if (y <= 5e-157) {
tmp = t_1;
} else if (y <= 1.08e-125) {
tmp = b / (z * c);
} else if (y <= 1.7e-63) {
tmp = t_1;
} else if (y <= 5.4e-25) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (y <= 1.15e+79) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = 9.0 * (y * (x / (z * c)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = a * ((t * (-4.0d0)) / c)
if (y <= (-5.2d-39)) then
tmp = 9.0d0 * ((x / c) * (y / z))
else if (y <= 5d-157) then
tmp = t_1
else if (y <= 1.08d-125) then
tmp = b / (z * c)
else if (y <= 1.7d-63) then
tmp = t_1
else if (y <= 5.4d-25) then
tmp = 9.0d0 * ((x * y) / (z * c))
else if (y <= 1.15d+79) then
tmp = (-4.0d0) * (t * (a / c))
else
tmp = 9.0d0 * (y * (x / (z * c)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * ((t * -4.0) / c);
double tmp;
if (y <= -5.2e-39) {
tmp = 9.0 * ((x / c) * (y / z));
} else if (y <= 5e-157) {
tmp = t_1;
} else if (y <= 1.08e-125) {
tmp = b / (z * c);
} else if (y <= 1.7e-63) {
tmp = t_1;
} else if (y <= 5.4e-25) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (y <= 1.15e+79) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = 9.0 * (y * (x / (z * c)));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = a * ((t * -4.0) / c) tmp = 0 if y <= -5.2e-39: tmp = 9.0 * ((x / c) * (y / z)) elif y <= 5e-157: tmp = t_1 elif y <= 1.08e-125: tmp = b / (z * c) elif y <= 1.7e-63: tmp = t_1 elif y <= 5.4e-25: tmp = 9.0 * ((x * y) / (z * c)) elif y <= 1.15e+79: tmp = -4.0 * (t * (a / c)) else: tmp = 9.0 * (y * (x / (z * c))) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(a * Float64(Float64(t * -4.0) / c)) tmp = 0.0 if (y <= -5.2e-39) tmp = Float64(9.0 * Float64(Float64(x / c) * Float64(y / z))); elseif (y <= 5e-157) tmp = t_1; elseif (y <= 1.08e-125) tmp = Float64(b / Float64(z * c)); elseif (y <= 1.7e-63) tmp = t_1; elseif (y <= 5.4e-25) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))); elseif (y <= 1.15e+79) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); else tmp = Float64(9.0 * Float64(y * Float64(x / Float64(z * c)))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = a * ((t * -4.0) / c);
tmp = 0.0;
if (y <= -5.2e-39)
tmp = 9.0 * ((x / c) * (y / z));
elseif (y <= 5e-157)
tmp = t_1;
elseif (y <= 1.08e-125)
tmp = b / (z * c);
elseif (y <= 1.7e-63)
tmp = t_1;
elseif (y <= 5.4e-25)
tmp = 9.0 * ((x * y) / (z * c));
elseif (y <= 1.15e+79)
tmp = -4.0 * (t * (a / c));
else
tmp = 9.0 * (y * (x / (z * c)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.2e-39], N[(9.0 * N[(N[(x / c), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e-157], t$95$1, If[LessEqual[y, 1.08e-125], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e-63], t$95$1, If[LessEqual[y, 5.4e-25], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e+79], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(y * N[(x / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := a \cdot \frac{t \cdot -4}{c}\\
\mathbf{if}\;y \leq -5.2 \cdot 10^{-39}:\\
\;\;\;\;9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\
\mathbf{elif}\;y \leq 5 \cdot 10^{-157}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.08 \cdot 10^{-125}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-63}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{-25}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+79}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\
\end{array}
\end{array}
if y < -5.2e-39Initial program 72.6%
associate-+l-72.6%
*-commutative72.6%
associate-*r*72.0%
*-commutative72.0%
associate-+l-72.0%
associate-*l*72.0%
associate-*l*73.9%
*-commutative73.9%
Simplified73.9%
Taylor expanded in x around inf 54.4%
times-frac54.5%
Simplified54.5%
if -5.2e-39 < y < 5.0000000000000002e-157 or 1.07999999999999998e-125 < y < 1.69999999999999999e-63Initial program 83.0%
associate-+l-83.0%
*-commutative83.0%
associate-*r*85.0%
*-commutative85.0%
associate-+l-85.0%
associate-*l*85.1%
associate-*l*83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in z around inf 47.1%
*-commutative47.1%
associate-/l*48.1%
associate-*r*48.1%
associate-*l/48.1%
Simplified48.1%
if 5.0000000000000002e-157 < y < 1.07999999999999998e-125Initial program 100.0%
associate-+l-100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-+l-100.0%
associate-*l*100.0%
associate-*l*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in b around inf 100.0%
*-commutative100.0%
Simplified100.0%
if 1.69999999999999999e-63 < y < 5.40000000000000032e-25Initial program 90.7%
associate-+l-90.7%
*-commutative90.7%
associate-*r*91.0%
*-commutative91.0%
associate-+l-91.0%
associate-*l*91.1%
associate-*l*99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around inf 55.0%
if 5.40000000000000032e-25 < y < 1.15e79Initial program 77.8%
associate-+l-77.8%
*-commutative77.8%
associate-*r*83.2%
*-commutative83.2%
associate-+l-83.2%
associate-*l*83.1%
associate-*l*83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in y around inf 82.7%
Taylor expanded in c around 0 88.9%
Taylor expanded in y around 0 94.4%
Taylor expanded in z around inf 31.7%
associate-*r/31.7%
associate-*r*31.7%
associate-*l/31.8%
associate-*r/31.8%
associate-*l*31.8%
Simplified31.8%
if 1.15e79 < y Initial program 65.3%
associate-+l-65.3%
*-commutative65.3%
associate-*r*65.2%
*-commutative65.2%
associate-+l-65.2%
associate-*l*65.3%
associate-*l*65.3%
*-commutative65.3%
Simplified65.3%
Taylor expanded in y around inf 64.7%
Taylor expanded in c around 0 80.3%
Taylor expanded in y around 0 80.4%
Taylor expanded in x around inf 49.8%
*-commutative49.8%
associate-*r/57.1%
*-commutative57.1%
Simplified57.1%
Final simplification52.0%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* a (/ (* t -4.0) c))) (t_2 (* 9.0 (/ (* x (/ y c)) z))))
(if (<= y -1.7e-34)
t_2
(if (<= y 1.86e-156)
t_1
(if (<= y 1.52e-125)
(/ b (* z c))
(if (<= y 3.8e-64)
t_1
(if (<= y 5.5e-27)
(* 9.0 (/ (* x y) (* z c)))
(if (<= y 1.1e+81) (* -4.0 (* t (/ a c))) t_2))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * ((t * -4.0) / c);
double t_2 = 9.0 * ((x * (y / c)) / z);
double tmp;
if (y <= -1.7e-34) {
tmp = t_2;
} else if (y <= 1.86e-156) {
tmp = t_1;
} else if (y <= 1.52e-125) {
tmp = b / (z * c);
} else if (y <= 3.8e-64) {
tmp = t_1;
} else if (y <= 5.5e-27) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (y <= 1.1e+81) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a * ((t * (-4.0d0)) / c)
t_2 = 9.0d0 * ((x * (y / c)) / z)
if (y <= (-1.7d-34)) then
tmp = t_2
else if (y <= 1.86d-156) then
tmp = t_1
else if (y <= 1.52d-125) then
tmp = b / (z * c)
else if (y <= 3.8d-64) then
tmp = t_1
else if (y <= 5.5d-27) then
tmp = 9.0d0 * ((x * y) / (z * c))
else if (y <= 1.1d+81) then
tmp = (-4.0d0) * (t * (a / c))
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * ((t * -4.0) / c);
double t_2 = 9.0 * ((x * (y / c)) / z);
double tmp;
if (y <= -1.7e-34) {
tmp = t_2;
} else if (y <= 1.86e-156) {
tmp = t_1;
} else if (y <= 1.52e-125) {
tmp = b / (z * c);
} else if (y <= 3.8e-64) {
tmp = t_1;
} else if (y <= 5.5e-27) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (y <= 1.1e+81) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = a * ((t * -4.0) / c) t_2 = 9.0 * ((x * (y / c)) / z) tmp = 0 if y <= -1.7e-34: tmp = t_2 elif y <= 1.86e-156: tmp = t_1 elif y <= 1.52e-125: tmp = b / (z * c) elif y <= 3.8e-64: tmp = t_1 elif y <= 5.5e-27: tmp = 9.0 * ((x * y) / (z * c)) elif y <= 1.1e+81: tmp = -4.0 * (t * (a / c)) else: tmp = t_2 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(a * Float64(Float64(t * -4.0) / c)) t_2 = Float64(9.0 * Float64(Float64(x * Float64(y / c)) / z)) tmp = 0.0 if (y <= -1.7e-34) tmp = t_2; elseif (y <= 1.86e-156) tmp = t_1; elseif (y <= 1.52e-125) tmp = Float64(b / Float64(z * c)); elseif (y <= 3.8e-64) tmp = t_1; elseif (y <= 5.5e-27) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))); elseif (y <= 1.1e+81) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = a * ((t * -4.0) / c);
t_2 = 9.0 * ((x * (y / c)) / z);
tmp = 0.0;
if (y <= -1.7e-34)
tmp = t_2;
elseif (y <= 1.86e-156)
tmp = t_1;
elseif (y <= 1.52e-125)
tmp = b / (z * c);
elseif (y <= 3.8e-64)
tmp = t_1;
elseif (y <= 5.5e-27)
tmp = 9.0 * ((x * y) / (z * c));
elseif (y <= 1.1e+81)
tmp = -4.0 * (t * (a / c));
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(N[(x * N[(y / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.7e-34], t$95$2, If[LessEqual[y, 1.86e-156], t$95$1, If[LessEqual[y, 1.52e-125], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e-64], t$95$1, If[LessEqual[y, 5.5e-27], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e+81], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := a \cdot \frac{t \cdot -4}{c}\\
t_2 := 9 \cdot \frac{x \cdot \frac{y}{c}}{z}\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{-34}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.86 \cdot 10^{-156}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.52 \cdot 10^{-125}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-27}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+81}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.7e-34 or 1.09999999999999993e81 < y Initial program 70.8%
associate-+l-70.8%
*-commutative70.8%
associate-*r*69.7%
*-commutative69.7%
associate-+l-69.7%
associate-*l*69.7%
associate-*l*70.8%
*-commutative70.8%
Simplified70.8%
Taylor expanded in x around inf 52.6%
associate-/r*51.8%
associate-/l*56.3%
Simplified56.3%
if -1.7e-34 < y < 1.86000000000000012e-156 or 1.5199999999999999e-125 < y < 3.8000000000000002e-64Initial program 81.4%
associate-+l-81.4%
*-commutative81.4%
associate-*r*84.4%
*-commutative84.4%
associate-+l-84.4%
associate-*l*84.4%
associate-*l*82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in z around inf 47.2%
*-commutative47.2%
associate-/l*48.1%
associate-*r*48.1%
associate-*l/48.1%
Simplified48.1%
if 1.86000000000000012e-156 < y < 1.5199999999999999e-125Initial program 100.0%
associate-+l-100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-+l-100.0%
associate-*l*100.0%
associate-*l*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in b around inf 100.0%
*-commutative100.0%
Simplified100.0%
if 3.8000000000000002e-64 < y < 5.5000000000000002e-27Initial program 90.7%
associate-+l-90.7%
*-commutative90.7%
associate-*r*91.0%
*-commutative91.0%
associate-+l-91.0%
associate-*l*91.1%
associate-*l*99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around inf 55.0%
if 5.5000000000000002e-27 < y < 1.09999999999999993e81Initial program 77.8%
associate-+l-77.8%
*-commutative77.8%
associate-*r*83.2%
*-commutative83.2%
associate-+l-83.2%
associate-*l*83.1%
associate-*l*83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in y around inf 82.7%
Taylor expanded in c around 0 88.9%
Taylor expanded in y around 0 94.4%
Taylor expanded in z around inf 31.7%
associate-*r/31.7%
associate-*r*31.7%
associate-*l/31.8%
associate-*r/31.8%
associate-*l*31.8%
Simplified31.8%
Final simplification52.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* a (/ (* t -4.0) c))) (t_2 (* 9.0 (* y (/ x (* z c))))))
(if (<= t -1.65e+81)
t_1
(if (<= t -0.0023)
(/ (/ b c) z)
(if (<= t -9.5e-59)
t_2
(if (<= t -2.4e-142)
(* (/ b z) (/ 1.0 c))
(if (<= t -7.4e-235)
t_2
(if (<= t 4.1e-153) (/ (/ b z) c) t_1))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * ((t * -4.0) / c);
double t_2 = 9.0 * (y * (x / (z * c)));
double tmp;
if (t <= -1.65e+81) {
tmp = t_1;
} else if (t <= -0.0023) {
tmp = (b / c) / z;
} else if (t <= -9.5e-59) {
tmp = t_2;
} else if (t <= -2.4e-142) {
tmp = (b / z) * (1.0 / c);
} else if (t <= -7.4e-235) {
tmp = t_2;
} else if (t <= 4.1e-153) {
tmp = (b / z) / c;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a * ((t * (-4.0d0)) / c)
t_2 = 9.0d0 * (y * (x / (z * c)))
if (t <= (-1.65d+81)) then
tmp = t_1
else if (t <= (-0.0023d0)) then
tmp = (b / c) / z
else if (t <= (-9.5d-59)) then
tmp = t_2
else if (t <= (-2.4d-142)) then
tmp = (b / z) * (1.0d0 / c)
else if (t <= (-7.4d-235)) then
tmp = t_2
else if (t <= 4.1d-153) then
tmp = (b / z) / c
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * ((t * -4.0) / c);
double t_2 = 9.0 * (y * (x / (z * c)));
double tmp;
if (t <= -1.65e+81) {
tmp = t_1;
} else if (t <= -0.0023) {
tmp = (b / c) / z;
} else if (t <= -9.5e-59) {
tmp = t_2;
} else if (t <= -2.4e-142) {
tmp = (b / z) * (1.0 / c);
} else if (t <= -7.4e-235) {
tmp = t_2;
} else if (t <= 4.1e-153) {
tmp = (b / z) / c;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = a * ((t * -4.0) / c) t_2 = 9.0 * (y * (x / (z * c))) tmp = 0 if t <= -1.65e+81: tmp = t_1 elif t <= -0.0023: tmp = (b / c) / z elif t <= -9.5e-59: tmp = t_2 elif t <= -2.4e-142: tmp = (b / z) * (1.0 / c) elif t <= -7.4e-235: tmp = t_2 elif t <= 4.1e-153: tmp = (b / z) / c else: tmp = t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(a * Float64(Float64(t * -4.0) / c)) t_2 = Float64(9.0 * Float64(y * Float64(x / Float64(z * c)))) tmp = 0.0 if (t <= -1.65e+81) tmp = t_1; elseif (t <= -0.0023) tmp = Float64(Float64(b / c) / z); elseif (t <= -9.5e-59) tmp = t_2; elseif (t <= -2.4e-142) tmp = Float64(Float64(b / z) * Float64(1.0 / c)); elseif (t <= -7.4e-235) tmp = t_2; elseif (t <= 4.1e-153) tmp = Float64(Float64(b / z) / c); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = a * ((t * -4.0) / c);
t_2 = 9.0 * (y * (x / (z * c)));
tmp = 0.0;
if (t <= -1.65e+81)
tmp = t_1;
elseif (t <= -0.0023)
tmp = (b / c) / z;
elseif (t <= -9.5e-59)
tmp = t_2;
elseif (t <= -2.4e-142)
tmp = (b / z) * (1.0 / c);
elseif (t <= -7.4e-235)
tmp = t_2;
elseif (t <= 4.1e-153)
tmp = (b / z) / c;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(y * N[(x / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.65e+81], t$95$1, If[LessEqual[t, -0.0023], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, -9.5e-59], t$95$2, If[LessEqual[t, -2.4e-142], N[(N[(b / z), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.4e-235], t$95$2, If[LessEqual[t, 4.1e-153], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := a \cdot \frac{t \cdot -4}{c}\\
t_2 := 9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\
\mathbf{if}\;t \leq -1.65 \cdot 10^{+81}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -0.0023:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;t \leq -9.5 \cdot 10^{-59}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2.4 \cdot 10^{-142}:\\
\;\;\;\;\frac{b}{z} \cdot \frac{1}{c}\\
\mathbf{elif}\;t \leq -7.4 \cdot 10^{-235}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 4.1 \cdot 10^{-153}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.65e81 or 4.1e-153 < t Initial program 70.7%
associate-+l-70.7%
*-commutative70.7%
associate-*r*74.9%
*-commutative74.9%
associate-+l-74.9%
associate-*l*74.9%
associate-*l*72.0%
*-commutative72.0%
Simplified72.0%
Taylor expanded in z around inf 51.9%
*-commutative51.9%
associate-/l*56.5%
associate-*r*56.5%
associate-*l/56.5%
Simplified56.5%
if -1.65e81 < t < -0.0023Initial program 84.5%
associate-+l-84.5%
*-commutative84.5%
associate-*r*92.4%
*-commutative92.4%
associate-+l-92.4%
associate-*l*92.4%
associate-*l*92.4%
*-commutative92.4%
Simplified92.4%
Taylor expanded in b around inf 55.4%
associate-/r*55.8%
Simplified55.8%
if -0.0023 < t < -9.4999999999999994e-59 or -2.39999999999999988e-142 < t < -7.4000000000000002e-235Initial program 79.7%
associate-+l-79.7%
*-commutative79.7%
associate-*r*74.3%
*-commutative74.3%
associate-+l-74.3%
associate-*l*74.3%
associate-*l*79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in y around inf 71.0%
Taylor expanded in c around 0 64.9%
Taylor expanded in y around 0 75.9%
Taylor expanded in x around inf 49.0%
*-commutative49.0%
associate-*r/61.8%
*-commutative61.8%
Simplified61.8%
if -9.4999999999999994e-59 < t < -2.39999999999999988e-142Initial program 83.9%
associate-+l-83.9%
*-commutative83.9%
associate-*r*84.0%
*-commutative84.0%
associate-+l-84.0%
associate-*l*84.0%
associate-*l*79.2%
*-commutative79.2%
Simplified79.2%
Taylor expanded in y around inf 59.3%
Taylor expanded in c around 0 74.6%
Taylor expanded in b around inf 32.5%
div-inv32.6%
Applied egg-rr32.6%
if -7.4000000000000002e-235 < t < 4.1e-153Initial program 88.4%
associate-+l-88.4%
*-commutative88.4%
associate-*r*82.7%
*-commutative82.7%
associate-+l-82.7%
associate-*l*82.7%
associate-*l*90.5%
*-commutative90.5%
Simplified90.5%
Taylor expanded in y around inf 59.4%
Taylor expanded in c around 0 82.7%
Taylor expanded in b around inf 53.0%
Final simplification54.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (- (/ b z) (* 4.0 (* a t))) c)))
(if (<= z -5.6e+42)
t_1
(if (<= z 1.9e+18)
(/ (+ b (* y (* 9.0 x))) (* z c))
(if (or (<= z 5.1e+72) (not (<= z 4e+113)))
t_1
(/ (+ (* 9.0 (/ (* x y) z)) (/ b z)) c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((b / z) - (4.0 * (a * t))) / c;
double tmp;
if (z <= -5.6e+42) {
tmp = t_1;
} else if (z <= 1.9e+18) {
tmp = (b + (y * (9.0 * x))) / (z * c);
} else if ((z <= 5.1e+72) || !(z <= 4e+113)) {
tmp = t_1;
} else {
tmp = ((9.0 * ((x * y) / z)) + (b / z)) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = ((b / z) - (4.0d0 * (a * t))) / c
if (z <= (-5.6d+42)) then
tmp = t_1
else if (z <= 1.9d+18) then
tmp = (b + (y * (9.0d0 * x))) / (z * c)
else if ((z <= 5.1d+72) .or. (.not. (z <= 4d+113))) then
tmp = t_1
else
tmp = ((9.0d0 * ((x * y) / z)) + (b / z)) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((b / z) - (4.0 * (a * t))) / c;
double tmp;
if (z <= -5.6e+42) {
tmp = t_1;
} else if (z <= 1.9e+18) {
tmp = (b + (y * (9.0 * x))) / (z * c);
} else if ((z <= 5.1e+72) || !(z <= 4e+113)) {
tmp = t_1;
} else {
tmp = ((9.0 * ((x * y) / z)) + (b / z)) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = ((b / z) - (4.0 * (a * t))) / c tmp = 0 if z <= -5.6e+42: tmp = t_1 elif z <= 1.9e+18: tmp = (b + (y * (9.0 * x))) / (z * c) elif (z <= 5.1e+72) or not (z <= 4e+113): tmp = t_1 else: tmp = ((9.0 * ((x * y) / z)) + (b / z)) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(b / z) - Float64(4.0 * Float64(a * t))) / c) tmp = 0.0 if (z <= -5.6e+42) tmp = t_1; elseif (z <= 1.9e+18) tmp = Float64(Float64(b + Float64(y * Float64(9.0 * x))) / Float64(z * c)); elseif ((z <= 5.1e+72) || !(z <= 4e+113)) tmp = t_1; else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z)) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = ((b / z) - (4.0 * (a * t))) / c;
tmp = 0.0;
if (z <= -5.6e+42)
tmp = t_1;
elseif (z <= 1.9e+18)
tmp = (b + (y * (9.0 * x))) / (z * c);
elseif ((z <= 5.1e+72) || ~((z <= 4e+113)))
tmp = t_1;
else
tmp = ((9.0 * ((x * y) / z)) + (b / z)) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(b / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -5.6e+42], t$95$1, If[LessEqual[z, 1.9e+18], N[(N[(b + N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 5.1e+72], N[Not[LessEqual[z, 4e+113]], $MachinePrecision]], t$95$1, N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+18}:\\
\;\;\;\;\frac{b + y \cdot \left(9 \cdot x\right)}{z \cdot c}\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{+72} \lor \neg \left(z \leq 4 \cdot 10^{+113}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}}{c}\\
\end{array}
\end{array}
if z < -5.5999999999999999e42 or 1.9e18 < z < 5.09999999999999977e72 or 4e113 < z Initial program 53.8%
associate-+l-53.8%
*-commutative53.8%
associate-*r*54.4%
*-commutative54.4%
associate-+l-54.4%
associate-*l*54.4%
associate-*l*60.1%
*-commutative60.1%
Simplified60.1%
Taylor expanded in y around inf 69.6%
Taylor expanded in c around 0 83.8%
Taylor expanded in y around 0 77.3%
if -5.5999999999999999e42 < z < 1.9e18Initial program 92.6%
associate-+l-92.6%
*-commutative92.6%
associate-*r*93.3%
*-commutative93.3%
associate-+l-93.3%
associate-*l*93.3%
associate-*l*90.0%
*-commutative90.0%
Simplified90.0%
Taylor expanded in x around inf 81.3%
associate-*r*81.3%
Simplified81.3%
if 5.09999999999999977e72 < z < 4e113Initial program 56.7%
associate-+l-56.7%
*-commutative56.7%
associate-*r*67.0%
*-commutative67.0%
associate-+l-67.0%
associate-*l*67.0%
associate-*l*67.6%
*-commutative67.6%
Simplified67.6%
Taylor expanded in y around inf 67.3%
Taylor expanded in c around 0 77.9%
Taylor expanded in y around 0 78.3%
Taylor expanded in a around 0 80.3%
Final simplification79.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ b (* y (* 9.0 x))) (* z c))))
(if (<= y -1.8e-28)
t_1
(if (<= y 7.8e-64)
(- (/ b (* z c)) (* 4.0 (/ (* a t) c)))
(if (<= y 7e-20)
t_1
(if (<= y 2.8e+76)
(/ (- (/ b z) (* 4.0 (* a t))) c)
(* (/ y c) (/ (- (/ b y) (* x -9.0)) z))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + (y * (9.0 * x))) / (z * c);
double tmp;
if (y <= -1.8e-28) {
tmp = t_1;
} else if (y <= 7.8e-64) {
tmp = (b / (z * c)) - (4.0 * ((a * t) / c));
} else if (y <= 7e-20) {
tmp = t_1;
} else if (y <= 2.8e+76) {
tmp = ((b / z) - (4.0 * (a * t))) / c;
} else {
tmp = (y / c) * (((b / y) - (x * -9.0)) / z);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (b + (y * (9.0d0 * x))) / (z * c)
if (y <= (-1.8d-28)) then
tmp = t_1
else if (y <= 7.8d-64) then
tmp = (b / (z * c)) - (4.0d0 * ((a * t) / c))
else if (y <= 7d-20) then
tmp = t_1
else if (y <= 2.8d+76) then
tmp = ((b / z) - (4.0d0 * (a * t))) / c
else
tmp = (y / c) * (((b / y) - (x * (-9.0d0))) / z)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + (y * (9.0 * x))) / (z * c);
double tmp;
if (y <= -1.8e-28) {
tmp = t_1;
} else if (y <= 7.8e-64) {
tmp = (b / (z * c)) - (4.0 * ((a * t) / c));
} else if (y <= 7e-20) {
tmp = t_1;
} else if (y <= 2.8e+76) {
tmp = ((b / z) - (4.0 * (a * t))) / c;
} else {
tmp = (y / c) * (((b / y) - (x * -9.0)) / z);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = (b + (y * (9.0 * x))) / (z * c) tmp = 0 if y <= -1.8e-28: tmp = t_1 elif y <= 7.8e-64: tmp = (b / (z * c)) - (4.0 * ((a * t) / c)) elif y <= 7e-20: tmp = t_1 elif y <= 2.8e+76: tmp = ((b / z) - (4.0 * (a * t))) / c else: tmp = (y / c) * (((b / y) - (x * -9.0)) / z) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b + Float64(y * Float64(9.0 * x))) / Float64(z * c)) tmp = 0.0 if (y <= -1.8e-28) tmp = t_1; elseif (y <= 7.8e-64) tmp = Float64(Float64(b / Float64(z * c)) - Float64(4.0 * Float64(Float64(a * t) / c))); elseif (y <= 7e-20) tmp = t_1; elseif (y <= 2.8e+76) tmp = Float64(Float64(Float64(b / z) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(y / c) * Float64(Float64(Float64(b / y) - Float64(x * -9.0)) / z)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (b + (y * (9.0 * x))) / (z * c);
tmp = 0.0;
if (y <= -1.8e-28)
tmp = t_1;
elseif (y <= 7.8e-64)
tmp = (b / (z * c)) - (4.0 * ((a * t) / c));
elseif (y <= 7e-20)
tmp = t_1;
elseif (y <= 2.8e+76)
tmp = ((b / z) - (4.0 * (a * t))) / c;
else
tmp = (y / c) * (((b / y) - (x * -9.0)) / z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b + N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.8e-28], t$95$1, If[LessEqual[y, 7.8e-64], N[(N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e-20], t$95$1, If[LessEqual[y, 2.8e+76], N[(N[(N[(b / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(y / c), $MachinePrecision] * N[(N[(N[(b / y), $MachinePrecision] - N[(x * -9.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{b + y \cdot \left(9 \cdot x\right)}{z \cdot c}\\
\mathbf{if}\;y \leq -1.8 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{-64}:\\
\;\;\;\;\frac{b}{z \cdot c} - 4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+76}:\\
\;\;\;\;\frac{\frac{b}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{c} \cdot \frac{\frac{b}{y} - x \cdot -9}{z}\\
\end{array}
\end{array}
if y < -1.7999999999999999e-28 or 7.7999999999999994e-64 < y < 7.00000000000000007e-20Initial program 76.6%
associate-+l-76.6%
*-commutative76.6%
associate-*r*75.5%
*-commutative75.5%
associate-+l-75.5%
associate-*l*75.5%
associate-*l*77.8%
*-commutative77.8%
Simplified77.8%
Taylor expanded in x around inf 67.2%
associate-*r*67.2%
Simplified67.2%
if -1.7999999999999999e-28 < y < 7.7999999999999994e-64Initial program 82.1%
associate-+l-82.1%
*-commutative82.1%
associate-*r*84.5%
*-commutative84.5%
associate-+l-84.5%
associate-*l*84.5%
associate-*l*83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in y around inf 44.9%
Taylor expanded in y around 0 80.8%
if 7.00000000000000007e-20 < y < 2.7999999999999999e76Initial program 76.5%
associate-+l-76.5%
*-commutative76.5%
associate-*r*82.1%
*-commutative82.1%
associate-+l-82.1%
associate-*l*82.0%
associate-*l*82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in y around inf 81.6%
Taylor expanded in c around 0 88.2%
Taylor expanded in y around 0 73.7%
if 2.7999999999999999e76 < y Initial program 65.9%
associate-+l-65.9%
*-commutative65.9%
associate-*r*65.9%
*-commutative65.9%
associate-+l-65.9%
associate-*l*66.0%
associate-*l*66.0%
*-commutative66.0%
Simplified66.0%
Taylor expanded in y around inf 65.4%
Taylor expanded in c around 0 80.7%
Taylor expanded in a around 0 60.6%
Taylor expanded in z around -inf 64.4%
mul-1-neg64.4%
times-frac69.8%
distribute-rgt-neg-in69.8%
distribute-neg-frac269.8%
mul-1-neg69.8%
unsub-neg69.8%
*-commutative69.8%
Simplified69.8%
Final simplification73.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= z -5.2e+42)
(and (not (<= z 1.72e+19)) (or (<= z 8.7e+71) (not (<= z 7.8e+120)))))
(/ (- (/ b z) (* 4.0 (* a t))) c)
(/ (+ b (* y (* 9.0 x))) (* z c))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -5.2e+42) || (!(z <= 1.72e+19) && ((z <= 8.7e+71) || !(z <= 7.8e+120)))) {
tmp = ((b / z) - (4.0 * (a * t))) / c;
} else {
tmp = (b + (y * (9.0 * x))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-5.2d+42)) .or. (.not. (z <= 1.72d+19)) .and. (z <= 8.7d+71) .or. (.not. (z <= 7.8d+120))) then
tmp = ((b / z) - (4.0d0 * (a * t))) / c
else
tmp = (b + (y * (9.0d0 * x))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -5.2e+42) || (!(z <= 1.72e+19) && ((z <= 8.7e+71) || !(z <= 7.8e+120)))) {
tmp = ((b / z) - (4.0 * (a * t))) / c;
} else {
tmp = (b + (y * (9.0 * x))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -5.2e+42) or (not (z <= 1.72e+19) and ((z <= 8.7e+71) or not (z <= 7.8e+120))): tmp = ((b / z) - (4.0 * (a * t))) / c else: tmp = (b + (y * (9.0 * x))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -5.2e+42) || (!(z <= 1.72e+19) && ((z <= 8.7e+71) || !(z <= 7.8e+120)))) tmp = Float64(Float64(Float64(b / z) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(b + Float64(y * Float64(9.0 * x))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -5.2e+42) || (~((z <= 1.72e+19)) && ((z <= 8.7e+71) || ~((z <= 7.8e+120)))))
tmp = ((b / z) - (4.0 * (a * t))) / c;
else
tmp = (b + (y * (9.0 * x))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -5.2e+42], And[N[Not[LessEqual[z, 1.72e+19]], $MachinePrecision], Or[LessEqual[z, 8.7e+71], N[Not[LessEqual[z, 7.8e+120]], $MachinePrecision]]]], N[(N[(N[(b / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+42} \lor \neg \left(z \leq 1.72 \cdot 10^{+19}\right) \land \left(z \leq 8.7 \cdot 10^{+71} \lor \neg \left(z \leq 7.8 \cdot 10^{+120}\right)\right):\\
\;\;\;\;\frac{\frac{b}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + y \cdot \left(9 \cdot x\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -5.1999999999999998e42 or 1.72e19 < z < 8.6999999999999997e71 or 7.7999999999999997e120 < z Initial program 53.8%
associate-+l-53.8%
*-commutative53.8%
associate-*r*54.4%
*-commutative54.4%
associate-+l-54.4%
associate-*l*54.4%
associate-*l*60.1%
*-commutative60.1%
Simplified60.1%
Taylor expanded in y around inf 69.6%
Taylor expanded in c around 0 83.8%
Taylor expanded in y around 0 77.3%
if -5.1999999999999998e42 < z < 1.72e19 or 8.6999999999999997e71 < z < 7.7999999999999997e120Initial program 90.6%
associate-+l-90.6%
*-commutative90.6%
associate-*r*91.8%
*-commutative91.8%
associate-+l-91.8%
associate-*l*91.8%
associate-*l*88.7%
*-commutative88.7%
Simplified88.7%
Taylor expanded in x around inf 81.2%
associate-*r*81.2%
Simplified81.2%
Final simplification79.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 4.0 (* a t))) (t_2 (/ (- (* 9.0 (/ (* x y) z)) t_1) c)))
(if (<= z -4e+22)
t_2
(if (<= z 2.5e-8)
(/ (+ b (* y (* 9.0 x))) (* z c))
(if (<= z 2.5e+118) t_2 (/ (- (/ b z) t_1) c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 4.0 * (a * t);
double t_2 = ((9.0 * ((x * y) / z)) - t_1) / c;
double tmp;
if (z <= -4e+22) {
tmp = t_2;
} else if (z <= 2.5e-8) {
tmp = (b + (y * (9.0 * x))) / (z * c);
} else if (z <= 2.5e+118) {
tmp = t_2;
} else {
tmp = ((b / z) - t_1) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 4.0d0 * (a * t)
t_2 = ((9.0d0 * ((x * y) / z)) - t_1) / c
if (z <= (-4d+22)) then
tmp = t_2
else if (z <= 2.5d-8) then
tmp = (b + (y * (9.0d0 * x))) / (z * c)
else if (z <= 2.5d+118) then
tmp = t_2
else
tmp = ((b / z) - t_1) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 4.0 * (a * t);
double t_2 = ((9.0 * ((x * y) / z)) - t_1) / c;
double tmp;
if (z <= -4e+22) {
tmp = t_2;
} else if (z <= 2.5e-8) {
tmp = (b + (y * (9.0 * x))) / (z * c);
} else if (z <= 2.5e+118) {
tmp = t_2;
} else {
tmp = ((b / z) - t_1) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = 4.0 * (a * t) t_2 = ((9.0 * ((x * y) / z)) - t_1) / c tmp = 0 if z <= -4e+22: tmp = t_2 elif z <= 2.5e-8: tmp = (b + (y * (9.0 * x))) / (z * c) elif z <= 2.5e+118: tmp = t_2 else: tmp = ((b / z) - t_1) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(4.0 * Float64(a * t)) t_2 = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) - t_1) / c) tmp = 0.0 if (z <= -4e+22) tmp = t_2; elseif (z <= 2.5e-8) tmp = Float64(Float64(b + Float64(y * Float64(9.0 * x))) / Float64(z * c)); elseif (z <= 2.5e+118) tmp = t_2; else tmp = Float64(Float64(Float64(b / z) - t_1) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = 4.0 * (a * t);
t_2 = ((9.0 * ((x * y) / z)) - t_1) / c;
tmp = 0.0;
if (z <= -4e+22)
tmp = t_2;
elseif (z <= 2.5e-8)
tmp = (b + (y * (9.0 * x))) / (z * c);
elseif (z <= 2.5e+118)
tmp = t_2;
else
tmp = ((b / z) - t_1) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -4e+22], t$95$2, If[LessEqual[z, 2.5e-8], N[(N[(b + N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+118], t$95$2, N[(N[(N[(b / z), $MachinePrecision] - t$95$1), $MachinePrecision] / c), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(a \cdot t\right)\\
t_2 := \frac{9 \cdot \frac{x \cdot y}{z} - t\_1}{c}\\
\mathbf{if}\;z \leq -4 \cdot 10^{+22}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-8}:\\
\;\;\;\;\frac{b + y \cdot \left(9 \cdot x\right)}{z \cdot c}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+118}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z} - t\_1}{c}\\
\end{array}
\end{array}
if z < -4e22 or 2.4999999999999999e-8 < z < 2.49999999999999986e118Initial program 60.0%
associate-+l-60.0%
*-commutative60.0%
associate-*r*62.7%
*-commutative62.7%
associate-+l-62.7%
associate-*l*62.8%
associate-*l*66.7%
*-commutative66.7%
Simplified66.7%
Taylor expanded in y around inf 68.2%
Taylor expanded in c around 0 82.2%
Taylor expanded in y around 0 85.5%
Taylor expanded in b around 0 76.5%
if -4e22 < z < 2.4999999999999999e-8Initial program 93.8%
associate-+l-93.8%
*-commutative93.8%
associate-*r*94.5%
*-commutative94.5%
associate-+l-94.5%
associate-*l*94.5%
associate-*l*90.9%
*-commutative90.9%
Simplified90.9%
Taylor expanded in x around inf 83.4%
associate-*r*83.4%
Simplified83.4%
if 2.49999999999999986e118 < z Initial program 51.3%
associate-+l-51.3%
*-commutative51.3%
associate-*r*48.7%
*-commutative48.7%
associate-+l-48.7%
associate-*l*48.7%
associate-*l*54.9%
*-commutative54.9%
Simplified54.9%
Taylor expanded in y around inf 68.5%
Taylor expanded in c around 0 85.8%
Taylor expanded in y around 0 91.5%
Final simplification82.1%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -2.5e+22) (not (<= z 1e-20))) (/ (- (+ (* 9.0 (/ (* x y) z)) (/ b z)) (* 4.0 (* a t))) c) (/ (- b (- (* a (* t (* z 4.0))) (* y (* 9.0 x)))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.5e+22) || !(z <= 1e-20)) {
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c;
} else {
tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-2.5d+22)) .or. (.not. (z <= 1d-20))) then
tmp = (((9.0d0 * ((x * y) / z)) + (b / z)) - (4.0d0 * (a * t))) / c
else
tmp = (b - ((a * (t * (z * 4.0d0))) - (y * (9.0d0 * x)))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.5e+22) || !(z <= 1e-20)) {
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c;
} else {
tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -2.5e+22) or not (z <= 1e-20): tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c else: tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -2.5e+22) || !(z <= 1e-20)) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z)) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(b - Float64(Float64(a * Float64(t * Float64(z * 4.0))) - Float64(y * Float64(9.0 * x)))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -2.5e+22) || ~((z <= 1e-20)))
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c;
else
tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -2.5e+22], N[Not[LessEqual[z, 1e-20]], $MachinePrecision]], N[(N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b - N[(N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+22} \lor \neg \left(z \leq 10^{-20}\right):\\
\;\;\;\;\frac{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b - \left(a \cdot \left(t \cdot \left(z \cdot 4\right)\right) - y \cdot \left(9 \cdot x\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -2.4999999999999998e22 or 9.99999999999999945e-21 < z Initial program 58.5%
associate-+l-58.5%
*-commutative58.5%
associate-*r*59.7%
*-commutative59.7%
associate-+l-59.7%
associate-*l*59.8%
associate-*l*64.2%
*-commutative64.2%
Simplified64.2%
Taylor expanded in y around inf 67.5%
Taylor expanded in c around 0 82.8%
Taylor expanded in y around 0 87.5%
if -2.4999999999999998e22 < z < 9.99999999999999945e-21Initial program 93.7%
Final simplification90.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -1.85e+86)
(/ (* y (- (* 9.0 (/ x z)) (* 4.0 (/ (* a t) y)))) c)
(if (<= z 7e+120)
(/ (+ b (- (* x (* 9.0 y)) (* (* a t) (* z 4.0)))) (* z c))
(/ (- (/ b z) (* 4.0 (* a t))) c))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -1.85e+86) {
tmp = (y * ((9.0 * (x / z)) - (4.0 * ((a * t) / y)))) / c;
} else if (z <= 7e+120) {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
} else {
tmp = ((b / z) - (4.0 * (a * t))) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-1.85d+86)) then
tmp = (y * ((9.0d0 * (x / z)) - (4.0d0 * ((a * t) / y)))) / c
else if (z <= 7d+120) then
tmp = (b + ((x * (9.0d0 * y)) - ((a * t) * (z * 4.0d0)))) / (z * c)
else
tmp = ((b / z) - (4.0d0 * (a * t))) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -1.85e+86) {
tmp = (y * ((9.0 * (x / z)) - (4.0 * ((a * t) / y)))) / c;
} else if (z <= 7e+120) {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
} else {
tmp = ((b / z) - (4.0 * (a * t))) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -1.85e+86: tmp = (y * ((9.0 * (x / z)) - (4.0 * ((a * t) / y)))) / c elif z <= 7e+120: tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c) else: tmp = ((b / z) - (4.0 * (a * t))) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -1.85e+86) tmp = Float64(Float64(y * Float64(Float64(9.0 * Float64(x / z)) - Float64(4.0 * Float64(Float64(a * t) / y)))) / c); elseif (z <= 7e+120) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(a * t) * Float64(z * 4.0)))) / Float64(z * c)); else tmp = Float64(Float64(Float64(b / z) - Float64(4.0 * Float64(a * t))) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -1.85e+86)
tmp = (y * ((9.0 * (x / z)) - (4.0 * ((a * t) / y)))) / c;
elseif (z <= 7e+120)
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
else
tmp = ((b / z) - (4.0 * (a * t))) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -1.85e+86], N[(N[(y * N[(N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 7e+120], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+86}:\\
\;\;\;\;\frac{y \cdot \left(9 \cdot \frac{x}{z} - 4 \cdot \frac{a \cdot t}{y}\right)}{c}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+120}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(a \cdot t\right) \cdot \left(z \cdot 4\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\end{array}
\end{array}
if z < -1.84999999999999996e86Initial program 47.1%
associate-+l-47.1%
*-commutative47.1%
associate-*r*50.6%
*-commutative50.6%
associate-+l-50.6%
associate-*l*50.6%
associate-*l*59.2%
*-commutative59.2%
Simplified59.2%
Taylor expanded in y around inf 68.2%
Taylor expanded in c around 0 82.9%
Taylor expanded in b around 0 81.7%
if -1.84999999999999996e86 < z < 7.00000000000000015e120Initial program 88.1%
associate-+l-88.1%
*-commutative88.1%
associate-*r*89.1%
*-commutative89.1%
associate-+l-89.1%
associate-*l*89.2%
associate-*l*86.5%
*-commutative86.5%
Simplified86.5%
if 7.00000000000000015e120 < z Initial program 51.3%
associate-+l-51.3%
*-commutative51.3%
associate-*r*48.7%
*-commutative48.7%
associate-+l-48.7%
associate-*l*48.7%
associate-*l*54.9%
*-commutative54.9%
Simplified54.9%
Taylor expanded in y around inf 68.5%
Taylor expanded in c around 0 85.8%
Taylor expanded in y around 0 91.5%
Final simplification86.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -8.4e+83)
(/ (* y (- (* 9.0 (/ x z)) (* 4.0 (/ (* a t) y)))) c)
(if (<= z 1.3e+119)
(/ (- b (- (* a (* t (* z 4.0))) (* y (* 9.0 x)))) (* z c))
(/ (- (/ b z) (* 4.0 (* a t))) c))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -8.4e+83) {
tmp = (y * ((9.0 * (x / z)) - (4.0 * ((a * t) / y)))) / c;
} else if (z <= 1.3e+119) {
tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (z * c);
} else {
tmp = ((b / z) - (4.0 * (a * t))) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-8.4d+83)) then
tmp = (y * ((9.0d0 * (x / z)) - (4.0d0 * ((a * t) / y)))) / c
else if (z <= 1.3d+119) then
tmp = (b - ((a * (t * (z * 4.0d0))) - (y * (9.0d0 * x)))) / (z * c)
else
tmp = ((b / z) - (4.0d0 * (a * t))) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -8.4e+83) {
tmp = (y * ((9.0 * (x / z)) - (4.0 * ((a * t) / y)))) / c;
} else if (z <= 1.3e+119) {
tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (z * c);
} else {
tmp = ((b / z) - (4.0 * (a * t))) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -8.4e+83: tmp = (y * ((9.0 * (x / z)) - (4.0 * ((a * t) / y)))) / c elif z <= 1.3e+119: tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (z * c) else: tmp = ((b / z) - (4.0 * (a * t))) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -8.4e+83) tmp = Float64(Float64(y * Float64(Float64(9.0 * Float64(x / z)) - Float64(4.0 * Float64(Float64(a * t) / y)))) / c); elseif (z <= 1.3e+119) tmp = Float64(Float64(b - Float64(Float64(a * Float64(t * Float64(z * 4.0))) - Float64(y * Float64(9.0 * x)))) / Float64(z * c)); else tmp = Float64(Float64(Float64(b / z) - Float64(4.0 * Float64(a * t))) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -8.4e+83)
tmp = (y * ((9.0 * (x / z)) - (4.0 * ((a * t) / y)))) / c;
elseif (z <= 1.3e+119)
tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (z * c);
else
tmp = ((b / z) - (4.0 * (a * t))) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -8.4e+83], N[(N[(y * N[(N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 1.3e+119], N[(N[(b - N[(N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.4 \cdot 10^{+83}:\\
\;\;\;\;\frac{y \cdot \left(9 \cdot \frac{x}{z} - 4 \cdot \frac{a \cdot t}{y}\right)}{c}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+119}:\\
\;\;\;\;\frac{b - \left(a \cdot \left(t \cdot \left(z \cdot 4\right)\right) - y \cdot \left(9 \cdot x\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\end{array}
\end{array}
if z < -8.4000000000000001e83Initial program 47.1%
associate-+l-47.1%
*-commutative47.1%
associate-*r*50.6%
*-commutative50.6%
associate-+l-50.6%
associate-*l*50.6%
associate-*l*59.2%
*-commutative59.2%
Simplified59.2%
Taylor expanded in y around inf 68.2%
Taylor expanded in c around 0 82.9%
Taylor expanded in b around 0 81.7%
if -8.4000000000000001e83 < z < 1.3e119Initial program 88.1%
if 1.3e119 < z Initial program 51.3%
associate-+l-51.3%
*-commutative51.3%
associate-*r*48.7%
*-commutative48.7%
associate-+l-48.7%
associate-*l*48.7%
associate-*l*54.9%
*-commutative54.9%
Simplified54.9%
Taylor expanded in y around inf 68.5%
Taylor expanded in c around 0 85.8%
Taylor expanded in y around 0 91.5%
Final simplification87.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= x -1.2e+109)
(/ (* y (+ (* 9.0 (/ x c)) (/ b (* y c)))) z)
(if (<= x 7e-150)
(/ (- (/ b z) (* 4.0 (* a t))) c)
(* (/ y c) (/ (- (/ b y) (* x -9.0)) z)))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -1.2e+109) {
tmp = (y * ((9.0 * (x / c)) + (b / (y * c)))) / z;
} else if (x <= 7e-150) {
tmp = ((b / z) - (4.0 * (a * t))) / c;
} else {
tmp = (y / c) * (((b / y) - (x * -9.0)) / z);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (x <= (-1.2d+109)) then
tmp = (y * ((9.0d0 * (x / c)) + (b / (y * c)))) / z
else if (x <= 7d-150) then
tmp = ((b / z) - (4.0d0 * (a * t))) / c
else
tmp = (y / c) * (((b / y) - (x * (-9.0d0))) / z)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -1.2e+109) {
tmp = (y * ((9.0 * (x / c)) + (b / (y * c)))) / z;
} else if (x <= 7e-150) {
tmp = ((b / z) - (4.0 * (a * t))) / c;
} else {
tmp = (y / c) * (((b / y) - (x * -9.0)) / z);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if x <= -1.2e+109: tmp = (y * ((9.0 * (x / c)) + (b / (y * c)))) / z elif x <= 7e-150: tmp = ((b / z) - (4.0 * (a * t))) / c else: tmp = (y / c) * (((b / y) - (x * -9.0)) / z) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (x <= -1.2e+109) tmp = Float64(Float64(y * Float64(Float64(9.0 * Float64(x / c)) + Float64(b / Float64(y * c)))) / z); elseif (x <= 7e-150) tmp = Float64(Float64(Float64(b / z) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(y / c) * Float64(Float64(Float64(b / y) - Float64(x * -9.0)) / z)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (x <= -1.2e+109)
tmp = (y * ((9.0 * (x / c)) + (b / (y * c)))) / z;
elseif (x <= 7e-150)
tmp = ((b / z) - (4.0 * (a * t))) / c;
else
tmp = (y / c) * (((b / y) - (x * -9.0)) / z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[x, -1.2e+109], N[(N[(y * N[(N[(9.0 * N[(x / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[x, 7e-150], N[(N[(N[(b / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(y / c), $MachinePrecision] * N[(N[(N[(b / y), $MachinePrecision] - N[(x * -9.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.2 \cdot 10^{+109}:\\
\;\;\;\;\frac{y \cdot \left(9 \cdot \frac{x}{c} + \frac{b}{y \cdot c}\right)}{z}\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-150}:\\
\;\;\;\;\frac{\frac{b}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{c} \cdot \frac{\frac{b}{y} - x \cdot -9}{z}\\
\end{array}
\end{array}
if x < -1.19999999999999994e109Initial program 72.6%
associate-+l-72.6%
*-commutative72.6%
associate-*r*76.5%
*-commutative76.5%
associate-+l-76.5%
associate-*l*76.5%
associate-*l*76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in y around inf 73.8%
Taylor expanded in z around 0 66.5%
if -1.19999999999999994e109 < x < 6.9999999999999996e-150Initial program 75.0%
associate-+l-75.0%
*-commutative75.0%
associate-*r*75.5%
*-commutative75.5%
associate-+l-75.5%
associate-*l*75.5%
associate-*l*75.9%
*-commutative75.9%
Simplified75.9%
Taylor expanded in y around inf 55.4%
Taylor expanded in c around 0 73.6%
Taylor expanded in y around 0 78.3%
if 6.9999999999999996e-150 < x Initial program 81.6%
associate-+l-81.6%
*-commutative81.6%
associate-*r*81.6%
*-commutative81.6%
associate-+l-81.6%
associate-*l*81.6%
associate-*l*81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in y around inf 59.9%
Taylor expanded in c around 0 70.4%
Taylor expanded in a around 0 59.4%
Taylor expanded in z around -inf 66.1%
mul-1-neg66.1%
times-frac64.9%
distribute-rgt-neg-in64.9%
distribute-neg-frac264.9%
mul-1-neg64.9%
unsub-neg64.9%
*-commutative64.9%
Simplified64.9%
Final simplification71.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -1e+106)
(/ (* t (* a -4.0)) c)
(if (<= z 4.6e+119)
(/ (+ b (* y (* 9.0 x))) (* z c))
(* -4.0 (/ (* a t) c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -1e+106) {
tmp = (t * (a * -4.0)) / c;
} else if (z <= 4.6e+119) {
tmp = (b + (y * (9.0 * x))) / (z * c);
} else {
tmp = -4.0 * ((a * t) / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-1d+106)) then
tmp = (t * (a * (-4.0d0))) / c
else if (z <= 4.6d+119) then
tmp = (b + (y * (9.0d0 * x))) / (z * c)
else
tmp = (-4.0d0) * ((a * t) / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -1e+106) {
tmp = (t * (a * -4.0)) / c;
} else if (z <= 4.6e+119) {
tmp = (b + (y * (9.0 * x))) / (z * c);
} else {
tmp = -4.0 * ((a * t) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -1e+106: tmp = (t * (a * -4.0)) / c elif z <= 4.6e+119: tmp = (b + (y * (9.0 * x))) / (z * c) else: tmp = -4.0 * ((a * t) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -1e+106) tmp = Float64(Float64(t * Float64(a * -4.0)) / c); elseif (z <= 4.6e+119) tmp = Float64(Float64(b + Float64(y * Float64(9.0 * x))) / Float64(z * c)); else tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -1e+106)
tmp = (t * (a * -4.0)) / c;
elseif (z <= 4.6e+119)
tmp = (b + (y * (9.0 * x))) / (z * c);
else
tmp = -4.0 * ((a * t) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. 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, -1e+106], N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 4.6e+119], N[(N[(b + N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+106}:\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+119}:\\
\;\;\;\;\frac{b + y \cdot \left(9 \cdot x\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\end{array}
\end{array}
if z < -1.00000000000000009e106Initial program 42.3%
associate-+l-42.3%
*-commutative42.3%
associate-*r*49.2%
*-commutative49.2%
associate-+l-49.2%
associate-*l*49.2%
associate-*l*56.1%
*-commutative56.1%
Simplified56.1%
Taylor expanded in y around inf 63.7%
Taylor expanded in c around 0 80.5%
Taylor expanded in z around inf 64.1%
associate-*r*64.1%
Simplified64.1%
if -1.00000000000000009e106 < z < 4.6000000000000001e119Initial program 87.9%
associate-+l-87.9%
*-commutative87.9%
associate-*r*88.4%
*-commutative88.4%
associate-+l-88.4%
associate-*l*88.4%
associate-*l*86.3%
*-commutative86.3%
Simplified86.3%
Taylor expanded in x around inf 75.6%
associate-*r*75.6%
Simplified75.6%
if 4.6000000000000001e119 < z Initial program 51.3%
associate-+l-51.3%
*-commutative51.3%
associate-*r*48.7%
*-commutative48.7%
associate-+l-48.7%
associate-*l*48.7%
associate-*l*54.9%
*-commutative54.9%
Simplified54.9%
Taylor expanded in z around inf 74.9%
*-commutative74.9%
Simplified74.9%
Final simplification73.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -6e+19) (not (<= z 2.7e-9))) (* -4.0 (* t (/ a c))) (/ b (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -6e+19) || !(z <= 2.7e-9)) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = b / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 <= (-6d+19)) .or. (.not. (z <= 2.7d-9))) then
tmp = (-4.0d0) * (t * (a / c))
else
tmp = b / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
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 <= -6e+19) || !(z <= 2.7e-9)) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = b / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [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 <= -6e+19) or not (z <= 2.7e-9): tmp = -4.0 * (t * (a / c)) else: tmp = b / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) 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 <= -6e+19) || !(z <= 2.7e-9)) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); else tmp = Float64(b / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
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 <= -6e+19) || ~((z <= 2.7e-9)))
tmp = -4.0 * (t * (a / c));
else
tmp = b / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. 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, -6e+19], N[Not[LessEqual[z, 2.7e-9]], $MachinePrecision]], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+19} \lor \neg \left(z \leq 2.7 \cdot 10^{-9}\right):\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if z < -6e19 or 2.7000000000000002e-9 < z Initial program 57.9%
associate-+l-57.9%
*-commutative57.9%
associate-*r*59.1%
*-commutative59.1%
associate-+l-59.1%
associate-*l*59.1%
associate-*l*63.7%
*-commutative63.7%
Simplified63.7%
Taylor expanded in y around inf 68.6%
Taylor expanded in c around 0 83.3%
Taylor expanded in y around 0 87.3%
Taylor expanded in z around inf 56.2%
associate-*r/56.2%
associate-*r*56.2%
associate-*l/56.5%
associate-*r/56.5%
associate-*l*57.3%
Simplified57.3%
if -6e19 < z < 2.7000000000000002e-9Initial program 93.8%
associate-+l-93.8%
*-commutative93.8%
associate-*r*94.5%
*-commutative94.5%
associate-+l-94.5%
associate-*l*94.5%
associate-*l*90.8%
*-commutative90.8%
Simplified90.8%
Taylor expanded in b around inf 51.0%
*-commutative51.0%
Simplified51.0%
Final simplification54.0%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -1.4e+20) (not (<= z 0.0145))) (* a (/ (* t -4.0) c)) (/ b (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.4e+20) || !(z <= 0.0145)) {
tmp = a * ((t * -4.0) / c);
} else {
tmp = b / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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.4d+20)) .or. (.not. (z <= 0.0145d0))) then
tmp = a * ((t * (-4.0d0)) / c)
else
tmp = b / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
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.4e+20) || !(z <= 0.0145)) {
tmp = a * ((t * -4.0) / c);
} else {
tmp = b / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [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.4e+20) or not (z <= 0.0145): tmp = a * ((t * -4.0) / c) else: tmp = b / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) 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.4e+20) || !(z <= 0.0145)) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); else tmp = Float64(b / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
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.4e+20) || ~((z <= 0.0145)))
tmp = a * ((t * -4.0) / c);
else
tmp = b / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. 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.4e+20], N[Not[LessEqual[z, 0.0145]], $MachinePrecision]], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+20} \lor \neg \left(z \leq 0.0145\right):\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.4e20 or 0.0145000000000000007 < z Initial program 57.9%
associate-+l-57.9%
*-commutative57.9%
associate-*r*59.1%
*-commutative59.1%
associate-+l-59.1%
associate-*l*59.1%
associate-*l*63.7%
*-commutative63.7%
Simplified63.7%
Taylor expanded in z around inf 56.2%
*-commutative56.2%
associate-/l*56.9%
associate-*r*56.9%
associate-*l/56.9%
Simplified56.9%
if -1.4e20 < z < 0.0145000000000000007Initial program 93.8%
associate-+l-93.8%
*-commutative93.8%
associate-*r*94.5%
*-commutative94.5%
associate-+l-94.5%
associate-*l*94.5%
associate-*l*90.8%
*-commutative90.8%
Simplified90.8%
Taylor expanded in b around inf 51.0%
*-commutative51.0%
Simplified51.0%
Final simplification53.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ b (* z c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = b / (z * c)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): return b / (z * c)
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = b / (z * c);
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 76.8%
associate-+l-76.8%
*-commutative76.8%
associate-*r*77.8%
*-commutative77.8%
associate-+l-77.8%
associate-*l*77.8%
associate-*l*78.0%
*-commutative78.0%
Simplified78.0%
Taylor expanded in b around inf 33.3%
*-commutative33.3%
Simplified33.3%
Final simplification33.3%
(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 2024095
(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)))