
(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 19 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 (* z (- t a)))
(t_2 (- (/ (- a t) y) (/ x (+ z -1.0))))
(t_3 (+ (* x y) t_1))
(t_4 (/ t_3 (+ y (* z (- b y)))))
(t_5
(+
(+ (/ x (/ (- b y) (/ y z))) (/ (- t a) (- b y)))
(/ (* (/ y z) (- a t)) (pow (- b y) 2.0)))))
(if (<= t_4 (- INFINITY))
t_2
(if (<= t_4 -1e-173)
(/ t_3 (+ y (- (* z b) (* y z))))
(if (<= t_4 0.0)
t_5
(if (<= t_4 5e+276)
(/ (fma x y t_1) (fma z (- b y) y))
(if (<= t_4 INFINITY) t_2 t_5)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = ((a - t) / y) - (x / (z + -1.0));
double t_3 = (x * y) + t_1;
double t_4 = t_3 / (y + (z * (b - y)));
double t_5 = ((x / ((b - y) / (y / z))) + ((t - a) / (b - y))) + (((y / z) * (a - t)) / pow((b - y), 2.0));
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_4 <= -1e-173) {
tmp = t_3 / (y + ((z * b) - (y * z)));
} else if (t_4 <= 0.0) {
tmp = t_5;
} else if (t_4 <= 5e+276) {
tmp = fma(x, y, t_1) / fma(z, (b - y), y);
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = t_5;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))) t_3 = Float64(Float64(x * y) + t_1) t_4 = Float64(t_3 / Float64(y + Float64(z * Float64(b - y)))) t_5 = Float64(Float64(Float64(x / Float64(Float64(b - y) / Float64(y / z))) + Float64(Float64(t - a) / Float64(b - y))) + Float64(Float64(Float64(y / z) * Float64(a - t)) / (Float64(b - y) ^ 2.0))) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_2; elseif (t_4 <= -1e-173) tmp = Float64(t_3 / Float64(y + Float64(Float64(z * b) - Float64(y * z)))); elseif (t_4 <= 0.0) tmp = t_5; elseif (t_4 <= 5e+276) tmp = Float64(fma(x, y, t_1) / fma(z, Float64(b - y), y)); elseif (t_4 <= Inf) tmp = t_2; else tmp = t_5; end return 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[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(x / N[(N[(b - y), $MachinePrecision] / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y / z), $MachinePrecision] * N[(a - t), $MachinePrecision]), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$2, If[LessEqual[t$95$4, -1e-173], N[(t$95$3 / N[(y + N[(N[(z * b), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 0.0], t$95$5, If[LessEqual[t$95$4, 5e+276], N[(N[(x * y + t$95$1), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], t$95$2, t$95$5]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{a - t}{y} - \frac{x}{z + -1}\\
t_3 := x \cdot y + t_1\\
t_4 := \frac{t_3}{y + z \cdot \left(b - y\right)}\\
t_5 := \left(\frac{x}{\frac{b - y}{\frac{y}{z}}} + \frac{t - a}{b - y}\right) + \frac{\frac{y}{z} \cdot \left(a - t\right)}{{\left(b - y\right)}^{2}}\\
\mathbf{if}\;t_4 \leq -\infty:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_4 \leq -1 \cdot 10^{-173}:\\
\;\;\;\;\frac{t_3}{y + \left(z \cdot b - y \cdot z\right)}\\
\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t_4 \leq 5 \cdot 10^{+276}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t_1\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_5\\
\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.00000000000000001e276 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 27.0%
Taylor expanded in y around -inf 64.5%
mul-1-neg64.5%
unsub-neg64.5%
associate-*r/64.5%
neg-mul-164.5%
sub-neg64.5%
metadata-eval64.5%
Simplified78.1%
Taylor expanded in z around inf 87.4%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1e-173Initial program 99.6%
sub-neg99.6%
distribute-lft-in99.7%
Applied egg-rr99.7%
if -1e-173 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 14.4%
Taylor expanded in z around inf 49.8%
associate--r+49.8%
+-commutative49.8%
associate--l+49.8%
associate-/l*51.8%
*-commutative51.8%
associate-/l*64.8%
div-sub64.8%
times-frac98.1%
associate-*r/94.4%
Simplified94.4%
if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.00000000000000001e276Initial program 99.6%
fma-def99.6%
+-commutative99.6%
fma-def99.6%
Simplified99.6%
Final simplification95.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (* z (- t a)))
(t_3 (- (/ (- a t) y) (/ x (+ z -1.0))))
(t_4 (+ (* x y) t_2))
(t_5 (/ t_4 t_1))
(t_6
(+
(+ (/ x (/ (- b y) (/ y z))) (/ (- t a) (- b y)))
(/ (* (/ y z) (- a t)) (pow (- b y) 2.0)))))
(if (<= t_5 (- INFINITY))
t_3
(if (<= t_5 -1e-173)
(/ t_4 (+ y (- (* z b) (* y z))))
(if (<= t_5 0.0)
t_6
(if (<= t_5 5e+276)
(/ (fma x y t_2) t_1)
(if (<= t_5 INFINITY) t_3 t_6)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = z * (t - a);
double t_3 = ((a - t) / y) - (x / (z + -1.0));
double t_4 = (x * y) + t_2;
double t_5 = t_4 / t_1;
double t_6 = ((x / ((b - y) / (y / z))) + ((t - a) / (b - y))) + (((y / z) * (a - t)) / pow((b - y), 2.0));
double tmp;
if (t_5 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_5 <= -1e-173) {
tmp = t_4 / (y + ((z * b) - (y * z)));
} else if (t_5 <= 0.0) {
tmp = t_6;
} else if (t_5 <= 5e+276) {
tmp = fma(x, y, t_2) / t_1;
} else if (t_5 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = t_6;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(z * Float64(t - a)) t_3 = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))) t_4 = Float64(Float64(x * y) + t_2) t_5 = Float64(t_4 / t_1) t_6 = Float64(Float64(Float64(x / Float64(Float64(b - y) / Float64(y / z))) + Float64(Float64(t - a) / Float64(b - y))) + Float64(Float64(Float64(y / z) * Float64(a - t)) / (Float64(b - y) ^ 2.0))) tmp = 0.0 if (t_5 <= Float64(-Inf)) tmp = t_3; elseif (t_5 <= -1e-173) tmp = Float64(t_4 / Float64(y + Float64(Float64(z * b) - Float64(y * z)))); elseif (t_5 <= 0.0) tmp = t_6; elseif (t_5 <= 5e+276) tmp = Float64(fma(x, y, t_2) / t_1); elseif (t_5 <= Inf) tmp = t_3; else tmp = t_6; end return 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[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / t$95$1), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(x / N[(N[(b - y), $MachinePrecision] / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y / z), $MachinePrecision] * N[(a - t), $MachinePrecision]), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, (-Infinity)], t$95$3, If[LessEqual[t$95$5, -1e-173], N[(t$95$4 / N[(y + N[(N[(z * b), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, 0.0], t$95$6, If[LessEqual[t$95$5, 5e+276], N[(N[(x * y + t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$5, Infinity], t$95$3, t$95$6]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := z \cdot \left(t - a\right)\\
t_3 := \frac{a - t}{y} - \frac{x}{z + -1}\\
t_4 := x \cdot y + t_2\\
t_5 := \frac{t_4}{t_1}\\
t_6 := \left(\frac{x}{\frac{b - y}{\frac{y}{z}}} + \frac{t - a}{b - y}\right) + \frac{\frac{y}{z} \cdot \left(a - t\right)}{{\left(b - y\right)}^{2}}\\
\mathbf{if}\;t_5 \leq -\infty:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_5 \leq -1 \cdot 10^{-173}:\\
\;\;\;\;\frac{t_4}{y + \left(z \cdot b - y \cdot z\right)}\\
\mathbf{elif}\;t_5 \leq 0:\\
\;\;\;\;t_6\\
\mathbf{elif}\;t_5 \leq 5 \cdot 10^{+276}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t_2\right)}{t_1}\\
\mathbf{elif}\;t_5 \leq \infty:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_6\\
\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.00000000000000001e276 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 27.0%
Taylor expanded in y around -inf 64.5%
mul-1-neg64.5%
unsub-neg64.5%
associate-*r/64.5%
neg-mul-164.5%
sub-neg64.5%
metadata-eval64.5%
Simplified78.1%
Taylor expanded in z around inf 87.4%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1e-173Initial program 99.6%
sub-neg99.6%
distribute-lft-in99.7%
Applied egg-rr99.7%
if -1e-173 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 14.4%
Taylor expanded in z around inf 49.8%
associate--r+49.8%
+-commutative49.8%
associate--l+49.8%
associate-/l*51.8%
*-commutative51.8%
associate-/l*64.8%
div-sub64.8%
times-frac98.1%
associate-*r/94.4%
Simplified94.4%
if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.00000000000000001e276Initial program 99.6%
fma-def99.6%
Simplified99.6%
Final simplification95.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (* z (- t a)))
(t_3 (- (/ (- a t) y) (/ x (+ z -1.0))))
(t_4 (+ (* x y) t_2))
(t_5 (/ t_4 t_1))
(t_6 (/ (- t a) (- b y))))
(if (<= t_5 (- INFINITY))
t_3
(if (<= t_5 -2e-293)
(/ t_4 (+ y (- (* z b) (* y z))))
(if (<= t_5 0.0)
t_6
(if (<= t_5 5e+276)
(/ (fma x y t_2) t_1)
(if (<= t_5 INFINITY) t_3 t_6)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = z * (t - a);
double t_3 = ((a - t) / y) - (x / (z + -1.0));
double t_4 = (x * y) + t_2;
double t_5 = t_4 / t_1;
double t_6 = (t - a) / (b - y);
double tmp;
if (t_5 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_5 <= -2e-293) {
tmp = t_4 / (y + ((z * b) - (y * z)));
} else if (t_5 <= 0.0) {
tmp = t_6;
} else if (t_5 <= 5e+276) {
tmp = fma(x, y, t_2) / t_1;
} else if (t_5 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = t_6;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(z * Float64(t - a)) t_3 = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))) t_4 = Float64(Float64(x * y) + t_2) t_5 = Float64(t_4 / t_1) t_6 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (t_5 <= Float64(-Inf)) tmp = t_3; elseif (t_5 <= -2e-293) tmp = Float64(t_4 / Float64(y + Float64(Float64(z * b) - Float64(y * z)))); elseif (t_5 <= 0.0) tmp = t_6; elseif (t_5 <= 5e+276) tmp = Float64(fma(x, y, t_2) / t_1); elseif (t_5 <= Inf) tmp = t_3; else tmp = t_6; end return 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[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / t$95$1), $MachinePrecision]}, Block[{t$95$6 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, (-Infinity)], t$95$3, If[LessEqual[t$95$5, -2e-293], N[(t$95$4 / N[(y + N[(N[(z * b), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, 0.0], t$95$6, If[LessEqual[t$95$5, 5e+276], N[(N[(x * y + t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$5, Infinity], t$95$3, t$95$6]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := z \cdot \left(t - a\right)\\
t_3 := \frac{a - t}{y} - \frac{x}{z + -1}\\
t_4 := x \cdot y + t_2\\
t_5 := \frac{t_4}{t_1}\\
t_6 := \frac{t - a}{b - y}\\
\mathbf{if}\;t_5 \leq -\infty:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_5 \leq -2 \cdot 10^{-293}:\\
\;\;\;\;\frac{t_4}{y + \left(z \cdot b - y \cdot z\right)}\\
\mathbf{elif}\;t_5 \leq 0:\\
\;\;\;\;t_6\\
\mathbf{elif}\;t_5 \leq 5 \cdot 10^{+276}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t_2\right)}{t_1}\\
\mathbf{elif}\;t_5 \leq \infty:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_6\\
\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.00000000000000001e276 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 27.0%
Taylor expanded in y around -inf 64.5%
mul-1-neg64.5%
unsub-neg64.5%
associate-*r/64.5%
neg-mul-164.5%
sub-neg64.5%
metadata-eval64.5%
Simplified78.1%
Taylor expanded in z around inf 87.4%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.0000000000000001e-293Initial program 99.6%
sub-neg99.6%
distribute-lft-in99.6%
Applied egg-rr99.6%
if -2.0000000000000001e-293 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 5.7%
Taylor expanded in z around inf 75.9%
if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.00000000000000001e276Initial program 99.6%
fma-def99.6%
Simplified99.6%
Final simplification92.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y)))
(t_2 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
(t_3 (- (/ (- a t) y) (/ x (+ z -1.0)))))
(if (<= t_2 (- INFINITY))
t_3
(if (<= t_2 -2e-293)
t_2
(if (<= t_2 0.0)
t_1
(if (<= t_2 5e+276) t_2 (if (<= t_2 INFINITY) t_3 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 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double t_3 = ((a - t) / y) - (x / (z + -1.0));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_2 <= -2e-293) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_1;
} else if (t_2 <= 5e+276) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_3;
} 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 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double t_3 = ((a - t) / y) - (x / (z + -1.0));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_3;
} else if (t_2 <= -2e-293) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_1;
} else if (t_2 <= 5e+276) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) t_2 = ((x * y) + (z * (t - a))) / (y + (z * (b - y))) t_3 = ((a - t) / y) - (x / (z + -1.0)) tmp = 0 if t_2 <= -math.inf: tmp = t_3 elif t_2 <= -2e-293: tmp = t_2 elif t_2 <= 0.0: tmp = t_1 elif t_2 <= 5e+276: tmp = t_2 elif t_2 <= math.inf: tmp = t_3 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(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) t_3 = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_3; elseif (t_2 <= -2e-293) tmp = t_2; elseif (t_2 <= 0.0) tmp = t_1; elseif (t_2 <= 5e+276) tmp = t_2; elseif (t_2 <= Inf) tmp = t_3; 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 = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); t_3 = ((a - t) / y) - (x / (z + -1.0)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_3; elseif (t_2 <= -2e-293) tmp = t_2; elseif (t_2 <= 0.0) tmp = t_1; elseif (t_2 <= 5e+276) tmp = t_2; elseif (t_2 <= Inf) tmp = t_3; 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[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, -2e-293], t$95$2, If[LessEqual[t$95$2, 0.0], t$95$1, If[LessEqual[t$95$2, 5e+276], t$95$2, If[LessEqual[t$95$2, Infinity], t$95$3, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
t_3 := \frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-293}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+276}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;t_3\\
\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.0 or 5.00000000000000001e276 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 27.0%
Taylor expanded in y around -inf 64.5%
mul-1-neg64.5%
unsub-neg64.5%
associate-*r/64.5%
neg-mul-164.5%
sub-neg64.5%
metadata-eval64.5%
Simplified78.1%
Taylor expanded in z around inf 87.4%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.0000000000000001e-293 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.00000000000000001e276Initial program 99.6%
if -2.0000000000000001e-293 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 5.7%
Taylor expanded in z around inf 75.9%
Final simplification92.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ (- a t) y) (/ x (+ z -1.0))))
(t_2 (+ (* x y) (* z (- t a))))
(t_3 (/ t_2 (+ y (* z (- b y)))))
(t_4 (/ (- t a) (- b y))))
(if (<= t_3 (- INFINITY))
t_1
(if (<= t_3 -2e-293)
(/ t_2 (+ y (- (* z b) (* y z))))
(if (<= t_3 0.0)
t_4
(if (<= t_3 5e+276) t_3 (if (<= t_3 INFINITY) t_1 t_4)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((a - t) / y) - (x / (z + -1.0));
double t_2 = (x * y) + (z * (t - a));
double t_3 = t_2 / (y + (z * (b - y)));
double t_4 = (t - a) / (b - y);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_3 <= -2e-293) {
tmp = t_2 / (y + ((z * b) - (y * z)));
} else if (t_3 <= 0.0) {
tmp = t_4;
} else if (t_3 <= 5e+276) {
tmp = t_3;
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = t_4;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((a - t) / y) - (x / (z + -1.0));
double t_2 = (x * y) + (z * (t - a));
double t_3 = t_2 / (y + (z * (b - y)));
double t_4 = (t - a) / (b - y);
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_3 <= -2e-293) {
tmp = t_2 / (y + ((z * b) - (y * z)));
} else if (t_3 <= 0.0) {
tmp = t_4;
} else if (t_3 <= 5e+276) {
tmp = t_3;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((a - t) / y) - (x / (z + -1.0)) t_2 = (x * y) + (z * (t - a)) t_3 = t_2 / (y + (z * (b - y))) t_4 = (t - a) / (b - y) tmp = 0 if t_3 <= -math.inf: tmp = t_1 elif t_3 <= -2e-293: tmp = t_2 / (y + ((z * b) - (y * z))) elif t_3 <= 0.0: tmp = t_4 elif t_3 <= 5e+276: tmp = t_3 elif t_3 <= math.inf: tmp = t_1 else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))) t_2 = Float64(Float64(x * y) + Float64(z * Float64(t - a))) t_3 = Float64(t_2 / Float64(y + Float64(z * Float64(b - y)))) t_4 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_1; elseif (t_3 <= -2e-293) tmp = Float64(t_2 / Float64(y + Float64(Float64(z * b) - Float64(y * z)))); elseif (t_3 <= 0.0) tmp = t_4; elseif (t_3 <= 5e+276) tmp = t_3; elseif (t_3 <= Inf) tmp = t_1; else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((a - t) / y) - (x / (z + -1.0)); t_2 = (x * y) + (z * (t - a)); t_3 = t_2 / (y + (z * (b - y))); t_4 = (t - a) / (b - y); tmp = 0.0; if (t_3 <= -Inf) tmp = t_1; elseif (t_3 <= -2e-293) tmp = t_2 / (y + ((z * b) - (y * z))); elseif (t_3 <= 0.0) tmp = t_4; elseif (t_3 <= 5e+276) tmp = t_3; elseif (t_3 <= Inf) tmp = t_1; else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$1, If[LessEqual[t$95$3, -2e-293], N[(t$95$2 / N[(y + N[(N[(z * b), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 0.0], t$95$4, If[LessEqual[t$95$3, 5e+276], t$95$3, If[LessEqual[t$95$3, Infinity], t$95$1, t$95$4]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y} - \frac{x}{z + -1}\\
t_2 := x \cdot y + z \cdot \left(t - a\right)\\
t_3 := \frac{t_2}{y + z \cdot \left(b - y\right)}\\
t_4 := \frac{t - a}{b - y}\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_3 \leq -2 \cdot 10^{-293}:\\
\;\;\;\;\frac{t_2}{y + \left(z \cdot b - y \cdot z\right)}\\
\mathbf{elif}\;t_3 \leq 0:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_3 \leq 5 \cdot 10^{+276}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\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.00000000000000001e276 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 27.0%
Taylor expanded in y around -inf 64.5%
mul-1-neg64.5%
unsub-neg64.5%
associate-*r/64.5%
neg-mul-164.5%
sub-neg64.5%
metadata-eval64.5%
Simplified78.1%
Taylor expanded in z around inf 87.4%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.0000000000000001e-293Initial program 99.6%
sub-neg99.6%
distribute-lft-in99.6%
Applied egg-rr99.6%
if -2.0000000000000001e-293 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 5.7%
Taylor expanded in z around inf 75.9%
if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.00000000000000001e276Initial program 99.6%
Final simplification92.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -7.8e+46)
t_1
(if (<= y -3.4e-6)
(/ t (- b y))
(if (<= y -2.15e-119)
(/ (- a) (- b y))
(if (or (<= y 5.7e-86) (and (not (<= y 0.0095)) (<= y 7.5e+56)))
(/ (- t a) b)
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 <= -7.8e+46) {
tmp = t_1;
} else if (y <= -3.4e-6) {
tmp = t / (b - y);
} else if (y <= -2.15e-119) {
tmp = -a / (b - y);
} else if ((y <= 5.7e-86) || (!(y <= 0.0095) && (y <= 7.5e+56))) {
tmp = (t - a) / b;
} 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 <= (-7.8d+46)) then
tmp = t_1
else if (y <= (-3.4d-6)) then
tmp = t / (b - y)
else if (y <= (-2.15d-119)) then
tmp = -a / (b - y)
else if ((y <= 5.7d-86) .or. (.not. (y <= 0.0095d0)) .and. (y <= 7.5d+56)) then
tmp = (t - a) / b
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 <= -7.8e+46) {
tmp = t_1;
} else if (y <= -3.4e-6) {
tmp = t / (b - y);
} else if (y <= -2.15e-119) {
tmp = -a / (b - y);
} else if ((y <= 5.7e-86) || (!(y <= 0.0095) && (y <= 7.5e+56))) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -7.8e+46: tmp = t_1 elif y <= -3.4e-6: tmp = t / (b - y) elif y <= -2.15e-119: tmp = -a / (b - y) elif (y <= 5.7e-86) or (not (y <= 0.0095) and (y <= 7.5e+56)): tmp = (t - a) / b 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 <= -7.8e+46) tmp = t_1; elseif (y <= -3.4e-6) tmp = Float64(t / Float64(b - y)); elseif (y <= -2.15e-119) tmp = Float64(Float64(-a) / Float64(b - y)); elseif ((y <= 5.7e-86) || (!(y <= 0.0095) && (y <= 7.5e+56))) tmp = Float64(Float64(t - a) / b); 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 <= -7.8e+46) tmp = t_1; elseif (y <= -3.4e-6) tmp = t / (b - y); elseif (y <= -2.15e-119) tmp = -a / (b - y); elseif ((y <= 5.7e-86) || (~((y <= 0.0095)) && (y <= 7.5e+56))) tmp = (t - a) / b; 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, -7.8e+46], t$95$1, If[LessEqual[y, -3.4e-6], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.15e-119], N[((-a) / N[(b - y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 5.7e-86], And[N[Not[LessEqual[y, 0.0095]], $MachinePrecision], LessEqual[y, 7.5e+56]]], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -7.8 \cdot 10^{+46}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{-6}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq -2.15 \cdot 10^{-119}:\\
\;\;\;\;\frac{-a}{b - y}\\
\mathbf{elif}\;y \leq 5.7 \cdot 10^{-86} \lor \neg \left(y \leq 0.0095\right) \land y \leq 7.5 \cdot 10^{+56}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -7.7999999999999999e46 or 5.7000000000000004e-86 < y < 0.00949999999999999976 or 7.4999999999999999e56 < y Initial program 47.8%
Taylor expanded in y around inf 58.5%
mul-1-neg58.5%
unsub-neg58.5%
Simplified58.5%
if -7.7999999999999999e46 < y < -3.40000000000000006e-6Initial program 57.7%
Taylor expanded in t around inf 36.2%
*-commutative36.2%
Simplified36.2%
Taylor expanded in z around inf 57.2%
if -3.40000000000000006e-6 < y < -2.15e-119Initial program 80.0%
Taylor expanded in a around inf 36.6%
mul-1-neg36.6%
distribute-lft-neg-out36.6%
*-commutative36.6%
Simplified36.6%
Taylor expanded in z around inf 39.8%
mul-1-neg39.8%
distribute-neg-frac39.8%
Simplified39.8%
if -2.15e-119 < y < 5.7000000000000004e-86 or 0.00949999999999999976 < y < 7.4999999999999999e56Initial program 82.2%
Taylor expanded in y around 0 58.7%
Final simplification56.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- x (/ z (/ y (+ (* x b) (- a t)))))) (t_2 (/ (- t a) (- b y))))
(if (<= z -8.5e-7)
t_2
(if (<= z -2.55e-241)
t_1
(if (<= z 1.55e-142)
(/ (+ (* x y) (* z (- t a))) y)
(if (<= z 1.15e-28) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - (z / (y / ((x * b) + (a - t))));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -8.5e-7) {
tmp = t_2;
} else if (z <= -2.55e-241) {
tmp = t_1;
} else if (z <= 1.55e-142) {
tmp = ((x * y) + (z * (t - a))) / y;
} else if (z <= 1.15e-28) {
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 - (z / (y / ((x * b) + (a - t))))
t_2 = (t - a) / (b - y)
if (z <= (-8.5d-7)) then
tmp = t_2
else if (z <= (-2.55d-241)) then
tmp = t_1
else if (z <= 1.55d-142) then
tmp = ((x * y) + (z * (t - a))) / y
else if (z <= 1.15d-28) 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 - (z / (y / ((x * b) + (a - t))));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -8.5e-7) {
tmp = t_2;
} else if (z <= -2.55e-241) {
tmp = t_1;
} else if (z <= 1.55e-142) {
tmp = ((x * y) + (z * (t - a))) / y;
} else if (z <= 1.15e-28) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x - (z / (y / ((x * b) + (a - t)))) t_2 = (t - a) / (b - y) tmp = 0 if z <= -8.5e-7: tmp = t_2 elif z <= -2.55e-241: tmp = t_1 elif z <= 1.55e-142: tmp = ((x * y) + (z * (t - a))) / y elif z <= 1.15e-28: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x - Float64(z / Float64(y / Float64(Float64(x * b) + Float64(a - t))))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -8.5e-7) tmp = t_2; elseif (z <= -2.55e-241) tmp = t_1; elseif (z <= 1.55e-142) tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / y); elseif (z <= 1.15e-28) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x - (z / (y / ((x * b) + (a - t)))); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -8.5e-7) tmp = t_2; elseif (z <= -2.55e-241) tmp = t_1; elseif (z <= 1.55e-142) tmp = ((x * y) + (z * (t - a))) / y; elseif (z <= 1.15e-28) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x - N[(z / N[(y / N[(N[(x * b), $MachinePrecision] + N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.5e-7], t$95$2, If[LessEqual[z, -2.55e-241], t$95$1, If[LessEqual[z, 1.55e-142], N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.15e-28], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{z}{\frac{y}{x \cdot b + \left(a - t\right)}}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -8.5 \cdot 10^{-7}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.55 \cdot 10^{-241}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-142}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-28}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -8.50000000000000014e-7 or 1.14999999999999993e-28 < z Initial program 44.4%
Taylor expanded in z around inf 78.6%
if -8.50000000000000014e-7 < z < -2.5499999999999999e-241 or 1.55e-142 < z < 1.14999999999999993e-28Initial program 77.7%
Taylor expanded in b around inf 77.2%
*-commutative77.2%
Simplified77.2%
Taylor expanded in y around -inf 77.9%
mul-1-neg77.9%
unsub-neg77.9%
sub-neg77.9%
*-commutative77.9%
associate-*r*77.9%
mul-1-neg77.9%
remove-double-neg77.9%
associate-*r*71.3%
distribute-rgt-in71.3%
associate-/l*69.8%
+-commutative69.8%
mul-1-neg69.8%
unsub-neg69.8%
Simplified69.8%
if -2.5499999999999999e-241 < z < 1.55e-142Initial program 83.3%
Taylor expanded in b around inf 83.3%
*-commutative83.3%
Simplified83.3%
Taylor expanded in y around inf 70.1%
Final simplification73.9%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= y -300000000000.0)
(not (or (<= y 2.06e-81) (and (not (<= y 0.0095)) (<= y 2.3e+56)))))
(/ 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 <= -300000000000.0) || !((y <= 2.06e-81) || (!(y <= 0.0095) && (y <= 2.3e+56)))) {
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 <= (-300000000000.0d0)) .or. (.not. (y <= 2.06d-81) .or. (.not. (y <= 0.0095d0)) .and. (y <= 2.3d+56))) 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 <= -300000000000.0) || !((y <= 2.06e-81) || (!(y <= 0.0095) && (y <= 2.3e+56)))) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -300000000000.0) or not ((y <= 2.06e-81) or (not (y <= 0.0095) and (y <= 2.3e+56))): 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 <= -300000000000.0) || !((y <= 2.06e-81) || (!(y <= 0.0095) && (y <= 2.3e+56)))) 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 <= -300000000000.0) || ~(((y <= 2.06e-81) || (~((y <= 0.0095)) && (y <= 2.3e+56))))) 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, -300000000000.0], N[Not[Or[LessEqual[y, 2.06e-81], And[N[Not[LessEqual[y, 0.0095]], $MachinePrecision], LessEqual[y, 2.3e+56]]]], $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 -300000000000 \lor \neg \left(y \leq 2.06 \cdot 10^{-81} \lor \neg \left(y \leq 0.0095\right) \land y \leq 2.3 \cdot 10^{+56}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -3e11 or 2.0600000000000001e-81 < y < 0.00949999999999999976 or 2.30000000000000015e56 < y Initial program 48.7%
Taylor expanded in y around inf 56.9%
mul-1-neg56.9%
unsub-neg56.9%
Simplified56.9%
if -3e11 < y < 2.0600000000000001e-81 or 0.00949999999999999976 < y < 2.30000000000000015e56Initial program 80.0%
Taylor expanded in y around 0 52.1%
Final simplification54.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.9e+54) (not (<= z 550000000000.0))) (/ (- t a) (- b y)) (/ (+ (* x y) (* z (- t a))) (+ y (* z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.9e+54) || !(z <= 550000000000.0)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + (z * (t - a))) / (y + (z * 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.9d+54)) .or. (.not. (z <= 550000000000.0d0))) then
tmp = (t - a) / (b - y)
else
tmp = ((x * y) + (z * (t - a))) / (y + (z * 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.9e+54) || !(z <= 550000000000.0)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + (z * (t - a))) / (y + (z * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.9e+54) or not (z <= 550000000000.0): tmp = (t - a) / (b - y) else: tmp = ((x * y) + (z * (t - a))) / (y + (z * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.9e+54) || !(z <= 550000000000.0)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.9e+54) || ~((z <= 550000000000.0))) tmp = (t - a) / (b - y); else tmp = ((x * y) + (z * (t - a))) / (y + (z * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.9e+54], N[Not[LessEqual[z, 550000000000.0]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+54} \lor \neg \left(z \leq 550000000000\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot b}\\
\end{array}
\end{array}
if z < -1.9000000000000001e54 or 5.5e11 < z Initial program 39.1%
Taylor expanded in z around inf 81.2%
if -1.9000000000000001e54 < z < 5.5e11Initial program 79.9%
Taylor expanded in b around inf 79.1%
*-commutative79.1%
Simplified79.1%
Final simplification79.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.3e-7) (not (<= z 7.8e-26))) (/ (- t a) (- b y)) (/ x (+ 1.0 (* z (+ -1.0 (/ b y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.3e-7) || !(z <= 7.8e-26)) {
tmp = (t - a) / (b - y);
} else {
tmp = x / (1.0 + (z * (-1.0 + (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 <= (-2.3d-7)) .or. (.not. (z <= 7.8d-26))) then
tmp = (t - a) / (b - y)
else
tmp = x / (1.0d0 + (z * ((-1.0d0) + (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 <= -2.3e-7) || !(z <= 7.8e-26)) {
tmp = (t - a) / (b - y);
} else {
tmp = x / (1.0 + (z * (-1.0 + (b / y))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.3e-7) or not (z <= 7.8e-26): tmp = (t - a) / (b - y) else: tmp = x / (1.0 + (z * (-1.0 + (b / y)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.3e-7) || !(z <= 7.8e-26)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x / Float64(1.0 + Float64(z * Float64(-1.0 + Float64(b / y))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.3e-7) || ~((z <= 7.8e-26))) tmp = (t - a) / (b - y); else tmp = x / (1.0 + (z * (-1.0 + (b / y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.3e-7], N[Not[LessEqual[z, 7.8e-26]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 + N[(z * N[(-1.0 + N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{-7} \lor \neg \left(z \leq 7.8 \cdot 10^{-26}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + z \cdot \left(-1 + \frac{b}{y}\right)}\\
\end{array}
\end{array}
if z < -2.29999999999999995e-7 or 7.79999999999999973e-26 < z Initial program 43.9%
Taylor expanded in z around inf 79.3%
if -2.29999999999999995e-7 < z < 7.79999999999999973e-26Initial program 79.9%
Taylor expanded in x around inf 37.2%
associate-/l*56.4%
+-commutative56.4%
fma-def56.4%
Simplified56.4%
Taylor expanded in z around 0 55.1%
Final simplification65.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -7.4e-6) (not (<= z 7.4e-21))) (/ (- t a) (- b y)) (/ x (+ 1.0 (/ (* z (- b y)) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -7.4e-6) || !(z <= 7.4e-21)) {
tmp = (t - a) / (b - y);
} else {
tmp = x / (1.0 + ((z * (b - y)) / 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 <= (-7.4d-6)) .or. (.not. (z <= 7.4d-21))) then
tmp = (t - a) / (b - y)
else
tmp = x / (1.0d0 + ((z * (b - y)) / 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 <= -7.4e-6) || !(z <= 7.4e-21)) {
tmp = (t - a) / (b - y);
} else {
tmp = x / (1.0 + ((z * (b - y)) / y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -7.4e-6) or not (z <= 7.4e-21): tmp = (t - a) / (b - y) else: tmp = x / (1.0 + ((z * (b - y)) / y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -7.4e-6) || !(z <= 7.4e-21)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x / Float64(1.0 + Float64(Float64(z * Float64(b - y)) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -7.4e-6) || ~((z <= 7.4e-21))) tmp = (t - a) / (b - y); else tmp = x / (1.0 + ((z * (b - y)) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -7.4e-6], N[Not[LessEqual[z, 7.4e-21]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 + N[(N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.4 \cdot 10^{-6} \lor \neg \left(z \leq 7.4 \cdot 10^{-21}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \frac{z \cdot \left(b - y\right)}{y}}\\
\end{array}
\end{array}
if z < -7.4000000000000003e-6 or 7.40000000000000041e-21 < z Initial program 43.9%
Taylor expanded in z around inf 79.3%
if -7.4000000000000003e-6 < z < 7.40000000000000041e-21Initial program 79.9%
Taylor expanded in x around inf 37.2%
associate-/l*56.4%
+-commutative56.4%
fma-def56.4%
Simplified56.4%
Taylor expanded in z around inf 56.4%
Final simplification66.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.1e-7) (not (<= z 1.45e-20))) (/ (- t a) (- b y)) (/ (+ (* x y) (* z (- t a))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.1e-7) || !(z <= 1.45e-20)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + (z * (t - a))) / 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 <= (-1.1d-7)) .or. (.not. (z <= 1.45d-20))) then
tmp = (t - a) / (b - y)
else
tmp = ((x * y) + (z * (t - a))) / 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 <= -1.1e-7) || !(z <= 1.45e-20)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + (z * (t - a))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.1e-7) or not (z <= 1.45e-20): tmp = (t - a) / (b - y) else: tmp = ((x * y) + (z * (t - a))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.1e-7) || !(z <= 1.45e-20)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.1e-7) || ~((z <= 1.45e-20))) tmp = (t - a) / (b - y); else tmp = ((x * y) + (z * (t - a))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.1e-7], N[Not[LessEqual[z, 1.45e-20]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{-7} \lor \neg \left(z \leq 1.45 \cdot 10^{-20}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y}\\
\end{array}
\end{array}
if z < -1.1000000000000001e-7 or 1.45e-20 < z Initial program 43.9%
Taylor expanded in z around inf 79.3%
if -1.1000000000000001e-7 < z < 1.45e-20Initial program 79.9%
Taylor expanded in b around inf 79.6%
*-commutative79.6%
Simplified79.6%
Taylor expanded in y around inf 61.3%
Final simplification69.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.7e-7) (not (<= z 1.05e-18))) (/ (- t a) (- b y)) (/ x (- 1.0 z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.7e-7) || !(z <= 1.05e-18)) {
tmp = (t - a) / (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 <= (-3.7d-7)) .or. (.not. (z <= 1.05d-18))) then
tmp = (t - a) / (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 <= -3.7e-7) || !(z <= 1.05e-18)) {
tmp = (t - a) / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.7e-7) or not (z <= 1.05e-18): tmp = (t - a) / (b - y) else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.7e-7) || !(z <= 1.05e-18)) tmp = Float64(Float64(t - a) / 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 <= -3.7e-7) || ~((z <= 1.05e-18))) tmp = (t - a) / (b - y); else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.7e-7], N[Not[LessEqual[z, 1.05e-18]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{-7} \lor \neg \left(z \leq 1.05 \cdot 10^{-18}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -3.70000000000000004e-7 or 1.05e-18 < z Initial program 43.9%
Taylor expanded in z around inf 79.3%
if -3.70000000000000004e-7 < z < 1.05e-18Initial program 79.9%
Taylor expanded in y around inf 50.7%
mul-1-neg50.7%
unsub-neg50.7%
Simplified50.7%
Final simplification63.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -15500.0) (not (<= z 0.065))) (/ t (- b y)) (+ x (* x z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -15500.0) || !(z <= 0.065)) {
tmp = t / (b - y);
} else {
tmp = x + (x * 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 <= (-15500.0d0)) .or. (.not. (z <= 0.065d0))) then
tmp = t / (b - y)
else
tmp = x + (x * 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 <= -15500.0) || !(z <= 0.065)) {
tmp = t / (b - y);
} else {
tmp = x + (x * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -15500.0) or not (z <= 0.065): tmp = t / (b - y) else: tmp = x + (x * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -15500.0) || !(z <= 0.065)) tmp = Float64(t / Float64(b - y)); else tmp = Float64(x + Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -15500.0) || ~((z <= 0.065))) tmp = t / (b - y); else tmp = x + (x * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -15500.0], N[Not[LessEqual[z, 0.065]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -15500 \lor \neg \left(z \leq 0.065\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + x \cdot z\\
\end{array}
\end{array}
if z < -15500 or 0.065000000000000002 < z Initial program 42.7%
Taylor expanded in t around inf 21.6%
*-commutative21.6%
Simplified21.6%
Taylor expanded in z around inf 45.7%
if -15500 < z < 0.065000000000000002Initial program 79.4%
Taylor expanded in y around inf 50.1%
mul-1-neg50.1%
unsub-neg50.1%
Simplified50.1%
Taylor expanded in z around 0 49.1%
*-commutative49.1%
Simplified49.1%
Final simplification47.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1120000000.0) (not (<= z 0.072))) (/ 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 <= -1120000000.0) || !(z <= 0.072)) {
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 <= (-1120000000.0d0)) .or. (.not. (z <= 0.072d0))) 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 <= -1120000000.0) || !(z <= 0.072)) {
tmp = t / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1120000000.0) or not (z <= 0.072): 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 <= -1120000000.0) || !(z <= 0.072)) 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 <= -1120000000.0) || ~((z <= 0.072))) 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, -1120000000.0], N[Not[LessEqual[z, 0.072]], $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 -1120000000 \lor \neg \left(z \leq 0.072\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -1.12e9 or 0.0719999999999999946 < z Initial program 42.7%
Taylor expanded in t around inf 21.6%
*-commutative21.6%
Simplified21.6%
Taylor expanded in z around inf 45.7%
if -1.12e9 < z < 0.0719999999999999946Initial program 79.4%
Taylor expanded in y around inf 50.1%
mul-1-neg50.1%
unsub-neg50.1%
Simplified50.1%
Final simplification48.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -0.75) (/ (- x) z) (if (<= z 0.065) (+ x (* x z)) (/ t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.75) {
tmp = -x / z;
} else if (z <= 0.065) {
tmp = x + (x * z);
} 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 <= (-0.75d0)) then
tmp = -x / z
else if (z <= 0.065d0) then
tmp = x + (x * z)
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 <= -0.75) {
tmp = -x / z;
} else if (z <= 0.065) {
tmp = x + (x * z);
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -0.75: tmp = -x / z elif z <= 0.065: tmp = x + (x * z) else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.75) tmp = Float64(Float64(-x) / z); elseif (z <= 0.065) tmp = Float64(x + Float64(x * z)); else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -0.75) tmp = -x / z; elseif (z <= 0.065) tmp = x + (x * z); else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.75], N[((-x) / z), $MachinePrecision], If[LessEqual[z, 0.065], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision], N[(t / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.75:\\
\;\;\;\;\frac{-x}{z}\\
\mathbf{elif}\;z \leq 0.065:\\
\;\;\;\;x + x \cdot z\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -0.75Initial program 37.0%
Taylor expanded in y around inf 23.2%
mul-1-neg23.2%
unsub-neg23.2%
Simplified23.2%
Taylor expanded in z around inf 23.2%
associate-*r/23.2%
mul-1-neg23.2%
Simplified23.2%
if -0.75 < z < 0.065000000000000002Initial program 79.3%
Taylor expanded in y around inf 50.4%
mul-1-neg50.4%
unsub-neg50.4%
Simplified50.4%
Taylor expanded in z around 0 49.4%
*-commutative49.4%
Simplified49.4%
if 0.065000000000000002 < z Initial program 47.4%
Taylor expanded in t around inf 19.2%
*-commutative19.2%
Simplified19.2%
Taylor expanded in y around 0 28.2%
Final simplification39.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -35000.0) (not (<= z 0.065))) (/ t b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -35000.0) || !(z <= 0.065)) {
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 <= (-35000.0d0)) .or. (.not. (z <= 0.065d0))) 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 <= -35000.0) || !(z <= 0.065)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -35000.0) or not (z <= 0.065): tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -35000.0) || !(z <= 0.065)) 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 <= -35000.0) || ~((z <= 0.065))) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -35000.0], N[Not[LessEqual[z, 0.065]], $MachinePrecision]], N[(t / b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -35000 \lor \neg \left(z \leq 0.065\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -35000 or 0.065000000000000002 < z Initial program 42.7%
Taylor expanded in t around inf 21.6%
*-commutative21.6%
Simplified21.6%
Taylor expanded in y around 0 25.4%
if -35000 < z < 0.065000000000000002Initial program 79.4%
Taylor expanded in z around 0 48.5%
Final simplification38.7%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.56e+16) (/ (- x) z) (if (<= z 0.065) x (/ t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.56e+16) {
tmp = -x / z;
} else if (z <= 0.065) {
tmp = x;
} 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 <= (-1.56d+16)) then
tmp = -x / z
else if (z <= 0.065d0) then
tmp = x
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 <= -1.56e+16) {
tmp = -x / z;
} else if (z <= 0.065) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.56e+16: tmp = -x / z elif z <= 0.065: tmp = x else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.56e+16) tmp = Float64(Float64(-x) / z); elseif (z <= 0.065) tmp = x; else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.56e+16) tmp = -x / z; elseif (z <= 0.065) tmp = x; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.56e+16], N[((-x) / z), $MachinePrecision], If[LessEqual[z, 0.065], x, N[(t / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.56 \cdot 10^{+16}:\\
\;\;\;\;\frac{-x}{z}\\
\mathbf{elif}\;z \leq 0.065:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -1.56e16Initial program 32.5%
Taylor expanded in y around inf 24.6%
mul-1-neg24.6%
unsub-neg24.6%
Simplified24.6%
Taylor expanded in z around inf 24.6%
associate-*r/24.6%
mul-1-neg24.6%
Simplified24.6%
if -1.56e16 < z < 0.065000000000000002Initial program 79.7%
Taylor expanded in z around 0 47.9%
if 0.065000000000000002 < z Initial program 47.4%
Taylor expanded in t around inf 19.2%
*-commutative19.2%
Simplified19.2%
Taylor expanded in y around 0 28.2%
Final simplification39.1%
(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 63.8%
Taylor expanded in z around 0 29.4%
Final simplification29.4%
(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 2024020
(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)))))