
(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 20 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 (/ (- t a) (- b y)))
(t_3 (* z (- t a)))
(t_4 (/ (+ (* x y) t_3) t_1))
(t_5 (+ (/ x (- 1.0 z)) t_2)))
(if (<= t_4 (- INFINITY))
t_5
(if (<= t_4 -1e-288)
(/ (+ (* x y) (- (* z t) (* z a))) t_1)
(if (<= t_4 0.0)
(+
t_2
(/ (- (/ (* x y) (- b y)) (/ y (/ (pow (- b y) 2.0) (- t a)))) z))
(if (<= t_4 2e+306) (+ (/ (* x y) t_1) (/ t_3 t_1)) 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 = (t - a) / (b - y);
double t_3 = z * (t - a);
double t_4 = ((x * y) + t_3) / t_1;
double t_5 = (x / (1.0 - z)) + t_2;
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_5;
} else if (t_4 <= -1e-288) {
tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
} else if (t_4 <= 0.0) {
tmp = t_2 + ((((x * y) / (b - y)) - (y / (pow((b - y), 2.0) / (t - a)))) / z);
} else if (t_4 <= 2e+306) {
tmp = ((x * y) / t_1) + (t_3 / t_1);
} 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 = (t - a) / (b - y);
double t_3 = z * (t - a);
double t_4 = ((x * y) + t_3) / t_1;
double t_5 = (x / (1.0 - z)) + t_2;
double tmp;
if (t_4 <= -Double.POSITIVE_INFINITY) {
tmp = t_5;
} else if (t_4 <= -1e-288) {
tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
} else if (t_4 <= 0.0) {
tmp = t_2 + ((((x * y) / (b - y)) - (y / (Math.pow((b - y), 2.0) / (t - a)))) / z);
} else if (t_4 <= 2e+306) {
tmp = ((x * y) / t_1) + (t_3 / t_1);
} else {
tmp = t_5;
}
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 = (x / (1.0 - z)) + t_2 tmp = 0 if t_4 <= -math.inf: tmp = t_5 elif t_4 <= -1e-288: tmp = ((x * y) + ((z * t) - (z * a))) / t_1 elif t_4 <= 0.0: tmp = t_2 + ((((x * y) / (b - y)) - (y / (math.pow((b - y), 2.0) / (t - a)))) / z) elif t_4 <= 2e+306: tmp = ((x * y) / t_1) + (t_3 / t_1) 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(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(x / Float64(1.0 - z)) + t_2) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_5; elseif (t_4 <= -1e-288) tmp = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(z * a))) / t_1); elseif (t_4 <= 0.0) tmp = Float64(t_2 + Float64(Float64(Float64(Float64(x * y) / Float64(b - y)) - Float64(y / Float64((Float64(b - y) ^ 2.0) / Float64(t - a)))) / z)); elseif (t_4 <= 2e+306) tmp = Float64(Float64(Float64(x * y) / t_1) + Float64(t_3 / t_1)); 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 = (t - a) / (b - y); t_3 = z * (t - a); t_4 = ((x * y) + t_3) / t_1; t_5 = (x / (1.0 - z)) + t_2; tmp = 0.0; if (t_4 <= -Inf) tmp = t_5; elseif (t_4 <= -1e-288) tmp = ((x * y) + ((z * t) - (z * a))) / t_1; elseif (t_4 <= 0.0) tmp = t_2 + ((((x * y) / (b - y)) - (y / (((b - y) ^ 2.0) / (t - a)))) / z); elseif (t_4 <= 2e+306) tmp = ((x * y) / t_1) + (t_3 / t_1); 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[(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[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$5, If[LessEqual[t$95$4, -1e-288], N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[(t$95$2 + 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]), $MachinePrecision], If[LessEqual[t$95$4, 2e+306], N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$3 / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$5]]]]]]]]]
\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{x}{1 - z} + t_2\\
\mathbf{if}\;t_4 \leq -\infty:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t_4 \leq -1 \cdot 10^{-288}:\\
\;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{t_1}\\
\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;t_2 + \frac{\frac{x \cdot y}{b - y} - \frac{y}{\frac{{\left(b - y\right)}^{2}}{t - a}}}{z}\\
\mathbf{elif}\;t_4 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;\frac{x \cdot y}{t_1} + \frac{t_3}{t_1}\\
\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 2.00000000000000003e306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 18.8%
Taylor expanded in x around 0 18.8%
Taylor expanded in z around inf 59.1%
Taylor expanded in y around inf 87.6%
neg-mul-187.6%
unsub-neg87.6%
Simplified87.6%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.00000000000000006e-288Initial program 99.4%
sub-neg99.4%
distribute-lft-in99.4%
Applied egg-rr99.4%
if -1.00000000000000006e-288 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 26.2%
Taylor expanded in z around -inf 89.7%
associate--l+89.7%
mul-1-neg89.7%
distribute-lft-out--89.7%
*-commutative89.7%
associate-/l*95.0%
div-sub95.0%
Simplified95.0%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000003e306Initial program 99.6%
Taylor expanded in x around 0 99.6%
Final simplification95.1%
(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 (+ (/ x (- 1.0 z)) t_2)))
(if (<= t_4 (- INFINITY))
t_5
(if (<= t_4 -1e-288)
(/ (+ (* x y) (- (* z t) (* z a))) t_1)
(if (<= t_4 0.0)
(-
(+ t_2 (/ x (/ z (/ y (- b y)))))
(* (/ y z) (/ (- t a) (pow (- b y) 2.0))))
(if (<= t_4 2e+306) (+ (/ (* x y) t_1) (/ t_3 t_1)) 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 = (t - a) / (b - y);
double t_3 = z * (t - a);
double t_4 = ((x * y) + t_3) / t_1;
double t_5 = (x / (1.0 - z)) + t_2;
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_5;
} else if (t_4 <= -1e-288) {
tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
} else if (t_4 <= 0.0) {
tmp = (t_2 + (x / (z / (y / (b - y))))) - ((y / z) * ((t - a) / pow((b - y), 2.0)));
} else if (t_4 <= 2e+306) {
tmp = ((x * y) / t_1) + (t_3 / t_1);
} 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 = (t - a) / (b - y);
double t_3 = z * (t - a);
double t_4 = ((x * y) + t_3) / t_1;
double t_5 = (x / (1.0 - z)) + t_2;
double tmp;
if (t_4 <= -Double.POSITIVE_INFINITY) {
tmp = t_5;
} else if (t_4 <= -1e-288) {
tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
} else if (t_4 <= 0.0) {
tmp = (t_2 + (x / (z / (y / (b - y))))) - ((y / z) * ((t - a) / Math.pow((b - y), 2.0)));
} else if (t_4 <= 2e+306) {
tmp = ((x * y) / t_1) + (t_3 / t_1);
} else {
tmp = t_5;
}
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 = (x / (1.0 - z)) + t_2 tmp = 0 if t_4 <= -math.inf: tmp = t_5 elif t_4 <= -1e-288: tmp = ((x * y) + ((z * t) - (z * a))) / t_1 elif t_4 <= 0.0: tmp = (t_2 + (x / (z / (y / (b - y))))) - ((y / z) * ((t - a) / math.pow((b - y), 2.0))) elif t_4 <= 2e+306: tmp = ((x * y) / t_1) + (t_3 / t_1) 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(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(x / Float64(1.0 - z)) + t_2) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_5; elseif (t_4 <= -1e-288) tmp = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(z * a))) / t_1); elseif (t_4 <= 0.0) tmp = Float64(Float64(t_2 + Float64(x / Float64(z / Float64(y / Float64(b - y))))) - Float64(Float64(y / z) * Float64(Float64(t - a) / (Float64(b - y) ^ 2.0)))); elseif (t_4 <= 2e+306) tmp = Float64(Float64(Float64(x * y) / t_1) + Float64(t_3 / t_1)); 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 = (t - a) / (b - y); t_3 = z * (t - a); t_4 = ((x * y) + t_3) / t_1; t_5 = (x / (1.0 - z)) + t_2; tmp = 0.0; if (t_4 <= -Inf) tmp = t_5; elseif (t_4 <= -1e-288) tmp = ((x * y) + ((z * t) - (z * a))) / t_1; elseif (t_4 <= 0.0) tmp = (t_2 + (x / (z / (y / (b - y))))) - ((y / z) * ((t - a) / ((b - y) ^ 2.0))); elseif (t_4 <= 2e+306) tmp = ((x * y) / t_1) + (t_3 / t_1); 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[(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[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$5, If[LessEqual[t$95$4, -1e-288], N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[(N[(t$95$2 + N[(x / N[(z / N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $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, 2e+306], N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$3 / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$5]]]]]]]]]
\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{x}{1 - z} + t_2\\
\mathbf{if}\;t_4 \leq -\infty:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t_4 \leq -1 \cdot 10^{-288}:\\
\;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{t_1}\\
\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;\left(t_2 + \frac{x}{\frac{z}{\frac{y}{b - y}}}\right) - \frac{y}{z} \cdot \frac{t - a}{{\left(b - y\right)}^{2}}\\
\mathbf{elif}\;t_4 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;\frac{x \cdot y}{t_1} + \frac{t_3}{t_1}\\
\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 2.00000000000000003e306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 18.8%
Taylor expanded in x around 0 18.8%
Taylor expanded in z around inf 59.1%
Taylor expanded in y around inf 87.6%
neg-mul-187.6%
unsub-neg87.6%
Simplified87.6%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.00000000000000006e-288Initial program 99.4%
sub-neg99.4%
distribute-lft-in99.4%
Applied egg-rr99.4%
if -1.00000000000000006e-288 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 26.2%
Taylor expanded in z around inf 70.8%
associate--r+70.8%
+-commutative70.8%
associate--l+70.8%
associate-/l*74.2%
associate-/l*88.2%
div-sub88.2%
times-frac93.4%
Simplified93.4%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000003e306Initial program 99.6%
Taylor expanded in x around 0 99.6%
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)))
(t_3 (* z (- t a)))
(t_4 (/ (+ (* x y) t_3) t_1))
(t_5 (+ (/ x (- 1.0 z)) t_2)))
(if (<= t_4 (- INFINITY))
t_5
(if (<= t_4 -2e-273)
(/ (+ (* x y) (- (* z t) (* z a))) t_1)
(if (<= t_4 0.0)
(+ t_2 (* (/ y z) (/ x b)))
(if (<= t_4 2e+306) (+ (/ (* x y) t_1) (/ t_3 t_1)) 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 = (t - a) / (b - y);
double t_3 = z * (t - a);
double t_4 = ((x * y) + t_3) / t_1;
double t_5 = (x / (1.0 - z)) + t_2;
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_5;
} else if (t_4 <= -2e-273) {
tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
} else if (t_4 <= 0.0) {
tmp = t_2 + ((y / z) * (x / b));
} else if (t_4 <= 2e+306) {
tmp = ((x * y) / t_1) + (t_3 / t_1);
} 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 = (t - a) / (b - y);
double t_3 = z * (t - a);
double t_4 = ((x * y) + t_3) / t_1;
double t_5 = (x / (1.0 - z)) + t_2;
double tmp;
if (t_4 <= -Double.POSITIVE_INFINITY) {
tmp = t_5;
} else if (t_4 <= -2e-273) {
tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
} else if (t_4 <= 0.0) {
tmp = t_2 + ((y / z) * (x / b));
} else if (t_4 <= 2e+306) {
tmp = ((x * y) / t_1) + (t_3 / t_1);
} else {
tmp = t_5;
}
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 = (x / (1.0 - z)) + t_2 tmp = 0 if t_4 <= -math.inf: tmp = t_5 elif t_4 <= -2e-273: tmp = ((x * y) + ((z * t) - (z * a))) / t_1 elif t_4 <= 0.0: tmp = t_2 + ((y / z) * (x / b)) elif t_4 <= 2e+306: tmp = ((x * y) / t_1) + (t_3 / t_1) 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(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(x / Float64(1.0 - z)) + t_2) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_5; elseif (t_4 <= -2e-273) tmp = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(z * a))) / t_1); elseif (t_4 <= 0.0) tmp = Float64(t_2 + Float64(Float64(y / z) * Float64(x / b))); elseif (t_4 <= 2e+306) tmp = Float64(Float64(Float64(x * y) / t_1) + Float64(t_3 / t_1)); 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 = (t - a) / (b - y); t_3 = z * (t - a); t_4 = ((x * y) + t_3) / t_1; t_5 = (x / (1.0 - z)) + t_2; tmp = 0.0; if (t_4 <= -Inf) tmp = t_5; elseif (t_4 <= -2e-273) tmp = ((x * y) + ((z * t) - (z * a))) / t_1; elseif (t_4 <= 0.0) tmp = t_2 + ((y / z) * (x / b)); elseif (t_4 <= 2e+306) tmp = ((x * y) / t_1) + (t_3 / t_1); 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[(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[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$5, If[LessEqual[t$95$4, -2e-273], N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[(t$95$2 + N[(N[(y / z), $MachinePrecision] * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 2e+306], N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$3 / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$5]]]]]]]]]
\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{x}{1 - z} + t_2\\
\mathbf{if}\;t_4 \leq -\infty:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t_4 \leq -2 \cdot 10^{-273}:\\
\;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{t_1}\\
\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;t_2 + \frac{y}{z} \cdot \frac{x}{b}\\
\mathbf{elif}\;t_4 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;\frac{x \cdot y}{t_1} + \frac{t_3}{t_1}\\
\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 2.00000000000000003e306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 18.8%
Taylor expanded in x around 0 18.8%
Taylor expanded in z around inf 59.1%
Taylor expanded in y around inf 87.6%
neg-mul-187.6%
unsub-neg87.6%
Simplified87.6%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-273Initial program 99.4%
sub-neg99.4%
distribute-lft-in99.4%
Applied egg-rr99.4%
if -2e-273 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 29.9%
Taylor expanded in x around 0 29.9%
Taylor expanded in z around inf 77.3%
div-inv77.2%
*-commutative77.2%
+-commutative77.2%
fma-def77.2%
Applied egg-rr77.2%
Taylor expanded in y around 0 67.4%
times-frac79.9%
Simplified79.9%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000003e306Initial program 99.6%
Taylor expanded in x around 0 99.6%
Final simplification93.9%
(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 (+ (/ x (- 1.0 z)) t_1)))
(if (<= t_2 (- INFINITY))
t_3
(if (<= t_2 -2e-273)
t_2
(if (<= t_2 0.0)
(+ t_1 (* (/ y z) (/ x b)))
(if (<= t_2 2e+306) t_2 t_3))))))
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 = (x / (1.0 - z)) + t_1;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_2 <= -2e-273) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_1 + ((y / z) * (x / b));
} else if (t_2 <= 2e+306) {
tmp = t_2;
} else {
tmp = t_3;
}
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 = (x / (1.0 - z)) + t_1;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_3;
} else if (t_2 <= -2e-273) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_1 + ((y / z) * (x / b));
} else if (t_2 <= 2e+306) {
tmp = t_2;
} else {
tmp = t_3;
}
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 = (x / (1.0 - z)) + t_1 tmp = 0 if t_2 <= -math.inf: tmp = t_3 elif t_2 <= -2e-273: tmp = t_2 elif t_2 <= 0.0: tmp = t_1 + ((y / z) * (x / b)) elif t_2 <= 2e+306: tmp = t_2 else: tmp = t_3 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(x / Float64(1.0 - z)) + t_1) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_3; elseif (t_2 <= -2e-273) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(t_1 + Float64(Float64(y / z) * Float64(x / b))); elseif (t_2 <= 2e+306) tmp = t_2; else tmp = t_3; 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 = (x / (1.0 - z)) + t_1; tmp = 0.0; if (t_2 <= -Inf) tmp = t_3; elseif (t_2 <= -2e-273) tmp = t_2; elseif (t_2 <= 0.0) tmp = t_1 + ((y / z) * (x / b)); elseif (t_2 <= 2e+306) tmp = t_2; else tmp = t_3; 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[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, -2e-273], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t$95$1 + N[(N[(y / z), $MachinePrecision] * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+306], t$95$2, t$95$3]]]]]]]
\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{x}{1 - z} + t_1\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-273}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t_1 + \frac{y}{z} \cdot \frac{x}{b}\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\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 2.00000000000000003e306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 18.8%
Taylor expanded in x around 0 18.8%
Taylor expanded in z around inf 59.1%
Taylor expanded in y around inf 87.6%
neg-mul-187.6%
unsub-neg87.6%
Simplified87.6%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-273 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000003e306Initial program 99.5%
if -2e-273 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 29.9%
Taylor expanded in x around 0 29.9%
Taylor expanded in z around inf 77.3%
div-inv77.2%
*-commutative77.2%
+-commutative77.2%
fma-def77.2%
Applied egg-rr77.2%
Taylor expanded in y around 0 67.4%
times-frac79.9%
Simplified79.9%
Final simplification93.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (/ (- t a) (- b y)))
(t_3 (/ (+ (* x y) (* z (- t a))) t_1))
(t_4 (+ (/ x (- 1.0 z)) t_2)))
(if (<= t_3 (- INFINITY))
t_4
(if (<= t_3 -2e-273)
(/ (+ (* x y) (- (* z t) (* z a))) t_1)
(if (<= t_3 0.0)
(+ t_2 (* (/ y z) (/ x b)))
(if (<= t_3 2e+306) t_3 t_4))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (t - a) / (b - y);
double t_3 = ((x * y) + (z * (t - a))) / t_1;
double t_4 = (x / (1.0 - z)) + t_2;
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_4;
} else if (t_3 <= -2e-273) {
tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
} else if (t_3 <= 0.0) {
tmp = t_2 + ((y / z) * (x / b));
} else if (t_3 <= 2e+306) {
tmp = t_3;
} else {
tmp = t_4;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (t - a) / (b - y);
double t_3 = ((x * y) + (z * (t - a))) / t_1;
double t_4 = (x / (1.0 - z)) + t_2;
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = t_4;
} else if (t_3 <= -2e-273) {
tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
} else if (t_3 <= 0.0) {
tmp = t_2 + ((y / z) * (x / b));
} else if (t_3 <= 2e+306) {
tmp = t_3;
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = (t - a) / (b - y) t_3 = ((x * y) + (z * (t - a))) / t_1 t_4 = (x / (1.0 - z)) + t_2 tmp = 0 if t_3 <= -math.inf: tmp = t_4 elif t_3 <= -2e-273: tmp = ((x * y) + ((z * t) - (z * a))) / t_1 elif t_3 <= 0.0: tmp = t_2 + ((y / z) * (x / b)) elif t_3 <= 2e+306: tmp = t_3 else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(t - a) / Float64(b - y)) t_3 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / t_1) t_4 = Float64(Float64(x / Float64(1.0 - z)) + t_2) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_4; elseif (t_3 <= -2e-273) tmp = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(z * a))) / t_1); elseif (t_3 <= 0.0) tmp = Float64(t_2 + Float64(Float64(y / z) * Float64(x / b))); elseif (t_3 <= 2e+306) tmp = t_3; else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = (t - a) / (b - y); t_3 = ((x * y) + (z * (t - a))) / t_1; t_4 = (x / (1.0 - z)) + t_2; tmp = 0.0; if (t_3 <= -Inf) tmp = t_4; elseif (t_3 <= -2e-273) tmp = ((x * y) + ((z * t) - (z * a))) / t_1; elseif (t_3 <= 0.0) tmp = t_2 + ((y / z) * (x / b)); elseif (t_3 <= 2e+306) tmp = t_3; else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, -2e-273], N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(t$95$2 + N[(N[(y / z), $MachinePrecision] * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+306], t$95$3, t$95$4]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{t - a}{b - y}\\
t_3 := \frac{x \cdot y + z \cdot \left(t - a\right)}{t_1}\\
t_4 := \frac{x}{1 - z} + t_2\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_3 \leq -2 \cdot 10^{-273}:\\
\;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{t_1}\\
\mathbf{elif}\;t_3 \leq 0:\\
\;\;\;\;t_2 + \frac{y}{z} \cdot \frac{x}{b}\\
\mathbf{elif}\;t_3 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or 2.00000000000000003e306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 18.8%
Taylor expanded in x around 0 18.8%
Taylor expanded in z around inf 59.1%
Taylor expanded in y around inf 87.6%
neg-mul-187.6%
unsub-neg87.6%
Simplified87.6%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-273Initial program 99.4%
sub-neg99.4%
distribute-lft-in99.4%
Applied egg-rr99.4%
if -2e-273 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 29.9%
Taylor expanded in x around 0 29.9%
Taylor expanded in z around inf 77.3%
div-inv77.2%
*-commutative77.2%
+-commutative77.2%
fma-def77.2%
Applied egg-rr77.2%
Taylor expanded in y around 0 67.4%
times-frac79.9%
Simplified79.9%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000003e306Initial program 99.6%
Final simplification93.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a))) (t_2 (+ (/ x (- 1.0 z)) (/ (- t a) (- b y)))))
(if (<= z -1.15e+143)
t_2
(if (<= z -2.6e+86)
(/ (- (/ x (/ z y)) (- a t)) b)
(if (<= z -3.2e-43)
t_2
(if (<= z 1.4e-133)
(+ x (/ t_1 y))
(if (<= z 1.56e-46)
(/ (+ t (- (* y (/ x z)) a)) b)
(if (<= z 7e+18) (+ x (/ t_1 (* y (- 1.0 z)))) t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (x / (1.0 - z)) + ((t - a) / (b - y));
double tmp;
if (z <= -1.15e+143) {
tmp = t_2;
} else if (z <= -2.6e+86) {
tmp = ((x / (z / y)) - (a - t)) / b;
} else if (z <= -3.2e-43) {
tmp = t_2;
} else if (z <= 1.4e-133) {
tmp = x + (t_1 / y);
} else if (z <= 1.56e-46) {
tmp = (t + ((y * (x / z)) - a)) / b;
} else if (z <= 7e+18) {
tmp = x + (t_1 / (y * (1.0 - z)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z * (t - a)
t_2 = (x / (1.0d0 - z)) + ((t - a) / (b - y))
if (z <= (-1.15d+143)) then
tmp = t_2
else if (z <= (-2.6d+86)) then
tmp = ((x / (z / y)) - (a - t)) / b
else if (z <= (-3.2d-43)) then
tmp = t_2
else if (z <= 1.4d-133) then
tmp = x + (t_1 / y)
else if (z <= 1.56d-46) then
tmp = (t + ((y * (x / z)) - a)) / b
else if (z <= 7d+18) then
tmp = x + (t_1 / (y * (1.0d0 - z)))
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 = z * (t - a);
double t_2 = (x / (1.0 - z)) + ((t - a) / (b - y));
double tmp;
if (z <= -1.15e+143) {
tmp = t_2;
} else if (z <= -2.6e+86) {
tmp = ((x / (z / y)) - (a - t)) / b;
} else if (z <= -3.2e-43) {
tmp = t_2;
} else if (z <= 1.4e-133) {
tmp = x + (t_1 / y);
} else if (z <= 1.56e-46) {
tmp = (t + ((y * (x / z)) - a)) / b;
} else if (z <= 7e+18) {
tmp = x + (t_1 / (y * (1.0 - z)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = (x / (1.0 - z)) + ((t - a) / (b - y)) tmp = 0 if z <= -1.15e+143: tmp = t_2 elif z <= -2.6e+86: tmp = ((x / (z / y)) - (a - t)) / b elif z <= -3.2e-43: tmp = t_2 elif z <= 1.4e-133: tmp = x + (t_1 / y) elif z <= 1.56e-46: tmp = (t + ((y * (x / z)) - a)) / b elif z <= 7e+18: tmp = x + (t_1 / (y * (1.0 - z))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(Float64(x / Float64(1.0 - z)) + Float64(Float64(t - a) / Float64(b - y))) tmp = 0.0 if (z <= -1.15e+143) tmp = t_2; elseif (z <= -2.6e+86) tmp = Float64(Float64(Float64(x / Float64(z / y)) - Float64(a - t)) / b); elseif (z <= -3.2e-43) tmp = t_2; elseif (z <= 1.4e-133) tmp = Float64(x + Float64(t_1 / y)); elseif (z <= 1.56e-46) tmp = Float64(Float64(t + Float64(Float64(y * Float64(x / z)) - a)) / b); elseif (z <= 7e+18) tmp = Float64(x + Float64(t_1 / Float64(y * Float64(1.0 - z)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = (x / (1.0 - z)) + ((t - a) / (b - y)); tmp = 0.0; if (z <= -1.15e+143) tmp = t_2; elseif (z <= -2.6e+86) tmp = ((x / (z / y)) - (a - t)) / b; elseif (z <= -3.2e-43) tmp = t_2; elseif (z <= 1.4e-133) tmp = x + (t_1 / y); elseif (z <= 1.56e-46) tmp = (t + ((y * (x / z)) - a)) / b; elseif (z <= 7e+18) tmp = x + (t_1 / (y * (1.0 - z))); else tmp = t_2; 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 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.15e+143], t$95$2, If[LessEqual[z, -2.6e+86], N[(N[(N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a - t), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, -3.2e-43], t$95$2, If[LessEqual[z, 1.4e-133], N[(x + N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.56e-46], N[(N[(t + N[(N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 7e+18], N[(x + N[(t$95$1 / N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{x}{1 - z} + \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{+143}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{+86}:\\
\;\;\;\;\frac{\frac{x}{\frac{z}{y}} - \left(a - t\right)}{b}\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-43}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-133}:\\
\;\;\;\;x + \frac{t_1}{y}\\
\mathbf{elif}\;z \leq 1.56 \cdot 10^{-46}:\\
\;\;\;\;\frac{t + \left(y \cdot \frac{x}{z} - a\right)}{b}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+18}:\\
\;\;\;\;x + \frac{t_1}{y \cdot \left(1 - z\right)}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.15e143 or -2.5999999999999998e86 < z < -3.19999999999999985e-43 or 7e18 < z Initial program 43.3%
Taylor expanded in x around 0 43.3%
Taylor expanded in z around inf 83.5%
Taylor expanded in y around inf 86.8%
neg-mul-186.8%
unsub-neg86.8%
Simplified86.8%
if -1.15e143 < z < -2.5999999999999998e86Initial program 83.0%
Taylor expanded in t around 0 83.0%
Taylor expanded in b around inf 83.6%
associate-+r+83.6%
mul-1-neg83.6%
sub-neg83.6%
associate-/l*91.6%
Simplified91.6%
if -3.19999999999999985e-43 < z < 1.3999999999999999e-133Initial program 83.9%
Taylor expanded in x around 0 83.9%
Taylor expanded in z around 0 88.3%
Taylor expanded in z around 0 79.8%
if 1.3999999999999999e-133 < z < 1.55999999999999991e-46Initial program 94.8%
Taylor expanded in x around 0 94.8%
Taylor expanded in z around inf 83.1%
times-frac72.9%
Simplified72.9%
Taylor expanded in b around inf 72.4%
associate--l+72.4%
associate-*l/72.4%
*-commutative72.4%
Simplified72.4%
if 1.55999999999999991e-46 < z < 7e18Initial program 92.9%
Taylor expanded in x around 0 92.9%
Taylor expanded in z around 0 70.6%
Taylor expanded in y around inf 59.6%
neg-mul-159.6%
unsub-neg59.6%
Simplified59.6%
Final simplification81.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a))) (t_2 (+ (/ x (- 1.0 z)) (/ (- t a) (- b y)))))
(if (<= z -2.1e+143)
t_2
(if (<= z -2.3e+86)
(/ (- (/ x (/ z y)) (- a t)) b)
(if (<= z -1.7e-38)
t_2
(if (<= z 2.55e-135)
(+ x (/ t_1 y))
(if (<= z 750000000.0) (/ t_1 (+ y (* z (- b y)))) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (x / (1.0 - z)) + ((t - a) / (b - y));
double tmp;
if (z <= -2.1e+143) {
tmp = t_2;
} else if (z <= -2.3e+86) {
tmp = ((x / (z / y)) - (a - t)) / b;
} else if (z <= -1.7e-38) {
tmp = t_2;
} else if (z <= 2.55e-135) {
tmp = x + (t_1 / y);
} else if (z <= 750000000.0) {
tmp = t_1 / (y + (z * (b - y)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z * (t - a)
t_2 = (x / (1.0d0 - z)) + ((t - a) / (b - y))
if (z <= (-2.1d+143)) then
tmp = t_2
else if (z <= (-2.3d+86)) then
tmp = ((x / (z / y)) - (a - t)) / b
else if (z <= (-1.7d-38)) then
tmp = t_2
else if (z <= 2.55d-135) then
tmp = x + (t_1 / y)
else if (z <= 750000000.0d0) then
tmp = t_1 / (y + (z * (b - y)))
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 = z * (t - a);
double t_2 = (x / (1.0 - z)) + ((t - a) / (b - y));
double tmp;
if (z <= -2.1e+143) {
tmp = t_2;
} else if (z <= -2.3e+86) {
tmp = ((x / (z / y)) - (a - t)) / b;
} else if (z <= -1.7e-38) {
tmp = t_2;
} else if (z <= 2.55e-135) {
tmp = x + (t_1 / y);
} else if (z <= 750000000.0) {
tmp = t_1 / (y + (z * (b - y)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = (x / (1.0 - z)) + ((t - a) / (b - y)) tmp = 0 if z <= -2.1e+143: tmp = t_2 elif z <= -2.3e+86: tmp = ((x / (z / y)) - (a - t)) / b elif z <= -1.7e-38: tmp = t_2 elif z <= 2.55e-135: tmp = x + (t_1 / y) elif z <= 750000000.0: tmp = t_1 / (y + (z * (b - y))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(Float64(x / Float64(1.0 - z)) + Float64(Float64(t - a) / Float64(b - y))) tmp = 0.0 if (z <= -2.1e+143) tmp = t_2; elseif (z <= -2.3e+86) tmp = Float64(Float64(Float64(x / Float64(z / y)) - Float64(a - t)) / b); elseif (z <= -1.7e-38) tmp = t_2; elseif (z <= 2.55e-135) tmp = Float64(x + Float64(t_1 / y)); elseif (z <= 750000000.0) tmp = Float64(t_1 / Float64(y + Float64(z * Float64(b - y)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = (x / (1.0 - z)) + ((t - a) / (b - y)); tmp = 0.0; if (z <= -2.1e+143) tmp = t_2; elseif (z <= -2.3e+86) tmp = ((x / (z / y)) - (a - t)) / b; elseif (z <= -1.7e-38) tmp = t_2; elseif (z <= 2.55e-135) tmp = x + (t_1 / y); elseif (z <= 750000000.0) tmp = t_1 / (y + (z * (b - y))); else tmp = t_2; 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 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.1e+143], t$95$2, If[LessEqual[z, -2.3e+86], N[(N[(N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a - t), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, -1.7e-38], t$95$2, If[LessEqual[z, 2.55e-135], N[(x + N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 750000000.0], N[(t$95$1 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{x}{1 - z} + \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+143}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{+86}:\\
\;\;\;\;\frac{\frac{x}{\frac{z}{y}} - \left(a - t\right)}{b}\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-38}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 2.55 \cdot 10^{-135}:\\
\;\;\;\;x + \frac{t_1}{y}\\
\mathbf{elif}\;z \leq 750000000:\\
\;\;\;\;\frac{t_1}{y + z \cdot \left(b - y\right)}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -2.09999999999999988e143 or -2.2999999999999999e86 < z < -1.7000000000000001e-38 or 7.5e8 < z Initial program 43.5%
Taylor expanded in x around 0 43.5%
Taylor expanded in z around inf 83.0%
Taylor expanded in y around inf 86.2%
neg-mul-186.2%
unsub-neg86.2%
Simplified86.2%
if -2.09999999999999988e143 < z < -2.2999999999999999e86Initial program 83.0%
Taylor expanded in t around 0 83.0%
Taylor expanded in b around inf 83.6%
associate-+r+83.6%
mul-1-neg83.6%
sub-neg83.6%
associate-/l*91.6%
Simplified91.6%
if -1.7000000000000001e-38 < z < 2.5500000000000001e-135Initial program 83.7%
Taylor expanded in x around 0 83.8%
Taylor expanded in z around 0 88.1%
Taylor expanded in z around 0 79.6%
if 2.5500000000000001e-135 < z < 7.5e8Initial program 96.7%
Taylor expanded in x around 0 75.0%
Final simplification82.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))) (t_2 (+ (/ x (- 1.0 z)) t_1)))
(if (<= z -1.15e+143)
t_2
(if (<= z -2.6e+86)
(/ (- (/ x (/ z y)) (- a t)) b)
(if (<= z -35000000.0)
t_1
(if (<= z 140000.0)
(- x (/ (* z (- a t)) (+ y (* z (- b y)))))
t_2))))))
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 / (1.0 - z)) + t_1;
double tmp;
if (z <= -1.15e+143) {
tmp = t_2;
} else if (z <= -2.6e+86) {
tmp = ((x / (z / y)) - (a - t)) / b;
} else if (z <= -35000000.0) {
tmp = t_1;
} else if (z <= 140000.0) {
tmp = x - ((z * (a - t)) / (y + (z * (b - y))));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (t - a) / (b - y)
t_2 = (x / (1.0d0 - z)) + t_1
if (z <= (-1.15d+143)) then
tmp = t_2
else if (z <= (-2.6d+86)) then
tmp = ((x / (z / y)) - (a - t)) / b
else if (z <= (-35000000.0d0)) then
tmp = t_1
else if (z <= 140000.0d0) then
tmp = x - ((z * (a - t)) / (y + (z * (b - y))))
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 = (t - a) / (b - y);
double t_2 = (x / (1.0 - z)) + t_1;
double tmp;
if (z <= -1.15e+143) {
tmp = t_2;
} else if (z <= -2.6e+86) {
tmp = ((x / (z / y)) - (a - t)) / b;
} else if (z <= -35000000.0) {
tmp = t_1;
} else if (z <= 140000.0) {
tmp = x - ((z * (a - t)) / (y + (z * (b - y))));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) t_2 = (x / (1.0 - z)) + t_1 tmp = 0 if z <= -1.15e+143: tmp = t_2 elif z <= -2.6e+86: tmp = ((x / (z / y)) - (a - t)) / b elif z <= -35000000.0: tmp = t_1 elif z <= 140000.0: tmp = x - ((z * (a - t)) / (y + (z * (b - y)))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) t_2 = Float64(Float64(x / Float64(1.0 - z)) + t_1) tmp = 0.0 if (z <= -1.15e+143) tmp = t_2; elseif (z <= -2.6e+86) tmp = Float64(Float64(Float64(x / Float64(z / y)) - Float64(a - t)) / b); elseif (z <= -35000000.0) tmp = t_1; elseif (z <= 140000.0) tmp = Float64(x - Float64(Float64(z * Float64(a - t)) / Float64(y + Float64(z * Float64(b - y))))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); t_2 = (x / (1.0 - z)) + t_1; tmp = 0.0; if (z <= -1.15e+143) tmp = t_2; elseif (z <= -2.6e+86) tmp = ((x / (z / y)) - (a - t)) / b; elseif (z <= -35000000.0) tmp = t_1; elseif (z <= 140000.0) tmp = x - ((z * (a - t)) / (y + (z * (b - y)))); else tmp = t_2; 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[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[z, -1.15e+143], t$95$2, If[LessEqual[z, -2.6e+86], N[(N[(N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a - t), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, -35000000.0], t$95$1, If[LessEqual[z, 140000.0], N[(x - N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := \frac{x}{1 - z} + t_1\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{+143}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{+86}:\\
\;\;\;\;\frac{\frac{x}{\frac{z}{y}} - \left(a - t\right)}{b}\\
\mathbf{elif}\;z \leq -35000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 140000:\\
\;\;\;\;x - \frac{z \cdot \left(a - t\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.15e143 or 1.4e5 < z Initial program 37.0%
Taylor expanded in x around 0 37.0%
Taylor expanded in z around inf 81.8%
Taylor expanded in y around inf 87.8%
neg-mul-187.8%
unsub-neg87.8%
Simplified87.8%
if -1.15e143 < z < -2.5999999999999998e86Initial program 83.0%
Taylor expanded in t around 0 83.0%
Taylor expanded in b around inf 83.6%
associate-+r+83.6%
mul-1-neg83.6%
sub-neg83.6%
associate-/l*91.6%
Simplified91.6%
if -2.5999999999999998e86 < z < -3.5e7Initial program 58.4%
Taylor expanded in z around inf 92.7%
if -3.5e7 < z < 1.4e5Initial program 87.2%
Taylor expanded in x around 0 87.2%
Taylor expanded in z around 0 84.1%
Final simplification86.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a))) (t_2 (/ (- t a) (- b y))))
(if (<= z -2.25e-13)
t_2
(if (<= z 1.4e-133)
(+ x (/ t_1 y))
(if (<= z 3.8e-47)
(/ (+ t (- (* y (/ x z)) a)) b)
(if (<= z 7e+18) (+ x (/ t_1 (* y (- 1.0 z)))) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -2.25e-13) {
tmp = t_2;
} else if (z <= 1.4e-133) {
tmp = x + (t_1 / y);
} else if (z <= 3.8e-47) {
tmp = (t + ((y * (x / z)) - a)) / b;
} else if (z <= 7e+18) {
tmp = x + (t_1 / (y * (1.0 - z)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z * (t - a)
t_2 = (t - a) / (b - y)
if (z <= (-2.25d-13)) then
tmp = t_2
else if (z <= 1.4d-133) then
tmp = x + (t_1 / y)
else if (z <= 3.8d-47) then
tmp = (t + ((y * (x / z)) - a)) / b
else if (z <= 7d+18) then
tmp = x + (t_1 / (y * (1.0d0 - z)))
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 = z * (t - a);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -2.25e-13) {
tmp = t_2;
} else if (z <= 1.4e-133) {
tmp = x + (t_1 / y);
} else if (z <= 3.8e-47) {
tmp = (t + ((y * (x / z)) - a)) / b;
} else if (z <= 7e+18) {
tmp = x + (t_1 / (y * (1.0 - z)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = (t - a) / (b - y) tmp = 0 if z <= -2.25e-13: tmp = t_2 elif z <= 1.4e-133: tmp = x + (t_1 / y) elif z <= 3.8e-47: tmp = (t + ((y * (x / z)) - a)) / b elif z <= 7e+18: tmp = x + (t_1 / (y * (1.0 - z))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.25e-13) tmp = t_2; elseif (z <= 1.4e-133) tmp = Float64(x + Float64(t_1 / y)); elseif (z <= 3.8e-47) tmp = Float64(Float64(t + Float64(Float64(y * Float64(x / z)) - a)) / b); elseif (z <= 7e+18) tmp = Float64(x + Float64(t_1 / Float64(y * Float64(1.0 - z)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -2.25e-13) tmp = t_2; elseif (z <= 1.4e-133) tmp = x + (t_1 / y); elseif (z <= 3.8e-47) tmp = (t + ((y * (x / z)) - a)) / b; elseif (z <= 7e+18) tmp = x + (t_1 / (y * (1.0 - z))); else tmp = t_2; 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[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.25e-13], t$95$2, If[LessEqual[z, 1.4e-133], N[(x + N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e-47], N[(N[(t + N[(N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 7e+18], N[(x + N[(t$95$1 / N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.25 \cdot 10^{-13}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-133}:\\
\;\;\;\;x + \frac{t_1}{y}\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-47}:\\
\;\;\;\;\frac{t + \left(y \cdot \frac{x}{z} - a\right)}{b}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+18}:\\
\;\;\;\;x + \frac{t_1}{y \cdot \left(1 - z\right)}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -2.25e-13 or 7e18 < z Initial program 45.2%
Taylor expanded in z around inf 80.6%
if -2.25e-13 < z < 1.3999999999999999e-133Initial program 83.9%
Taylor expanded in x around 0 83.9%
Taylor expanded in z around 0 88.1%
Taylor expanded in z around 0 78.2%
if 1.3999999999999999e-133 < z < 3.80000000000000015e-47Initial program 94.8%
Taylor expanded in x around 0 94.8%
Taylor expanded in z around inf 83.1%
times-frac72.9%
Simplified72.9%
Taylor expanded in b around inf 72.4%
associate--l+72.4%
associate-*l/72.4%
*-commutative72.4%
Simplified72.4%
if 3.80000000000000015e-47 < z < 7e18Initial program 92.9%
Taylor expanded in x around 0 92.9%
Taylor expanded in z around 0 70.6%
Taylor expanded in y around inf 59.6%
neg-mul-159.6%
unsub-neg59.6%
Simplified59.6%
Final simplification77.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) b)) (t_2 (/ (- a) (- b y))))
(if (<= z -9e+149)
t_2
(if (<= z -4.6e-67)
t_1
(if (<= z 1.4e-133)
x
(if (<= z 6.2e+135) t_1 (if (<= z 3e+240) (/ t (- b y)) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / b;
double t_2 = -a / (b - y);
double tmp;
if (z <= -9e+149) {
tmp = t_2;
} else if (z <= -4.6e-67) {
tmp = t_1;
} else if (z <= 1.4e-133) {
tmp = x;
} else if (z <= 6.2e+135) {
tmp = t_1;
} else if (z <= 3e+240) {
tmp = t / (b - y);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (t - a) / b
t_2 = -a / (b - y)
if (z <= (-9d+149)) then
tmp = t_2
else if (z <= (-4.6d-67)) then
tmp = t_1
else if (z <= 1.4d-133) then
tmp = x
else if (z <= 6.2d+135) then
tmp = t_1
else if (z <= 3d+240) then
tmp = t / (b - y)
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 = (t - a) / b;
double t_2 = -a / (b - y);
double tmp;
if (z <= -9e+149) {
tmp = t_2;
} else if (z <= -4.6e-67) {
tmp = t_1;
} else if (z <= 1.4e-133) {
tmp = x;
} else if (z <= 6.2e+135) {
tmp = t_1;
} else if (z <= 3e+240) {
tmp = t / (b - y);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / b t_2 = -a / (b - y) tmp = 0 if z <= -9e+149: tmp = t_2 elif z <= -4.6e-67: tmp = t_1 elif z <= 1.4e-133: tmp = x elif z <= 6.2e+135: tmp = t_1 elif z <= 3e+240: tmp = t / (b - y) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / b) t_2 = Float64(Float64(-a) / Float64(b - y)) tmp = 0.0 if (z <= -9e+149) tmp = t_2; elseif (z <= -4.6e-67) tmp = t_1; elseif (z <= 1.4e-133) tmp = x; elseif (z <= 6.2e+135) tmp = t_1; elseif (z <= 3e+240) tmp = Float64(t / Float64(b - y)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / b; t_2 = -a / (b - y); tmp = 0.0; if (z <= -9e+149) tmp = t_2; elseif (z <= -4.6e-67) tmp = t_1; elseif (z <= 1.4e-133) tmp = x; elseif (z <= 6.2e+135) tmp = t_1; elseif (z <= 3e+240) tmp = t / (b - y); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]}, Block[{t$95$2 = N[((-a) / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e+149], t$95$2, If[LessEqual[z, -4.6e-67], t$95$1, If[LessEqual[z, 1.4e-133], x, If[LessEqual[z, 6.2e+135], t$95$1, If[LessEqual[z, 3e+240], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b}\\
t_2 := \frac{-a}{b - y}\\
\mathbf{if}\;z \leq -9 \cdot 10^{+149}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{-67}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-133}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+135}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+240}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -8.99999999999999965e149 or 2.9999999999999999e240 < z Initial program 26.0%
Taylor expanded in x around 0 26.0%
Taylor expanded in z around inf 84.0%
div-inv84.0%
*-commutative84.0%
+-commutative84.0%
fma-def84.0%
Applied egg-rr84.0%
Taylor expanded in a around inf 64.9%
associate-*r/64.9%
mul-1-neg64.9%
Simplified64.9%
if -8.99999999999999965e149 < z < -4.6000000000000001e-67 or 1.3999999999999999e-133 < z < 6.20000000000000044e135Initial program 78.4%
Taylor expanded in y around 0 50.0%
if -4.6000000000000001e-67 < z < 1.3999999999999999e-133Initial program 83.0%
Taylor expanded in z around 0 59.3%
if 6.20000000000000044e135 < z < 2.9999999999999999e240Initial program 40.7%
Taylor expanded in x around 0 40.7%
Taylor expanded in z around inf 87.0%
div-inv87.0%
*-commutative87.0%
+-commutative87.0%
fma-def87.0%
Applied egg-rr87.0%
Taylor expanded in t around inf 59.3%
Final simplification56.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ z (/ y (- t a))))) (t_2 (/ (- t a) (- b y))))
(if (<= z -9.2e-21)
t_2
(if (<= z 6.1e-103)
t_1
(if (<= z 1.55e-38) (/ (- t a) b) (if (<= z 2e-10) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z / (y / (t - a)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -9.2e-21) {
tmp = t_2;
} else if (z <= 6.1e-103) {
tmp = t_1;
} else if (z <= 1.55e-38) {
tmp = (t - a) / b;
} else if (z <= 2e-10) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (z / (y / (t - a)))
t_2 = (t - a) / (b - y)
if (z <= (-9.2d-21)) then
tmp = t_2
else if (z <= 6.1d-103) then
tmp = t_1
else if (z <= 1.55d-38) then
tmp = (t - a) / b
else if (z <= 2d-10) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z / (y / (t - a)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -9.2e-21) {
tmp = t_2;
} else if (z <= 6.1e-103) {
tmp = t_1;
} else if (z <= 1.55e-38) {
tmp = (t - a) / b;
} else if (z <= 2e-10) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z / (y / (t - a))) t_2 = (t - a) / (b - y) tmp = 0 if z <= -9.2e-21: tmp = t_2 elif z <= 6.1e-103: tmp = t_1 elif z <= 1.55e-38: tmp = (t - a) / b elif z <= 2e-10: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z / Float64(y / Float64(t - a)))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -9.2e-21) tmp = t_2; elseif (z <= 6.1e-103) tmp = t_1; elseif (z <= 1.55e-38) tmp = Float64(Float64(t - a) / b); elseif (z <= 2e-10) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (z / (y / (t - a))); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -9.2e-21) tmp = t_2; elseif (z <= 6.1e-103) tmp = t_1; elseif (z <= 1.55e-38) tmp = (t - a) / b; elseif (z <= 2e-10) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z / N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.2e-21], t$95$2, If[LessEqual[z, 6.1e-103], t$95$1, If[LessEqual[z, 1.55e-38], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 2e-10], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z}{\frac{y}{t - a}}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -9.2 \cdot 10^{-21}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 6.1 \cdot 10^{-103}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-38}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-10}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -9.19999999999999998e-21 or 2.00000000000000007e-10 < z Initial program 46.6%
Taylor expanded in z around inf 79.1%
if -9.19999999999999998e-21 < z < 6.1000000000000001e-103 or 1.54999999999999991e-38 < z < 2.00000000000000007e-10Initial program 86.2%
Taylor expanded in x around 0 86.2%
Taylor expanded in z around 0 85.3%
Taylor expanded in z around 0 75.3%
associate-/l*69.4%
Simplified69.4%
if 6.1000000000000001e-103 < z < 1.54999999999999991e-38Initial program 91.4%
Taylor expanded in y around 0 83.0%
Final simplification74.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -8.6e-13)
t_1
(if (<= z 6.1e-103)
(+ x (/ (* z (- t a)) y))
(if (<= z 2.8e-47)
(/ (- t a) b)
(if (<= z 2.9e-8) (+ x (/ z (/ y (- t a)))) 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 <= -8.6e-13) {
tmp = t_1;
} else if (z <= 6.1e-103) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 2.8e-47) {
tmp = (t - a) / b;
} else if (z <= 2.9e-8) {
tmp = x + (z / (y / (t - a)));
} 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 <= (-8.6d-13)) then
tmp = t_1
else if (z <= 6.1d-103) then
tmp = x + ((z * (t - a)) / y)
else if (z <= 2.8d-47) then
tmp = (t - a) / b
else if (z <= 2.9d-8) then
tmp = x + (z / (y / (t - a)))
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 <= -8.6e-13) {
tmp = t_1;
} else if (z <= 6.1e-103) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 2.8e-47) {
tmp = (t - a) / b;
} else if (z <= 2.9e-8) {
tmp = x + (z / (y / (t - a)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -8.6e-13: tmp = t_1 elif z <= 6.1e-103: tmp = x + ((z * (t - a)) / y) elif z <= 2.8e-47: tmp = (t - a) / b elif z <= 2.9e-8: tmp = x + (z / (y / (t - a))) 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 <= -8.6e-13) tmp = t_1; elseif (z <= 6.1e-103) tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); elseif (z <= 2.8e-47) tmp = Float64(Float64(t - a) / b); elseif (z <= 2.9e-8) tmp = Float64(x + Float64(z / Float64(y / Float64(t - a)))); 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 <= -8.6e-13) tmp = t_1; elseif (z <= 6.1e-103) tmp = x + ((z * (t - a)) / y); elseif (z <= 2.8e-47) tmp = (t - a) / b; elseif (z <= 2.9e-8) tmp = x + (z / (y / (t - a))); 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, -8.6e-13], t$95$1, If[LessEqual[z, 6.1e-103], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e-47], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 2.9e-8], N[(x + N[(z / N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -8.6 \cdot 10^{-13}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 6.1 \cdot 10^{-103}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-47}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-8}:\\
\;\;\;\;x + \frac{z}{\frac{y}{t - a}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -8.5999999999999997e-13 or 2.9000000000000002e-8 < z Initial program 46.6%
Taylor expanded in z around inf 79.1%
if -8.5999999999999997e-13 < z < 6.1000000000000001e-103Initial program 85.0%
Taylor expanded in x around 0 85.0%
Taylor expanded in z around 0 86.2%
Taylor expanded in z around 0 76.0%
if 6.1000000000000001e-103 < z < 2.79999999999999993e-47Initial program 91.4%
Taylor expanded in y around 0 83.0%
if 2.79999999999999993e-47 < z < 2.9000000000000002e-8Initial program 99.1%
Taylor expanded in x around 0 99.1%
Taylor expanded in z around 0 76.4%
Taylor expanded in z around 0 67.4%
associate-/l*67.8%
Simplified67.8%
Final simplification77.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -3.7e-19)
t_1
(if (<= z 1.4e-133)
(+ x (/ (* z (- t a)) y))
(if (<= z 4.3e-41)
(/ (+ t (- (* y (/ x z)) a)) b)
(if (<= z 5e-11) (+ x (/ z (/ y (- t a)))) 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 <= -3.7e-19) {
tmp = t_1;
} else if (z <= 1.4e-133) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 4.3e-41) {
tmp = (t + ((y * (x / z)) - a)) / b;
} else if (z <= 5e-11) {
tmp = x + (z / (y / (t - a)));
} 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 <= (-3.7d-19)) then
tmp = t_1
else if (z <= 1.4d-133) then
tmp = x + ((z * (t - a)) / y)
else if (z <= 4.3d-41) then
tmp = (t + ((y * (x / z)) - a)) / b
else if (z <= 5d-11) then
tmp = x + (z / (y / (t - a)))
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 <= -3.7e-19) {
tmp = t_1;
} else if (z <= 1.4e-133) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 4.3e-41) {
tmp = (t + ((y * (x / z)) - a)) / b;
} else if (z <= 5e-11) {
tmp = x + (z / (y / (t - a)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -3.7e-19: tmp = t_1 elif z <= 1.4e-133: tmp = x + ((z * (t - a)) / y) elif z <= 4.3e-41: tmp = (t + ((y * (x / z)) - a)) / b elif z <= 5e-11: tmp = x + (z / (y / (t - a))) 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 <= -3.7e-19) tmp = t_1; elseif (z <= 1.4e-133) tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); elseif (z <= 4.3e-41) tmp = Float64(Float64(t + Float64(Float64(y * Float64(x / z)) - a)) / b); elseif (z <= 5e-11) tmp = Float64(x + Float64(z / Float64(y / Float64(t - a)))); 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 <= -3.7e-19) tmp = t_1; elseif (z <= 1.4e-133) tmp = x + ((z * (t - a)) / y); elseif (z <= 4.3e-41) tmp = (t + ((y * (x / z)) - a)) / b; elseif (z <= 5e-11) tmp = x + (z / (y / (t - a))); 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, -3.7e-19], t$95$1, If[LessEqual[z, 1.4e-133], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.3e-41], N[(N[(t + N[(N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 5e-11], N[(x + N[(z / N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3.7 \cdot 10^{-19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-133}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{-41}:\\
\;\;\;\;\frac{t + \left(y \cdot \frac{x}{z} - a\right)}{b}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-11}:\\
\;\;\;\;x + \frac{z}{\frac{y}{t - a}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.70000000000000005e-19 or 5.00000000000000018e-11 < z Initial program 46.6%
Taylor expanded in z around inf 79.1%
if -3.70000000000000005e-19 < z < 1.3999999999999999e-133Initial program 83.9%
Taylor expanded in x around 0 83.9%
Taylor expanded in z around 0 88.1%
Taylor expanded in z around 0 78.2%
if 1.3999999999999999e-133 < z < 4.2999999999999999e-41Initial program 94.8%
Taylor expanded in x around 0 94.8%
Taylor expanded in z around inf 83.1%
times-frac72.9%
Simplified72.9%
Taylor expanded in b around inf 72.4%
associate--l+72.4%
associate-*l/72.4%
*-commutative72.4%
Simplified72.4%
if 4.2999999999999999e-41 < z < 5.00000000000000018e-11Initial program 99.1%
Taylor expanded in x around 0 99.1%
Taylor expanded in z around 0 76.4%
Taylor expanded in z around 0 67.4%
associate-/l*67.8%
Simplified67.8%
Final simplification77.8%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= y -1.45e+83)
(and (not (<= y -9.5e+16)) (or (<= y -1.2e-31) (not (<= y 9.2e-26)))))
(/ x (- 1.0 z))
(/ (- t a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.45e+83) || (!(y <= -9.5e+16) && ((y <= -1.2e-31) || !(y <= 9.2e-26)))) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.45d+83)) .or. (.not. (y <= (-9.5d+16))) .and. (y <= (-1.2d-31)) .or. (.not. (y <= 9.2d-26))) then
tmp = x / (1.0d0 - z)
else
tmp = (t - a) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.45e+83) || (!(y <= -9.5e+16) && ((y <= -1.2e-31) || !(y <= 9.2e-26)))) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.45e+83) or (not (y <= -9.5e+16) and ((y <= -1.2e-31) or not (y <= 9.2e-26))): tmp = x / (1.0 - z) else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.45e+83) || (!(y <= -9.5e+16) && ((y <= -1.2e-31) || !(y <= 9.2e-26)))) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.45e+83) || (~((y <= -9.5e+16)) && ((y <= -1.2e-31) || ~((y <= 9.2e-26))))) tmp = x / (1.0 - z); else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.45e+83], And[N[Not[LessEqual[y, -9.5e+16]], $MachinePrecision], Or[LessEqual[y, -1.2e-31], N[Not[LessEqual[y, 9.2e-26]], $MachinePrecision]]]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+83} \lor \neg \left(y \leq -9.5 \cdot 10^{+16}\right) \land \left(y \leq -1.2 \cdot 10^{-31} \lor \neg \left(y \leq 9.2 \cdot 10^{-26}\right)\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -1.45e83 or -9.5e16 < y < -1.2e-31 or 9.20000000000000035e-26 < y Initial program 58.4%
Taylor expanded in y around inf 50.5%
mul-1-neg50.5%
unsub-neg50.5%
Simplified50.5%
if -1.45e83 < y < -9.5e16 or -1.2e-31 < y < 9.20000000000000035e-26Initial program 74.8%
Taylor expanded in y around 0 60.2%
Final simplification55.4%
(FPCore (x y z t a b) :precision binary64 (if (<= z -8.6e+182) (/ a y) (if (or (<= z -1.8e-56) (not (<= z 2.6e-119))) (/ t b) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -8.6e+182) {
tmp = a / y;
} else if ((z <= -1.8e-56) || !(z <= 2.6e-119)) {
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 <= (-8.6d+182)) then
tmp = a / y
else if ((z <= (-1.8d-56)) .or. (.not. (z <= 2.6d-119))) 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 <= -8.6e+182) {
tmp = a / y;
} else if ((z <= -1.8e-56) || !(z <= 2.6e-119)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -8.6e+182: tmp = a / y elif (z <= -1.8e-56) or not (z <= 2.6e-119): tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -8.6e+182) tmp = Float64(a / y); elseif ((z <= -1.8e-56) || !(z <= 2.6e-119)) 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 <= -8.6e+182) tmp = a / y; elseif ((z <= -1.8e-56) || ~((z <= 2.6e-119))) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -8.6e+182], N[(a / y), $MachinePrecision], If[Or[LessEqual[z, -1.8e-56], N[Not[LessEqual[z, 2.6e-119]], $MachinePrecision]], N[(t / b), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.6 \cdot 10^{+182}:\\
\;\;\;\;\frac{a}{y}\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-56} \lor \neg \left(z \leq 2.6 \cdot 10^{-119}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -8.6000000000000003e182Initial program 24.6%
Taylor expanded in x around 0 24.6%
Taylor expanded in y around inf 21.6%
times-frac43.7%
neg-mul-143.7%
unsub-neg43.7%
Simplified43.7%
Taylor expanded in t around 0 28.6%
associate-*r/28.6%
neg-mul-128.6%
Simplified28.6%
Taylor expanded in z around inf 36.8%
if -8.6000000000000003e182 < z < -1.79999999999999989e-56 or 2.60000000000000012e-119 < z Initial program 63.2%
Taylor expanded in y around 0 49.3%
Taylor expanded in t around inf 32.3%
if -1.79999999999999989e-56 < z < 2.60000000000000012e-119Initial program 83.6%
Taylor expanded in z around 0 58.3%
Final simplification42.1%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.1e+168) (/ (- a) b) (if (or (<= z -1e-54) (not (<= z 2.8e-119))) (/ t b) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.1e+168) {
tmp = -a / b;
} else if ((z <= -1e-54) || !(z <= 2.8e-119)) {
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 <= (-1.1d+168)) then
tmp = -a / b
else if ((z <= (-1d-54)) .or. (.not. (z <= 2.8d-119))) 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 <= -1.1e+168) {
tmp = -a / b;
} else if ((z <= -1e-54) || !(z <= 2.8e-119)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.1e+168: tmp = -a / b elif (z <= -1e-54) or not (z <= 2.8e-119): tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.1e+168) tmp = Float64(Float64(-a) / b); elseif ((z <= -1e-54) || !(z <= 2.8e-119)) 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 <= -1.1e+168) tmp = -a / b; elseif ((z <= -1e-54) || ~((z <= 2.8e-119))) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.1e+168], N[((-a) / b), $MachinePrecision], If[Or[LessEqual[z, -1e-54], N[Not[LessEqual[z, 2.8e-119]], $MachinePrecision]], N[(t / b), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+168}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;z \leq -1 \cdot 10^{-54} \lor \neg \left(z \leq 2.8 \cdot 10^{-119}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.1000000000000001e168Initial program 26.5%
Taylor expanded in y around 0 47.8%
Taylor expanded in t around 0 39.6%
mul-1-neg39.6%
Simplified39.6%
if -1.1000000000000001e168 < z < -1e-54 or 2.8e-119 < z Initial program 64.5%
Taylor expanded in y around 0 48.5%
Taylor expanded in t around inf 33.6%
if -1e-54 < z < 2.8e-119Initial program 83.6%
Taylor expanded in z around 0 58.3%
Final simplification43.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.9e-57) (not (<= z 1.4e-133))) (/ (- t a) (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.9e-57) || !(z <= 1.4e-133)) {
tmp = (t - a) / (b - y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-3.9d-57)) .or. (.not. (z <= 1.4d-133))) then
tmp = (t - a) / (b - y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.9e-57) || !(z <= 1.4e-133)) {
tmp = (t - a) / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.9e-57) or not (z <= 1.4e-133): tmp = (t - a) / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.9e-57) || !(z <= 1.4e-133)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.9e-57) || ~((z <= 1.4e-133))) tmp = (t - a) / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.9e-57], N[Not[LessEqual[z, 1.4e-133]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{-57} \lor \neg \left(z \leq 1.4 \cdot 10^{-133}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.90000000000000006e-57 or 1.3999999999999999e-133 < z Initial program 57.9%
Taylor expanded in z around inf 71.8%
if -3.90000000000000006e-57 < z < 1.3999999999999999e-133Initial program 83.0%
Taylor expanded in z around 0 59.3%
Final simplification67.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.15e-58) (not (<= z 7.5e-124))) (/ t (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.15e-58) || !(z <= 7.5e-124)) {
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 <= (-3.15d-58)) .or. (.not. (z <= 7.5d-124))) 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 <= -3.15e-58) || !(z <= 7.5e-124)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.15e-58) or not (z <= 7.5e-124): tmp = t / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.15e-58) || !(z <= 7.5e-124)) 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 <= -3.15e-58) || ~((z <= 7.5e-124))) tmp = t / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.15e-58], N[Not[LessEqual[z, 7.5e-124]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.15 \cdot 10^{-58} \lor \neg \left(z \leq 7.5 \cdot 10^{-124}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.14999999999999999e-58 or 7.4999999999999996e-124 < z Initial program 57.1%
Taylor expanded in x around 0 57.1%
Taylor expanded in z around inf 79.9%
div-inv79.8%
*-commutative79.8%
+-commutative79.8%
fma-def79.8%
Applied egg-rr79.8%
Taylor expanded in t around inf 39.4%
if -3.14999999999999999e-58 < z < 7.4999999999999996e-124Initial program 83.6%
Taylor expanded in z around 0 58.3%
Final simplification46.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.7e+38) (not (<= z 6600.0))) (/ a y) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.7e+38) || !(z <= 6600.0)) {
tmp = a / 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 <= (-2.7d+38)) .or. (.not. (z <= 6600.0d0))) then
tmp = a / 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 <= -2.7e+38) || !(z <= 6600.0)) {
tmp = a / y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.7e+38) or not (z <= 6600.0): tmp = a / y else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.7e+38) || !(z <= 6600.0)) tmp = Float64(a / y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.7e+38) || ~((z <= 6600.0))) tmp = a / y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.7e+38], N[Not[LessEqual[z, 6600.0]], $MachinePrecision]], N[(a / y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+38} \lor \neg \left(z \leq 6600\right):\\
\;\;\;\;\frac{a}{y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.69999999999999996e38 or 6600 < z Initial program 42.8%
Taylor expanded in x around 0 36.2%
Taylor expanded in y around inf 21.7%
times-frac34.6%
neg-mul-134.6%
unsub-neg34.6%
Simplified34.6%
Taylor expanded in t around 0 19.9%
associate-*r/19.9%
neg-mul-119.9%
Simplified19.9%
Taylor expanded in z around inf 22.1%
if -2.69999999999999996e38 < z < 6600Initial program 86.4%
Taylor expanded in z around 0 43.0%
Final simplification33.5%
(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 66.6%
Taylor expanded in z around 0 24.9%
Final simplification24.9%
(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 2024014
(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)))))