
(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 (+ y (* z (- b y))))
(t_2
(-
(+ (* (/ y z) (/ x (- b y))) (/ (- t a) (- b y)))
(* (/ (- t a) z) (/ y (pow (- b y) 2.0)))))
(t_3 (/ (+ (* x y) (* z (- t a))) t_1))
(t_4
(-
(/
(-
(* (/ z (+ z -1.0)) (- a t))
(* (/ b (pow (+ z -1.0) 2.0)) (* x z)))
y)
(/ x (+ z -1.0)))))
(if (<= t_3 (- INFINITY))
t_4
(if (<= t_3 -5e-233)
t_3
(if (<= t_3 2e-300)
t_2
(if (<= t_3 5e+262)
(/ (- (* x y) (- (* z a) (* z t))) t_1)
(if (<= t_3 INFINITY) t_4 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 = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) - (((t - a) / z) * (y / pow((b - y), 2.0)));
double t_3 = ((x * y) + (z * (t - a))) / t_1;
double t_4 = ((((z / (z + -1.0)) * (a - t)) - ((b / pow((z + -1.0), 2.0)) * (x * z))) / y) - (x / (z + -1.0));
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_4;
} else if (t_3 <= -5e-233) {
tmp = t_3;
} else if (t_3 <= 2e-300) {
tmp = t_2;
} else if (t_3 <= 5e+262) {
tmp = ((x * y) - ((z * a) - (z * t))) / t_1;
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_4;
} else {
tmp = t_2;
}
return tmp;
}
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 = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) - (((t - a) / z) * (y / Math.pow((b - y), 2.0)));
double t_3 = ((x * y) + (z * (t - a))) / t_1;
double t_4 = ((((z / (z + -1.0)) * (a - t)) - ((b / Math.pow((z + -1.0), 2.0)) * (x * z))) / y) - (x / (z + -1.0));
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = t_4;
} else if (t_3 <= -5e-233) {
tmp = t_3;
} else if (t_3 <= 2e-300) {
tmp = t_2;
} else if (t_3 <= 5e+262) {
tmp = ((x * y) - ((z * a) - (z * t))) / t_1;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_4;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) - (((t - a) / z) * (y / math.pow((b - y), 2.0))) t_3 = ((x * y) + (z * (t - a))) / t_1 t_4 = ((((z / (z + -1.0)) * (a - t)) - ((b / math.pow((z + -1.0), 2.0)) * (x * z))) / y) - (x / (z + -1.0)) tmp = 0 if t_3 <= -math.inf: tmp = t_4 elif t_3 <= -5e-233: tmp = t_3 elif t_3 <= 2e-300: tmp = t_2 elif t_3 <= 5e+262: tmp = ((x * y) - ((z * a) - (z * t))) / t_1 elif t_3 <= math.inf: tmp = t_4 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(Float64(y / z) * Float64(x / Float64(b - y))) + Float64(Float64(t - a) / Float64(b - y))) - Float64(Float64(Float64(t - a) / z) * Float64(y / (Float64(b - y) ^ 2.0)))) t_3 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / t_1) t_4 = Float64(Float64(Float64(Float64(Float64(z / Float64(z + -1.0)) * Float64(a - t)) - Float64(Float64(b / (Float64(z + -1.0) ^ 2.0)) * Float64(x * z))) / y) - Float64(x / Float64(z + -1.0))) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_4; elseif (t_3 <= -5e-233) tmp = t_3; elseif (t_3 <= 2e-300) tmp = t_2; elseif (t_3 <= 5e+262) tmp = Float64(Float64(Float64(x * y) - Float64(Float64(z * a) - Float64(z * t))) / t_1); elseif (t_3 <= Inf) tmp = t_4; 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 = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) - (((t - a) / z) * (y / ((b - y) ^ 2.0))); t_3 = ((x * y) + (z * (t - a))) / t_1; t_4 = ((((z / (z + -1.0)) * (a - t)) - ((b / ((z + -1.0) ^ 2.0)) * (x * z))) / y) - (x / (z + -1.0)); tmp = 0.0; if (t_3 <= -Inf) tmp = t_4; elseif (t_3 <= -5e-233) tmp = t_3; elseif (t_3 <= 2e-300) tmp = t_2; elseif (t_3 <= 5e+262) tmp = ((x * y) - ((z * a) - (z * t))) / t_1; elseif (t_3 <= Inf) tmp = t_4; 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[(N[(y / z), $MachinePrecision] * N[(x / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t - a), $MachinePrecision] / z), $MachinePrecision] * N[(y / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(N[(z / N[(z + -1.0), $MachinePrecision]), $MachinePrecision] * N[(a - t), $MachinePrecision]), $MachinePrecision] - N[(N[(b / N[Power[N[(z + -1.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, -5e-233], t$95$3, If[LessEqual[t$95$3, 2e-300], t$95$2, If[LessEqual[t$95$3, 5e+262], N[(N[(N[(x * y), $MachinePrecision] - N[(N[(z * a), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$4, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \left(\frac{y}{z} \cdot \frac{x}{b - y} + \frac{t - a}{b - y}\right) - \frac{t - a}{z} \cdot \frac{y}{{\left(b - y\right)}^{2}}\\
t_3 := \frac{x \cdot y + z \cdot \left(t - a\right)}{t_1}\\
t_4 := \frac{\frac{z}{z + -1} \cdot \left(a - t\right) - \frac{b}{{\left(z + -1\right)}^{2}} \cdot \left(x \cdot z\right)}{y} - \frac{x}{z + -1}\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_3 \leq -5 \cdot 10^{-233}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_3 \leq 2 \cdot 10^{-300}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_3 \leq 5 \cdot 10^{+262}:\\
\;\;\;\;\frac{x \cdot y - \left(z \cdot a - z \cdot t\right)}{t_1}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or 5.00000000000000008e262 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 35.5%
Taylor expanded in y around -inf 67.2%
mul-1-neg67.2%
unsub-neg67.2%
associate-*r/67.2%
neg-mul-167.2%
sub-neg67.2%
metadata-eval67.2%
Simplified78.4%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.00000000000000012e-233Initial program 99.7%
if -5.00000000000000012e-233 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000005e-300 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 16.2%
Taylor expanded in z around inf 52.2%
associate--r+52.2%
+-commutative52.2%
associate--l+52.2%
*-commutative52.2%
times-frac60.0%
div-sub60.0%
*-commutative60.0%
times-frac98.3%
Simplified98.3%
if 2.00000000000000005e-300 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.00000000000000008e262Initial program 99.5%
sub-neg99.5%
distribute-lft-in99.5%
Applied egg-rr99.5%
Final simplification94.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (/ (- t a) (- b y)))
(t_3 (/ (+ (* x y) (* z (- t a))) t_1))
(t_4
(-
(/
(-
(* (/ z (+ z -1.0)) (- a t))
(* (/ b (pow (+ z -1.0) 2.0)) (* x z)))
y)
(/ x (+ z -1.0)))))
(if (<= t_3 (- INFINITY))
t_4
(if (<= t_3 -1e-254)
t_3
(if (<= t_3 2e-300)
t_2
(if (<= t_3 5e+262)
(/ (- (* x y) (- (* z a) (* z t))) t_1)
(if (<= t_3 INFINITY) t_4 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);
double t_3 = ((x * y) + (z * (t - a))) / t_1;
double t_4 = ((((z / (z + -1.0)) * (a - t)) - ((b / pow((z + -1.0), 2.0)) * (x * z))) / y) - (x / (z + -1.0));
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_4;
} else if (t_3 <= -1e-254) {
tmp = t_3;
} else if (t_3 <= 2e-300) {
tmp = t_2;
} else if (t_3 <= 5e+262) {
tmp = ((x * y) - ((z * a) - (z * t))) / t_1;
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_4;
} else {
tmp = t_2;
}
return tmp;
}
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);
double t_3 = ((x * y) + (z * (t - a))) / t_1;
double t_4 = ((((z / (z + -1.0)) * (a - t)) - ((b / Math.pow((z + -1.0), 2.0)) * (x * z))) / y) - (x / (z + -1.0));
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = t_4;
} else if (t_3 <= -1e-254) {
tmp = t_3;
} else if (t_3 <= 2e-300) {
tmp = t_2;
} else if (t_3 <= 5e+262) {
tmp = ((x * y) - ((z * a) - (z * t))) / t_1;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_4;
} 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) t_3 = ((x * y) + (z * (t - a))) / t_1 t_4 = ((((z / (z + -1.0)) * (a - t)) - ((b / math.pow((z + -1.0), 2.0)) * (x * z))) / y) - (x / (z + -1.0)) tmp = 0 if t_3 <= -math.inf: tmp = t_4 elif t_3 <= -1e-254: tmp = t_3 elif t_3 <= 2e-300: tmp = t_2 elif t_3 <= 5e+262: tmp = ((x * y) - ((z * a) - (z * t))) / t_1 elif t_3 <= math.inf: tmp = t_4 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(t - a) / Float64(b - y)) t_3 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / t_1) t_4 = Float64(Float64(Float64(Float64(Float64(z / Float64(z + -1.0)) * Float64(a - t)) - Float64(Float64(b / (Float64(z + -1.0) ^ 2.0)) * Float64(x * z))) / y) - Float64(x / Float64(z + -1.0))) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_4; elseif (t_3 <= -1e-254) tmp = t_3; elseif (t_3 <= 2e-300) tmp = t_2; elseif (t_3 <= 5e+262) tmp = Float64(Float64(Float64(x * y) - Float64(Float64(z * a) - Float64(z * t))) / t_1); elseif (t_3 <= Inf) tmp = t_4; 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); t_3 = ((x * y) + (z * (t - a))) / t_1; t_4 = ((((z / (z + -1.0)) * (a - t)) - ((b / ((z + -1.0) ^ 2.0)) * (x * z))) / y) - (x / (z + -1.0)); tmp = 0.0; if (t_3 <= -Inf) tmp = t_4; elseif (t_3 <= -1e-254) tmp = t_3; elseif (t_3 <= 2e-300) tmp = t_2; elseif (t_3 <= 5e+262) tmp = ((x * y) - ((z * a) - (z * t))) / t_1; elseif (t_3 <= Inf) tmp = t_4; 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[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(N[(z / N[(z + -1.0), $MachinePrecision]), $MachinePrecision] * N[(a - t), $MachinePrecision]), $MachinePrecision] - N[(N[(b / N[Power[N[(z + -1.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, -1e-254], t$95$3, If[LessEqual[t$95$3, 2e-300], t$95$2, If[LessEqual[t$95$3, 5e+262], N[(N[(N[(x * y), $MachinePrecision] - N[(N[(z * a), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$4, 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}\\
t_3 := \frac{x \cdot y + z \cdot \left(t - a\right)}{t_1}\\
t_4 := \frac{\frac{z}{z + -1} \cdot \left(a - t\right) - \frac{b}{{\left(z + -1\right)}^{2}} \cdot \left(x \cdot z\right)}{y} - \frac{x}{z + -1}\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_3 \leq -1 \cdot 10^{-254}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_3 \leq 2 \cdot 10^{-300}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_3 \leq 5 \cdot 10^{+262}:\\
\;\;\;\;\frac{x \cdot y - \left(z \cdot a - z \cdot t\right)}{t_1}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or 5.00000000000000008e262 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 35.5%
Taylor expanded in y around -inf 67.2%
mul-1-neg67.2%
unsub-neg67.2%
associate-*r/67.2%
neg-mul-167.2%
sub-neg67.2%
metadata-eval67.2%
Simplified78.4%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.9999999999999991e-255Initial program 99.6%
if -9.9999999999999991e-255 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000005e-300 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 14.6%
Taylor expanded in z around inf 75.4%
if 2.00000000000000005e-300 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.00000000000000008e262Initial program 99.5%
sub-neg99.5%
distribute-lft-in99.5%
Applied egg-rr99.5%
Final simplification89.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y)))
(t_2 (+ y (* z (- b y))))
(t_3 (/ (+ (* x y) (* z (- t a))) t_2)))
(if (<= t_3 (- INFINITY))
(/ y (/ t_2 x))
(if (<= t_3 -1e-254)
t_3
(if (<= t_3 2e-300)
t_1
(if (<= t_3 5e+290)
t_3
(if (<= t_3 INFINITY) (- x (* z (/ a y))) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = y + (z * (b - y));
double t_3 = ((x * y) + (z * (t - a))) / t_2;
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = y / (t_2 / x);
} else if (t_3 <= -1e-254) {
tmp = t_3;
} else if (t_3 <= 2e-300) {
tmp = t_1;
} else if (t_3 <= 5e+290) {
tmp = t_3;
} else if (t_3 <= ((double) INFINITY)) {
tmp = x - (z * (a / y));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = y + (z * (b - y));
double t_3 = ((x * y) + (z * (t - a))) / t_2;
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = y / (t_2 / x);
} else if (t_3 <= -1e-254) {
tmp = t_3;
} else if (t_3 <= 2e-300) {
tmp = t_1;
} else if (t_3 <= 5e+290) {
tmp = t_3;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = x - (z * (a / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) t_2 = y + (z * (b - y)) t_3 = ((x * y) + (z * (t - a))) / t_2 tmp = 0 if t_3 <= -math.inf: tmp = y / (t_2 / x) elif t_3 <= -1e-254: tmp = t_3 elif t_3 <= 2e-300: tmp = t_1 elif t_3 <= 5e+290: tmp = t_3 elif t_3 <= math.inf: tmp = x - (z * (a / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) t_2 = Float64(y + Float64(z * Float64(b - y))) t_3 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / t_2) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(y / Float64(t_2 / x)); elseif (t_3 <= -1e-254) tmp = t_3; elseif (t_3 <= 2e-300) tmp = t_1; elseif (t_3 <= 5e+290) tmp = t_3; elseif (t_3 <= Inf) tmp = Float64(x - Float64(z * Float64(a / 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); t_2 = y + (z * (b - y)); t_3 = ((x * y) + (z * (t - a))) / t_2; tmp = 0.0; if (t_3 <= -Inf) tmp = y / (t_2 / x); elseif (t_3 <= -1e-254) tmp = t_3; elseif (t_3 <= 2e-300) tmp = t_1; elseif (t_3 <= 5e+290) tmp = t_3; elseif (t_3 <= Inf) tmp = x - (z * (a / y)); else tmp = t_1; 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]}, Block[{t$95$2 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(y / N[(t$95$2 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -1e-254], t$95$3, If[LessEqual[t$95$3, 2e-300], t$95$1, If[LessEqual[t$95$3, 5e+290], t$95$3, If[LessEqual[t$95$3, Infinity], N[(x - N[(z * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := y + z \cdot \left(b - y\right)\\
t_3 := \frac{x \cdot y + z \cdot \left(t - a\right)}{t_2}\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;\frac{y}{\frac{t_2}{x}}\\
\mathbf{elif}\;t_3 \leq -1 \cdot 10^{-254}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_3 \leq 2 \cdot 10^{-300}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_3 \leq 5 \cdot 10^{+290}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;x - z \cdot \frac{a}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0Initial program 35.2%
Taylor expanded in x around inf 4.2%
*-commutative4.2%
+-commutative4.2%
fma-udef4.2%
associate-/l*53.9%
Simplified53.9%
fma-udef53.9%
Applied egg-rr53.9%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.9999999999999991e-255 or 2.00000000000000005e-300 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 4.9999999999999998e290Initial program 99.5%
if -9.9999999999999991e-255 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000005e-300 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 14.6%
Taylor expanded in z around inf 75.4%
if 4.9999999999999998e290 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 30.9%
Taylor expanded in z around 0 14.2%
associate-/l*69.9%
Simplified69.9%
Taylor expanded in a around inf 73.0%
mul-1-neg73.0%
Simplified73.0%
Final simplification86.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y)))
(t_2 (+ y (* z (- b y))))
(t_3 (/ (+ (* x y) (* z (- t a))) t_2)))
(if (<= t_3 (- INFINITY))
(/ y (/ t_2 x))
(if (<= t_3 -1e-254)
t_3
(if (<= t_3 2e-300)
t_1
(if (<= t_3 5e+290)
(/ (- (* x y) (- (* z a) (* z t))) t_2)
(if (<= t_3 INFINITY) (- x (* z (/ a y))) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = y + (z * (b - y));
double t_3 = ((x * y) + (z * (t - a))) / t_2;
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = y / (t_2 / x);
} else if (t_3 <= -1e-254) {
tmp = t_3;
} else if (t_3 <= 2e-300) {
tmp = t_1;
} else if (t_3 <= 5e+290) {
tmp = ((x * y) - ((z * a) - (z * t))) / t_2;
} else if (t_3 <= ((double) INFINITY)) {
tmp = x - (z * (a / y));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = y + (z * (b - y));
double t_3 = ((x * y) + (z * (t - a))) / t_2;
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = y / (t_2 / x);
} else if (t_3 <= -1e-254) {
tmp = t_3;
} else if (t_3 <= 2e-300) {
tmp = t_1;
} else if (t_3 <= 5e+290) {
tmp = ((x * y) - ((z * a) - (z * t))) / t_2;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = x - (z * (a / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) t_2 = y + (z * (b - y)) t_3 = ((x * y) + (z * (t - a))) / t_2 tmp = 0 if t_3 <= -math.inf: tmp = y / (t_2 / x) elif t_3 <= -1e-254: tmp = t_3 elif t_3 <= 2e-300: tmp = t_1 elif t_3 <= 5e+290: tmp = ((x * y) - ((z * a) - (z * t))) / t_2 elif t_3 <= math.inf: tmp = x - (z * (a / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) t_2 = Float64(y + Float64(z * Float64(b - y))) t_3 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / t_2) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(y / Float64(t_2 / x)); elseif (t_3 <= -1e-254) tmp = t_3; elseif (t_3 <= 2e-300) tmp = t_1; elseif (t_3 <= 5e+290) tmp = Float64(Float64(Float64(x * y) - Float64(Float64(z * a) - Float64(z * t))) / t_2); elseif (t_3 <= Inf) tmp = Float64(x - Float64(z * Float64(a / 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); t_2 = y + (z * (b - y)); t_3 = ((x * y) + (z * (t - a))) / t_2; tmp = 0.0; if (t_3 <= -Inf) tmp = y / (t_2 / x); elseif (t_3 <= -1e-254) tmp = t_3; elseif (t_3 <= 2e-300) tmp = t_1; elseif (t_3 <= 5e+290) tmp = ((x * y) - ((z * a) - (z * t))) / t_2; elseif (t_3 <= Inf) tmp = x - (z * (a / y)); else tmp = t_1; 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]}, Block[{t$95$2 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(y / N[(t$95$2 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -1e-254], t$95$3, If[LessEqual[t$95$3, 2e-300], t$95$1, If[LessEqual[t$95$3, 5e+290], N[(N[(N[(x * y), $MachinePrecision] - N[(N[(z * a), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(x - N[(z * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := y + z \cdot \left(b - y\right)\\
t_3 := \frac{x \cdot y + z \cdot \left(t - a\right)}{t_2}\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;\frac{y}{\frac{t_2}{x}}\\
\mathbf{elif}\;t_3 \leq -1 \cdot 10^{-254}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_3 \leq 2 \cdot 10^{-300}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_3 \leq 5 \cdot 10^{+290}:\\
\;\;\;\;\frac{x \cdot y - \left(z \cdot a - z \cdot t\right)}{t_2}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;x - z \cdot \frac{a}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0Initial program 35.2%
Taylor expanded in x around inf 4.2%
*-commutative4.2%
+-commutative4.2%
fma-udef4.2%
associate-/l*53.9%
Simplified53.9%
fma-udef53.9%
Applied egg-rr53.9%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.9999999999999991e-255Initial program 99.6%
if -9.9999999999999991e-255 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000005e-300 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 14.6%
Taylor expanded in z around inf 75.4%
if 2.00000000000000005e-300 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 4.9999999999999998e290Initial program 99.5%
sub-neg99.5%
distribute-lft-in99.5%
Applied egg-rr99.5%
if 4.9999999999999998e290 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 30.9%
Taylor expanded in z around 0 14.2%
associate-/l*69.9%
Simplified69.9%
Taylor expanded in a around inf 73.0%
mul-1-neg73.0%
Simplified73.0%
Final simplification86.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* x y) (* z (- t a))) (+ y (* z b))))
(t_2 (/ (- t a) (- b y))))
(if (<= z -1.75e+44)
t_2
(if (<= z -2.1e-174)
t_1
(if (<= z 7e-271) (- x (/ (* z a) y)) (if (<= z 6.7) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) + (z * (t - a))) / (y + (z * b));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.75e+44) {
tmp = t_2;
} else if (z <= -2.1e-174) {
tmp = t_1;
} else if (z <= 7e-271) {
tmp = x - ((z * a) / y);
} else if (z <= 6.7) {
tmp = 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 = ((x * y) + (z * (t - a))) / (y + (z * b))
t_2 = (t - a) / (b - y)
if (z <= (-1.75d+44)) then
tmp = t_2
else if (z <= (-2.1d-174)) then
tmp = t_1
else if (z <= 7d-271) then
tmp = x - ((z * a) / y)
else if (z <= 6.7d0) then
tmp = 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 = ((x * y) + (z * (t - a))) / (y + (z * b));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.75e+44) {
tmp = t_2;
} else if (z <= -2.1e-174) {
tmp = t_1;
} else if (z <= 7e-271) {
tmp = x - ((z * a) / y);
} else if (z <= 6.7) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x * y) + (z * (t - a))) / (y + (z * b)) t_2 = (t - a) / (b - y) tmp = 0 if z <= -1.75e+44: tmp = t_2 elif z <= -2.1e-174: tmp = t_1 elif z <= 7e-271: tmp = x - ((z * a) / y) elif z <= 6.7: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * b))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.75e+44) tmp = t_2; elseif (z <= -2.1e-174) tmp = t_1; elseif (z <= 7e-271) tmp = Float64(x - Float64(Float64(z * a) / y)); elseif (z <= 6.7) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x * y) + (z * (t - a))) / (y + (z * b)); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.75e+44) tmp = t_2; elseif (z <= -2.1e-174) tmp = t_1; elseif (z <= 7e-271) tmp = x - ((z * a) / y); elseif (z <= 6.7) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.75e+44], t$95$2, If[LessEqual[z, -2.1e-174], t$95$1, If[LessEqual[z, 7e-271], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.7], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot b}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.75 \cdot 10^{+44}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-174}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-271}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\mathbf{elif}\;z \leq 6.7:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.75e44 or 6.70000000000000018 < z Initial program 52.0%
Taylor expanded in z around inf 81.1%
if -1.75e44 < z < -2.1000000000000001e-174 or 6.9999999999999999e-271 < z < 6.70000000000000018Initial program 82.5%
Taylor expanded in b around inf 79.3%
*-commutative79.3%
Simplified79.3%
if -2.1000000000000001e-174 < z < 6.9999999999999999e-271Initial program 72.1%
Taylor expanded in z around 0 52.2%
associate-/l*78.7%
Simplified78.7%
Taylor expanded in a around inf 84.9%
associate-*r/84.9%
associate-*r*84.9%
neg-mul-184.9%
*-commutative84.9%
Simplified84.9%
Final simplification81.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.25e-44)
t_1
(if (<= z 2.8e-156)
(- x (/ (* z a) y))
(if (<= z 5.3e-71) (/ y (/ (+ y (* z (- b y))) x)) t_1)))))
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.25e-44) {
tmp = t_1;
} else if (z <= 2.8e-156) {
tmp = x - ((z * a) / y);
} else if (z <= 5.3e-71) {
tmp = y / ((y + (z * (b - y))) / 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)
if (z <= (-2.25d-44)) then
tmp = t_1
else if (z <= 2.8d-156) then
tmp = x - ((z * a) / y)
else if (z <= 5.3d-71) then
tmp = y / ((y + (z * (b - y))) / 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);
double tmp;
if (z <= -2.25e-44) {
tmp = t_1;
} else if (z <= 2.8e-156) {
tmp = x - ((z * a) / y);
} else if (z <= 5.3e-71) {
tmp = y / ((y + (z * (b - y))) / x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -2.25e-44: tmp = t_1 elif z <= 2.8e-156: tmp = x - ((z * a) / y) elif z <= 5.3e-71: tmp = y / ((y + (z * (b - y))) / x) else: tmp = t_1 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.25e-44) tmp = t_1; elseif (z <= 2.8e-156) tmp = Float64(x - Float64(Float64(z * a) / y)); elseif (z <= 5.3e-71) tmp = Float64(y / Float64(Float64(y + Float64(z * Float64(b - y))) / 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); tmp = 0.0; if (z <= -2.25e-44) tmp = t_1; elseif (z <= 2.8e-156) tmp = x - ((z * a) / y); elseif (z <= 5.3e-71) tmp = y / ((y + (z * (b - y))) / x); else tmp = t_1; 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.25e-44], t$95$1, If[LessEqual[z, 2.8e-156], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.3e-71], N[(y / N[(N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.25 \cdot 10^{-44}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-156}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\mathbf{elif}\;z \leq 5.3 \cdot 10^{-71}:\\
\;\;\;\;\frac{y}{\frac{y + z \cdot \left(b - y\right)}{x}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.2499999999999999e-44 or 5.29999999999999999e-71 < z Initial program 58.8%
Taylor expanded in z around inf 73.6%
if -2.2499999999999999e-44 < z < 2.8000000000000002e-156Initial program 81.3%
Taylor expanded in z around 0 56.8%
associate-/l*74.9%
Simplified74.9%
Taylor expanded in a around inf 81.1%
associate-*r/81.1%
associate-*r*81.1%
neg-mul-181.1%
*-commutative81.1%
Simplified81.1%
if 2.8000000000000002e-156 < z < 5.29999999999999999e-71Initial program 68.3%
Taylor expanded in x around inf 40.1%
*-commutative40.1%
+-commutative40.1%
fma-udef40.1%
associate-/l*66.9%
Simplified66.9%
fma-udef67.0%
Applied egg-rr67.0%
Final simplification75.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))))
(if (<= z -2.7e+123)
t_1
(if (<= z -170000000.0)
(- (/ x z))
(if (<= z -1.34e-14)
(/ (- a) b)
(if (<= z 5.8e-11) (+ x (* x z)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -2.7e+123) {
tmp = t_1;
} else if (z <= -170000000.0) {
tmp = -(x / z);
} else if (z <= -1.34e-14) {
tmp = -a / b;
} else if (z <= 5.8e-11) {
tmp = x + (x * z);
} 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 / (b - y)
if (z <= (-2.7d+123)) then
tmp = t_1
else if (z <= (-170000000.0d0)) then
tmp = -(x / z)
else if (z <= (-1.34d-14)) then
tmp = -a / b
else if (z <= 5.8d-11) then
tmp = x + (x * z)
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 / (b - y);
double tmp;
if (z <= -2.7e+123) {
tmp = t_1;
} else if (z <= -170000000.0) {
tmp = -(x / z);
} else if (z <= -1.34e-14) {
tmp = -a / b;
} else if (z <= 5.8e-11) {
tmp = x + (x * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if z <= -2.7e+123: tmp = t_1 elif z <= -170000000.0: tmp = -(x / z) elif z <= -1.34e-14: tmp = -a / b elif z <= 5.8e-11: tmp = x + (x * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -2.7e+123) tmp = t_1; elseif (z <= -170000000.0) tmp = Float64(-Float64(x / z)); elseif (z <= -1.34e-14) tmp = Float64(Float64(-a) / b); elseif (z <= 5.8e-11) tmp = Float64(x + Float64(x * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); tmp = 0.0; if (z <= -2.7e+123) tmp = t_1; elseif (z <= -170000000.0) tmp = -(x / z); elseif (z <= -1.34e-14) tmp = -a / b; elseif (z <= 5.8e-11) tmp = x + (x * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.7e+123], t$95$1, If[LessEqual[z, -170000000.0], (-N[(x / z), $MachinePrecision]), If[LessEqual[z, -1.34e-14], N[((-a) / b), $MachinePrecision], If[LessEqual[z, 5.8e-11], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -2.7 \cdot 10^{+123}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -170000000:\\
\;\;\;\;-\frac{x}{z}\\
\mathbf{elif}\;z \leq -1.34 \cdot 10^{-14}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-11}:\\
\;\;\;\;x + x \cdot z\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.70000000000000013e123 or 5.8e-11 < z Initial program 51.2%
Taylor expanded in t around inf 28.8%
*-commutative28.8%
Simplified28.8%
Taylor expanded in z around inf 51.3%
if -2.70000000000000013e123 < z < -1.7e8Initial program 68.0%
Taylor expanded in y around inf 43.7%
mul-1-neg43.7%
unsub-neg43.7%
Simplified43.7%
Taylor expanded in z around inf 42.9%
associate-*r/42.9%
mul-1-neg42.9%
Simplified42.9%
if -1.7e8 < z < -1.34e-14Initial program 75.6%
sub-neg75.6%
distribute-lft-in75.6%
Applied egg-rr75.6%
Taylor expanded in y around 0 75.0%
Taylor expanded in a around inf 51.3%
associate-*r/51.3%
mul-1-neg51.3%
Simplified51.3%
if -1.34e-14 < z < 5.8e-11Initial program 79.2%
Taylor expanded in y around inf 61.1%
mul-1-neg61.1%
unsub-neg61.1%
Simplified61.1%
Taylor expanded in z around 0 61.1%
*-commutative61.1%
Simplified61.1%
Final simplification55.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -1.2e-83)
t_1
(if (<= y 2.7e+14)
(/ (- t a) b)
(if (<= y 9.2e+79) x (if (<= y 1.7e+147) (/ (- a t) y) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -1.2e-83) {
tmp = t_1;
} else if (y <= 2.7e+14) {
tmp = (t - a) / b;
} else if (y <= 9.2e+79) {
tmp = x;
} else if (y <= 1.7e+147) {
tmp = (a - t) / 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 = x / (1.0d0 - z)
if (y <= (-1.2d-83)) then
tmp = t_1
else if (y <= 2.7d+14) then
tmp = (t - a) / b
else if (y <= 9.2d+79) then
tmp = x
else if (y <= 1.7d+147) then
tmp = (a - t) / 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 = x / (1.0 - z);
double tmp;
if (y <= -1.2e-83) {
tmp = t_1;
} else if (y <= 2.7e+14) {
tmp = (t - a) / b;
} else if (y <= 9.2e+79) {
tmp = x;
} else if (y <= 1.7e+147) {
tmp = (a - t) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -1.2e-83: tmp = t_1 elif y <= 2.7e+14: tmp = (t - a) / b elif y <= 9.2e+79: tmp = x elif y <= 1.7e+147: tmp = (a - t) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -1.2e-83) tmp = t_1; elseif (y <= 2.7e+14) tmp = Float64(Float64(t - a) / b); elseif (y <= 9.2e+79) tmp = x; elseif (y <= 1.7e+147) tmp = Float64(Float64(a - t) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -1.2e-83) tmp = t_1; elseif (y <= 2.7e+14) tmp = (t - a) / b; elseif (y <= 9.2e+79) tmp = x; elseif (y <= 1.7e+147) tmp = (a - t) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.2e-83], t$95$1, If[LessEqual[y, 2.7e+14], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 9.2e+79], x, If[LessEqual[y, 1.7e+147], N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -1.2 \cdot 10^{-83}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+14}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{+79}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+147}:\\
\;\;\;\;\frac{a - t}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.2e-83 or 1.7e147 < y Initial program 50.4%
Taylor expanded in y around inf 63.4%
mul-1-neg63.4%
unsub-neg63.4%
Simplified63.4%
if -1.2e-83 < y < 2.7e14Initial program 88.1%
Taylor expanded in y around 0 59.8%
if 2.7e14 < y < 9.2000000000000002e79Initial program 100.0%
Taylor expanded in z around 0 100.0%
if 9.2000000000000002e79 < y < 1.7e147Initial program 57.0%
Taylor expanded in z around inf 73.1%
Taylor expanded in b around 0 58.7%
associate-*r/58.7%
mul-1-neg58.7%
Simplified58.7%
Final simplification62.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -3.3e-84)
t_1
(if (<= y 80000000000000.0)
(- (/ t b) (/ a b))
(if (<= y 2.9e+82) x (if (<= y 1.7e+147) (/ (- a t) y) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -3.3e-84) {
tmp = t_1;
} else if (y <= 80000000000000.0) {
tmp = (t / b) - (a / b);
} else if (y <= 2.9e+82) {
tmp = x;
} else if (y <= 1.7e+147) {
tmp = (a - t) / 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 = x / (1.0d0 - z)
if (y <= (-3.3d-84)) then
tmp = t_1
else if (y <= 80000000000000.0d0) then
tmp = (t / b) - (a / b)
else if (y <= 2.9d+82) then
tmp = x
else if (y <= 1.7d+147) then
tmp = (a - t) / 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 = x / (1.0 - z);
double tmp;
if (y <= -3.3e-84) {
tmp = t_1;
} else if (y <= 80000000000000.0) {
tmp = (t / b) - (a / b);
} else if (y <= 2.9e+82) {
tmp = x;
} else if (y <= 1.7e+147) {
tmp = (a - t) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -3.3e-84: tmp = t_1 elif y <= 80000000000000.0: tmp = (t / b) - (a / b) elif y <= 2.9e+82: tmp = x elif y <= 1.7e+147: tmp = (a - t) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -3.3e-84) tmp = t_1; elseif (y <= 80000000000000.0) tmp = Float64(Float64(t / b) - Float64(a / b)); elseif (y <= 2.9e+82) tmp = x; elseif (y <= 1.7e+147) tmp = Float64(Float64(a - t) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -3.3e-84) tmp = t_1; elseif (y <= 80000000000000.0) tmp = (t / b) - (a / b); elseif (y <= 2.9e+82) tmp = x; elseif (y <= 1.7e+147) tmp = (a - t) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.3e-84], t$95$1, If[LessEqual[y, 80000000000000.0], N[(N[(t / b), $MachinePrecision] - N[(a / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e+82], x, If[LessEqual[y, 1.7e+147], N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -3.3 \cdot 10^{-84}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 80000000000000:\\
\;\;\;\;\frac{t}{b} - \frac{a}{b}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+82}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+147}:\\
\;\;\;\;\frac{a - t}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -3.29999999999999984e-84 or 1.7e147 < y Initial program 50.4%
Taylor expanded in y around inf 63.4%
mul-1-neg63.4%
unsub-neg63.4%
Simplified63.4%
if -3.29999999999999984e-84 < y < 8e13Initial program 88.1%
Taylor expanded in y around 0 59.8%
Taylor expanded in t around 0 59.8%
+-commutative59.8%
neg-mul-159.8%
sub-neg59.8%
Simplified59.8%
if 8e13 < y < 2.9000000000000001e82Initial program 100.0%
Taylor expanded in z around 0 100.0%
if 2.9000000000000001e82 < y < 1.7e147Initial program 57.0%
Taylor expanded in z around inf 73.1%
Taylor expanded in b around 0 58.7%
associate-*r/58.7%
mul-1-neg58.7%
Simplified58.7%
Final simplification62.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -1.6e-47)
t_1
(if (<= z 6.4e-137)
(- x (* z (/ a y)))
(if (<= z 2.8e-14) (+ x (* z (/ t y))) t_1)))))
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 <= -1.6e-47) {
tmp = t_1;
} else if (z <= 6.4e-137) {
tmp = x - (z * (a / y));
} else if (z <= 2.8e-14) {
tmp = x + (z * (t / 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)
if (z <= (-1.6d-47)) then
tmp = t_1
else if (z <= 6.4d-137) then
tmp = x - (z * (a / y))
else if (z <= 2.8d-14) then
tmp = x + (z * (t / 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);
double tmp;
if (z <= -1.6e-47) {
tmp = t_1;
} else if (z <= 6.4e-137) {
tmp = x - (z * (a / y));
} else if (z <= 2.8e-14) {
tmp = x + (z * (t / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -1.6e-47: tmp = t_1 elif z <= 6.4e-137: tmp = x - (z * (a / y)) elif z <= 2.8e-14: tmp = x + (z * (t / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.6e-47) tmp = t_1; elseif (z <= 6.4e-137) tmp = Float64(x - Float64(z * Float64(a / y))); elseif (z <= 2.8e-14) tmp = Float64(x + Float64(z * Float64(t / 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); tmp = 0.0; if (z <= -1.6e-47) tmp = t_1; elseif (z <= 6.4e-137) tmp = x - (z * (a / y)); elseif (z <= 2.8e-14) tmp = x + (z * (t / y)); else tmp = t_1; 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, -1.6e-47], t$95$1, If[LessEqual[z, 6.4e-137], N[(x - N[(z * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e-14], N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{-47}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{-137}:\\
\;\;\;\;x - z \cdot \frac{a}{y}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-14}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.6e-47 or 2.8000000000000001e-14 < z Initial program 56.9%
Taylor expanded in z around inf 75.8%
if -1.6e-47 < z < 6.40000000000000043e-137Initial program 81.9%
Taylor expanded in z around 0 53.3%
associate-/l*70.0%
Simplified70.0%
Taylor expanded in a around inf 73.7%
mul-1-neg73.7%
Simplified73.7%
if 6.40000000000000043e-137 < z < 2.8000000000000001e-14Initial program 68.0%
Taylor expanded in z around 0 43.3%
associate-/l*68.5%
Simplified68.5%
Taylor expanded in t around inf 68.9%
Final simplification74.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -1.06e-45)
t_1
(if (<= z 1.05e-137)
(- x (/ (* z a) y))
(if (<= z 3.1e-15) (+ x (* z (/ t y))) t_1)))))
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 <= -1.06e-45) {
tmp = t_1;
} else if (z <= 1.05e-137) {
tmp = x - ((z * a) / y);
} else if (z <= 3.1e-15) {
tmp = x + (z * (t / 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)
if (z <= (-1.06d-45)) then
tmp = t_1
else if (z <= 1.05d-137) then
tmp = x - ((z * a) / y)
else if (z <= 3.1d-15) then
tmp = x + (z * (t / 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);
double tmp;
if (z <= -1.06e-45) {
tmp = t_1;
} else if (z <= 1.05e-137) {
tmp = x - ((z * a) / y);
} else if (z <= 3.1e-15) {
tmp = x + (z * (t / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -1.06e-45: tmp = t_1 elif z <= 1.05e-137: tmp = x - ((z * a) / y) elif z <= 3.1e-15: tmp = x + (z * (t / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.06e-45) tmp = t_1; elseif (z <= 1.05e-137) tmp = Float64(x - Float64(Float64(z * a) / y)); elseif (z <= 3.1e-15) tmp = Float64(x + Float64(z * Float64(t / 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); tmp = 0.0; if (z <= -1.06e-45) tmp = t_1; elseif (z <= 1.05e-137) tmp = x - ((z * a) / y); elseif (z <= 3.1e-15) tmp = x + (z * (t / y)); else tmp = t_1; 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, -1.06e-45], t$95$1, If[LessEqual[z, 1.05e-137], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1e-15], N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.06 \cdot 10^{-45}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-137}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-15}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.06000000000000004e-45 or 3.0999999999999999e-15 < z Initial program 56.9%
Taylor expanded in z around inf 75.8%
if -1.06000000000000004e-45 < z < 1.04999999999999996e-137Initial program 81.9%
Taylor expanded in z around 0 53.3%
associate-/l*70.0%
Simplified70.0%
Taylor expanded in a around inf 76.8%
associate-*r/76.8%
associate-*r*76.8%
neg-mul-176.8%
*-commutative76.8%
Simplified76.8%
if 1.04999999999999996e-137 < z < 3.0999999999999999e-15Initial program 68.0%
Taylor expanded in z around 0 43.3%
associate-/l*68.5%
Simplified68.5%
Taylor expanded in t around inf 68.9%
Final simplification75.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.8e-36) (not (<= z 4e-15))) (/ (- t a) (- b y)) (+ x (* z (/ t y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.8e-36) || !(z <= 4e-15)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (z * (t / 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 <= (-5.8d-36)) .or. (.not. (z <= 4d-15))) then
tmp = (t - a) / (b - y)
else
tmp = x + (z * (t / 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 <= -5.8e-36) || !(z <= 4e-15)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (z * (t / y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.8e-36) or not (z <= 4e-15): tmp = (t - a) / (b - y) else: tmp = x + (z * (t / y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.8e-36) || !(z <= 4e-15)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(z * Float64(t / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.8e-36) || ~((z <= 4e-15))) tmp = (t - a) / (b - y); else tmp = x + (z * (t / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.8e-36], N[Not[LessEqual[z, 4e-15]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{-36} \lor \neg \left(z \leq 4 \cdot 10^{-15}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\end{array}
\end{array}
if z < -5.80000000000000026e-36 or 4.0000000000000003e-15 < z Initial program 56.6%
Taylor expanded in z around inf 76.3%
if -5.80000000000000026e-36 < z < 4.0000000000000003e-15Initial program 79.3%
Taylor expanded in z around 0 51.8%
associate-/l*69.9%
Simplified69.9%
Taylor expanded in t around inf 68.8%
Final simplification72.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.8e+125) (not (<= z 5.6e-11))) (/ t (- b y)) (/ x (- 1.0 z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.8e+125) || !(z <= 5.6e-11)) {
tmp = t / (b - y);
} 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 <= (-2.8d+125)) .or. (.not. (z <= 5.6d-11))) then
tmp = t / (b - y)
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 <= -2.8e+125) || !(z <= 5.6e-11)) {
tmp = t / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.8e+125) or not (z <= 5.6e-11): tmp = t / (b - y) else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.8e+125) || !(z <= 5.6e-11)) tmp = Float64(t / Float64(b - y)); 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 <= -2.8e+125) || ~((z <= 5.6e-11))) tmp = t / (b - y); else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.8e+125], N[Not[LessEqual[z, 5.6e-11]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+125} \lor \neg \left(z \leq 5.6 \cdot 10^{-11}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -2.8000000000000001e125 or 5.6e-11 < z Initial program 51.2%
Taylor expanded in t around inf 28.8%
*-commutative28.8%
Simplified28.8%
Taylor expanded in z around inf 51.3%
if -2.8000000000000001e125 < z < 5.6e-11Initial program 77.3%
Taylor expanded in y around inf 56.8%
mul-1-neg56.8%
unsub-neg56.8%
Simplified56.8%
Final simplification54.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.5e-84) (not (<= y 70000000000000.0))) (/ x (- 1.0 z)) (/ (- t a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.5e-84) || !(y <= 70000000000000.0)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / 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 ((y <= (-5.5d-84)) .or. (.not. (y <= 70000000000000.0d0))) then
tmp = x / (1.0d0 - z)
else
tmp = (t - a) / 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 ((y <= -5.5e-84) || !(y <= 70000000000000.0)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.5e-84) or not (y <= 70000000000000.0): tmp = x / (1.0 - z) else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5.5e-84) || !(y <= 70000000000000.0)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -5.5e-84) || ~((y <= 70000000000000.0))) tmp = x / (1.0 - z); else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5.5e-84], N[Not[LessEqual[y, 70000000000000.0]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{-84} \lor \neg \left(y \leq 70000000000000\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -5.50000000000000019e-84 or 7e13 < y Initial program 53.3%
Taylor expanded in y around inf 61.4%
mul-1-neg61.4%
unsub-neg61.4%
Simplified61.4%
if -5.50000000000000019e-84 < y < 7e13Initial program 88.1%
Taylor expanded in y around 0 59.8%
Final simplification60.8%
(FPCore (x y z t a b) :precision binary64 (if (<= z -0.72) (- (/ x z)) (if (<= z 3.3e-27) (+ x (* x z)) (/ (- a) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.72) {
tmp = -(x / z);
} else if (z <= 3.3e-27) {
tmp = x + (x * z);
} else {
tmp = -a / 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 <= (-0.72d0)) then
tmp = -(x / z)
else if (z <= 3.3d-27) then
tmp = x + (x * z)
else
tmp = -a / 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 <= -0.72) {
tmp = -(x / z);
} else if (z <= 3.3e-27) {
tmp = x + (x * z);
} else {
tmp = -a / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -0.72: tmp = -(x / z) elif z <= 3.3e-27: tmp = x + (x * z) else: tmp = -a / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.72) tmp = Float64(-Float64(x / z)); elseif (z <= 3.3e-27) tmp = Float64(x + Float64(x * z)); else tmp = Float64(Float64(-a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -0.72) tmp = -(x / z); elseif (z <= 3.3e-27) tmp = x + (x * z); else tmp = -a / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.72], (-N[(x / z), $MachinePrecision]), If[LessEqual[z, 3.3e-27], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision], N[((-a) / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.72:\\
\;\;\;\;-\frac{x}{z}\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-27}:\\
\;\;\;\;x + x \cdot z\\
\mathbf{else}:\\
\;\;\;\;\frac{-a}{b}\\
\end{array}
\end{array}
if z < -0.71999999999999997Initial program 50.7%
Taylor expanded in y around inf 27.1%
mul-1-neg27.1%
unsub-neg27.1%
Simplified27.1%
Taylor expanded in z around inf 25.5%
associate-*r/25.5%
mul-1-neg25.5%
Simplified25.5%
if -0.71999999999999997 < z < 3.29999999999999998e-27Initial program 78.8%
Taylor expanded in y around inf 60.9%
mul-1-neg60.9%
unsub-neg60.9%
Simplified60.9%
Taylor expanded in z around 0 60.9%
*-commutative60.9%
Simplified60.9%
if 3.29999999999999998e-27 < z Initial program 61.6%
sub-neg61.6%
distribute-lft-in59.9%
Applied egg-rr59.9%
Taylor expanded in y around 0 36.2%
Taylor expanded in a around inf 28.2%
associate-*r/28.2%
mul-1-neg28.2%
Simplified28.2%
Final simplification44.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.0) (- (/ x z)) (if (<= z 1.5e-14) x (/ (- a) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.0) {
tmp = -(x / z);
} else if (z <= 1.5e-14) {
tmp = x;
} else {
tmp = -a / 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 <= (-1.0d0)) then
tmp = -(x / z)
else if (z <= 1.5d-14) then
tmp = x
else
tmp = -a / 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 <= -1.0) {
tmp = -(x / z);
} else if (z <= 1.5e-14) {
tmp = x;
} else {
tmp = -a / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.0: tmp = -(x / z) elif z <= 1.5e-14: tmp = x else: tmp = -a / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.0) tmp = Float64(-Float64(x / z)); elseif (z <= 1.5e-14) tmp = x; else tmp = Float64(Float64(-a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.0) tmp = -(x / z); elseif (z <= 1.5e-14) tmp = x; else tmp = -a / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.0], (-N[(x / z), $MachinePrecision]), If[LessEqual[z, 1.5e-14], x, N[((-a) / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1:\\
\;\;\;\;-\frac{x}{z}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-14}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{-a}{b}\\
\end{array}
\end{array}
if z < -1Initial program 50.7%
Taylor expanded in y around inf 27.1%
mul-1-neg27.1%
unsub-neg27.1%
Simplified27.1%
Taylor expanded in z around inf 25.5%
associate-*r/25.5%
mul-1-neg25.5%
Simplified25.5%
if -1 < z < 1.4999999999999999e-14Initial program 78.8%
Taylor expanded in z around 0 60.7%
if 1.4999999999999999e-14 < z Initial program 61.6%
sub-neg61.6%
distribute-lft-in59.9%
Applied egg-rr59.9%
Taylor expanded in y around 0 36.2%
Taylor expanded in a around inf 28.2%
associate-*r/28.2%
mul-1-neg28.2%
Simplified28.2%
Final simplification44.0%
(FPCore (x y z t a b) :precision binary64 (if (<= y -6.2e-92) x (if (<= y 9.5e-64) (/ t b) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.2e-92) {
tmp = x;
} else if (y <= 9.5e-64) {
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 (y <= (-6.2d-92)) then
tmp = x
else if (y <= 9.5d-64) 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 (y <= -6.2e-92) {
tmp = x;
} else if (y <= 9.5e-64) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -6.2e-92: tmp = x elif y <= 9.5e-64: tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -6.2e-92) tmp = x; elseif (y <= 9.5e-64) 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 (y <= -6.2e-92) tmp = x; elseif (y <= 9.5e-64) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6.2e-92], x, If[LessEqual[y, 9.5e-64], N[(t / b), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{-92}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-64}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.2000000000000002e-92 or 9.50000000000000043e-64 < y Initial program 57.1%
Taylor expanded in z around 0 43.6%
if -6.2000000000000002e-92 < y < 9.50000000000000043e-64Initial program 88.0%
Taylor expanded in t around inf 43.3%
*-commutative43.3%
Simplified43.3%
Taylor expanded in y around 0 42.7%
Final simplification43.3%
(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.6%
Taylor expanded in z around 0 32.6%
Final simplification32.6%
(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 2023293
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:herbie-target
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))