
(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 15 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 (- (/ (- a t) y) (/ x (+ z -1.0))))
(t_3 (* z (- t a)))
(t_4 (/ (+ (* x y) t_3) t_1))
(t_5 (* (/ y (pow (- b y) 2.0)) (/ (- a t) z))))
(if (<= t_4 (- INFINITY))
t_2
(if (<= t_4 -2e-295)
(+ (/ t_3 t_1) (/ (* x y) t_1))
(if (<= t_4 0.0)
(+ (/ (/ (* x y) z) (- b y)) (+ (/ t (- b y)) (- t_5 (/ a (- b y)))))
(if (<= t_4 5e+302)
t_4
(if (<= t_4 INFINITY)
t_2
(fma (/ y z) (/ x (- b y)) (+ (/ (- t a) (- b y)) 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 = ((a - t) / y) - (x / (z + -1.0));
double t_3 = z * (t - a);
double t_4 = ((x * y) + t_3) / t_1;
double t_5 = (y / pow((b - y), 2.0)) * ((a - t) / z);
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_4 <= -2e-295) {
tmp = (t_3 / t_1) + ((x * y) / t_1);
} else if (t_4 <= 0.0) {
tmp = (((x * y) / z) / (b - y)) + ((t / (b - y)) + (t_5 - (a / (b - y))));
} else if (t_4 <= 5e+302) {
tmp = t_4;
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = fma((y / z), (x / (b - y)), (((t - a) / (b - y)) + t_5));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))) t_3 = Float64(z * Float64(t - a)) t_4 = Float64(Float64(Float64(x * y) + t_3) / t_1) t_5 = Float64(Float64(y / (Float64(b - y) ^ 2.0)) * Float64(Float64(a - t) / z)) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_2; elseif (t_4 <= -2e-295) tmp = Float64(Float64(t_3 / t_1) + Float64(Float64(x * y) / t_1)); elseif (t_4 <= 0.0) tmp = Float64(Float64(Float64(Float64(x * y) / z) / Float64(b - y)) + Float64(Float64(t / Float64(b - y)) + Float64(t_5 - Float64(a / Float64(b - y))))); elseif (t_4 <= 5e+302) tmp = t_4; elseif (t_4 <= Inf) tmp = t_2; else tmp = fma(Float64(y / z), Float64(x / Float64(b - y)), Float64(Float64(Float64(t - a) / Float64(b - y)) + 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[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $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$1), $MachinePrecision]}, Block[{t$95$5 = N[(N[(y / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$2, If[LessEqual[t$95$4, -2e-295], N[(N[(t$95$3 / t$95$1), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[(N[(N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(t$95$5 - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 5e+302], t$95$4, If[LessEqual[t$95$4, Infinity], t$95$2, N[(N[(y / z), $MachinePrecision] * N[(x / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{a - t}{y} - \frac{x}{z + -1}\\
t_3 := z \cdot \left(t - a\right)\\
t_4 := \frac{x \cdot y + t_3}{t_1}\\
t_5 := \frac{y}{{\left(b - y\right)}^{2}} \cdot \frac{a - t}{z}\\
\mathbf{if}\;t_4 \leq -\infty:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_4 \leq -2 \cdot 10^{-295}:\\
\;\;\;\;\frac{t_3}{t_1} + \frac{x \cdot y}{t_1}\\
\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;\frac{\frac{x \cdot y}{z}}{b - y} + \left(\frac{t}{b - y} + \left(t_5 - \frac{a}{b - y}\right)\right)\\
\mathbf{elif}\;t_4 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{z}, \frac{x}{b - y}, \frac{t - a}{b - y} + t_5\right)\\
\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 5e302 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 28.0%
Taylor expanded in y around -inf 51.2%
mul-1-neg51.2%
unsub-neg51.2%
mul-1-neg51.2%
distribute-neg-frac51.2%
cancel-sign-sub-inv51.2%
associate-/l*65.9%
metadata-eval65.9%
*-lft-identity65.9%
associate-/l*67.7%
Simplified67.7%
Taylor expanded in z around inf 81.4%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.00000000000000012e-295Initial program 99.6%
Taylor expanded in x around inf 99.6%
if -2.00000000000000012e-295 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 26.7%
Taylor expanded in z around inf 60.3%
associate--l+60.3%
associate-/r*77.2%
+-commutative77.2%
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)))) < 5e302Initial 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 44.2%
associate--l+44.2%
times-frac58.7%
fma-def58.7%
+-commutative58.7%
*-commutative58.7%
associate--r+58.7%
div-sub58.7%
*-commutative58.7%
times-frac99.7%
Simplified99.7%
Final simplification95.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2
(+
(/ (- t a) (- b y))
(/ (+ (/ y (/ (- b y) x)) (/ (- a t) (/ (pow (- b y) 2.0) y))) z)))
(t_3 (* z (- t a)))
(t_4 (/ (+ (* x y) t_3) t_1))
(t_5 (- (/ (- a t) y) (/ x (+ z -1.0)))))
(if (<= t_4 (- INFINITY))
t_5
(if (<= t_4 -2e-295)
(+ (/ t_3 t_1) (/ (* x y) t_1))
(if (<= t_4 0.0)
t_2
(if (<= t_4 5e+302) 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)) + (((y / ((b - y) / x)) + ((a - t) / (pow((b - y), 2.0) / y))) / z);
double t_3 = z * (t - a);
double t_4 = ((x * y) + t_3) / t_1;
double t_5 = ((a - t) / y) - (x / (z + -1.0));
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_5;
} else if (t_4 <= -2e-295) {
tmp = (t_3 / t_1) + ((x * y) / t_1);
} else if (t_4 <= 0.0) {
tmp = t_2;
} else if (t_4 <= 5e+302) {
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)) + (((y / ((b - y) / x)) + ((a - t) / (Math.pow((b - y), 2.0) / y))) / z);
double t_3 = z * (t - a);
double t_4 = ((x * y) + t_3) / t_1;
double t_5 = ((a - t) / y) - (x / (z + -1.0));
double tmp;
if (t_4 <= -Double.POSITIVE_INFINITY) {
tmp = t_5;
} else if (t_4 <= -2e-295) {
tmp = (t_3 / t_1) + ((x * y) / t_1);
} else if (t_4 <= 0.0) {
tmp = t_2;
} else if (t_4 <= 5e+302) {
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)) + (((y / ((b - y) / x)) + ((a - t) / (math.pow((b - y), 2.0) / y))) / z) t_3 = z * (t - a) t_4 = ((x * y) + t_3) / t_1 t_5 = ((a - t) / y) - (x / (z + -1.0)) tmp = 0 if t_4 <= -math.inf: tmp = t_5 elif t_4 <= -2e-295: tmp = (t_3 / t_1) + ((x * y) / t_1) elif t_4 <= 0.0: tmp = t_2 elif t_4 <= 5e+302: 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(Float64(t - a) / Float64(b - y)) + Float64(Float64(Float64(y / Float64(Float64(b - y) / x)) + Float64(Float64(a - t) / Float64((Float64(b - y) ^ 2.0) / y))) / z)) t_3 = Float64(z * Float64(t - a)) t_4 = Float64(Float64(Float64(x * y) + t_3) / t_1) t_5 = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_5; elseif (t_4 <= -2e-295) tmp = Float64(Float64(t_3 / t_1) + Float64(Float64(x * y) / t_1)); elseif (t_4 <= 0.0) tmp = t_2; elseif (t_4 <= 5e+302) 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)) + (((y / ((b - y) / x)) + ((a - t) / (((b - y) ^ 2.0) / y))) / z); t_3 = z * (t - a); t_4 = ((x * y) + t_3) / t_1; t_5 = ((a - t) / y) - (x / (z + -1.0)); tmp = 0.0; if (t_4 <= -Inf) tmp = t_5; elseif (t_4 <= -2e-295) tmp = (t_3 / t_1) + ((x * y) / t_1); elseif (t_4 <= 0.0) tmp = t_2; elseif (t_4 <= 5e+302) 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[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y / N[(N[(b - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(a - t), $MachinePrecision] / N[(N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $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[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$5, If[LessEqual[t$95$4, -2e-295], N[(N[(t$95$3 / t$95$1), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 0.0], t$95$2, If[LessEqual[t$95$4, 5e+302], 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} + \frac{\frac{y}{\frac{b - y}{x}} + \frac{a - t}{\frac{{\left(b - y\right)}^{2}}{y}}}{z}\\
t_3 := z \cdot \left(t - a\right)\\
t_4 := \frac{x \cdot y + t_3}{t_1}\\
t_5 := \frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{if}\;t_4 \leq -\infty:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t_4 \leq -2 \cdot 10^{-295}:\\
\;\;\;\;\frac{t_3}{t_1} + \frac{x \cdot y}{t_1}\\
\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_4 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;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 5e302 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 28.0%
Taylor expanded in y around -inf 51.2%
mul-1-neg51.2%
unsub-neg51.2%
mul-1-neg51.2%
distribute-neg-frac51.2%
cancel-sign-sub-inv51.2%
associate-/l*65.9%
metadata-eval65.9%
*-lft-identity65.9%
associate-/l*67.7%
Simplified67.7%
Taylor expanded in z around inf 81.4%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.00000000000000012e-295Initial program 99.6%
Taylor expanded in x around inf 99.6%
if -2.00000000000000012e-295 < (/.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.5%
Taylor expanded in z around -inf 57.4%
+-commutative57.4%
associate--l+57.4%
Simplified98.0%
if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5e302Initial program 99.6%
Final simplification94.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (* z (- t a)))
(t_3 (pow (- b y) 2.0))
(t_4 (/ (+ (* x y) t_2) t_1))
(t_5 (- (/ (- a t) y) (/ x (+ z -1.0)))))
(if (<= t_4 (- INFINITY))
t_5
(if (<= t_4 -2e-295)
(+ (/ t_2 t_1) (/ (* x y) t_1))
(if (<= t_4 0.0)
(+
(/ (/ (* x y) z) (- b y))
(+ (/ t (- b y)) (- (* (/ y t_3) (/ (- a t) z)) (/ a (- b y)))))
(if (<= t_4 5e+302)
t_4
(if (<= t_4 INFINITY)
t_5
(+
(/ (- t a) (- b y))
(/ (+ (/ y (/ (- b y) x)) (/ (- a t) (/ t_3 y))) z)))))))))
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 = pow((b - y), 2.0);
double t_4 = ((x * y) + t_2) / t_1;
double t_5 = ((a - t) / y) - (x / (z + -1.0));
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_5;
} else if (t_4 <= -2e-295) {
tmp = (t_2 / t_1) + ((x * y) / t_1);
} else if (t_4 <= 0.0) {
tmp = (((x * y) / z) / (b - y)) + ((t / (b - y)) + (((y / t_3) * ((a - t) / z)) - (a / (b - y))));
} else if (t_4 <= 5e+302) {
tmp = t_4;
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_5;
} else {
tmp = ((t - a) / (b - y)) + (((y / ((b - y) / x)) + ((a - t) / (t_3 / y))) / z);
}
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 = Math.pow((b - y), 2.0);
double t_4 = ((x * y) + t_2) / t_1;
double t_5 = ((a - t) / y) - (x / (z + -1.0));
double tmp;
if (t_4 <= -Double.POSITIVE_INFINITY) {
tmp = t_5;
} else if (t_4 <= -2e-295) {
tmp = (t_2 / t_1) + ((x * y) / t_1);
} else if (t_4 <= 0.0) {
tmp = (((x * y) / z) / (b - y)) + ((t / (b - y)) + (((y / t_3) * ((a - t) / z)) - (a / (b - y))));
} else if (t_4 <= 5e+302) {
tmp = t_4;
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = t_5;
} else {
tmp = ((t - a) / (b - y)) + (((y / ((b - y) / x)) + ((a - t) / (t_3 / y))) / z);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = z * (t - a) t_3 = math.pow((b - y), 2.0) t_4 = ((x * y) + t_2) / t_1 t_5 = ((a - t) / y) - (x / (z + -1.0)) tmp = 0 if t_4 <= -math.inf: tmp = t_5 elif t_4 <= -2e-295: tmp = (t_2 / t_1) + ((x * y) / t_1) elif t_4 <= 0.0: tmp = (((x * y) / z) / (b - y)) + ((t / (b - y)) + (((y / t_3) * ((a - t) / z)) - (a / (b - y)))) elif t_4 <= 5e+302: tmp = t_4 elif t_4 <= math.inf: tmp = t_5 else: tmp = ((t - a) / (b - y)) + (((y / ((b - y) / x)) + ((a - t) / (t_3 / y))) / z) 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(b - y) ^ 2.0 t_4 = Float64(Float64(Float64(x * y) + t_2) / t_1) t_5 = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_5; elseif (t_4 <= -2e-295) tmp = Float64(Float64(t_2 / t_1) + Float64(Float64(x * y) / t_1)); elseif (t_4 <= 0.0) tmp = Float64(Float64(Float64(Float64(x * y) / z) / Float64(b - y)) + Float64(Float64(t / Float64(b - y)) + Float64(Float64(Float64(y / t_3) * Float64(Float64(a - t) / z)) - Float64(a / Float64(b - y))))); elseif (t_4 <= 5e+302) tmp = t_4; elseif (t_4 <= Inf) tmp = t_5; else tmp = Float64(Float64(Float64(t - a) / Float64(b - y)) + Float64(Float64(Float64(y / Float64(Float64(b - y) / x)) + Float64(Float64(a - t) / Float64(t_3 / y))) / z)); 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 = (b - y) ^ 2.0; t_4 = ((x * y) + t_2) / t_1; t_5 = ((a - t) / y) - (x / (z + -1.0)); tmp = 0.0; if (t_4 <= -Inf) tmp = t_5; elseif (t_4 <= -2e-295) tmp = (t_2 / t_1) + ((x * y) / t_1); elseif (t_4 <= 0.0) tmp = (((x * y) / z) / (b - y)) + ((t / (b - y)) + (((y / t_3) * ((a - t) / z)) - (a / (b - y)))); elseif (t_4 <= 5e+302) tmp = t_4; elseif (t_4 <= Inf) tmp = t_5; else tmp = ((t - a) / (b - y)) + (((y / ((b - y) / x)) + ((a - t) / (t_3 / y))) / z); 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[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$5, If[LessEqual[t$95$4, -2e-295], N[(N[(t$95$2 / t$95$1), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[(N[(N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y / t$95$3), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 5e+302], t$95$4, If[LessEqual[t$95$4, Infinity], t$95$5, N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y / N[(N[(b - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(a - t), $MachinePrecision] / N[(t$95$3 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\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 := {\left(b - y\right)}^{2}\\
t_4 := \frac{x \cdot y + t_2}{t_1}\\
t_5 := \frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{if}\;t_4 \leq -\infty:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t_4 \leq -2 \cdot 10^{-295}:\\
\;\;\;\;\frac{t_2}{t_1} + \frac{x \cdot y}{t_1}\\
\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;\frac{\frac{x \cdot y}{z}}{b - y} + \left(\frac{t}{b - y} + \left(\frac{y}{t_3} \cdot \frac{a - t}{z} - \frac{a}{b - y}\right)\right)\\
\mathbf{elif}\;t_4 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;t_5\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b - y} + \frac{\frac{y}{\frac{b - y}{x}} + \frac{a - t}{\frac{t_3}{y}}}{z}\\
\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 5e302 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 28.0%
Taylor expanded in y around -inf 51.2%
mul-1-neg51.2%
unsub-neg51.2%
mul-1-neg51.2%
distribute-neg-frac51.2%
cancel-sign-sub-inv51.2%
associate-/l*65.9%
metadata-eval65.9%
*-lft-identity65.9%
associate-/l*67.7%
Simplified67.7%
Taylor expanded in z around inf 81.4%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.00000000000000012e-295Initial program 99.6%
Taylor expanded in x around inf 99.6%
if -2.00000000000000012e-295 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 26.7%
Taylor expanded in z around inf 60.3%
associate--l+60.3%
associate-/r*77.2%
+-commutative77.2%
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)))) < 5e302Initial 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 44.7%
+-commutative44.7%
associate--l+44.7%
Simplified99.6%
Final simplification95.0%
(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-295)
t_2
(if (<= t_2 0.0)
t_1
(if (<= t_2 5e+302) 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-295) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_1;
} else if (t_2 <= 5e+302) {
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-295) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_1;
} else if (t_2 <= 5e+302) {
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-295: tmp = t_2 elif t_2 <= 0.0: tmp = t_1 elif t_2 <= 5e+302: 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-295) tmp = t_2; elseif (t_2 <= 0.0) tmp = t_1; elseif (t_2 <= 5e+302) 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-295) tmp = t_2; elseif (t_2 <= 0.0) tmp = t_1; elseif (t_2 <= 5e+302) 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-295], t$95$2, If[LessEqual[t$95$2, 0.0], t$95$1, If[LessEqual[t$95$2, 5e+302], 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^{-295}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;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 5e302 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 28.0%
Taylor expanded in y around -inf 51.2%
mul-1-neg51.2%
unsub-neg51.2%
mul-1-neg51.2%
distribute-neg-frac51.2%
cancel-sign-sub-inv51.2%
associate-/l*65.9%
metadata-eval65.9%
*-lft-identity65.9%
associate-/l*67.7%
Simplified67.7%
Taylor expanded in z around inf 81.4%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.00000000000000012e-295 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5e302Initial program 99.6%
if -2.00000000000000012e-295 < (/.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.5%
Taylor expanded in z around inf 79.5%
Final simplification90.6%
(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 (- (/ (- a t) y) (/ x (+ z -1.0)))))
(if (<= t_4 (- INFINITY))
t_5
(if (<= t_4 -2e-295)
(+ (/ t_3 t_1) (/ (* x y) t_1))
(if (<= t_4 0.0)
t_2
(if (<= t_4 5e+302) 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 = ((a - t) / y) - (x / (z + -1.0));
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_5;
} else if (t_4 <= -2e-295) {
tmp = (t_3 / t_1) + ((x * y) / t_1);
} else if (t_4 <= 0.0) {
tmp = t_2;
} else if (t_4 <= 5e+302) {
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 = ((a - t) / y) - (x / (z + -1.0));
double tmp;
if (t_4 <= -Double.POSITIVE_INFINITY) {
tmp = t_5;
} else if (t_4 <= -2e-295) {
tmp = (t_3 / t_1) + ((x * y) / t_1);
} else if (t_4 <= 0.0) {
tmp = t_2;
} else if (t_4 <= 5e+302) {
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 = ((a - t) / y) - (x / (z + -1.0)) tmp = 0 if t_4 <= -math.inf: tmp = t_5 elif t_4 <= -2e-295: tmp = (t_3 / t_1) + ((x * y) / t_1) elif t_4 <= 0.0: tmp = t_2 elif t_4 <= 5e+302: 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(a - t) / y) - Float64(x / Float64(z + -1.0))) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_5; elseif (t_4 <= -2e-295) tmp = Float64(Float64(t_3 / t_1) + Float64(Float64(x * y) / t_1)); elseif (t_4 <= 0.0) tmp = t_2; elseif (t_4 <= 5e+302) 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 = ((a - t) / y) - (x / (z + -1.0)); tmp = 0.0; if (t_4 <= -Inf) tmp = t_5; elseif (t_4 <= -2e-295) tmp = (t_3 / t_1) + ((x * y) / t_1); elseif (t_4 <= 0.0) tmp = t_2; elseif (t_4 <= 5e+302) 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[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$5, If[LessEqual[t$95$4, -2e-295], N[(N[(t$95$3 / t$95$1), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 0.0], t$95$2, If[LessEqual[t$95$4, 5e+302], 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{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{if}\;t_4 \leq -\infty:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t_4 \leq -2 \cdot 10^{-295}:\\
\;\;\;\;\frac{t_3}{t_1} + \frac{x \cdot y}{t_1}\\
\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_4 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;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 5e302 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 28.0%
Taylor expanded in y around -inf 51.2%
mul-1-neg51.2%
unsub-neg51.2%
mul-1-neg51.2%
distribute-neg-frac51.2%
cancel-sign-sub-inv51.2%
associate-/l*65.9%
metadata-eval65.9%
*-lft-identity65.9%
associate-/l*67.7%
Simplified67.7%
Taylor expanded in z around inf 81.4%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.00000000000000012e-295Initial program 99.6%
Taylor expanded in x around inf 99.6%
if -2.00000000000000012e-295 < (/.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.5%
Taylor expanded in z around inf 79.5%
if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5e302Initial program 99.6%
Final simplification90.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- (+ b (/ y z)) y))))
(if (<= z -3.9e-23)
t_1
(if (<= z 4.2e-91)
(+ x (/ (* z (- t a)) y))
(if (<= z 2.65e-8)
t_1
(if (<= z 9e+18)
(- (/ (- a t) y) (/ x (+ z -1.0)))
(/ (- t a) (- b y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / ((b + (y / z)) - y);
double tmp;
if (z <= -3.9e-23) {
tmp = t_1;
} else if (z <= 4.2e-91) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 2.65e-8) {
tmp = t_1;
} else if (z <= 9e+18) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / ((b + (y / z)) - y)
if (z <= (-3.9d-23)) then
tmp = t_1
else if (z <= 4.2d-91) then
tmp = x + ((z * (t - a)) / y)
else if (z <= 2.65d-8) then
tmp = t_1
else if (z <= 9d+18) then
tmp = ((a - t) / y) - (x / (z + (-1.0d0)))
else
tmp = (t - a) / (b - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / ((b + (y / z)) - y);
double tmp;
if (z <= -3.9e-23) {
tmp = t_1;
} else if (z <= 4.2e-91) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 2.65e-8) {
tmp = t_1;
} else if (z <= 9e+18) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / ((b + (y / z)) - y) tmp = 0 if z <= -3.9e-23: tmp = t_1 elif z <= 4.2e-91: tmp = x + ((z * (t - a)) / y) elif z <= 2.65e-8: tmp = t_1 elif z <= 9e+18: tmp = ((a - t) / y) - (x / (z + -1.0)) else: tmp = (t - a) / (b - y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(Float64(b + Float64(y / z)) - y)) tmp = 0.0 if (z <= -3.9e-23) tmp = t_1; elseif (z <= 4.2e-91) tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); elseif (z <= 2.65e-8) tmp = t_1; elseif (z <= 9e+18) tmp = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))); else tmp = Float64(Float64(t - a) / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / ((b + (y / z)) - y); tmp = 0.0; if (z <= -3.9e-23) tmp = t_1; elseif (z <= 4.2e-91) tmp = x + ((z * (t - a)) / y); elseif (z <= 2.65e-8) tmp = t_1; elseif (z <= 9e+18) tmp = ((a - t) / y) - (x / (z + -1.0)); else tmp = (t - a) / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(N[(b + N[(y / z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.9e-23], t$95$1, If[LessEqual[z, 4.2e-91], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.65e-8], t$95$1, If[LessEqual[z, 9e+18], N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{\left(b + \frac{y}{z}\right) - y}\\
\mathbf{if}\;z \leq -3.9 \cdot 10^{-23}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-91}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq 2.65 \cdot 10^{-8}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+18}:\\
\;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\end{array}
\end{array}
if z < -3.9e-23 or 4.1999999999999998e-91 < z < 2.6499999999999999e-8Initial program 61.0%
flip--50.2%
associate-*r/44.1%
+-commutative44.1%
Applied egg-rr44.1%
*-commutative44.1%
associate-/l*48.6%
Simplified48.6%
Taylor expanded in x around 0 40.4%
associate-/l*50.0%
associate-/l*53.4%
unpow253.4%
unpow253.4%
+-commutative53.4%
Simplified53.4%
Taylor expanded in b around inf 83.8%
if -3.9e-23 < z < 4.1999999999999998e-91Initial program 78.2%
Taylor expanded in z around 0 57.2%
Taylor expanded in x around 0 78.8%
if 2.6499999999999999e-8 < z < 9e18Initial program 58.7%
Taylor expanded in y around -inf 100.0%
mul-1-neg100.0%
unsub-neg100.0%
mul-1-neg100.0%
distribute-neg-frac100.0%
cancel-sign-sub-inv100.0%
associate-/l*100.0%
metadata-eval100.0%
*-lft-identity100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around inf 100.0%
if 9e18 < z Initial program 33.9%
Taylor expanded in z around inf 87.3%
Final simplification82.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- (+ b (/ y z)) y))))
(if (<= z -1.26e-23)
t_1
(if (<= z 2.6e-91)
(+ x (/ (* z (- t a)) y))
(if (<= z 3e-6)
t_1
(if (<= z 9.5e+17) (/ x (- 1.0 z)) (/ (- t a) (- b y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / ((b + (y / z)) - y);
double tmp;
if (z <= -1.26e-23) {
tmp = t_1;
} else if (z <= 2.6e-91) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 3e-6) {
tmp = t_1;
} else if (z <= 9.5e+17) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / ((b + (y / z)) - y)
if (z <= (-1.26d-23)) then
tmp = t_1
else if (z <= 2.6d-91) then
tmp = x + ((z * (t - a)) / y)
else if (z <= 3d-6) then
tmp = t_1
else if (z <= 9.5d+17) then
tmp = x / (1.0d0 - z)
else
tmp = (t - a) / (b - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / ((b + (y / z)) - y);
double tmp;
if (z <= -1.26e-23) {
tmp = t_1;
} else if (z <= 2.6e-91) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 3e-6) {
tmp = t_1;
} else if (z <= 9.5e+17) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / ((b + (y / z)) - y) tmp = 0 if z <= -1.26e-23: tmp = t_1 elif z <= 2.6e-91: tmp = x + ((z * (t - a)) / y) elif z <= 3e-6: tmp = t_1 elif z <= 9.5e+17: tmp = x / (1.0 - z) else: tmp = (t - a) / (b - y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(Float64(b + Float64(y / z)) - y)) tmp = 0.0 if (z <= -1.26e-23) tmp = t_1; elseif (z <= 2.6e-91) tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); elseif (z <= 3e-6) tmp = t_1; elseif (z <= 9.5e+17) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / ((b + (y / z)) - y); tmp = 0.0; if (z <= -1.26e-23) tmp = t_1; elseif (z <= 2.6e-91) tmp = x + ((z * (t - a)) / y); elseif (z <= 3e-6) tmp = t_1; elseif (z <= 9.5e+17) tmp = x / (1.0 - z); else tmp = (t - a) / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(N[(b + N[(y / z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.26e-23], t$95$1, If[LessEqual[z, 2.6e-91], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e-6], t$95$1, If[LessEqual[z, 9.5e+17], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{\left(b + \frac{y}{z}\right) - y}\\
\mathbf{if}\;z \leq -1.26 \cdot 10^{-23}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-91}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-6}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+17}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\end{array}
\end{array}
if z < -1.25999999999999996e-23 or 2.60000000000000014e-91 < z < 3.0000000000000001e-6Initial program 61.0%
flip--50.2%
associate-*r/44.1%
+-commutative44.1%
Applied egg-rr44.1%
*-commutative44.1%
associate-/l*48.6%
Simplified48.6%
Taylor expanded in x around 0 40.4%
associate-/l*50.0%
associate-/l*53.4%
unpow253.4%
unpow253.4%
+-commutative53.4%
Simplified53.4%
Taylor expanded in b around inf 83.8%
if -1.25999999999999996e-23 < z < 2.60000000000000014e-91Initial program 78.2%
Taylor expanded in z around 0 57.2%
Taylor expanded in x around 0 78.8%
if 3.0000000000000001e-6 < z < 9.5e17Initial program 58.7%
Taylor expanded in y around inf 86.1%
+-commutative86.1%
mul-1-neg86.1%
unsub-neg86.1%
Simplified86.1%
if 9.5e17 < z Initial program 33.9%
Taylor expanded in z around inf 87.3%
Final simplification82.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.35e-23)
t_1
(if (<= z 8.8e-103)
x
(if (<= z 2.8e-6)
(/ (- t a) b)
(if (<= z 8.2e+17) (/ x (- 1.0 z)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.35e-23) {
tmp = t_1;
} else if (z <= 8.8e-103) {
tmp = x;
} else if (z <= 2.8e-6) {
tmp = (t - a) / b;
} else if (z <= 8.2e+17) {
tmp = x / (1.0 - z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-2.35d-23)) then
tmp = t_1
else if (z <= 8.8d-103) then
tmp = x
else if (z <= 2.8d-6) then
tmp = (t - a) / b
else if (z <= 8.2d+17) then
tmp = x / (1.0d0 - z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.35e-23) {
tmp = t_1;
} else if (z <= 8.8e-103) {
tmp = x;
} else if (z <= 2.8e-6) {
tmp = (t - a) / b;
} else if (z <= 8.2e+17) {
tmp = x / (1.0 - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -2.35e-23: tmp = t_1 elif z <= 8.8e-103: tmp = x elif z <= 2.8e-6: tmp = (t - a) / b elif z <= 8.2e+17: tmp = x / (1.0 - z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.35e-23) tmp = t_1; elseif (z <= 8.8e-103) tmp = x; elseif (z <= 2.8e-6) tmp = Float64(Float64(t - a) / b); elseif (z <= 8.2e+17) tmp = Float64(x / Float64(1.0 - z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -2.35e-23) tmp = t_1; elseif (z <= 8.8e-103) tmp = x; elseif (z <= 2.8e-6) tmp = (t - a) / b; elseif (z <= 8.2e+17) tmp = x / (1.0 - z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.35e-23], t$95$1, If[LessEqual[z, 8.8e-103], x, If[LessEqual[z, 2.8e-6], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 8.2e+17], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.35 \cdot 10^{-23}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{-103}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-6}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+17}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.35e-23 or 8.2e17 < z Initial program 43.2%
Taylor expanded in z around inf 85.8%
if -2.35e-23 < z < 8.7999999999999997e-103Initial program 78.5%
Taylor expanded in z around 0 57.6%
if 8.7999999999999997e-103 < z < 2.79999999999999987e-6Initial program 90.3%
Taylor expanded in y around 0 46.5%
if 2.79999999999999987e-6 < z < 8.2e17Initial program 58.7%
Taylor expanded in y around inf 86.1%
+-commutative86.1%
mul-1-neg86.1%
unsub-neg86.1%
Simplified86.1%
Final simplification71.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))))
(if (<= z -3.4e-22)
t_1
(if (<= z 4.2e-91)
x
(if (<= z 3.8e-9)
(/ (- a) b)
(if (<= z 1.4e+22) (/ x (- 1.0 z)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -3.4e-22) {
tmp = t_1;
} else if (z <= 4.2e-91) {
tmp = x;
} else if (z <= 3.8e-9) {
tmp = -a / b;
} else if (z <= 1.4e+22) {
tmp = x / (1.0 - z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t / (b - y)
if (z <= (-3.4d-22)) then
tmp = t_1
else if (z <= 4.2d-91) then
tmp = x
else if (z <= 3.8d-9) then
tmp = -a / b
else if (z <= 1.4d+22) then
tmp = x / (1.0d0 - z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -3.4e-22) {
tmp = t_1;
} else if (z <= 4.2e-91) {
tmp = x;
} else if (z <= 3.8e-9) {
tmp = -a / b;
} else if (z <= 1.4e+22) {
tmp = x / (1.0 - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if z <= -3.4e-22: tmp = t_1 elif z <= 4.2e-91: tmp = x elif z <= 3.8e-9: tmp = -a / b elif z <= 1.4e+22: tmp = x / (1.0 - z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -3.4e-22) tmp = t_1; elseif (z <= 4.2e-91) tmp = x; elseif (z <= 3.8e-9) tmp = Float64(Float64(-a) / b); elseif (z <= 1.4e+22) tmp = Float64(x / Float64(1.0 - z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); tmp = 0.0; if (z <= -3.4e-22) tmp = t_1; elseif (z <= 4.2e-91) tmp = x; elseif (z <= 3.8e-9) tmp = -a / b; elseif (z <= 1.4e+22) tmp = x / (1.0 - z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.4e-22], t$95$1, If[LessEqual[z, 4.2e-91], x, If[LessEqual[z, 3.8e-9], N[((-a) / b), $MachinePrecision], If[LessEqual[z, 1.4e+22], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -3.4 \cdot 10^{-22}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-91}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-9}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+22}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.3999999999999998e-22 or 1.4e22 < z Initial program 42.8%
Taylor expanded in z around inf 85.7%
Taylor expanded in t around inf 52.4%
if -3.3999999999999998e-22 < z < 4.1999999999999998e-91Initial program 78.2%
Taylor expanded in z around 0 57.0%
if 4.1999999999999998e-91 < z < 3.80000000000000011e-9Initial program 94.0%
Taylor expanded in a around inf 64.6%
mul-1-neg64.6%
distribute-lft-neg-out64.6%
*-commutative64.6%
Simplified64.6%
Taylor expanded in y around 0 47.8%
associate-*r/47.8%
neg-mul-147.8%
Simplified47.8%
if 3.80000000000000011e-9 < z < 1.4e22Initial program 63.7%
Taylor expanded in y around inf 75.6%
+-commutative75.6%
mul-1-neg75.6%
unsub-neg75.6%
Simplified75.6%
Final simplification54.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -2.7e+35)
t_1
(if (<= y 5.4e-88)
(/ (- t a) b)
(if (<= y 4.1e+101) (/ (+ t a) (- b y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -2.7e+35) {
tmp = t_1;
} else if (y <= 5.4e-88) {
tmp = (t - a) / b;
} else if (y <= 4.1e+101) {
tmp = (t + a) / (b - y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-2.7d+35)) then
tmp = t_1
else if (y <= 5.4d-88) then
tmp = (t - a) / b
else if (y <= 4.1d+101) then
tmp = (t + a) / (b - y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -2.7e+35) {
tmp = t_1;
} else if (y <= 5.4e-88) {
tmp = (t - a) / b;
} else if (y <= 4.1e+101) {
tmp = (t + a) / (b - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -2.7e+35: tmp = t_1 elif y <= 5.4e-88: tmp = (t - a) / b elif y <= 4.1e+101: tmp = (t + a) / (b - y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -2.7e+35) tmp = t_1; elseif (y <= 5.4e-88) tmp = Float64(Float64(t - a) / b); elseif (y <= 4.1e+101) tmp = Float64(Float64(t + a) / Float64(b - y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -2.7e+35) tmp = t_1; elseif (y <= 5.4e-88) tmp = (t - a) / b; elseif (y <= 4.1e+101) tmp = (t + a) / (b - y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.7e+35], t$95$1, If[LessEqual[y, 5.4e-88], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 4.1e+101], N[(N[(t + a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -2.7 \cdot 10^{+35}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{-88}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{+101}:\\
\;\;\;\;\frac{t + a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.70000000000000003e35 or 4.1e101 < y Initial program 42.9%
Taylor expanded in y around inf 58.6%
+-commutative58.6%
mul-1-neg58.6%
unsub-neg58.6%
Simplified58.6%
if -2.70000000000000003e35 < y < 5.39999999999999989e-88Initial program 82.2%
Taylor expanded in y around 0 60.1%
if 5.39999999999999989e-88 < y < 4.1e101Initial program 60.9%
Taylor expanded in z around inf 61.7%
expm1-log1p-u42.0%
expm1-udef24.5%
sub-neg24.5%
add-sqr-sqrt11.2%
sqrt-unprod18.2%
sqr-neg18.2%
sqrt-unprod9.0%
add-sqr-sqrt18.7%
Applied egg-rr18.7%
expm1-def32.2%
expm1-log1p49.4%
+-commutative49.4%
Simplified49.4%
Final simplification57.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2e-22) (not (<= z 3.6e-11))) (/ (- t a) (- b y)) (+ x (/ (* z (- t a)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2e-22) || !(z <= 3.6e-11)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((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 <= (-2d-22)) .or. (.not. (z <= 3.6d-11))) then
tmp = (t - a) / (b - y)
else
tmp = x + ((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 <= -2e-22) || !(z <= 3.6e-11)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - a)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2e-22) or not (z <= 3.6e-11): tmp = (t - a) / (b - y) else: tmp = x + ((z * (t - a)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2e-22) || !(z <= 3.6e-11)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(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 <= -2e-22) || ~((z <= 3.6e-11))) tmp = (t - a) / (b - y); else tmp = x + ((z * (t - a)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2e-22], N[Not[LessEqual[z, 3.6e-11]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{-22} \lor \neg \left(z \leq 3.6 \cdot 10^{-11}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\end{array}
\end{array}
if z < -2.0000000000000001e-22 or 3.59999999999999985e-11 < z Initial program 44.5%
Taylor expanded in z around inf 82.2%
if -2.0000000000000001e-22 < z < 3.59999999999999985e-11Initial program 80.2%
Taylor expanded in z around 0 56.1%
Taylor expanded in x around 0 75.0%
Final simplification78.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))))
(if (<= z -1.15e-23)
t_1
(if (<= z 3.8e-91) x (if (<= z 9.5e+84) (/ (- a) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -1.15e-23) {
tmp = t_1;
} else if (z <= 3.8e-91) {
tmp = x;
} else if (z <= 9.5e+84) {
tmp = -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 = t / (b - y)
if (z <= (-1.15d-23)) then
tmp = t_1
else if (z <= 3.8d-91) then
tmp = x
else if (z <= 9.5d+84) then
tmp = -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 = t / (b - y);
double tmp;
if (z <= -1.15e-23) {
tmp = t_1;
} else if (z <= 3.8e-91) {
tmp = x;
} else if (z <= 9.5e+84) {
tmp = -a / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if z <= -1.15e-23: tmp = t_1 elif z <= 3.8e-91: tmp = x elif z <= 9.5e+84: tmp = -a / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -1.15e-23) tmp = t_1; elseif (z <= 3.8e-91) tmp = x; elseif (z <= 9.5e+84) tmp = Float64(Float64(-a) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); tmp = 0.0; if (z <= -1.15e-23) tmp = t_1; elseif (z <= 3.8e-91) tmp = x; elseif (z <= 9.5e+84) tmp = -a / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.15e-23], t$95$1, If[LessEqual[z, 3.8e-91], x, If[LessEqual[z, 9.5e+84], N[((-a) / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{-23}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-91}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+84}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.15000000000000005e-23 or 9.49999999999999979e84 < z Initial program 41.3%
Taylor expanded in z around inf 86.4%
Taylor expanded in t around inf 54.1%
if -1.15000000000000005e-23 < z < 3.79999999999999978e-91Initial program 78.2%
Taylor expanded in z around 0 57.0%
if 3.79999999999999978e-91 < z < 9.49999999999999979e84Initial program 79.4%
Taylor expanded in a around inf 46.6%
mul-1-neg46.6%
distribute-lft-neg-out46.6%
*-commutative46.6%
Simplified46.6%
Taylor expanded in y around 0 32.3%
associate-*r/32.3%
neg-mul-132.3%
Simplified32.3%
Final simplification52.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -2.9e+35)
t_1
(if (<= y 3.4e-87)
(/ (- t a) b)
(if (<= y 4.5e+101) (/ t (- b y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -2.9e+35) {
tmp = t_1;
} else if (y <= 3.4e-87) {
tmp = (t - a) / b;
} else if (y <= 4.5e+101) {
tmp = t / (b - y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-2.9d+35)) then
tmp = t_1
else if (y <= 3.4d-87) then
tmp = (t - a) / b
else if (y <= 4.5d+101) then
tmp = t / (b - y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -2.9e+35) {
tmp = t_1;
} else if (y <= 3.4e-87) {
tmp = (t - a) / b;
} else if (y <= 4.5e+101) {
tmp = t / (b - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -2.9e+35: tmp = t_1 elif y <= 3.4e-87: tmp = (t - a) / b elif y <= 4.5e+101: tmp = t / (b - y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -2.9e+35) tmp = t_1; elseif (y <= 3.4e-87) tmp = Float64(Float64(t - a) / b); elseif (y <= 4.5e+101) tmp = Float64(t / Float64(b - y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -2.9e+35) tmp = t_1; elseif (y <= 3.4e-87) tmp = (t - a) / b; elseif (y <= 4.5e+101) tmp = t / (b - y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.9e+35], t$95$1, If[LessEqual[y, 3.4e-87], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 4.5e+101], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -2.9 \cdot 10^{+35}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-87}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+101}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.89999999999999995e35 or 4.5000000000000002e101 < y Initial program 42.9%
Taylor expanded in y around inf 58.6%
+-commutative58.6%
mul-1-neg58.6%
unsub-neg58.6%
Simplified58.6%
if -2.89999999999999995e35 < y < 3.3999999999999999e-87Initial program 82.2%
Taylor expanded in y around 0 60.1%
if 3.3999999999999999e-87 < y < 4.5000000000000002e101Initial program 60.9%
Taylor expanded in z around inf 61.7%
Taylor expanded in t around inf 49.3%
Final simplification57.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6.6e-22) (not (<= z 4.2e-91))) (/ (- a) b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.6e-22) || !(z <= 4.2e-91)) {
tmp = -a / 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 <= (-6.6d-22)) .or. (.not. (z <= 4.2d-91))) then
tmp = -a / 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 <= -6.6e-22) || !(z <= 4.2e-91)) {
tmp = -a / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6.6e-22) or not (z <= 4.2e-91): tmp = -a / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6.6e-22) || !(z <= 4.2e-91)) tmp = Float64(Float64(-a) / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6.6e-22) || ~((z <= 4.2e-91))) tmp = -a / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6.6e-22], N[Not[LessEqual[z, 4.2e-91]], $MachinePrecision]], N[((-a) / b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.6 \cdot 10^{-22} \lor \neg \left(z \leq 4.2 \cdot 10^{-91}\right):\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -6.6000000000000002e-22 or 4.1999999999999998e-91 < z Initial program 49.8%
Taylor expanded in a around inf 25.5%
mul-1-neg25.5%
distribute-lft-neg-out25.5%
*-commutative25.5%
Simplified25.5%
Taylor expanded in y around 0 24.5%
associate-*r/24.5%
neg-mul-124.5%
Simplified24.5%
if -6.6000000000000002e-22 < z < 4.1999999999999998e-91Initial program 78.2%
Taylor expanded in z around 0 57.0%
Final simplification38.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.9%
Taylor expanded in z around 0 26.8%
Final simplification26.8%
(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 2023257
(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)))))