
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
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
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
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
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.9e+238)
(- t_1 (/ x z))
(if (or (<= z -350000000.0) (not (<= z 7.6e+15)))
(+
t_1
(/ (- (* x (/ y (- b y))) (* y (/ (- t a) (pow (- b y) 2.0)))) z))
(*
x
(-
(/ y (+ y (* z (- b y))))
(/ (* z (- t a)) (* x (- (* z (- y b)) y)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.9e+238) {
tmp = t_1 - (x / z);
} else if ((z <= -350000000.0) || !(z <= 7.6e+15)) {
tmp = t_1 + (((x * (y / (b - y))) - (y * ((t - a) / pow((b - y), 2.0)))) / z);
} else {
tmp = x * ((y / (y + (z * (b - y)))) - ((z * (t - a)) / (x * ((z * (y - b)) - y))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-2.9d+238)) then
tmp = t_1 - (x / z)
else if ((z <= (-350000000.0d0)) .or. (.not. (z <= 7.6d+15))) then
tmp = t_1 + (((x * (y / (b - y))) - (y * ((t - a) / ((b - y) ** 2.0d0)))) / z)
else
tmp = x * ((y / (y + (z * (b - y)))) - ((z * (t - a)) / (x * ((z * (y - b)) - y))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.9e+238) {
tmp = t_1 - (x / z);
} else if ((z <= -350000000.0) || !(z <= 7.6e+15)) {
tmp = t_1 + (((x * (y / (b - y))) - (y * ((t - a) / Math.pow((b - y), 2.0)))) / z);
} else {
tmp = x * ((y / (y + (z * (b - y)))) - ((z * (t - a)) / (x * ((z * (y - b)) - y))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -2.9e+238: tmp = t_1 - (x / z) elif (z <= -350000000.0) or not (z <= 7.6e+15): tmp = t_1 + (((x * (y / (b - y))) - (y * ((t - a) / math.pow((b - y), 2.0)))) / z) else: tmp = x * ((y / (y + (z * (b - y)))) - ((z * (t - a)) / (x * ((z * (y - b)) - y)))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.9e+238) tmp = Float64(t_1 - Float64(x / z)); elseif ((z <= -350000000.0) || !(z <= 7.6e+15)) tmp = Float64(t_1 + Float64(Float64(Float64(x * Float64(y / Float64(b - y))) - Float64(y * Float64(Float64(t - a) / (Float64(b - y) ^ 2.0)))) / z)); else tmp = Float64(x * Float64(Float64(y / Float64(y + Float64(z * Float64(b - y)))) - Float64(Float64(z * Float64(t - a)) / Float64(x * Float64(Float64(z * Float64(y - b)) - y))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -2.9e+238) tmp = t_1 - (x / z); elseif ((z <= -350000000.0) || ~((z <= 7.6e+15))) tmp = t_1 + (((x * (y / (b - y))) - (y * ((t - a) / ((b - y) ^ 2.0)))) / z); else tmp = x * ((y / (y + (z * (b - y)))) - ((z * (t - a)) / (x * ((z * (y - b)) - y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.9e+238], N[(t$95$1 - N[(x / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -350000000.0], N[Not[LessEqual[z, 7.6e+15]], $MachinePrecision]], N[(t$95$1 + N[(N[(N[(x * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(t - a), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(x * N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{+238}:\\
\;\;\;\;t\_1 - \frac{x}{z}\\
\mathbf{elif}\;z \leq -350000000 \lor \neg \left(z \leq 7.6 \cdot 10^{+15}\right):\\
\;\;\;\;t\_1 + \frac{x \cdot \frac{y}{b - y} - y \cdot \frac{t - a}{{\left(b - y\right)}^{2}}}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{y + z \cdot \left(b - y\right)} - \frac{z \cdot \left(t - a\right)}{x \cdot \left(z \cdot \left(y - b\right) - y\right)}\right)\\
\end{array}
\end{array}
if z < -2.9000000000000002e238Initial program 33.7%
Taylor expanded in z around -inf 69.2%
associate--l+69.2%
mul-1-neg69.2%
distribute-lft-out--69.2%
associate-/l*69.2%
associate-/l*54.5%
div-sub62.2%
Simplified62.2%
Taylor expanded in y around inf 99.9%
if -2.9000000000000002e238 < z < -3.5e8 or 7.6e15 < z Initial program 50.1%
Taylor expanded in z around -inf 70.0%
associate--l+70.0%
mul-1-neg70.0%
distribute-lft-out--70.0%
associate-/l*73.4%
associate-/l*91.7%
div-sub92.6%
Simplified92.6%
if -3.5e8 < z < 7.6e15Initial program 85.5%
Taylor expanded in x around inf 89.5%
Final simplification91.4%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -550000.0) (not (<= z 1.3e+15)))
(+
(/ t (- b y))
(-
(* (/ x z) (/ y (- b y)))
(+ (/ a (- b y)) (* y (/ (- t a) (* z (pow (- b y) 2.0)))))))
(*
x
(-
(/ y (+ y (* z (- b y))))
(/ (* z (- t a)) (* x (- (* z (- y b)) y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -550000.0) || !(z <= 1.3e+15)) {
tmp = (t / (b - y)) + (((x / z) * (y / (b - y))) - ((a / (b - y)) + (y * ((t - a) / (z * pow((b - y), 2.0))))));
} else {
tmp = x * ((y / (y + (z * (b - y)))) - ((z * (t - a)) / (x * ((z * (y - b)) - y))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((z <= (-550000.0d0)) .or. (.not. (z <= 1.3d+15))) then
tmp = (t / (b - y)) + (((x / z) * (y / (b - y))) - ((a / (b - y)) + (y * ((t - a) / (z * ((b - y) ** 2.0d0))))))
else
tmp = x * ((y / (y + (z * (b - y)))) - ((z * (t - a)) / (x * ((z * (y - b)) - y))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -550000.0) || !(z <= 1.3e+15)) {
tmp = (t / (b - y)) + (((x / z) * (y / (b - y))) - ((a / (b - y)) + (y * ((t - a) / (z * Math.pow((b - y), 2.0))))));
} else {
tmp = x * ((y / (y + (z * (b - y)))) - ((z * (t - a)) / (x * ((z * (y - b)) - y))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -550000.0) or not (z <= 1.3e+15): tmp = (t / (b - y)) + (((x / z) * (y / (b - y))) - ((a / (b - y)) + (y * ((t - a) / (z * math.pow((b - y), 2.0)))))) else: tmp = x * ((y / (y + (z * (b - y)))) - ((z * (t - a)) / (x * ((z * (y - b)) - y)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -550000.0) || !(z <= 1.3e+15)) tmp = Float64(Float64(t / Float64(b - y)) + Float64(Float64(Float64(x / z) * Float64(y / Float64(b - y))) - Float64(Float64(a / Float64(b - y)) + Float64(y * Float64(Float64(t - a) / Float64(z * (Float64(b - y) ^ 2.0))))))); else tmp = Float64(x * Float64(Float64(y / Float64(y + Float64(z * Float64(b - y)))) - Float64(Float64(z * Float64(t - a)) / Float64(x * Float64(Float64(z * Float64(y - b)) - y))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -550000.0) || ~((z <= 1.3e+15))) tmp = (t / (b - y)) + (((x / z) * (y / (b - y))) - ((a / (b - y)) + (y * ((t - a) / (z * ((b - y) ^ 2.0)))))); else tmp = x * ((y / (y + (z * (b - y)))) - ((z * (t - a)) / (x * ((z * (y - b)) - y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -550000.0], N[Not[LessEqual[z, 1.3e+15]], $MachinePrecision]], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(t - a), $MachinePrecision] / N[(z * N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(x * N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -550000 \lor \neg \left(z \leq 1.3 \cdot 10^{+15}\right):\\
\;\;\;\;\frac{t}{b - y} + \left(\frac{x}{z} \cdot \frac{y}{b - y} - \left(\frac{a}{b - y} + y \cdot \frac{t - a}{z \cdot {\left(b - y\right)}^{2}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{y + z \cdot \left(b - y\right)} - \frac{z \cdot \left(t - a\right)}{x \cdot \left(z \cdot \left(y - b\right) - y\right)}\right)\\
\end{array}
\end{array}
if z < -5.5e5 or 1.3e15 < z Initial program 48.8%
Taylor expanded in z around inf 67.6%
associate--l+67.6%
times-frac72.4%
associate-/l*92.7%
Simplified92.7%
if -5.5e5 < z < 1.3e15Initial program 85.4%
Taylor expanded in x around inf 90.1%
Final simplification91.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ (- t a) (- b y)) (/ x z)))
(t_2 (/ -1.0 (- (/ (+ z -1.0) x) (* b (/ z (* y x)))))))
(if (<= z -620000000.0)
t_1
(if (<= z -1.85e-65)
(/ (* z (- t a)) (+ y (* z (- b y))))
(if (<= z -7.6e-294)
t_2
(if (<= z 3.5e-31)
(/ (* y (+ x (* z (/ (- t a) y)))) y)
(if (<= z 1e+15) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double t_2 = -1.0 / (((z + -1.0) / x) - (b * (z / (y * x))));
double tmp;
if (z <= -620000000.0) {
tmp = t_1;
} else if (z <= -1.85e-65) {
tmp = (z * (t - a)) / (y + (z * (b - y)));
} else if (z <= -7.6e-294) {
tmp = t_2;
} else if (z <= 3.5e-31) {
tmp = (y * (x + (z * ((t - a) / y)))) / y;
} else if (z <= 1e+15) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((t - a) / (b - y)) - (x / z)
t_2 = (-1.0d0) / (((z + (-1.0d0)) / x) - (b * (z / (y * x))))
if (z <= (-620000000.0d0)) then
tmp = t_1
else if (z <= (-1.85d-65)) then
tmp = (z * (t - a)) / (y + (z * (b - y)))
else if (z <= (-7.6d-294)) then
tmp = t_2
else if (z <= 3.5d-31) then
tmp = (y * (x + (z * ((t - a) / y)))) / y
else if (z <= 1d+15) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double t_2 = -1.0 / (((z + -1.0) / x) - (b * (z / (y * x))));
double tmp;
if (z <= -620000000.0) {
tmp = t_1;
} else if (z <= -1.85e-65) {
tmp = (z * (t - a)) / (y + (z * (b - y)));
} else if (z <= -7.6e-294) {
tmp = t_2;
} else if (z <= 3.5e-31) {
tmp = (y * (x + (z * ((t - a) / y)))) / y;
} else if (z <= 1e+15) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t - a) / (b - y)) - (x / z) t_2 = -1.0 / (((z + -1.0) / x) - (b * (z / (y * x)))) tmp = 0 if z <= -620000000.0: tmp = t_1 elif z <= -1.85e-65: tmp = (z * (t - a)) / (y + (z * (b - y))) elif z <= -7.6e-294: tmp = t_2 elif z <= 3.5e-31: tmp = (y * (x + (z * ((t - a) / y)))) / y elif z <= 1e+15: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)) t_2 = Float64(-1.0 / Float64(Float64(Float64(z + -1.0) / x) - Float64(b * Float64(z / Float64(y * x))))) tmp = 0.0 if (z <= -620000000.0) tmp = t_1; elseif (z <= -1.85e-65) tmp = Float64(Float64(z * Float64(t - a)) / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= -7.6e-294) tmp = t_2; elseif (z <= 3.5e-31) tmp = Float64(Float64(y * Float64(x + Float64(z * Float64(Float64(t - a) / y)))) / y); elseif (z <= 1e+15) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((t - a) / (b - y)) - (x / z); t_2 = -1.0 / (((z + -1.0) / x) - (b * (z / (y * x)))); tmp = 0.0; if (z <= -620000000.0) tmp = t_1; elseif (z <= -1.85e-65) tmp = (z * (t - a)) / (y + (z * (b - y))); elseif (z <= -7.6e-294) tmp = t_2; elseif (z <= 3.5e-31) tmp = (y * (x + (z * ((t - a) / y)))) / y; elseif (z <= 1e+15) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 / N[(N[(N[(z + -1.0), $MachinePrecision] / x), $MachinePrecision] - N[(b * N[(z / N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -620000000.0], t$95$1, If[LessEqual[z, -1.85e-65], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.6e-294], t$95$2, If[LessEqual[z, 3.5e-31], N[(N[(y * N[(x + N[(z * N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1e+15], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y} - \frac{x}{z}\\
t_2 := \frac{-1}{\frac{z + -1}{x} - b \cdot \frac{z}{y \cdot x}}\\
\mathbf{if}\;z \leq -620000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{-65}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq -7.6 \cdot 10^{-294}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-31}:\\
\;\;\;\;\frac{y \cdot \left(x + z \cdot \frac{t - a}{y}\right)}{y}\\
\mathbf{elif}\;z \leq 10^{+15}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.2e8 or 1e15 < z Initial program 48.3%
Taylor expanded in z around -inf 69.1%
associate--l+69.1%
mul-1-neg69.1%
distribute-lft-out--69.1%
associate-/l*72.2%
associate-/l*87.0%
div-sub88.7%
Simplified88.7%
Taylor expanded in y around inf 88.1%
if -6.2e8 < z < -1.85e-65Initial program 99.6%
Taylor expanded in x around 0 89.3%
if -1.85e-65 < z < -7.6e-294 or 3.49999999999999985e-31 < z < 1e15Initial program 78.2%
fma-define78.2%
clear-num78.1%
inv-pow78.1%
+-commutative78.1%
fma-undefine78.1%
fma-define78.1%
+-commutative78.1%
fma-define78.1%
Applied egg-rr78.1%
unpow-178.1%
*-commutative78.1%
Simplified78.1%
Taylor expanded in x around inf 49.4%
Taylor expanded in y around -inf 69.0%
+-commutative69.0%
mul-1-neg69.0%
unsub-neg69.0%
associate-/l*69.1%
sub-neg69.1%
metadata-eval69.1%
Simplified69.1%
if -7.6e-294 < z < 3.49999999999999985e-31Initial program 90.0%
Taylor expanded in y around inf 90.0%
associate-/l*80.1%
Simplified80.1%
Taylor expanded in z around 0 63.8%
Final simplification78.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (+ y (* z (- b y))))
(t_3 (- (/ (- t a) (- b y)) (/ x z))))
(if (<= z -420000000000.0)
t_3
(if (<= z -2.6e-68)
(/ t_1 t_2)
(if (<= z -1.95e-146)
(/ -1.0 (- (/ (+ z -1.0) x) (* b (/ z (* y x)))))
(if (<= z 4.2e-175)
(/ (+ t_1 (* y x)) (- y (* z y)))
(if (<= z 1e+22) (/ (+ (* y x) (* z t)) t_2) t_3)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = y + (z * (b - y));
double t_3 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -420000000000.0) {
tmp = t_3;
} else if (z <= -2.6e-68) {
tmp = t_1 / t_2;
} else if (z <= -1.95e-146) {
tmp = -1.0 / (((z + -1.0) / x) - (b * (z / (y * x))));
} else if (z <= 4.2e-175) {
tmp = (t_1 + (y * x)) / (y - (z * y));
} else if (z <= 1e+22) {
tmp = ((y * x) + (z * t)) / t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = z * (t - a)
t_2 = y + (z * (b - y))
t_3 = ((t - a) / (b - y)) - (x / z)
if (z <= (-420000000000.0d0)) then
tmp = t_3
else if (z <= (-2.6d-68)) then
tmp = t_1 / t_2
else if (z <= (-1.95d-146)) then
tmp = (-1.0d0) / (((z + (-1.0d0)) / x) - (b * (z / (y * x))))
else if (z <= 4.2d-175) then
tmp = (t_1 + (y * x)) / (y - (z * y))
else if (z <= 1d+22) then
tmp = ((y * x) + (z * t)) / t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = y + (z * (b - y));
double t_3 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -420000000000.0) {
tmp = t_3;
} else if (z <= -2.6e-68) {
tmp = t_1 / t_2;
} else if (z <= -1.95e-146) {
tmp = -1.0 / (((z + -1.0) / x) - (b * (z / (y * x))));
} else if (z <= 4.2e-175) {
tmp = (t_1 + (y * x)) / (y - (z * y));
} else if (z <= 1e+22) {
tmp = ((y * x) + (z * t)) / t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = y + (z * (b - y)) t_3 = ((t - a) / (b - y)) - (x / z) tmp = 0 if z <= -420000000000.0: tmp = t_3 elif z <= -2.6e-68: tmp = t_1 / t_2 elif z <= -1.95e-146: tmp = -1.0 / (((z + -1.0) / x) - (b * (z / (y * x)))) elif z <= 4.2e-175: tmp = (t_1 + (y * x)) / (y - (z * y)) elif z <= 1e+22: tmp = ((y * x) + (z * t)) / t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(y + Float64(z * Float64(b - y))) t_3 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)) tmp = 0.0 if (z <= -420000000000.0) tmp = t_3; elseif (z <= -2.6e-68) tmp = Float64(t_1 / t_2); elseif (z <= -1.95e-146) tmp = Float64(-1.0 / Float64(Float64(Float64(z + -1.0) / x) - Float64(b * Float64(z / Float64(y * x))))); elseif (z <= 4.2e-175) tmp = Float64(Float64(t_1 + Float64(y * x)) / Float64(y - Float64(z * y))); elseif (z <= 1e+22) tmp = Float64(Float64(Float64(y * x) + Float64(z * t)) / t_2); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = y + (z * (b - y)); t_3 = ((t - a) / (b - y)) - (x / z); tmp = 0.0; if (z <= -420000000000.0) tmp = t_3; elseif (z <= -2.6e-68) tmp = t_1 / t_2; elseif (z <= -1.95e-146) tmp = -1.0 / (((z + -1.0) / x) - (b * (z / (y * x)))); elseif (z <= 4.2e-175) tmp = (t_1 + (y * x)) / (y - (z * y)); elseif (z <= 1e+22) tmp = ((y * x) + (z * t)) / t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -420000000000.0], t$95$3, If[LessEqual[z, -2.6e-68], N[(t$95$1 / t$95$2), $MachinePrecision], If[LessEqual[z, -1.95e-146], N[(-1.0 / N[(N[(N[(z + -1.0), $MachinePrecision] / x), $MachinePrecision] - N[(b * N[(z / N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-175], N[(N[(t$95$1 + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y - N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e+22], N[(N[(N[(y * x), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := y + z \cdot \left(b - y\right)\\
t_3 := \frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{if}\;z \leq -420000000000:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-68}:\\
\;\;\;\;\frac{t\_1}{t\_2}\\
\mathbf{elif}\;z \leq -1.95 \cdot 10^{-146}:\\
\;\;\;\;\frac{-1}{\frac{z + -1}{x} - b \cdot \frac{z}{y \cdot x}}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-175}:\\
\;\;\;\;\frac{t\_1 + y \cdot x}{y - z \cdot y}\\
\mathbf{elif}\;z \leq 10^{+22}:\\
\;\;\;\;\frac{y \cdot x + z \cdot t}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -4.2e11 or 1e22 < z Initial program 47.5%
Taylor expanded in z around -inf 69.4%
associate--l+69.4%
mul-1-neg69.4%
distribute-lft-out--69.4%
associate-/l*72.5%
associate-/l*87.6%
div-sub89.2%
Simplified89.2%
Taylor expanded in y around inf 88.7%
if -4.2e11 < z < -2.5999999999999998e-68Initial program 99.6%
Taylor expanded in x around 0 89.3%
if -2.5999999999999998e-68 < z < -1.95000000000000001e-146Initial program 63.1%
fma-define63.2%
clear-num63.0%
inv-pow63.0%
+-commutative63.0%
fma-undefine63.0%
fma-define62.9%
+-commutative62.9%
fma-define63.0%
Applied egg-rr63.0%
unpow-163.0%
*-commutative63.0%
Simplified63.0%
Taylor expanded in x around inf 39.0%
Taylor expanded in y around -inf 75.7%
+-commutative75.7%
mul-1-neg75.7%
unsub-neg75.7%
associate-/l*75.7%
sub-neg75.7%
metadata-eval75.7%
Simplified75.7%
if -1.95000000000000001e-146 < z < 4.2e-175Initial program 91.5%
Taylor expanded in b around 0 80.2%
mul-1-neg80.2%
distribute-lft-neg-out80.2%
*-commutative80.2%
Simplified80.2%
if 4.2e-175 < z < 1e22Initial program 85.3%
Taylor expanded in a around 0 65.6%
Final simplification82.1%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -350000000.0) (not (<= z 4.5e+15)))
(- (/ (- t a) (- b y)) (/ x z))
(*
x
(-
(/ y (+ y (* z (- b y))))
(/ (* z (- t a)) (* x (- (* z (- y b)) y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -350000000.0) || !(z <= 4.5e+15)) {
tmp = ((t - a) / (b - y)) - (x / z);
} else {
tmp = x * ((y / (y + (z * (b - y)))) - ((z * (t - a)) / (x * ((z * (y - b)) - y))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((z <= (-350000000.0d0)) .or. (.not. (z <= 4.5d+15))) then
tmp = ((t - a) / (b - y)) - (x / z)
else
tmp = x * ((y / (y + (z * (b - y)))) - ((z * (t - a)) / (x * ((z * (y - b)) - y))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -350000000.0) || !(z <= 4.5e+15)) {
tmp = ((t - a) / (b - y)) - (x / z);
} else {
tmp = x * ((y / (y + (z * (b - y)))) - ((z * (t - a)) / (x * ((z * (y - b)) - y))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -350000000.0) or not (z <= 4.5e+15): tmp = ((t - a) / (b - y)) - (x / z) else: tmp = x * ((y / (y + (z * (b - y)))) - ((z * (t - a)) / (x * ((z * (y - b)) - y)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -350000000.0) || !(z <= 4.5e+15)) tmp = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)); else tmp = Float64(x * Float64(Float64(y / Float64(y + Float64(z * Float64(b - y)))) - Float64(Float64(z * Float64(t - a)) / Float64(x * Float64(Float64(z * Float64(y - b)) - y))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -350000000.0) || ~((z <= 4.5e+15))) tmp = ((t - a) / (b - y)) - (x / z); else tmp = x * ((y / (y + (z * (b - y)))) - ((z * (t - a)) / (x * ((z * (y - b)) - y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -350000000.0], N[Not[LessEqual[z, 4.5e+15]], $MachinePrecision]], N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(x * N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -350000000 \lor \neg \left(z \leq 4.5 \cdot 10^{+15}\right):\\
\;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{y + z \cdot \left(b - y\right)} - \frac{z \cdot \left(t - a\right)}{x \cdot \left(z \cdot \left(y - b\right) - y\right)}\right)\\
\end{array}
\end{array}
if z < -3.5e8 or 4.5e15 < z Initial program 48.8%
Taylor expanded in z around -inf 69.4%
associate--l+69.4%
mul-1-neg69.4%
distribute-lft-out--69.4%
associate-/l*72.5%
associate-/l*87.1%
div-sub88.8%
Simplified88.8%
Taylor expanded in y around inf 88.2%
if -3.5e8 < z < 4.5e15Initial program 85.4%
Taylor expanded in x around inf 90.1%
Final simplification89.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))) (t_2 (- (/ (- t a) (- b y)) (/ x z))))
(if (<= z -2300000000.0)
t_2
(if (<= z -1.3e-68)
(/ (* z (- t a)) t_1)
(if (<= z -3.4e-130)
(/ -1.0 (- (/ (+ z -1.0) x) (* b (/ z (* y x)))))
(if (<= z 1e+22) (/ (+ (* y x) (* z t)) t_1) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -2300000000.0) {
tmp = t_2;
} else if (z <= -1.3e-68) {
tmp = (z * (t - a)) / t_1;
} else if (z <= -3.4e-130) {
tmp = -1.0 / (((z + -1.0) / x) - (b * (z / (y * x))));
} else if (z <= 1e+22) {
tmp = ((y * x) + (z * t)) / t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y + (z * (b - y))
t_2 = ((t - a) / (b - y)) - (x / z)
if (z <= (-2300000000.0d0)) then
tmp = t_2
else if (z <= (-1.3d-68)) then
tmp = (z * (t - a)) / t_1
else if (z <= (-3.4d-130)) then
tmp = (-1.0d0) / (((z + (-1.0d0)) / x) - (b * (z / (y * x))))
else if (z <= 1d+22) then
tmp = ((y * x) + (z * t)) / t_1
else
tmp = 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 t_1 = y + (z * (b - y));
double t_2 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -2300000000.0) {
tmp = t_2;
} else if (z <= -1.3e-68) {
tmp = (z * (t - a)) / t_1;
} else if (z <= -3.4e-130) {
tmp = -1.0 / (((z + -1.0) / x) - (b * (z / (y * x))));
} else if (z <= 1e+22) {
tmp = ((y * x) + (z * t)) / t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = ((t - a) / (b - y)) - (x / z) tmp = 0 if z <= -2300000000.0: tmp = t_2 elif z <= -1.3e-68: tmp = (z * (t - a)) / t_1 elif z <= -3.4e-130: tmp = -1.0 / (((z + -1.0) / x) - (b * (z / (y * x)))) elif z <= 1e+22: tmp = ((y * x) + (z * t)) / t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)) tmp = 0.0 if (z <= -2300000000.0) tmp = t_2; elseif (z <= -1.3e-68) tmp = Float64(Float64(z * Float64(t - a)) / t_1); elseif (z <= -3.4e-130) tmp = Float64(-1.0 / Float64(Float64(Float64(z + -1.0) / x) - Float64(b * Float64(z / Float64(y * x))))); elseif (z <= 1e+22) tmp = Float64(Float64(Float64(y * x) + Float64(z * t)) / t_1); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = ((t - a) / (b - y)) - (x / z); tmp = 0.0; if (z <= -2300000000.0) tmp = t_2; elseif (z <= -1.3e-68) tmp = (z * (t - a)) / t_1; elseif (z <= -3.4e-130) tmp = -1.0 / (((z + -1.0) / x) - (b * (z / (y * x)))); elseif (z <= 1e+22) tmp = ((y * x) + (z * t)) / t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2300000000.0], t$95$2, If[LessEqual[z, -1.3e-68], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[z, -3.4e-130], N[(-1.0 / N[(N[(N[(z + -1.0), $MachinePrecision] / x), $MachinePrecision] - N[(b * N[(z / N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e+22], N[(N[(N[(y * x), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{if}\;z \leq -2300000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-68}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{t\_1}\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{-130}:\\
\;\;\;\;\frac{-1}{\frac{z + -1}{x} - b \cdot \frac{z}{y \cdot x}}\\
\mathbf{elif}\;z \leq 10^{+22}:\\
\;\;\;\;\frac{y \cdot x + z \cdot t}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -2.3e9 or 1e22 < z Initial program 47.5%
Taylor expanded in z around -inf 69.4%
associate--l+69.4%
mul-1-neg69.4%
distribute-lft-out--69.4%
associate-/l*72.5%
associate-/l*87.6%
div-sub89.2%
Simplified89.2%
Taylor expanded in y around inf 88.7%
if -2.3e9 < z < -1.2999999999999999e-68Initial program 99.6%
Taylor expanded in x around 0 89.3%
if -1.2999999999999999e-68 < z < -3.40000000000000005e-130Initial program 60.2%
fma-define60.3%
clear-num60.1%
inv-pow60.1%
+-commutative60.1%
fma-undefine60.1%
fma-define60.0%
+-commutative60.0%
fma-define60.1%
Applied egg-rr60.1%
unpow-160.1%
*-commutative60.1%
Simplified60.1%
Taylor expanded in x around inf 36.1%
Taylor expanded in y around -inf 75.7%
+-commutative75.7%
mul-1-neg75.7%
unsub-neg75.7%
associate-/l*75.7%
sub-neg75.7%
metadata-eval75.7%
Simplified75.7%
if -3.40000000000000005e-130 < z < 1e22Initial program 88.6%
Taylor expanded in a around 0 68.3%
Final simplification79.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ (- t a) (- b y)) (/ x z))))
(if (<= z -1.6e-9)
t_1
(if (<= z -9.5e-67)
(/ (* z t) (+ y (* z (- b y))))
(if (<= z -6.5e-294)
x
(if (<= z 5.8e-11) (/ (* y (+ x (* z (/ (- t a) y)))) y) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -1.6e-9) {
tmp = t_1;
} else if (z <= -9.5e-67) {
tmp = (z * t) / (y + (z * (b - y)));
} else if (z <= -6.5e-294) {
tmp = x;
} else if (z <= 5.8e-11) {
tmp = (y * (x + (z * ((t - a) / y)))) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = ((t - a) / (b - y)) - (x / z)
if (z <= (-1.6d-9)) then
tmp = t_1
else if (z <= (-9.5d-67)) then
tmp = (z * t) / (y + (z * (b - y)))
else if (z <= (-6.5d-294)) then
tmp = x
else if (z <= 5.8d-11) then
tmp = (y * (x + (z * ((t - a) / y)))) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -1.6e-9) {
tmp = t_1;
} else if (z <= -9.5e-67) {
tmp = (z * t) / (y + (z * (b - y)));
} else if (z <= -6.5e-294) {
tmp = x;
} else if (z <= 5.8e-11) {
tmp = (y * (x + (z * ((t - a) / y)))) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t - a) / (b - y)) - (x / z) tmp = 0 if z <= -1.6e-9: tmp = t_1 elif z <= -9.5e-67: tmp = (z * t) / (y + (z * (b - y))) elif z <= -6.5e-294: tmp = x elif z <= 5.8e-11: tmp = (y * (x + (z * ((t - a) / y)))) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)) tmp = 0.0 if (z <= -1.6e-9) tmp = t_1; elseif (z <= -9.5e-67) tmp = Float64(Float64(z * t) / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= -6.5e-294) tmp = x; elseif (z <= 5.8e-11) tmp = Float64(Float64(y * Float64(x + Float64(z * Float64(Float64(t - a) / y)))) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((t - a) / (b - y)) - (x / z); tmp = 0.0; if (z <= -1.6e-9) tmp = t_1; elseif (z <= -9.5e-67) tmp = (z * t) / (y + (z * (b - y))); elseif (z <= -6.5e-294) tmp = x; elseif (z <= 5.8e-11) tmp = (y * (x + (z * ((t - a) / y)))) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e-9], t$95$1, If[LessEqual[z, -9.5e-67], N[(N[(z * t), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.5e-294], x, If[LessEqual[z, 5.8e-11], N[(N[(y * N[(x + N[(z * N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{-67}:\\
\;\;\;\;\frac{z \cdot t}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{-294}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-11}:\\
\;\;\;\;\frac{y \cdot \left(x + z \cdot \frac{t - a}{y}\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.60000000000000006e-9 or 5.8e-11 < z Initial program 51.5%
Taylor expanded in z around -inf 68.4%
associate--l+68.4%
mul-1-neg68.4%
distribute-lft-out--68.4%
associate-/l*70.5%
associate-/l*85.1%
div-sub86.6%
Simplified86.6%
Taylor expanded in y around inf 86.2%
if -1.60000000000000006e-9 < z < -9.4999999999999994e-67Initial program 99.6%
Taylor expanded in t around inf 69.0%
*-commutative69.0%
Simplified69.0%
if -9.4999999999999994e-67 < z < -6.4999999999999995e-294Initial program 77.2%
Taylor expanded in z around 0 67.1%
if -6.4999999999999995e-294 < z < 5.8e-11Initial program 88.8%
Taylor expanded in y around inf 88.7%
associate-/l*79.2%
Simplified79.2%
Taylor expanded in z around 0 61.8%
Final simplification75.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ (- t a) (- b y)) (/ x z))))
(if (<= z -4500000000.0)
t_1
(if (<= z -4.5e-68)
(/ (* z (- t a)) (+ y (* z (- b y))))
(if (<= z -8e-294)
x
(if (<= z 9.2e-9) (/ (* y (+ x (* z (/ (- t a) y)))) y) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -4500000000.0) {
tmp = t_1;
} else if (z <= -4.5e-68) {
tmp = (z * (t - a)) / (y + (z * (b - y)));
} else if (z <= -8e-294) {
tmp = x;
} else if (z <= 9.2e-9) {
tmp = (y * (x + (z * ((t - a) / y)))) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = ((t - a) / (b - y)) - (x / z)
if (z <= (-4500000000.0d0)) then
tmp = t_1
else if (z <= (-4.5d-68)) then
tmp = (z * (t - a)) / (y + (z * (b - y)))
else if (z <= (-8d-294)) then
tmp = x
else if (z <= 9.2d-9) then
tmp = (y * (x + (z * ((t - a) / y)))) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -4500000000.0) {
tmp = t_1;
} else if (z <= -4.5e-68) {
tmp = (z * (t - a)) / (y + (z * (b - y)));
} else if (z <= -8e-294) {
tmp = x;
} else if (z <= 9.2e-9) {
tmp = (y * (x + (z * ((t - a) / y)))) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t - a) / (b - y)) - (x / z) tmp = 0 if z <= -4500000000.0: tmp = t_1 elif z <= -4.5e-68: tmp = (z * (t - a)) / (y + (z * (b - y))) elif z <= -8e-294: tmp = x elif z <= 9.2e-9: tmp = (y * (x + (z * ((t - a) / y)))) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)) tmp = 0.0 if (z <= -4500000000.0) tmp = t_1; elseif (z <= -4.5e-68) tmp = Float64(Float64(z * Float64(t - a)) / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= -8e-294) tmp = x; elseif (z <= 9.2e-9) tmp = Float64(Float64(y * Float64(x + Float64(z * Float64(Float64(t - a) / y)))) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((t - a) / (b - y)) - (x / z); tmp = 0.0; if (z <= -4500000000.0) tmp = t_1; elseif (z <= -4.5e-68) tmp = (z * (t - a)) / (y + (z * (b - y))); elseif (z <= -8e-294) tmp = x; elseif (z <= 9.2e-9) tmp = (y * (x + (z * ((t - a) / y)))) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4500000000.0], t$95$1, If[LessEqual[z, -4.5e-68], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8e-294], x, If[LessEqual[z, 9.2e-9], N[(N[(y * N[(x + N[(z * N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{if}\;z \leq -4500000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-68}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-294}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{-9}:\\
\;\;\;\;\frac{y \cdot \left(x + z \cdot \frac{t - a}{y}\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.5e9 or 9.1999999999999997e-9 < z Initial program 50.3%
Taylor expanded in z around -inf 68.4%
associate--l+68.4%
mul-1-neg68.4%
distribute-lft-out--68.4%
associate-/l*70.6%
associate-/l*85.5%
div-sub87.1%
Simplified87.1%
Taylor expanded in y around inf 86.6%
if -4.5e9 < z < -4.49999999999999999e-68Initial program 99.6%
Taylor expanded in x around 0 89.3%
if -4.49999999999999999e-68 < z < -8.00000000000000013e-294Initial program 77.2%
Taylor expanded in z around 0 67.1%
if -8.00000000000000013e-294 < z < 9.1999999999999997e-9Initial program 88.8%
Taylor expanded in y around inf 88.7%
associate-/l*79.2%
Simplified79.2%
Taylor expanded in z around 0 61.8%
Final simplification76.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.4e+16) (not (<= z 1.28e+26))) (- (/ (- t a) (- b y)) (/ x z)) (/ (+ (* z (- t a)) (* y x)) (+ y (- (* z b) (* z y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.4e+16) || !(z <= 1.28e+26)) {
tmp = ((t - a) / (b - y)) - (x / z);
} else {
tmp = ((z * (t - a)) + (y * x)) / (y + ((z * b) - (z * y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((z <= (-2.4d+16)) .or. (.not. (z <= 1.28d+26))) then
tmp = ((t - a) / (b - y)) - (x / z)
else
tmp = ((z * (t - a)) + (y * x)) / (y + ((z * b) - (z * y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.4e+16) || !(z <= 1.28e+26)) {
tmp = ((t - a) / (b - y)) - (x / z);
} else {
tmp = ((z * (t - a)) + (y * x)) / (y + ((z * b) - (z * y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.4e+16) or not (z <= 1.28e+26): tmp = ((t - a) / (b - y)) - (x / z) else: tmp = ((z * (t - a)) + (y * x)) / (y + ((z * b) - (z * y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.4e+16) || !(z <= 1.28e+26)) tmp = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / Float64(y + Float64(Float64(z * b) - Float64(z * y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.4e+16) || ~((z <= 1.28e+26))) tmp = ((t - a) / (b - y)) - (x / z); else tmp = ((z * (t - a)) + (y * x)) / (y + ((z * b) - (z * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.4e+16], N[Not[LessEqual[z, 1.28e+26]], $MachinePrecision]], N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(N[(z * b), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+16} \lor \neg \left(z \leq 1.28 \cdot 10^{+26}\right):\\
\;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + \left(z \cdot b - z \cdot y\right)}\\
\end{array}
\end{array}
if z < -2.4e16 or 1.28e26 < z Initial program 47.5%
Taylor expanded in z around -inf 69.4%
associate--l+69.4%
mul-1-neg69.4%
distribute-lft-out--69.4%
associate-/l*72.5%
associate-/l*87.6%
div-sub89.2%
Simplified89.2%
Taylor expanded in y around inf 88.7%
if -2.4e16 < z < 1.28e26Initial program 85.7%
sub-neg85.7%
distribute-lft-in85.7%
Applied egg-rr85.7%
Final simplification87.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.3e+16) (not (<= z 3.8e+23))) (- (/ (- t a) (- b y)) (/ x z)) (/ (+ (* z (- t a)) (* y x)) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.3e+16) || !(z <= 3.8e+23)) {
tmp = ((t - a) / (b - y)) - (x / z);
} else {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((z <= (-3.3d+16)) .or. (.not. (z <= 3.8d+23))) then
tmp = ((t - a) / (b - y)) - (x / z)
else
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.3e+16) || !(z <= 3.8e+23)) {
tmp = ((t - a) / (b - y)) - (x / z);
} else {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.3e+16) or not (z <= 3.8e+23): tmp = ((t - a) / (b - y)) - (x / z) else: tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.3e+16) || !(z <= 3.8e+23)) tmp = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.3e+16) || ~((z <= 3.8e+23))) tmp = ((t - a) / (b - y)) - (x / z); else tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.3e+16], N[Not[LessEqual[z, 3.8e+23]], $MachinePrecision]], N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+16} \lor \neg \left(z \leq 3.8 \cdot 10^{+23}\right):\\
\;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -3.3e16 or 3.79999999999999975e23 < z Initial program 47.5%
Taylor expanded in z around -inf 69.4%
associate--l+69.4%
mul-1-neg69.4%
distribute-lft-out--69.4%
associate-/l*72.5%
associate-/l*87.6%
div-sub89.2%
Simplified89.2%
Taylor expanded in y around inf 88.7%
if -3.3e16 < z < 3.79999999999999975e23Initial program 85.7%
Final simplification87.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ (- t a) (- b y)) (/ x z))))
(if (<= z -4.8e-9)
t_1
(if (<= z -7.5e-66)
(/ (* z t) (+ y (* z (- b y))))
(if (<= z 1.45e-37) x t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -4.8e-9) {
tmp = t_1;
} else if (z <= -7.5e-66) {
tmp = (z * t) / (y + (z * (b - y)));
} else if (z <= 1.45e-37) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = ((t - a) / (b - y)) - (x / z)
if (z <= (-4.8d-9)) then
tmp = t_1
else if (z <= (-7.5d-66)) then
tmp = (z * t) / (y + (z * (b - y)))
else if (z <= 1.45d-37) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -4.8e-9) {
tmp = t_1;
} else if (z <= -7.5e-66) {
tmp = (z * t) / (y + (z * (b - y)));
} else if (z <= 1.45e-37) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t - a) / (b - y)) - (x / z) tmp = 0 if z <= -4.8e-9: tmp = t_1 elif z <= -7.5e-66: tmp = (z * t) / (y + (z * (b - y))) elif z <= 1.45e-37: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)) tmp = 0.0 if (z <= -4.8e-9) tmp = t_1; elseif (z <= -7.5e-66) tmp = Float64(Float64(z * t) / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= 1.45e-37) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((t - a) / (b - y)) - (x / z); tmp = 0.0; if (z <= -4.8e-9) tmp = t_1; elseif (z <= -7.5e-66) tmp = (z * t) / (y + (z * (b - y))); elseif (z <= 1.45e-37) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.8e-9], t$95$1, If[LessEqual[z, -7.5e-66], N[(N[(z * t), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e-37], x, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-66}:\\
\;\;\;\;\frac{z \cdot t}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-37}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.8e-9 or 1.45000000000000002e-37 < z Initial program 52.2%
Taylor expanded in z around -inf 67.1%
associate--l+67.1%
mul-1-neg67.1%
distribute-lft-out--67.1%
associate-/l*69.9%
associate-/l*84.1%
div-sub85.5%
Simplified85.5%
Taylor expanded in y around inf 84.4%
if -4.8e-9 < z < -7.49999999999999995e-66Initial program 99.6%
Taylor expanded in t around inf 69.0%
*-commutative69.0%
Simplified69.0%
if -7.49999999999999995e-66 < z < 1.45000000000000002e-37Initial program 83.5%
Taylor expanded in z around 0 57.8%
Final simplification72.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -4e+87)
(/ (- a t) y)
(if (or (<= z -2.4e-50) (not (<= z 2.95e-52)))
(/ (- t a) b)
(/ x (- 1.0 z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4e+87) {
tmp = (a - t) / y;
} else if ((z <= -2.4e-50) || !(z <= 2.95e-52)) {
tmp = (t - a) / b;
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (z <= (-4d+87)) then
tmp = (a - t) / y
else if ((z <= (-2.4d-50)) .or. (.not. (z <= 2.95d-52))) then
tmp = (t - a) / b
else
tmp = x / (1.0d0 - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4e+87) {
tmp = (a - t) / y;
} else if ((z <= -2.4e-50) || !(z <= 2.95e-52)) {
tmp = (t - a) / b;
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -4e+87: tmp = (a - t) / y elif (z <= -2.4e-50) or not (z <= 2.95e-52): tmp = (t - a) / b else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -4e+87) tmp = Float64(Float64(a - t) / y); elseif ((z <= -2.4e-50) || !(z <= 2.95e-52)) tmp = Float64(Float64(t - a) / b); else tmp = Float64(x / Float64(1.0 - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -4e+87) tmp = (a - t) / y; elseif ((z <= -2.4e-50) || ~((z <= 2.95e-52))) tmp = (t - a) / b; else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4e+87], N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision], If[Or[LessEqual[z, -2.4e-50], N[Not[LessEqual[z, 2.95e-52]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+87}:\\
\;\;\;\;\frac{a - t}{y}\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-50} \lor \neg \left(z \leq 2.95 \cdot 10^{-52}\right):\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -3.9999999999999998e87Initial program 38.0%
Taylor expanded in b around 0 25.2%
mul-1-neg25.2%
distribute-lft-neg-out25.2%
*-commutative25.2%
Simplified25.2%
Taylor expanded in z around inf 58.0%
associate-*r/58.0%
mul-1-neg58.0%
Simplified58.0%
if -3.9999999999999998e87 < z < -2.40000000000000002e-50 or 2.9500000000000001e-52 < z Initial program 61.6%
Taylor expanded in y around 0 53.5%
if -2.40000000000000002e-50 < z < 2.9500000000000001e-52Initial program 83.8%
Taylor expanded in y around inf 55.9%
mul-1-neg55.9%
unsub-neg55.9%
Simplified55.9%
Final simplification55.3%
(FPCore (x y z t a b) :precision binary64 (if (<= z -3.45e-50) (/ t b) (if (<= z 7.5e-51) x (if (<= z 3.8e+180) (/ a (- b)) (/ t b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.45e-50) {
tmp = t / b;
} else if (z <= 7.5e-51) {
tmp = x;
} else if (z <= 3.8e+180) {
tmp = a / -b;
} else {
tmp = t / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (z <= (-3.45d-50)) then
tmp = t / b
else if (z <= 7.5d-51) then
tmp = x
else if (z <= 3.8d+180) then
tmp = a / -b
else
tmp = t / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.45e-50) {
tmp = t / b;
} else if (z <= 7.5e-51) {
tmp = x;
} else if (z <= 3.8e+180) {
tmp = a / -b;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.45e-50: tmp = t / b elif z <= 7.5e-51: tmp = x elif z <= 3.8e+180: tmp = a / -b else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.45e-50) tmp = Float64(t / b); elseif (z <= 7.5e-51) tmp = x; elseif (z <= 3.8e+180) tmp = Float64(a / Float64(-b)); else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.45e-50) tmp = t / b; elseif (z <= 7.5e-51) tmp = x; elseif (z <= 3.8e+180) tmp = a / -b; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.45e-50], N[(t / b), $MachinePrecision], If[LessEqual[z, 7.5e-51], x, If[LessEqual[z, 3.8e+180], N[(a / (-b)), $MachinePrecision], N[(t / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.45 \cdot 10^{-50}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-51}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+180}:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -3.4500000000000001e-50 or 3.8e180 < z Initial program 49.6%
fma-define49.6%
clear-num49.5%
inv-pow49.5%
+-commutative49.5%
fma-undefine49.5%
fma-define49.5%
+-commutative49.5%
fma-define49.5%
Applied egg-rr49.5%
unpow-149.5%
*-commutative49.5%
Simplified49.5%
Taylor expanded in y around 0 46.5%
Taylor expanded in t around inf 33.6%
if -3.4500000000000001e-50 < z < 7.49999999999999976e-51Initial program 83.8%
Taylor expanded in z around 0 55.9%
if 7.49999999999999976e-51 < z < 3.8e180Initial program 66.6%
Taylor expanded in a around inf 40.1%
mul-1-neg40.1%
distribute-lft-neg-out40.1%
*-commutative40.1%
Simplified40.1%
Taylor expanded in y around 0 48.4%
associate-*r/48.4%
neg-mul-148.4%
Simplified48.4%
Final simplification46.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -3.4e-50)
(/ t b)
(if (<= z 4.5e+44)
(/ x (- 1.0 z))
(if (<= z 1.35e+180) (/ a (- b)) (/ t b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.4e-50) {
tmp = t / b;
} else if (z <= 4.5e+44) {
tmp = x / (1.0 - z);
} else if (z <= 1.35e+180) {
tmp = a / -b;
} else {
tmp = t / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (z <= (-3.4d-50)) then
tmp = t / b
else if (z <= 4.5d+44) then
tmp = x / (1.0d0 - z)
else if (z <= 1.35d+180) then
tmp = a / -b
else
tmp = t / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.4e-50) {
tmp = t / b;
} else if (z <= 4.5e+44) {
tmp = x / (1.0 - z);
} else if (z <= 1.35e+180) {
tmp = a / -b;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.4e-50: tmp = t / b elif z <= 4.5e+44: tmp = x / (1.0 - z) elif z <= 1.35e+180: tmp = a / -b else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.4e-50) tmp = Float64(t / b); elseif (z <= 4.5e+44) tmp = Float64(x / Float64(1.0 - z)); elseif (z <= 1.35e+180) tmp = Float64(a / Float64(-b)); else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.4e-50) tmp = t / b; elseif (z <= 4.5e+44) tmp = x / (1.0 - z); elseif (z <= 1.35e+180) tmp = a / -b; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.4e-50], N[(t / b), $MachinePrecision], If[LessEqual[z, 4.5e+44], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+180], N[(a / (-b)), $MachinePrecision], N[(t / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{-50}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+44}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+180}:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -3.40000000000000014e-50 or 1.35000000000000008e180 < z Initial program 49.6%
fma-define49.6%
clear-num49.5%
inv-pow49.5%
+-commutative49.5%
fma-undefine49.5%
fma-define49.5%
+-commutative49.5%
fma-define49.5%
Applied egg-rr49.5%
unpow-149.5%
*-commutative49.5%
Simplified49.5%
Taylor expanded in y around 0 46.5%
Taylor expanded in t around inf 33.6%
if -3.40000000000000014e-50 < z < 4.5e44Initial program 84.8%
Taylor expanded in y around inf 53.1%
mul-1-neg53.1%
unsub-neg53.1%
Simplified53.1%
if 4.5e44 < z < 1.35000000000000008e180Initial program 55.6%
Taylor expanded in a around inf 44.2%
mul-1-neg44.2%
distribute-lft-neg-out44.2%
*-commutative44.2%
Simplified44.2%
Taylor expanded in y around 0 58.6%
associate-*r/58.6%
neg-mul-158.6%
Simplified58.6%
Final simplification46.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -9.2e-68) (not (<= z 2.6e-35))) (/ (- t a) (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9.2e-68) || !(z <= 2.6e-35)) {
tmp = (t - a) / (b - y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((z <= (-9.2d-68)) .or. (.not. (z <= 2.6d-35))) then
tmp = (t - a) / (b - y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9.2e-68) || !(z <= 2.6e-35)) {
tmp = (t - a) / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -9.2e-68) or not (z <= 2.6e-35): tmp = (t - a) / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -9.2e-68) || !(z <= 2.6e-35)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -9.2e-68) || ~((z <= 2.6e-35))) tmp = (t - a) / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -9.2e-68], N[Not[LessEqual[z, 2.6e-35]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{-68} \lor \neg \left(z \leq 2.6 \cdot 10^{-35}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -9.19999999999999987e-68 or 2.60000000000000005e-35 < z Initial program 55.8%
Taylor expanded in z around inf 77.4%
if -9.19999999999999987e-68 < z < 2.60000000000000005e-35Initial program 83.5%
Taylor expanded in z around 0 57.8%
Final simplification68.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3e-50) (not (<= z 8.2e-51))) (/ (- t a) b) (/ x (- 1.0 z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3e-50) || !(z <= 8.2e-51)) {
tmp = (t - a) / b;
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((z <= (-3d-50)) .or. (.not. (z <= 8.2d-51))) then
tmp = (t - a) / b
else
tmp = x / (1.0d0 - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3e-50) || !(z <= 8.2e-51)) {
tmp = (t - a) / b;
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3e-50) or not (z <= 8.2e-51): tmp = (t - a) / b else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3e-50) || !(z <= 8.2e-51)) tmp = Float64(Float64(t - a) / b); else tmp = Float64(x / Float64(1.0 - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3e-50) || ~((z <= 8.2e-51))) tmp = (t - a) / b; else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3e-50], N[Not[LessEqual[z, 8.2e-51]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{-50} \lor \neg \left(z \leq 8.2 \cdot 10^{-51}\right):\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -2.9999999999999999e-50 or 8.19999999999999947e-51 < z Initial program 55.2%
Taylor expanded in y around 0 50.6%
if -2.9999999999999999e-50 < z < 8.19999999999999947e-51Initial program 83.8%
Taylor expanded in y around inf 55.9%
mul-1-neg55.9%
unsub-neg55.9%
Simplified55.9%
Final simplification52.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3e-50) (not (<= z 3.1e-38))) (/ t b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3e-50) || !(z <= 3.1e-38)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((z <= (-3d-50)) .or. (.not. (z <= 3.1d-38))) then
tmp = t / b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3e-50) || !(z <= 3.1e-38)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3e-50) or not (z <= 3.1e-38): tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3e-50) || !(z <= 3.1e-38)) tmp = Float64(t / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3e-50) || ~((z <= 3.1e-38))) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3e-50], N[Not[LessEqual[z, 3.1e-38]], $MachinePrecision]], N[(t / b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{-50} \lor \neg \left(z \leq 3.1 \cdot 10^{-38}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.9999999999999999e-50 or 3.09999999999999983e-38 < z Initial program 54.6%
fma-define54.6%
clear-num54.6%
inv-pow54.6%
+-commutative54.6%
fma-undefine54.6%
fma-define54.6%
+-commutative54.6%
fma-define54.6%
Applied egg-rr54.6%
unpow-154.6%
*-commutative54.6%
Simplified54.6%
Taylor expanded in y around 0 50.4%
Taylor expanded in t around inf 28.7%
if -2.9999999999999999e-50 < z < 3.09999999999999983e-38Initial program 84.1%
Taylor expanded in z around 0 55.9%
Final simplification40.9%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
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
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 67.8%
Taylor expanded in z around 0 27.0%
Final simplification27.0%
(FPCore (x y z t a b) :precision binary64 (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
real(8) function code(x, y, z, t, a, b)
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
code = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
def code(x, y, z, t, a, b): return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(z * t) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))) - Float64(a / Float64(Float64(b - y) + Float64(y / z)))) end
function tmp = code(x, y, z, t, a, b) tmp = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(z * t), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{z \cdot t + y \cdot x}{y + z \cdot \left(b - y\right)} - \frac{a}{\left(b - y\right) + \frac{y}{z}}
\end{array}
herbie shell --seed 2024078
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:alt
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))