
(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 (* z (- t a)))
(t_3 (/ (+ (* x y) t_2) t_1))
(t_4 (+ (* (/ z y) (/ (- t a) (- 1.0 z))) (/ x (- 1.0 z))))
(t_5
(+
(+ (/ t (- b y)) (* (/ x z) (/ y (- b y))))
(- (* (/ y z) (/ (- a t) (pow (- b y) 2.0))) (/ a (- b y))))))
(if (<= t_3 (- INFINITY))
t_4
(if (<= t_3 -1e-223)
(+ (/ (* x y) t_1) (/ t_2 t_1))
(if (<= t_3 0.0)
t_5
(if (<= t_3 1e+265)
(/ (fma x y t_2) (fma z (- b y) y))
(if (<= t_3 INFINITY) t_4 t_5)))))))
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 = ((x * y) + t_2) / t_1;
double t_4 = ((z / y) * ((t - a) / (1.0 - z))) + (x / (1.0 - z));
double t_5 = ((t / (b - y)) + ((x / z) * (y / (b - y)))) + (((y / z) * ((a - t) / pow((b - y), 2.0))) - (a / (b - y)));
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_4;
} else if (t_3 <= -1e-223) {
tmp = ((x * y) / t_1) + (t_2 / t_1);
} else if (t_3 <= 0.0) {
tmp = t_5;
} else if (t_3 <= 1e+265) {
tmp = fma(x, y, t_2) / fma(z, (b - y), y);
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_4;
} else {
tmp = t_5;
}
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(x * y) + t_2) / t_1) t_4 = Float64(Float64(Float64(z / y) * Float64(Float64(t - a) / Float64(1.0 - z))) + Float64(x / Float64(1.0 - z))) t_5 = Float64(Float64(Float64(t / Float64(b - y)) + Float64(Float64(x / z) * Float64(y / Float64(b - y)))) + Float64(Float64(Float64(y / z) * Float64(Float64(a - t) / (Float64(b - y) ^ 2.0))) - Float64(a / Float64(b - y)))) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_4; elseif (t_3 <= -1e-223) tmp = Float64(Float64(Float64(x * y) / t_1) + Float64(t_2 / t_1)); elseif (t_3 <= 0.0) tmp = t_5; elseif (t_3 <= 1e+265) tmp = Float64(fma(x, y, t_2) / fma(z, Float64(b - y), y)); elseif (t_3 <= Inf) tmp = t_4; else tmp = t_5; 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[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(z / y), $MachinePrecision] * N[(N[(t - a), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y / z), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, -1e-223], N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 0.0], t$95$5, If[LessEqual[t$95$3, 1e+265], N[(N[(x * y + t$95$2), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$4, t$95$5]]]]]]]]]]
\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{x \cdot y + t_2}{t_1}\\
t_4 := \frac{z}{y} \cdot \frac{t - a}{1 - z} + \frac{x}{1 - z}\\
t_5 := \left(\frac{t}{b - y} + \frac{x}{z} \cdot \frac{y}{b - y}\right) + \left(\frac{y}{z} \cdot \frac{a - t}{{\left(b - y\right)}^{2}} - \frac{a}{b - y}\right)\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_3 \leq -1 \cdot 10^{-223}:\\
\;\;\;\;\frac{x \cdot y}{t_1} + \frac{t_2}{t_1}\\
\mathbf{elif}\;t_3 \leq 0:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t_3 \leq 10^{+265}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t_2\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;t_4\\
\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 1.00000000000000007e265 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 30.6%
Taylor expanded in y around inf 25.8%
mul-1-neg25.8%
unsub-neg25.8%
Simplified25.8%
Taylor expanded in x around 0 61.5%
+-commutative61.5%
times-frac72.3%
Simplified72.3%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.9999999999999997e-224Initial program 99.3%
Taylor expanded in x around 0 99.4%
if -9.9999999999999997e-224 < (/.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 10.9%
Taylor expanded in z around inf 58.4%
times-frac72.0%
times-frac100.0%
Simplified100.0%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.00000000000000007e265Initial program 99.6%
fma-def99.6%
+-commutative99.6%
fma-def99.6%
Simplified99.6%
Final simplification94.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (* z (- t a)))
(t_3 (/ (+ (* x y) t_2) t_1))
(t_4 (+ (* (/ z y) (/ (- t a) (- 1.0 z))) (/ x (- 1.0 z))))
(t_5
(+
(+ (/ t (- b y)) (* (/ x z) (/ y (- b y))))
(- (* (/ y z) (/ (- a t) (pow (- b y) 2.0))) (/ a (- b y))))))
(if (<= t_3 (- INFINITY))
t_4
(if (<= t_3 -1e-223)
(+ (/ (* x y) t_1) (/ t_2 t_1))
(if (<= t_3 0.0)
t_5
(if (<= t_3 1e+265) t_3 (if (<= t_3 INFINITY) t_4 t_5)))))))
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 = ((x * y) + t_2) / t_1;
double t_4 = ((z / y) * ((t - a) / (1.0 - z))) + (x / (1.0 - z));
double t_5 = ((t / (b - y)) + ((x / z) * (y / (b - y)))) + (((y / z) * ((a - t) / pow((b - y), 2.0))) - (a / (b - y)));
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_4;
} else if (t_3 <= -1e-223) {
tmp = ((x * y) / t_1) + (t_2 / t_1);
} else if (t_3 <= 0.0) {
tmp = t_5;
} else if (t_3 <= 1e+265) {
tmp = t_3;
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_4;
} else {
tmp = t_5;
}
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 = z * (t - a);
double t_3 = ((x * y) + t_2) / t_1;
double t_4 = ((z / y) * ((t - a) / (1.0 - z))) + (x / (1.0 - z));
double t_5 = ((t / (b - y)) + ((x / z) * (y / (b - y)))) + (((y / z) * ((a - t) / Math.pow((b - y), 2.0))) - (a / (b - y)));
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = t_4;
} else if (t_3 <= -1e-223) {
tmp = ((x * y) / t_1) + (t_2 / t_1);
} else if (t_3 <= 0.0) {
tmp = t_5;
} else if (t_3 <= 1e+265) {
tmp = t_3;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_4;
} else {
tmp = t_5;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = z * (t - a) t_3 = ((x * y) + t_2) / t_1 t_4 = ((z / y) * ((t - a) / (1.0 - z))) + (x / (1.0 - z)) t_5 = ((t / (b - y)) + ((x / z) * (y / (b - y)))) + (((y / z) * ((a - t) / math.pow((b - y), 2.0))) - (a / (b - y))) tmp = 0 if t_3 <= -math.inf: tmp = t_4 elif t_3 <= -1e-223: tmp = ((x * y) / t_1) + (t_2 / t_1) elif t_3 <= 0.0: tmp = t_5 elif t_3 <= 1e+265: tmp = t_3 elif t_3 <= math.inf: tmp = t_4 else: tmp = t_5 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(x * y) + t_2) / t_1) t_4 = Float64(Float64(Float64(z / y) * Float64(Float64(t - a) / Float64(1.0 - z))) + Float64(x / Float64(1.0 - z))) t_5 = Float64(Float64(Float64(t / Float64(b - y)) + Float64(Float64(x / z) * Float64(y / Float64(b - y)))) + Float64(Float64(Float64(y / z) * Float64(Float64(a - t) / (Float64(b - y) ^ 2.0))) - Float64(a / Float64(b - y)))) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_4; elseif (t_3 <= -1e-223) tmp = Float64(Float64(Float64(x * y) / t_1) + Float64(t_2 / t_1)); elseif (t_3 <= 0.0) tmp = t_5; elseif (t_3 <= 1e+265) tmp = t_3; elseif (t_3 <= Inf) tmp = t_4; else tmp = t_5; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = z * (t - a); t_3 = ((x * y) + t_2) / t_1; t_4 = ((z / y) * ((t - a) / (1.0 - z))) + (x / (1.0 - z)); t_5 = ((t / (b - y)) + ((x / z) * (y / (b - y)))) + (((y / z) * ((a - t) / ((b - y) ^ 2.0))) - (a / (b - y))); tmp = 0.0; if (t_3 <= -Inf) tmp = t_4; elseif (t_3 <= -1e-223) tmp = ((x * y) / t_1) + (t_2 / t_1); elseif (t_3 <= 0.0) tmp = t_5; elseif (t_3 <= 1e+265) tmp = t_3; elseif (t_3 <= Inf) tmp = t_4; else tmp = t_5; 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[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(z / y), $MachinePrecision] * N[(N[(t - a), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y / z), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, -1e-223], N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 0.0], t$95$5, If[LessEqual[t$95$3, 1e+265], t$95$3, If[LessEqual[t$95$3, Infinity], t$95$4, t$95$5]]]]]]]]]]
\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{x \cdot y + t_2}{t_1}\\
t_4 := \frac{z}{y} \cdot \frac{t - a}{1 - z} + \frac{x}{1 - z}\\
t_5 := \left(\frac{t}{b - y} + \frac{x}{z} \cdot \frac{y}{b - y}\right) + \left(\frac{y}{z} \cdot \frac{a - t}{{\left(b - y\right)}^{2}} - \frac{a}{b - y}\right)\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_3 \leq -1 \cdot 10^{-223}:\\
\;\;\;\;\frac{x \cdot y}{t_1} + \frac{t_2}{t_1}\\
\mathbf{elif}\;t_3 \leq 0:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t_3 \leq 10^{+265}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;t_4\\
\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 1.00000000000000007e265 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 30.6%
Taylor expanded in y around inf 25.8%
mul-1-neg25.8%
unsub-neg25.8%
Simplified25.8%
Taylor expanded in x around 0 61.5%
+-commutative61.5%
times-frac72.3%
Simplified72.3%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.9999999999999997e-224Initial program 99.3%
Taylor expanded in x around 0 99.4%
if -9.9999999999999997e-224 < (/.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 10.9%
Taylor expanded in z around inf 58.4%
times-frac72.0%
times-frac100.0%
Simplified100.0%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.00000000000000007e265Initial program 99.6%
Final simplification94.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (/ (- t a) (- b y)))
(t_3 (* z (- t a)))
(t_4 (/ (+ (* x y) t_3) t_1))
(t_5 (+ (* (/ z y) (/ (- t a) (- 1.0 z))) (/ x (- 1.0 z)))))
(if (<= t_4 (- INFINITY))
t_5
(if (<= t_4 -1e-223)
(+ (/ (* x y) t_1) (/ t_3 t_1))
(if (<= t_4 0.0)
(-
(+ t_2 (/ (/ (* x y) z) (- b y)))
(* (/ y z) (/ (- t a) (pow (- b y) 2.0))))
(if (<= t_4 1e+265) t_4 (if (<= t_4 INFINITY) t_5 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 = z * (t - a);
double t_4 = ((x * y) + t_3) / t_1;
double t_5 = ((z / y) * ((t - a) / (1.0 - z))) + (x / (1.0 - z));
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_5;
} else if (t_4 <= -1e-223) {
tmp = ((x * y) / t_1) + (t_3 / t_1);
} else if (t_4 <= 0.0) {
tmp = (t_2 + (((x * y) / z) / (b - y))) - ((y / z) * ((t - a) / pow((b - y), 2.0)));
} else if (t_4 <= 1e+265) {
tmp = t_4;
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_5;
} 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 = z * (t - a);
double t_4 = ((x * y) + t_3) / t_1;
double t_5 = ((z / y) * ((t - a) / (1.0 - z))) + (x / (1.0 - z));
double tmp;
if (t_4 <= -Double.POSITIVE_INFINITY) {
tmp = t_5;
} else if (t_4 <= -1e-223) {
tmp = ((x * y) / t_1) + (t_3 / t_1);
} else if (t_4 <= 0.0) {
tmp = (t_2 + (((x * y) / z) / (b - y))) - ((y / z) * ((t - a) / Math.pow((b - y), 2.0)));
} else if (t_4 <= 1e+265) {
tmp = t_4;
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = t_5;
} 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 = z * (t - a) t_4 = ((x * y) + t_3) / t_1 t_5 = ((z / y) * ((t - a) / (1.0 - z))) + (x / (1.0 - z)) tmp = 0 if t_4 <= -math.inf: tmp = t_5 elif t_4 <= -1e-223: tmp = ((x * y) / t_1) + (t_3 / t_1) elif t_4 <= 0.0: tmp = (t_2 + (((x * y) / z) / (b - y))) - ((y / z) * ((t - a) / math.pow((b - y), 2.0))) elif t_4 <= 1e+265: tmp = t_4 elif t_4 <= math.inf: tmp = t_5 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(z * Float64(t - a)) t_4 = Float64(Float64(Float64(x * y) + t_3) / t_1) t_5 = Float64(Float64(Float64(z / y) * Float64(Float64(t - a) / Float64(1.0 - z))) + Float64(x / Float64(1.0 - z))) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_5; elseif (t_4 <= -1e-223) tmp = Float64(Float64(Float64(x * y) / t_1) + Float64(t_3 / t_1)); elseif (t_4 <= 0.0) tmp = Float64(Float64(t_2 + Float64(Float64(Float64(x * y) / z) / Float64(b - y))) - Float64(Float64(y / z) * Float64(Float64(t - a) / (Float64(b - y) ^ 2.0)))); elseif (t_4 <= 1e+265) tmp = t_4; elseif (t_4 <= Inf) tmp = t_5; 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 = z * (t - a); t_4 = ((x * y) + t_3) / t_1; t_5 = ((z / y) * ((t - a) / (1.0 - z))) + (x / (1.0 - z)); tmp = 0.0; if (t_4 <= -Inf) tmp = t_5; elseif (t_4 <= -1e-223) tmp = ((x * y) / t_1) + (t_3 / t_1); elseif (t_4 <= 0.0) tmp = (t_2 + (((x * y) / z) / (b - y))) - ((y / z) * ((t - a) / ((b - y) ^ 2.0))); elseif (t_4 <= 1e+265) tmp = t_4; elseif (t_4 <= Inf) tmp = t_5; 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[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(x * y), $MachinePrecision] + t$95$3), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(z / y), $MachinePrecision] * N[(N[(t - a), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$5, If[LessEqual[t$95$4, -1e-223], N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$3 / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[(N[(t$95$2 + N[(N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y / z), $MachinePrecision] * N[(N[(t - a), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 1e+265], t$95$4, If[LessEqual[t$95$4, Infinity], t$95$5, 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 := z \cdot \left(t - a\right)\\
t_4 := \frac{x \cdot y + t_3}{t_1}\\
t_5 := \frac{z}{y} \cdot \frac{t - a}{1 - z} + \frac{x}{1 - z}\\
\mathbf{if}\;t_4 \leq -\infty:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t_4 \leq -1 \cdot 10^{-223}:\\
\;\;\;\;\frac{x \cdot y}{t_1} + \frac{t_3}{t_1}\\
\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;\left(t_2 + \frac{\frac{x \cdot y}{z}}{b - y}\right) - \frac{y}{z} \cdot \frac{t - a}{{\left(b - y\right)}^{2}}\\
\mathbf{elif}\;t_4 \leq 10^{+265}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;t_5\\
\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 1.00000000000000007e265 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 30.6%
Taylor expanded in y around inf 25.8%
mul-1-neg25.8%
unsub-neg25.8%
Simplified25.8%
Taylor expanded in x around 0 61.5%
+-commutative61.5%
times-frac72.3%
Simplified72.3%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.9999999999999997e-224Initial program 99.3%
Taylor expanded in x around 0 99.4%
if -9.9999999999999997e-224 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 27.6%
Taylor expanded in z around inf 65.5%
associate--r+65.5%
+-commutative65.5%
associate--l+65.5%
associate-/r*85.1%
*-commutative85.1%
div-sub85.1%
times-frac99.9%
Simplified99.9%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.00000000000000007e265Initial program 99.6%
if +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 0.0%
Taylor expanded in z around inf 85.8%
Final simplification91.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y)))
(t_2 (+ y (* z (- b y))))
(t_3 (* z (- t a)))
(t_4 (/ (+ (* x y) t_3) t_2))
(t_5 (+ (* (/ z y) (/ (- t a) (- 1.0 z))) (/ x (- 1.0 z)))))
(if (<= t_4 (- INFINITY))
t_5
(if (<= t_4 -4e-292)
(+ (/ (* x y) t_2) (/ t_3 t_2))
(if (<= t_4 0.0)
(+
(/ (- (/ (* x y) (- b y)) (/ y (/ (pow (- b y) 2.0) (- t a)))) z)
t_1)
(if (<= t_4 1e+265) t_4 (if (<= t_4 INFINITY) t_5 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 = z * (t - a);
double t_4 = ((x * y) + t_3) / t_2;
double t_5 = ((z / y) * ((t - a) / (1.0 - z))) + (x / (1.0 - z));
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_5;
} else if (t_4 <= -4e-292) {
tmp = ((x * y) / t_2) + (t_3 / t_2);
} else if (t_4 <= 0.0) {
tmp = ((((x * y) / (b - y)) - (y / (pow((b - y), 2.0) / (t - a)))) / z) + t_1;
} else if (t_4 <= 1e+265) {
tmp = t_4;
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_5;
} 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 = z * (t - a);
double t_4 = ((x * y) + t_3) / t_2;
double t_5 = ((z / y) * ((t - a) / (1.0 - z))) + (x / (1.0 - z));
double tmp;
if (t_4 <= -Double.POSITIVE_INFINITY) {
tmp = t_5;
} else if (t_4 <= -4e-292) {
tmp = ((x * y) / t_2) + (t_3 / t_2);
} else if (t_4 <= 0.0) {
tmp = ((((x * y) / (b - y)) - (y / (Math.pow((b - y), 2.0) / (t - a)))) / z) + t_1;
} else if (t_4 <= 1e+265) {
tmp = t_4;
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = t_5;
} 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 = z * (t - a) t_4 = ((x * y) + t_3) / t_2 t_5 = ((z / y) * ((t - a) / (1.0 - z))) + (x / (1.0 - z)) tmp = 0 if t_4 <= -math.inf: tmp = t_5 elif t_4 <= -4e-292: tmp = ((x * y) / t_2) + (t_3 / t_2) elif t_4 <= 0.0: tmp = ((((x * y) / (b - y)) - (y / (math.pow((b - y), 2.0) / (t - a)))) / z) + t_1 elif t_4 <= 1e+265: tmp = t_4 elif t_4 <= math.inf: tmp = t_5 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(z * Float64(t - a)) t_4 = Float64(Float64(Float64(x * y) + t_3) / t_2) t_5 = Float64(Float64(Float64(z / y) * Float64(Float64(t - a) / Float64(1.0 - z))) + Float64(x / Float64(1.0 - z))) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_5; elseif (t_4 <= -4e-292) tmp = Float64(Float64(Float64(x * y) / t_2) + Float64(t_3 / t_2)); elseif (t_4 <= 0.0) tmp = Float64(Float64(Float64(Float64(Float64(x * y) / Float64(b - y)) - Float64(y / Float64((Float64(b - y) ^ 2.0) / Float64(t - a)))) / z) + t_1); elseif (t_4 <= 1e+265) tmp = t_4; elseif (t_4 <= Inf) tmp = t_5; 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 = z * (t - a); t_4 = ((x * y) + t_3) / t_2; t_5 = ((z / y) * ((t - a) / (1.0 - z))) + (x / (1.0 - z)); tmp = 0.0; if (t_4 <= -Inf) tmp = t_5; elseif (t_4 <= -4e-292) tmp = ((x * y) / t_2) + (t_3 / t_2); elseif (t_4 <= 0.0) tmp = ((((x * y) / (b - y)) - (y / (((b - y) ^ 2.0) / (t - a)))) / z) + t_1; elseif (t_4 <= 1e+265) tmp = t_4; elseif (t_4 <= Inf) tmp = t_5; 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[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(x * y), $MachinePrecision] + t$95$3), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(z / y), $MachinePrecision] * N[(N[(t - a), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$5, If[LessEqual[t$95$4, -4e-292], N[(N[(N[(x * y), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(t$95$3 / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[(N[(N[(N[(N[(x * y), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(y / N[(N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t$95$4, 1e+265], t$95$4, If[LessEqual[t$95$4, Infinity], t$95$5, 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 := z \cdot \left(t - a\right)\\
t_4 := \frac{x \cdot y + t_3}{t_2}\\
t_5 := \frac{z}{y} \cdot \frac{t - a}{1 - z} + \frac{x}{1 - z}\\
\mathbf{if}\;t_4 \leq -\infty:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t_4 \leq -4 \cdot 10^{-292}:\\
\;\;\;\;\frac{x \cdot y}{t_2} + \frac{t_3}{t_2}\\
\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;\frac{\frac{x \cdot y}{b - y} - \frac{y}{\frac{{\left(b - y\right)}^{2}}{t - a}}}{z} + t_1\\
\mathbf{elif}\;t_4 \leq 10^{+265}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;t_5\\
\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 1.00000000000000007e265 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 30.6%
Taylor expanded in y around inf 25.8%
mul-1-neg25.8%
unsub-neg25.8%
Simplified25.8%
Taylor expanded in x around 0 61.5%
+-commutative61.5%
times-frac72.3%
Simplified72.3%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.0000000000000002e-292Initial program 99.3%
Taylor expanded in x around 0 99.4%
if -4.0000000000000002e-292 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 24.8%
Taylor expanded in z around -inf 84.6%
associate--l+84.6%
mul-1-neg84.6%
distribute-lft-out--84.6%
*-commutative84.6%
associate-/l*100.0%
div-sub100.0%
Simplified100.0%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.00000000000000007e265Initial program 99.6%
if +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 0.0%
Taylor expanded in z around inf 85.8%
Final simplification91.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (* z (- t a)))
(t_3 (/ (- t a) (- b y)))
(t_4 (/ t_2 t_1)))
(if (<= z -8.5e+21)
t_3
(if (<= z -3.2e-213)
(+ (/ (* x y) t_1) t_4)
(if (<= z 1e-210)
(+ x t_4)
(if (<= z 2.2e+30)
(/ (+ (* x y) t_2) (+ y (/ z (/ 1.0 (- b y)))))
t_3))))))
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 = (t - a) / (b - y);
double t_4 = t_2 / t_1;
double tmp;
if (z <= -8.5e+21) {
tmp = t_3;
} else if (z <= -3.2e-213) {
tmp = ((x * y) / t_1) + t_4;
} else if (z <= 1e-210) {
tmp = x + t_4;
} else if (z <= 2.2e+30) {
tmp = ((x * y) + t_2) / (y + (z / (1.0 / (b - y))));
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = y + (z * (b - y))
t_2 = z * (t - a)
t_3 = (t - a) / (b - y)
t_4 = t_2 / t_1
if (z <= (-8.5d+21)) then
tmp = t_3
else if (z <= (-3.2d-213)) then
tmp = ((x * y) / t_1) + t_4
else if (z <= 1d-210) then
tmp = x + t_4
else if (z <= 2.2d+30) then
tmp = ((x * y) + t_2) / (y + (z / (1.0d0 / (b - y))))
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = z * (t - a);
double t_3 = (t - a) / (b - y);
double t_4 = t_2 / t_1;
double tmp;
if (z <= -8.5e+21) {
tmp = t_3;
} else if (z <= -3.2e-213) {
tmp = ((x * y) / t_1) + t_4;
} else if (z <= 1e-210) {
tmp = x + t_4;
} else if (z <= 2.2e+30) {
tmp = ((x * y) + t_2) / (y + (z / (1.0 / (b - y))));
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = z * (t - a) t_3 = (t - a) / (b - y) t_4 = t_2 / t_1 tmp = 0 if z <= -8.5e+21: tmp = t_3 elif z <= -3.2e-213: tmp = ((x * y) / t_1) + t_4 elif z <= 1e-210: tmp = x + t_4 elif z <= 2.2e+30: tmp = ((x * y) + t_2) / (y + (z / (1.0 / (b - y)))) else: tmp = t_3 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(t - a) / Float64(b - y)) t_4 = Float64(t_2 / t_1) tmp = 0.0 if (z <= -8.5e+21) tmp = t_3; elseif (z <= -3.2e-213) tmp = Float64(Float64(Float64(x * y) / t_1) + t_4); elseif (z <= 1e-210) tmp = Float64(x + t_4); elseif (z <= 2.2e+30) tmp = Float64(Float64(Float64(x * y) + t_2) / Float64(y + Float64(z / Float64(1.0 / Float64(b - y))))); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = z * (t - a); t_3 = (t - a) / (b - y); t_4 = t_2 / t_1; tmp = 0.0; if (z <= -8.5e+21) tmp = t_3; elseif (z <= -3.2e-213) tmp = ((x * y) / t_1) + t_4; elseif (z <= 1e-210) tmp = x + t_4; elseif (z <= 2.2e+30) tmp = ((x * y) + t_2) / (y + (z / (1.0 / (b - y)))); else tmp = t_3; 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[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 / t$95$1), $MachinePrecision]}, If[LessEqual[z, -8.5e+21], t$95$3, If[LessEqual[z, -3.2e-213], N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + t$95$4), $MachinePrecision], If[LessEqual[z, 1e-210], N[(x + t$95$4), $MachinePrecision], If[LessEqual[z, 2.2e+30], N[(N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision] / N[(y + N[(z / N[(1.0 / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]
\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{t - a}{b - y}\\
t_4 := \frac{t_2}{t_1}\\
\mathbf{if}\;z \leq -8.5 \cdot 10^{+21}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-213}:\\
\;\;\;\;\frac{x \cdot y}{t_1} + t_4\\
\mathbf{elif}\;z \leq 10^{-210}:\\
\;\;\;\;x + t_4\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+30}:\\
\;\;\;\;\frac{x \cdot y + t_2}{y + \frac{z}{\frac{1}{b - y}}}\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if z < -8.5e21 or 2.2e30 < z Initial program 37.9%
Taylor expanded in z around inf 84.6%
if -8.5e21 < z < -3.19999999999999972e-213Initial program 92.3%
Taylor expanded in x around 0 92.3%
if -3.19999999999999972e-213 < z < 1e-210Initial program 71.1%
Taylor expanded in x around 0 71.1%
Taylor expanded in z around 0 94.6%
if 1e-210 < z < 2.2e30Initial program 92.2%
flip--55.3%
associate-*r/54.9%
associate-/l*55.4%
*-un-lft-identity55.4%
associate-/l*55.3%
flip--92.2%
Applied egg-rr92.2%
Final simplification88.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (+ (* x y) t_1))
(t_3 (+ y (* z (- b y))))
(t_4 (/ (- t a) (- b y))))
(if (<= z -3.45e+18)
t_4
(if (<= z -9.2e-212)
(/ t_2 t_3)
(if (<= z 7e-216)
(+ x (/ t_1 t_3))
(if (<= z 1.9e+30) (/ t_2 (+ y (/ z (/ 1.0 (- b y))))) t_4))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (x * y) + t_1;
double t_3 = y + (z * (b - y));
double t_4 = (t - a) / (b - y);
double tmp;
if (z <= -3.45e+18) {
tmp = t_4;
} else if (z <= -9.2e-212) {
tmp = t_2 / t_3;
} else if (z <= 7e-216) {
tmp = x + (t_1 / t_3);
} else if (z <= 1.9e+30) {
tmp = t_2 / (y + (z / (1.0 / (b - y))));
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = z * (t - a)
t_2 = (x * y) + t_1
t_3 = y + (z * (b - y))
t_4 = (t - a) / (b - y)
if (z <= (-3.45d+18)) then
tmp = t_4
else if (z <= (-9.2d-212)) then
tmp = t_2 / t_3
else if (z <= 7d-216) then
tmp = x + (t_1 / t_3)
else if (z <= 1.9d+30) then
tmp = t_2 / (y + (z / (1.0d0 / (b - y))))
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (x * y) + t_1;
double t_3 = y + (z * (b - y));
double t_4 = (t - a) / (b - y);
double tmp;
if (z <= -3.45e+18) {
tmp = t_4;
} else if (z <= -9.2e-212) {
tmp = t_2 / t_3;
} else if (z <= 7e-216) {
tmp = x + (t_1 / t_3);
} else if (z <= 1.9e+30) {
tmp = t_2 / (y + (z / (1.0 / (b - y))));
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = (x * y) + t_1 t_3 = y + (z * (b - y)) t_4 = (t - a) / (b - y) tmp = 0 if z <= -3.45e+18: tmp = t_4 elif z <= -9.2e-212: tmp = t_2 / t_3 elif z <= 7e-216: tmp = x + (t_1 / t_3) elif z <= 1.9e+30: tmp = t_2 / (y + (z / (1.0 / (b - y)))) else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(Float64(x * y) + t_1) t_3 = Float64(y + Float64(z * Float64(b - y))) t_4 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -3.45e+18) tmp = t_4; elseif (z <= -9.2e-212) tmp = Float64(t_2 / t_3); elseif (z <= 7e-216) tmp = Float64(x + Float64(t_1 / t_3)); elseif (z <= 1.9e+30) tmp = Float64(t_2 / Float64(y + Float64(z / Float64(1.0 / Float64(b - y))))); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = (x * y) + t_1; t_3 = y + (z * (b - y)); t_4 = (t - a) / (b - y); tmp = 0.0; if (z <= -3.45e+18) tmp = t_4; elseif (z <= -9.2e-212) tmp = t_2 / t_3; elseif (z <= 7e-216) tmp = x + (t_1 / t_3); elseif (z <= 1.9e+30) tmp = t_2 / (y + (z / (1.0 / (b - y)))); else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.45e+18], t$95$4, If[LessEqual[z, -9.2e-212], N[(t$95$2 / t$95$3), $MachinePrecision], If[LessEqual[z, 7e-216], N[(x + N[(t$95$1 / t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+30], N[(t$95$2 / N[(y + N[(z / N[(1.0 / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := x \cdot y + t_1\\
t_3 := y + z \cdot \left(b - y\right)\\
t_4 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3.45 \cdot 10^{+18}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;z \leq -9.2 \cdot 10^{-212}:\\
\;\;\;\;\frac{t_2}{t_3}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-216}:\\
\;\;\;\;x + \frac{t_1}{t_3}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+30}:\\
\;\;\;\;\frac{t_2}{y + \frac{z}{\frac{1}{b - y}}}\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
if z < -3.45e18 or 1.9000000000000001e30 < z Initial program 37.9%
Taylor expanded in z around inf 84.6%
if -3.45e18 < z < -9.2000000000000004e-212Initial program 92.3%
if -9.2000000000000004e-212 < z < 6.99999999999999965e-216Initial program 71.1%
Taylor expanded in x around 0 71.1%
Taylor expanded in z around 0 94.6%
if 6.99999999999999965e-216 < z < 1.9000000000000001e30Initial program 92.2%
flip--55.3%
associate-*r/54.9%
associate-/l*55.4%
*-un-lft-identity55.4%
associate-/l*55.3%
flip--92.2%
Applied egg-rr92.2%
Final simplification88.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (+ y (* z (- b y))))
(t_3 (/ (+ (* x y) t_1) t_2))
(t_4 (/ (- t a) (- b y))))
(if (<= z -2.2e+23)
t_4
(if (<= z -4.6e-215)
t_3
(if (<= z 7e-214) (+ x (/ t_1 t_2)) (if (<= z 6.2e+30) t_3 t_4))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = y + (z * (b - y));
double t_3 = ((x * y) + t_1) / t_2;
double t_4 = (t - a) / (b - y);
double tmp;
if (z <= -2.2e+23) {
tmp = t_4;
} else if (z <= -4.6e-215) {
tmp = t_3;
} else if (z <= 7e-214) {
tmp = x + (t_1 / t_2);
} else if (z <= 6.2e+30) {
tmp = t_3;
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = z * (t - a)
t_2 = y + (z * (b - y))
t_3 = ((x * y) + t_1) / t_2
t_4 = (t - a) / (b - y)
if (z <= (-2.2d+23)) then
tmp = t_4
else if (z <= (-4.6d-215)) then
tmp = t_3
else if (z <= 7d-214) then
tmp = x + (t_1 / t_2)
else if (z <= 6.2d+30) then
tmp = t_3
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = y + (z * (b - y));
double t_3 = ((x * y) + t_1) / t_2;
double t_4 = (t - a) / (b - y);
double tmp;
if (z <= -2.2e+23) {
tmp = t_4;
} else if (z <= -4.6e-215) {
tmp = t_3;
} else if (z <= 7e-214) {
tmp = x + (t_1 / t_2);
} else if (z <= 6.2e+30) {
tmp = t_3;
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = y + (z * (b - y)) t_3 = ((x * y) + t_1) / t_2 t_4 = (t - a) / (b - y) tmp = 0 if z <= -2.2e+23: tmp = t_4 elif z <= -4.6e-215: tmp = t_3 elif z <= 7e-214: tmp = x + (t_1 / t_2) elif z <= 6.2e+30: tmp = t_3 else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(y + Float64(z * Float64(b - y))) t_3 = Float64(Float64(Float64(x * y) + t_1) / t_2) t_4 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.2e+23) tmp = t_4; elseif (z <= -4.6e-215) tmp = t_3; elseif (z <= 7e-214) tmp = Float64(x + Float64(t_1 / t_2)); elseif (z <= 6.2e+30) tmp = t_3; else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = y + (z * (b - y)); t_3 = ((x * y) + t_1) / t_2; t_4 = (t - a) / (b - y); tmp = 0.0; if (z <= -2.2e+23) tmp = t_4; elseif (z <= -4.6e-215) tmp = t_3; elseif (z <= 7e-214) tmp = x + (t_1 / t_2); elseif (z <= 6.2e+30) tmp = t_3; else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e+23], t$95$4, If[LessEqual[z, -4.6e-215], t$95$3, If[LessEqual[z, 7e-214], N[(x + N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+30], t$95$3, t$95$4]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := y + z \cdot \left(b - y\right)\\
t_3 := \frac{x \cdot y + t_1}{t_2}\\
t_4 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+23}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{-215}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-214}:\\
\;\;\;\;x + \frac{t_1}{t_2}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+30}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
if z < -2.20000000000000008e23 or 6.1999999999999995e30 < z Initial program 37.9%
Taylor expanded in z around inf 84.6%
if -2.20000000000000008e23 < z < -4.5999999999999998e-215 or 7e-214 < z < 6.1999999999999995e30Initial program 92.2%
if -4.5999999999999998e-215 < z < 7e-214Initial program 71.1%
Taylor expanded in x around 0 71.1%
Taylor expanded in z around 0 94.6%
Final simplification88.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a t) y)) (t_2 (/ x (- 1.0 z))) (t_3 (/ (- t a) b)))
(if (<= y -3.9e+224)
t_2
(if (<= y -3.8e+117)
t_1
(if (<= y -1.5e-24)
t_2
(if (<= y 1.25e-41)
t_3
(if (<= y 3e+25)
t_2
(if (<= y 1.02e+32) t_3 (if (<= y 6e+272) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - t) / y;
double t_2 = x / (1.0 - z);
double t_3 = (t - a) / b;
double tmp;
if (y <= -3.9e+224) {
tmp = t_2;
} else if (y <= -3.8e+117) {
tmp = t_1;
} else if (y <= -1.5e-24) {
tmp = t_2;
} else if (y <= 1.25e-41) {
tmp = t_3;
} else if (y <= 3e+25) {
tmp = t_2;
} else if (y <= 1.02e+32) {
tmp = t_3;
} else if (y <= 6e+272) {
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) :: t_3
real(8) :: tmp
t_1 = (a - t) / y
t_2 = x / (1.0d0 - z)
t_3 = (t - a) / b
if (y <= (-3.9d+224)) then
tmp = t_2
else if (y <= (-3.8d+117)) then
tmp = t_1
else if (y <= (-1.5d-24)) then
tmp = t_2
else if (y <= 1.25d-41) then
tmp = t_3
else if (y <= 3d+25) then
tmp = t_2
else if (y <= 1.02d+32) then
tmp = t_3
else if (y <= 6d+272) 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 = (a - t) / y;
double t_2 = x / (1.0 - z);
double t_3 = (t - a) / b;
double tmp;
if (y <= -3.9e+224) {
tmp = t_2;
} else if (y <= -3.8e+117) {
tmp = t_1;
} else if (y <= -1.5e-24) {
tmp = t_2;
} else if (y <= 1.25e-41) {
tmp = t_3;
} else if (y <= 3e+25) {
tmp = t_2;
} else if (y <= 1.02e+32) {
tmp = t_3;
} else if (y <= 6e+272) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - t) / y t_2 = x / (1.0 - z) t_3 = (t - a) / b tmp = 0 if y <= -3.9e+224: tmp = t_2 elif y <= -3.8e+117: tmp = t_1 elif y <= -1.5e-24: tmp = t_2 elif y <= 1.25e-41: tmp = t_3 elif y <= 3e+25: tmp = t_2 elif y <= 1.02e+32: tmp = t_3 elif y <= 6e+272: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - t) / y) t_2 = Float64(x / Float64(1.0 - z)) t_3 = Float64(Float64(t - a) / b) tmp = 0.0 if (y <= -3.9e+224) tmp = t_2; elseif (y <= -3.8e+117) tmp = t_1; elseif (y <= -1.5e-24) tmp = t_2; elseif (y <= 1.25e-41) tmp = t_3; elseif (y <= 3e+25) tmp = t_2; elseif (y <= 1.02e+32) tmp = t_3; elseif (y <= 6e+272) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - t) / y; t_2 = x / (1.0 - z); t_3 = (t - a) / b; tmp = 0.0; if (y <= -3.9e+224) tmp = t_2; elseif (y <= -3.8e+117) tmp = t_1; elseif (y <= -1.5e-24) tmp = t_2; elseif (y <= 1.25e-41) tmp = t_3; elseif (y <= 3e+25) tmp = t_2; elseif (y <= 1.02e+32) tmp = t_3; elseif (y <= 6e+272) 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[(a - t), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -3.9e+224], t$95$2, If[LessEqual[y, -3.8e+117], t$95$1, If[LessEqual[y, -1.5e-24], t$95$2, If[LessEqual[y, 1.25e-41], t$95$3, If[LessEqual[y, 3e+25], t$95$2, If[LessEqual[y, 1.02e+32], t$95$3, If[LessEqual[y, 6e+272], t$95$1, t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y}\\
t_2 := \frac{x}{1 - z}\\
t_3 := \frac{t - a}{b}\\
\mathbf{if}\;y \leq -3.9 \cdot 10^{+224}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{+117}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{-24}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-41}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+25}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{+32}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+272}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -3.90000000000000007e224 or -3.8000000000000002e117 < y < -1.49999999999999998e-24 or 1.2499999999999999e-41 < y < 3.00000000000000006e25 or 6.0000000000000004e272 < y Initial program 64.4%
Taylor expanded in y around inf 64.4%
mul-1-neg64.4%
unsub-neg64.4%
Simplified64.4%
if -3.90000000000000007e224 < y < -3.8000000000000002e117 or 1.0199999999999999e32 < y < 6.0000000000000004e272Initial program 41.7%
Taylor expanded in y around inf 37.8%
mul-1-neg37.8%
unsub-neg37.8%
Simplified37.8%
Taylor expanded in z around inf 51.2%
associate-*r/51.2%
neg-mul-151.2%
Simplified51.2%
if -1.49999999999999998e-24 < y < 1.2499999999999999e-41 or 3.00000000000000006e25 < y < 1.0199999999999999e32Initial program 72.1%
Taylor expanded in y around 0 64.9%
Final simplification61.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -6.1e-28)
t_1
(if (<= z 3.1e-46)
(+ x (* z (+ x (/ (- t a) y))))
(if (<= z 1.6e+28)
(/ (* z (- t a)) (+ y (* z (- b y))))
(if (<= z 3.9e+67) (+ (/ x (- 1.0 z)) (/ (- a 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 <= -6.1e-28) {
tmp = t_1;
} else if (z <= 3.1e-46) {
tmp = x + (z * (x + ((t - a) / y)));
} else if (z <= 1.6e+28) {
tmp = (z * (t - a)) / (y + (z * (b - y)));
} else if (z <= 3.9e+67) {
tmp = (x / (1.0 - z)) + ((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 = (t - a) / (b - y)
if (z <= (-6.1d-28)) then
tmp = t_1
else if (z <= 3.1d-46) then
tmp = x + (z * (x + ((t - a) / y)))
else if (z <= 1.6d+28) then
tmp = (z * (t - a)) / (y + (z * (b - y)))
else if (z <= 3.9d+67) then
tmp = (x / (1.0d0 - z)) + ((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 = (t - a) / (b - y);
double tmp;
if (z <= -6.1e-28) {
tmp = t_1;
} else if (z <= 3.1e-46) {
tmp = x + (z * (x + ((t - a) / y)));
} else if (z <= 1.6e+28) {
tmp = (z * (t - a)) / (y + (z * (b - y)));
} else if (z <= 3.9e+67) {
tmp = (x / (1.0 - z)) + ((a - 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 <= -6.1e-28: tmp = t_1 elif z <= 3.1e-46: tmp = x + (z * (x + ((t - a) / y))) elif z <= 1.6e+28: tmp = (z * (t - a)) / (y + (z * (b - y))) elif z <= 3.9e+67: tmp = (x / (1.0 - z)) + ((a - 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 <= -6.1e-28) tmp = t_1; elseif (z <= 3.1e-46) tmp = Float64(x + Float64(z * Float64(x + Float64(Float64(t - a) / y)))); elseif (z <= 1.6e+28) tmp = Float64(Float64(z * Float64(t - a)) / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= 3.9e+67) tmp = Float64(Float64(x / Float64(1.0 - z)) + 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 = (t - a) / (b - y); tmp = 0.0; if (z <= -6.1e-28) tmp = t_1; elseif (z <= 3.1e-46) tmp = x + (z * (x + ((t - a) / y))); elseif (z <= 1.6e+28) tmp = (z * (t - a)) / (y + (z * (b - y))); elseif (z <= 3.9e+67) tmp = (x / (1.0 - z)) + ((a - 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, -6.1e-28], t$95$1, If[LessEqual[z, 3.1e-46], N[(x + N[(z * N[(x + N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+28], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.9e+67], N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -6.1 \cdot 10^{-28}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-46}:\\
\;\;\;\;x + z \cdot \left(x + \frac{t - a}{y}\right)\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+28}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{+67}:\\
\;\;\;\;\frac{x}{1 - z} + \frac{a - t}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -6.1e-28 or 3.90000000000000007e67 < z Initial program 38.3%
Taylor expanded in z around inf 84.2%
if -6.1e-28 < z < 3.1000000000000001e-46Initial program 84.0%
Taylor expanded in y around inf 65.6%
mul-1-neg65.6%
unsub-neg65.6%
Simplified65.6%
Taylor expanded in z around 0 74.6%
+-commutative74.6%
associate--r+74.6%
div-sub75.6%
mul-1-neg75.6%
Simplified75.6%
if 3.1000000000000001e-46 < z < 1.6e28Initial program 95.4%
Taylor expanded in x around 0 74.6%
if 1.6e28 < z < 3.90000000000000007e67Initial program 58.4%
Taylor expanded in y around inf 48.5%
mul-1-neg48.5%
unsub-neg48.5%
Simplified48.5%
Taylor expanded in x around 0 69.5%
+-commutative69.5%
times-frac89.8%
Simplified89.8%
Taylor expanded in z around inf 90.0%
associate-*r/90.0%
neg-mul-190.0%
Simplified90.0%
Final simplification80.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1800.0) (not (<= z 1.7e-17))) (/ (- t a) (- b y)) (+ x (/ (* z (- t a)) (+ y (* z (- b y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1800.0) || !(z <= 1.7e-17)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - a)) / (y + (z * (b - y))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1800.0d0)) .or. (.not. (z <= 1.7d-17))) then
tmp = (t - a) / (b - y)
else
tmp = x + ((z * (t - a)) / (y + (z * (b - y))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1800.0) || !(z <= 1.7e-17)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - a)) / (y + (z * (b - y))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1800.0) or not (z <= 1.7e-17): tmp = (t - a) / (b - y) else: tmp = x + ((z * (t - a)) / (y + (z * (b - y)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1800.0) || !(z <= 1.7e-17)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / Float64(y + Float64(z * Float64(b - y))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1800.0) || ~((z <= 1.7e-17))) tmp = (t - a) / (b - y); else tmp = x + ((z * (t - a)) / (y + (z * (b - y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1800.0], N[Not[LessEqual[z, 1.7e-17]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1800 \lor \neg \left(z \leq 1.7 \cdot 10^{-17}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -1800 or 1.6999999999999999e-17 < z Initial program 45.5%
Taylor expanded in z around inf 82.5%
if -1800 < z < 1.6999999999999999e-17Initial program 84.6%
Taylor expanded in x around 0 84.6%
Taylor expanded in z around 0 86.3%
Final simplification84.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.1e-24) (not (<= z 1.2e-17))) (/ (- t a) (- b y)) (+ x (* z (- (/ t y) (/ a y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.1e-24) || !(z <= 1.2e-17)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (z * ((t / y) - (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 <= (-5.1d-24)) .or. (.not. (z <= 1.2d-17))) then
tmp = (t - a) / (b - y)
else
tmp = x + (z * ((t / y) - (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 <= -5.1e-24) || !(z <= 1.2e-17)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (z * ((t / y) - (a / y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.1e-24) or not (z <= 1.2e-17): tmp = (t - a) / (b - y) else: tmp = x + (z * ((t / y) - (a / y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.1e-24) || !(z <= 1.2e-17)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(z * Float64(Float64(t / y) - Float64(a / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.1e-24) || ~((z <= 1.2e-17))) tmp = (t - a) / (b - y); else tmp = x + (z * ((t / y) - (a / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.1e-24], N[Not[LessEqual[z, 1.2e-17]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(N[(t / y), $MachinePrecision] - N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.1 \cdot 10^{-24} \lor \neg \left(z \leq 1.2 \cdot 10^{-17}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(\frac{t}{y} - \frac{a}{y}\right)\\
\end{array}
\end{array}
if z < -5.10000000000000025e-24 or 1.19999999999999993e-17 < z Initial program 46.3%
Taylor expanded in z around inf 81.2%
if -5.10000000000000025e-24 < z < 1.19999999999999993e-17Initial program 84.9%
Taylor expanded in y around inf 64.8%
mul-1-neg64.8%
unsub-neg64.8%
Simplified64.8%
Taylor expanded in z around 0 73.3%
+-commutative73.3%
associate--r+73.3%
div-sub74.3%
mul-1-neg74.3%
Simplified74.3%
Taylor expanded in x around 0 73.3%
Final simplification78.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.8e-24) (not (<= z 3.2e-19))) (/ (- t a) (- b y)) (+ x (* z (+ x (/ (- t a) y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.8e-24) || !(z <= 3.2e-19)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (z * (x + ((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.8d-24)) .or. (.not. (z <= 3.2d-19))) then
tmp = (t - a) / (b - y)
else
tmp = x + (z * (x + ((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.8e-24) || !(z <= 3.2e-19)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (z * (x + ((t - a) / y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.8e-24) or not (z <= 3.2e-19): tmp = (t - a) / (b - y) else: tmp = x + (z * (x + ((t - a) / y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.8e-24) || !(z <= 3.2e-19)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(z * Float64(x + Float64(Float64(t - a) / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.8e-24) || ~((z <= 3.2e-19))) tmp = (t - a) / (b - y); else tmp = x + (z * (x + ((t - a) / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.8e-24], N[Not[LessEqual[z, 3.2e-19]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(x + N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{-24} \lor \neg \left(z \leq 3.2 \cdot 10^{-19}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(x + \frac{t - a}{y}\right)\\
\end{array}
\end{array}
if z < -1.8e-24 or 3.19999999999999982e-19 < z Initial program 46.3%
Taylor expanded in z around inf 81.2%
if -1.8e-24 < z < 3.19999999999999982e-19Initial program 84.9%
Taylor expanded in y around inf 64.8%
mul-1-neg64.8%
unsub-neg64.8%
Simplified64.8%
Taylor expanded in z around 0 73.3%
+-commutative73.3%
associate--r+73.3%
div-sub74.3%
mul-1-neg74.3%
Simplified74.3%
Final simplification78.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -3.3e-24)
t_1
(if (<= y 1.15e-50)
(/ (- t a) b)
(if (or (<= y 5.5e+26) (not (<= y 9.8e+48))) t_1 (/ t (- b y)))))))
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-24) {
tmp = t_1;
} else if (y <= 1.15e-50) {
tmp = (t - a) / b;
} else if ((y <= 5.5e+26) || !(y <= 9.8e+48)) {
tmp = t_1;
} else {
tmp = t / (b - y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-3.3d-24)) then
tmp = t_1
else if (y <= 1.15d-50) then
tmp = (t - a) / b
else if ((y <= 5.5d+26) .or. (.not. (y <= 9.8d+48))) then
tmp = t_1
else
tmp = t / (b - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -3.3e-24) {
tmp = t_1;
} else if (y <= 1.15e-50) {
tmp = (t - a) / b;
} else if ((y <= 5.5e+26) || !(y <= 9.8e+48)) {
tmp = t_1;
} else {
tmp = t / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -3.3e-24: tmp = t_1 elif y <= 1.15e-50: tmp = (t - a) / b elif (y <= 5.5e+26) or not (y <= 9.8e+48): tmp = t_1 else: tmp = t / (b - y) 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-24) tmp = t_1; elseif (y <= 1.15e-50) tmp = Float64(Float64(t - a) / b); elseif ((y <= 5.5e+26) || !(y <= 9.8e+48)) tmp = t_1; else tmp = Float64(t / Float64(b - y)); 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-24) tmp = t_1; elseif (y <= 1.15e-50) tmp = (t - a) / b; elseif ((y <= 5.5e+26) || ~((y <= 9.8e+48))) tmp = t_1; else tmp = t / (b - y); 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-24], t$95$1, If[LessEqual[y, 1.15e-50], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[Or[LessEqual[y, 5.5e+26], N[Not[LessEqual[y, 9.8e+48]], $MachinePrecision]], t$95$1, N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -3.3 \cdot 10^{-24}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-50}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+26} \lor \neg \left(y \leq 9.8 \cdot 10^{+48}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y}\\
\end{array}
\end{array}
if y < -3.29999999999999984e-24 or 1.1500000000000001e-50 < y < 5.4999999999999997e26 or 9.80000000000000059e48 < y Initial program 53.5%
Taylor expanded in y around inf 49.6%
mul-1-neg49.6%
unsub-neg49.6%
Simplified49.6%
if -3.29999999999999984e-24 < y < 1.1500000000000001e-50Initial program 72.3%
Taylor expanded in y around 0 64.0%
if 5.4999999999999997e26 < y < 9.80000000000000059e48Initial program 50.6%
Taylor expanded in t around inf 26.8%
Taylor expanded in z around inf 75.8%
Final simplification56.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.4e-47) (not (<= z 1.25e-21))) (/ (- 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 <= -4.4e-47) || !(z <= 1.25e-21)) {
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 <= (-4.4d-47)) .or. (.not. (z <= 1.25d-21))) 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 <= -4.4e-47) || !(z <= 1.25e-21)) {
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 <= -4.4e-47) or not (z <= 1.25e-21): 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 <= -4.4e-47) || !(z <= 1.25e-21)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(Float64(z * t) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4.4e-47) || ~((z <= 1.25e-21))) 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, -4.4e-47], N[Not[LessEqual[z, 1.25e-21]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{-47} \lor \neg \left(z \leq 1.25 \cdot 10^{-21}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot t}{y}\\
\end{array}
\end{array}
if z < -4.40000000000000037e-47 or 1.24999999999999993e-21 < z Initial program 48.0%
Taylor expanded in z around inf 80.0%
if -4.40000000000000037e-47 < z < 1.24999999999999993e-21Initial program 84.2%
Taylor expanded in y around inf 65.0%
mul-1-neg65.0%
unsub-neg65.0%
Simplified65.0%
Taylor expanded in z around 0 74.0%
+-commutative74.0%
associate--r+74.0%
div-sub75.0%
mul-1-neg75.0%
Simplified75.0%
Taylor expanded in t around inf 69.8%
Final simplification76.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.8e-47) (not (<= z 2.8e-53))) (/ t (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.8e-47) || !(z <= 2.8e-53)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-4.8d-47)) .or. (.not. (z <= 2.8d-53))) then
tmp = t / (b - y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.8e-47) || !(z <= 2.8e-53)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.8e-47) or not (z <= 2.8e-53): tmp = t / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.8e-47) || !(z <= 2.8e-53)) tmp = Float64(t / Float64(b - y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4.8e-47) || ~((z <= 2.8e-53))) tmp = t / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.8e-47], N[Not[LessEqual[z, 2.8e-53]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{-47} \lor \neg \left(z \leq 2.8 \cdot 10^{-53}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.7999999999999999e-47 or 2.79999999999999985e-53 < z Initial program 50.4%
Taylor expanded in t around inf 29.8%
Taylor expanded in z around inf 45.6%
if -4.7999999999999999e-47 < z < 2.79999999999999985e-53Initial program 82.8%
Taylor expanded in z around 0 59.3%
Final simplification50.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.4e-48) (not (<= z 9.5e-54))) (/ 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 <= -5.4e-48) || !(z <= 9.5e-54)) {
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 <= (-5.4d-48)) .or. (.not. (z <= 9.5d-54))) 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 <= -5.4e-48) || !(z <= 9.5e-54)) {
tmp = t / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.4e-48) or not (z <= 9.5e-54): 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 <= -5.4e-48) || !(z <= 9.5e-54)) 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 <= -5.4e-48) || ~((z <= 9.5e-54))) 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, -5.4e-48], N[Not[LessEqual[z, 9.5e-54]], $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 -5.4 \cdot 10^{-48} \lor \neg \left(z \leq 9.5 \cdot 10^{-54}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -5.40000000000000023e-48 or 9.4999999999999994e-54 < z Initial program 50.4%
Taylor expanded in t around inf 29.8%
Taylor expanded in z around inf 45.6%
if -5.40000000000000023e-48 < z < 9.4999999999999994e-54Initial program 82.8%
Taylor expanded in y around inf 59.3%
mul-1-neg59.3%
unsub-neg59.3%
Simplified59.3%
Final simplification50.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.4e-47) (not (<= z 2.5e-47))) (/ t b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.4e-47) || !(z <= 2.5e-47)) {
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 <= (-4.4d-47)) .or. (.not. (z <= 2.5d-47))) 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 <= -4.4e-47) || !(z <= 2.5e-47)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.4e-47) or not (z <= 2.5e-47): tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.4e-47) || !(z <= 2.5e-47)) 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 <= -4.4e-47) || ~((z <= 2.5e-47))) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.4e-47], N[Not[LessEqual[z, 2.5e-47]], $MachinePrecision]], N[(t / b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{-47} \lor \neg \left(z \leq 2.5 \cdot 10^{-47}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.40000000000000037e-47 or 2.50000000000000006e-47 < z Initial program 50.2%
Taylor expanded in t around inf 30.0%
Taylor expanded in y around 0 30.3%
if -4.40000000000000037e-47 < z < 2.50000000000000006e-47Initial program 83.0%
Taylor expanded in z around 0 58.7%
Final simplification40.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 61.7%
Taylor expanded in z around 0 23.6%
Final simplification23.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 2023301
(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)))))