
(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 (fma z (- b y) y))
(t_2 (/ (- t a) (- b y)))
(t_3 (* z (- t a)))
(t_4 (/ (+ (* x y) t_3) (+ y (* z (- b y)))))
(t_5 (pow (- b y) 2.0)))
(if (<= t_4 (- INFINITY))
(- (/ (- a t) y) (/ x (+ z -1.0)))
(if (<= t_4 -4e-243)
(/ 1.0 (/ t_1 (fma z (- t a) (* x y))))
(if (<= t_4 0.0)
(+ t_2 (/ (+ (/ y (/ t_5 (- a t))) (/ (* x y) (- b y))) z))
(if (<= t_4 2e+306)
(/ (fma x y t_3) t_1)
(if (<= t_4 INFINITY)
(/ z (- (/ (* z b) (- t a)) (/ y (/ (- t a) (+ z -1.0)))))
(+ (/ (- (/ x (/ (- b y) y)) (/ y (/ t_5 (- t a)))) z) t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(z, (b - y), y);
double t_2 = (t - a) / (b - y);
double t_3 = z * (t - a);
double t_4 = ((x * y) + t_3) / (y + (z * (b - y)));
double t_5 = pow((b - y), 2.0);
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else if (t_4 <= -4e-243) {
tmp = 1.0 / (t_1 / fma(z, (t - a), (x * y)));
} else if (t_4 <= 0.0) {
tmp = t_2 + (((y / (t_5 / (a - t))) + ((x * y) / (b - y))) / z);
} else if (t_4 <= 2e+306) {
tmp = fma(x, y, t_3) / t_1;
} else if (t_4 <= ((double) INFINITY)) {
tmp = z / (((z * b) / (t - a)) - (y / ((t - a) / (z + -1.0))));
} else {
tmp = (((x / ((b - y) / y)) - (y / (t_5 / (t - a)))) / z) + t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(z, Float64(b - y), 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) / Float64(y + Float64(z * Float64(b - y)))) t_5 = Float64(b - y) ^ 2.0 tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))); elseif (t_4 <= -4e-243) tmp = Float64(1.0 / Float64(t_1 / fma(z, Float64(t - a), Float64(x * y)))); elseif (t_4 <= 0.0) tmp = Float64(t_2 + Float64(Float64(Float64(y / Float64(t_5 / Float64(a - t))) + Float64(Float64(x * y) / Float64(b - y))) / z)); elseif (t_4 <= 2e+306) tmp = Float64(fma(x, y, t_3) / t_1); elseif (t_4 <= Inf) tmp = Float64(z / Float64(Float64(Float64(z * b) / Float64(t - a)) - Float64(y / Float64(Float64(t - a) / Float64(z + -1.0))))); else tmp = Float64(Float64(Float64(Float64(x / Float64(Float64(b - y) / y)) - Float64(y / Float64(t_5 / Float64(t - a)))) / z) + t_2); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(b - y), $MachinePrecision] + y), $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] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, -4e-243], N[(1.0 / N[(t$95$1 / N[(z * N[(t - a), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[(t$95$2 + N[(N[(N[(y / N[(t$95$5 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 2e+306], N[(N[(x * y + t$95$3), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(z / N[(N[(N[(z * b), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] - N[(y / N[(N[(t - a), $MachinePrecision] / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x / N[(N[(b - y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] - N[(y / N[(t$95$5 / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + t$95$2), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, b - y, 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}{y + z \cdot \left(b - y\right)}\\
t_5 := {\left(b - y\right)}^{2}\\
\mathbf{if}\;t_4 \leq -\infty:\\
\;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{elif}\;t_4 \leq -4 \cdot 10^{-243}:\\
\;\;\;\;\frac{1}{\frac{t_1}{\mathsf{fma}\left(z, t - a, x \cdot y\right)}}\\
\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;t_2 + \frac{\frac{y}{\frac{t_5}{a - t}} + \frac{x \cdot y}{b - y}}{z}\\
\mathbf{elif}\;t_4 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t_3\right)}{t_1}\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;\frac{z}{\frac{z \cdot b}{t - a} - \frac{y}{\frac{t - a}{z + -1}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{\frac{b - y}{y}} - \frac{y}{\frac{t_5}{t - a}}}{z} + 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.0Initial program 34.0%
Taylor expanded in y around -inf 53.0%
mul-1-neg53.0%
unsub-neg53.0%
associate-*r/53.0%
neg-mul-153.0%
sub-neg53.0%
metadata-eval53.0%
Simplified63.1%
Taylor expanded in z around inf 86.5%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -3.99999999999999998e-243Initial program 99.4%
fma-def99.4%
clear-num99.4%
inv-pow99.4%
+-commutative99.4%
fma-udef99.4%
Applied egg-rr99.4%
unpow-199.4%
fma-def99.4%
+-commutative99.4%
fma-def99.4%
*-commutative99.4%
Simplified99.4%
if -3.99999999999999998e-243 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 33.9%
sub-neg33.9%
distribute-lft-in33.9%
Applied egg-rr33.9%
Taylor expanded in z around -inf 75.0%
mul-1-neg75.0%
unsub-neg75.0%
associate-*r/75.0%
mul-1-neg75.0%
mul-1-neg75.0%
unsub-neg75.0%
Simplified95.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.0%
fma-def99.0%
+-commutative99.0%
fma-def99.0%
Simplified99.0%
if 2.00000000000000003e306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 42.9%
Taylor expanded in x around 0 41.5%
associate-/l*64.9%
+-commutative64.9%
fma-def64.9%
Simplified64.9%
Taylor expanded in y around -inf 64.9%
+-commutative64.9%
mul-1-neg64.9%
unsub-neg64.9%
*-commutative64.9%
associate-/l*64.9%
sub-neg64.9%
metadata-eval64.9%
Simplified64.9%
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 11.1%
associate--l+11.1%
mul-1-neg11.1%
distribute-lft-out--11.1%
associate-/l*18.1%
associate-/l*99.9%
div-sub99.9%
Simplified99.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 (* z (- t a)))
(t_4 (/ (+ (* x y) t_3) t_1))
(t_5 (pow (- b y) 2.0)))
(if (<= t_4 (- INFINITY))
(- (/ (- a t) y) (/ x (+ z -1.0)))
(if (<= t_4 -4e-243)
(/ (+ (* x y) (- (* z t) (* z a))) t_1)
(if (<= t_4 0.0)
(+ t_2 (/ (+ (/ y (/ t_5 (- a t))) (/ (* x y) (- b y))) z))
(if (<= t_4 2e+306)
(/ (fma x y t_3) (fma z (- b y) y))
(if (<= t_4 INFINITY)
(/ z (- (/ (* z b) (- t a)) (/ y (/ (- t a) (+ z -1.0)))))
(+ (/ (- (/ x (/ (- b y) y)) (/ y (/ t_5 (- t a)))) z) 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 = pow((b - y), 2.0);
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else if (t_4 <= -4e-243) {
tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
} else if (t_4 <= 0.0) {
tmp = t_2 + (((y / (t_5 / (a - t))) + ((x * y) / (b - y))) / z);
} else if (t_4 <= 2e+306) {
tmp = fma(x, y, t_3) / fma(z, (b - y), y);
} else if (t_4 <= ((double) INFINITY)) {
tmp = z / (((z * b) / (t - a)) - (y / ((t - a) / (z + -1.0))));
} else {
tmp = (((x / ((b - y) / y)) - (y / (t_5 / (t - a)))) / z) + 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(b - y) ^ 2.0 tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))); elseif (t_4 <= -4e-243) 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(y / Float64(t_5 / Float64(a - t))) + Float64(Float64(x * y) / Float64(b - y))) / z)); elseif (t_4 <= 2e+306) tmp = Float64(fma(x, y, t_3) / fma(z, Float64(b - y), y)); elseif (t_4 <= Inf) tmp = Float64(z / Float64(Float64(Float64(z * b) / Float64(t - a)) - Float64(y / Float64(Float64(t - a) / Float64(z + -1.0))))); else tmp = Float64(Float64(Float64(Float64(x / Float64(Float64(b - y) / y)) - Float64(y / Float64(t_5 / Float64(t - a)))) / z) + t_2); 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[(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[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, -4e-243], 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[(y / N[(t$95$5 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 2e+306], N[(N[(x * y + t$95$3), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(z / N[(N[(N[(z * b), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] - N[(y / N[(N[(t - a), $MachinePrecision] / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x / N[(N[(b - y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] - N[(y / N[(t$95$5 / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + t$95$2), $MachinePrecision]]]]]]]]]]]
\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 := {\left(b - y\right)}^{2}\\
\mathbf{if}\;t_4 \leq -\infty:\\
\;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{elif}\;t_4 \leq -4 \cdot 10^{-243}:\\
\;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{t_1}\\
\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;t_2 + \frac{\frac{y}{\frac{t_5}{a - t}} + \frac{x \cdot y}{b - y}}{z}\\
\mathbf{elif}\;t_4 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t_3\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;\frac{z}{\frac{z \cdot b}{t - a} - \frac{y}{\frac{t - a}{z + -1}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{\frac{b - y}{y}} - \frac{y}{\frac{t_5}{t - a}}}{z} + 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.0Initial program 34.0%
Taylor expanded in y around -inf 53.0%
mul-1-neg53.0%
unsub-neg53.0%
associate-*r/53.0%
neg-mul-153.0%
sub-neg53.0%
metadata-eval53.0%
Simplified63.1%
Taylor expanded in z around inf 86.5%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -3.99999999999999998e-243Initial program 99.4%
sub-neg99.4%
distribute-lft-in99.4%
Applied egg-rr99.4%
if -3.99999999999999998e-243 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 33.9%
sub-neg33.9%
distribute-lft-in33.9%
Applied egg-rr33.9%
Taylor expanded in z around -inf 75.0%
mul-1-neg75.0%
unsub-neg75.0%
associate-*r/75.0%
mul-1-neg75.0%
mul-1-neg75.0%
unsub-neg75.0%
Simplified95.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.0%
fma-def99.0%
+-commutative99.0%
fma-def99.0%
Simplified99.0%
if 2.00000000000000003e306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 42.9%
Taylor expanded in x around 0 41.5%
associate-/l*64.9%
+-commutative64.9%
fma-def64.9%
Simplified64.9%
Taylor expanded in y around -inf 64.9%
+-commutative64.9%
mul-1-neg64.9%
unsub-neg64.9%
*-commutative64.9%
associate-/l*64.9%
sub-neg64.9%
metadata-eval64.9%
Simplified64.9%
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 11.1%
associate--l+11.1%
mul-1-neg11.1%
distribute-lft-out--11.1%
associate-/l*18.1%
associate-/l*99.9%
div-sub99.9%
Simplified99.9%
Final simplification93.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (/ (+ (* x y) (* z (- t a))) t_1))
(t_3 (/ (- t a) (- b y)))
(t_4 (pow (- b y) 2.0)))
(if (<= t_2 (- INFINITY))
(- (/ (- a t) y) (/ x (+ z -1.0)))
(if (<= t_2 -4e-243)
(/ (+ (* x y) (- (* z t) (* z a))) t_1)
(if (<= t_2 0.0)
(+ t_3 (/ (+ (/ y (/ t_4 (- a t))) (/ (* x y) (- b y))) z))
(if (<= t_2 2e+306)
t_2
(if (<= t_2 INFINITY)
(/ z (- (/ (* z b) (- t a)) (/ y (/ (- t a) (+ z -1.0)))))
(+ (/ (- (/ x (/ (- b y) y)) (/ y (/ t_4 (- t a)))) z) t_3))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = ((x * y) + (z * (t - a))) / t_1;
double t_3 = (t - a) / (b - y);
double t_4 = pow((b - y), 2.0);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else if (t_2 <= -4e-243) {
tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
} else if (t_2 <= 0.0) {
tmp = t_3 + (((y / (t_4 / (a - t))) + ((x * y) / (b - y))) / z);
} else if (t_2 <= 2e+306) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = z / (((z * b) / (t - a)) - (y / ((t - a) / (z + -1.0))));
} else {
tmp = (((x / ((b - y) / y)) - (y / (t_4 / (t - a)))) / z) + t_3;
}
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 = ((x * y) + (z * (t - a))) / t_1;
double t_3 = (t - a) / (b - y);
double t_4 = Math.pow((b - y), 2.0);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else if (t_2 <= -4e-243) {
tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
} else if (t_2 <= 0.0) {
tmp = t_3 + (((y / (t_4 / (a - t))) + ((x * y) / (b - y))) / z);
} else if (t_2 <= 2e+306) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = z / (((z * b) / (t - a)) - (y / ((t - a) / (z + -1.0))));
} else {
tmp = (((x / ((b - y) / y)) - (y / (t_4 / (t - a)))) / z) + t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = ((x * y) + (z * (t - a))) / t_1 t_3 = (t - a) / (b - y) t_4 = math.pow((b - y), 2.0) tmp = 0 if t_2 <= -math.inf: tmp = ((a - t) / y) - (x / (z + -1.0)) elif t_2 <= -4e-243: tmp = ((x * y) + ((z * t) - (z * a))) / t_1 elif t_2 <= 0.0: tmp = t_3 + (((y / (t_4 / (a - t))) + ((x * y) / (b - y))) / z) elif t_2 <= 2e+306: tmp = t_2 elif t_2 <= math.inf: tmp = z / (((z * b) / (t - a)) - (y / ((t - a) / (z + -1.0)))) else: tmp = (((x / ((b - y) / y)) - (y / (t_4 / (t - a)))) / z) + t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / t_1) t_3 = Float64(Float64(t - a) / Float64(b - y)) t_4 = Float64(b - y) ^ 2.0 tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))); elseif (t_2 <= -4e-243) tmp = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(z * a))) / t_1); elseif (t_2 <= 0.0) tmp = Float64(t_3 + Float64(Float64(Float64(y / Float64(t_4 / Float64(a - t))) + Float64(Float64(x * y) / Float64(b - y))) / z)); elseif (t_2 <= 2e+306) tmp = t_2; elseif (t_2 <= Inf) tmp = Float64(z / Float64(Float64(Float64(z * b) / Float64(t - a)) - Float64(y / Float64(Float64(t - a) / Float64(z + -1.0))))); else tmp = Float64(Float64(Float64(Float64(x / Float64(Float64(b - y) / y)) - Float64(y / Float64(t_4 / Float64(t - a)))) / z) + t_3); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = ((x * y) + (z * (t - a))) / t_1; t_3 = (t - a) / (b - y); t_4 = (b - y) ^ 2.0; tmp = 0.0; if (t_2 <= -Inf) tmp = ((a - t) / y) - (x / (z + -1.0)); elseif (t_2 <= -4e-243) tmp = ((x * y) + ((z * t) - (z * a))) / t_1; elseif (t_2 <= 0.0) tmp = t_3 + (((y / (t_4 / (a - t))) + ((x * y) / (b - y))) / z); elseif (t_2 <= 2e+306) tmp = t_2; elseif (t_2 <= Inf) tmp = z / (((z * b) / (t - a)) - (y / ((t - a) / (z + -1.0)))); else tmp = (((x / ((b - y) / y)) - (y / (t_4 / (t - a)))) / z) + t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -4e-243], 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$2, 0.0], N[(t$95$3 + N[(N[(N[(y / N[(t$95$4 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+306], t$95$2, If[LessEqual[t$95$2, Infinity], N[(z / N[(N[(N[(z * b), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] - N[(y / N[(N[(t - a), $MachinePrecision] / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x / N[(N[(b - y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] - N[(y / N[(t$95$4 / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + t$95$3), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{x \cdot y + z \cdot \left(t - a\right)}{t_1}\\
t_3 := \frac{t - a}{b - y}\\
t_4 := {\left(b - y\right)}^{2}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{elif}\;t_2 \leq -4 \cdot 10^{-243}:\\
\;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{t_1}\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t_3 + \frac{\frac{y}{\frac{t_4}{a - t}} + \frac{x \cdot y}{b - y}}{z}\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\frac{z}{\frac{z \cdot b}{t - a} - \frac{y}{\frac{t - a}{z + -1}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{\frac{b - y}{y}} - \frac{y}{\frac{t_4}{t - a}}}{z} + 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.0Initial program 34.0%
Taylor expanded in y around -inf 53.0%
mul-1-neg53.0%
unsub-neg53.0%
associate-*r/53.0%
neg-mul-153.0%
sub-neg53.0%
metadata-eval53.0%
Simplified63.1%
Taylor expanded in z around inf 86.5%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -3.99999999999999998e-243Initial program 99.4%
sub-neg99.4%
distribute-lft-in99.4%
Applied egg-rr99.4%
if -3.99999999999999998e-243 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 33.9%
sub-neg33.9%
distribute-lft-in33.9%
Applied egg-rr33.9%
Taylor expanded in z around -inf 75.0%
mul-1-neg75.0%
unsub-neg75.0%
associate-*r/75.0%
mul-1-neg75.0%
mul-1-neg75.0%
unsub-neg75.0%
Simplified95.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.0%
if 2.00000000000000003e306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 42.9%
Taylor expanded in x around 0 41.5%
associate-/l*64.9%
+-commutative64.9%
fma-def64.9%
Simplified64.9%
Taylor expanded in y around -inf 64.9%
+-commutative64.9%
mul-1-neg64.9%
unsub-neg64.9%
*-commutative64.9%
associate-/l*64.9%
sub-neg64.9%
metadata-eval64.9%
Simplified64.9%
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 11.1%
associate--l+11.1%
mul-1-neg11.1%
distribute-lft-out--11.1%
associate-/l*18.1%
associate-/l*99.9%
div-sub99.9%
Simplified99.9%
Final simplification93.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (/ (+ (* x y) (* z (- t a))) t_1))
(t_3 (/ (- t a) (- b y))))
(if (<= t_2 (- INFINITY))
(- (/ (- a t) y) (/ x (+ z -1.0)))
(if (<= t_2 -4e-243)
(/ (+ (* x y) (- (* z t) (* z a))) t_1)
(if (<= t_2 0.0)
(+
t_3
(/ (+ (/ y (/ (pow (- b y) 2.0) (- a t))) (/ (* x y) (- b y))) z))
(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 = y + (z * (b - y));
double t_2 = ((x * y) + (z * (t - a))) / t_1;
double t_3 = (t - a) / (b - y);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else if (t_2 <= -4e-243) {
tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
} else if (t_2 <= 0.0) {
tmp = t_3 + (((y / (pow((b - y), 2.0) / (a - t))) + ((x * y) / (b - y))) / z);
} 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 = y + (z * (b - y));
double t_2 = ((x * y) + (z * (t - a))) / t_1;
double t_3 = (t - a) / (b - y);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else if (t_2 <= -4e-243) {
tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
} else if (t_2 <= 0.0) {
tmp = t_3 + (((y / (Math.pow((b - y), 2.0) / (a - t))) + ((x * y) / (b - y))) / z);
} 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 = y + (z * (b - y)) t_2 = ((x * y) + (z * (t - a))) / t_1 t_3 = (t - a) / (b - y) tmp = 0 if t_2 <= -math.inf: tmp = ((a - t) / y) - (x / (z + -1.0)) elif t_2 <= -4e-243: tmp = ((x * y) + ((z * t) - (z * a))) / t_1 elif t_2 <= 0.0: tmp = t_3 + (((y / (math.pow((b - y), 2.0) / (a - t))) + ((x * y) / (b - y))) / z) 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(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / t_1) t_3 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))); elseif (t_2 <= -4e-243) tmp = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(z * a))) / t_1); elseif (t_2 <= 0.0) tmp = Float64(t_3 + Float64(Float64(Float64(y / Float64((Float64(b - y) ^ 2.0) / Float64(a - t))) + Float64(Float64(x * y) / Float64(b - y))) / z)); 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 = y + (z * (b - y)); t_2 = ((x * y) + (z * (t - a))) / t_1; t_3 = (t - a) / (b - y); tmp = 0.0; if (t_2 <= -Inf) tmp = ((a - t) / y) - (x / (z + -1.0)); elseif (t_2 <= -4e-243) tmp = ((x * y) + ((z * t) - (z * a))) / t_1; elseif (t_2 <= 0.0) tmp = t_3 + (((y / (((b - y) ^ 2.0) / (a - t))) + ((x * y) / (b - y))) / z); 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[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -4e-243], 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$2, 0.0], N[(t$95$3 + N[(N[(N[(y / N[(N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+306], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{x \cdot y + z \cdot \left(t - a\right)}{t_1}\\
t_3 := \frac{t - a}{b - y}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{elif}\;t_2 \leq -4 \cdot 10^{-243}:\\
\;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{t_1}\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t_3 + \frac{\frac{y}{\frac{{\left(b - y\right)}^{2}}{a - t}} + \frac{x \cdot y}{b - y}}{z}\\
\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.0Initial program 34.0%
Taylor expanded in y around -inf 53.0%
mul-1-neg53.0%
unsub-neg53.0%
associate-*r/53.0%
neg-mul-153.0%
sub-neg53.0%
metadata-eval53.0%
Simplified63.1%
Taylor expanded in z around inf 86.5%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -3.99999999999999998e-243Initial program 99.4%
sub-neg99.4%
distribute-lft-in99.4%
Applied egg-rr99.4%
if -3.99999999999999998e-243 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 33.9%
sub-neg33.9%
distribute-lft-in33.9%
Applied egg-rr33.9%
Taylor expanded in z around -inf 75.0%
mul-1-neg75.0%
unsub-neg75.0%
associate-*r/75.0%
mul-1-neg75.0%
mul-1-neg75.0%
unsub-neg75.0%
Simplified95.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.0%
if 2.00000000000000003e306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 21.5%
Taylor expanded in z around inf 65.1%
Final simplification90.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* x y) (* z t)) (+ y (* z (- b y)))))
(t_2 (/ (- t a) (- b y))))
(if (<= z -1.55e+20)
t_2
(if (<= z -8.6e-288)
t_1
(if (<= z 3.6e-144)
(- (* (/ a y) (/ z (+ z -1.0))) (/ x (+ z -1.0)))
(if (<= z 4e+15) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) + (z * t)) / (y + (z * (b - y)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.55e+20) {
tmp = t_2;
} else if (z <= -8.6e-288) {
tmp = t_1;
} else if (z <= 3.6e-144) {
tmp = ((a / y) * (z / (z + -1.0))) - (x / (z + -1.0));
} else if (z <= 4e+15) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((x * y) + (z * t)) / (y + (z * (b - y)))
t_2 = (t - a) / (b - y)
if (z <= (-1.55d+20)) then
tmp = t_2
else if (z <= (-8.6d-288)) then
tmp = t_1
else if (z <= 3.6d-144) then
tmp = ((a / y) * (z / (z + (-1.0d0)))) - (x / (z + (-1.0d0)))
else if (z <= 4d+15) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) + (z * t)) / (y + (z * (b - y)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.55e+20) {
tmp = t_2;
} else if (z <= -8.6e-288) {
tmp = t_1;
} else if (z <= 3.6e-144) {
tmp = ((a / y) * (z / (z + -1.0))) - (x / (z + -1.0));
} else if (z <= 4e+15) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x * y) + (z * t)) / (y + (z * (b - y))) t_2 = (t - a) / (b - y) tmp = 0 if z <= -1.55e+20: tmp = t_2 elif z <= -8.6e-288: tmp = t_1 elif z <= 3.6e-144: tmp = ((a / y) * (z / (z + -1.0))) - (x / (z + -1.0)) elif z <= 4e+15: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x * y) + Float64(z * t)) / Float64(y + Float64(z * Float64(b - y)))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.55e+20) tmp = t_2; elseif (z <= -8.6e-288) tmp = t_1; elseif (z <= 3.6e-144) tmp = Float64(Float64(Float64(a / y) * Float64(z / Float64(z + -1.0))) - Float64(x / Float64(z + -1.0))); elseif (z <= 4e+15) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x * y) + (z * t)) / (y + (z * (b - y))); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.55e+20) tmp = t_2; elseif (z <= -8.6e-288) tmp = t_1; elseif (z <= 3.6e-144) tmp = ((a / y) * (z / (z + -1.0))) - (x / (z + -1.0)); elseif (z <= 4e+15) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.55e+20], t$95$2, If[LessEqual[z, -8.6e-288], t$95$1, If[LessEqual[z, 3.6e-144], N[(N[(N[(a / y), $MachinePrecision] * N[(z / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e+15], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot y + z \cdot t}{y + z \cdot \left(b - y\right)}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.55 \cdot 10^{+20}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -8.6 \cdot 10^{-288}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-144}:\\
\;\;\;\;\frac{a}{y} \cdot \frac{z}{z + -1} - \frac{x}{z + -1}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+15}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.55e20 or 4e15 < z Initial program 49.4%
Taylor expanded in z around inf 82.2%
if -1.55e20 < z < -8.59999999999999951e-288 or 3.6e-144 < z < 4e15Initial program 88.4%
Taylor expanded in a around 0 72.4%
if -8.59999999999999951e-288 < z < 3.6e-144Initial program 75.6%
Taylor expanded in y around -inf 77.9%
mul-1-neg77.9%
unsub-neg77.9%
associate-*r/77.9%
neg-mul-177.9%
sub-neg77.9%
metadata-eval77.9%
Simplified77.8%
Taylor expanded in a around inf 75.0%
mul-1-neg75.0%
times-frac76.7%
sub-neg76.7%
metadata-eval76.7%
distribute-rgt-neg-in76.7%
Simplified76.7%
Final simplification77.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.95e+61) (not (<= z 3.1e+56))) (/ (- t a) (- b y)) (/ (+ (* x y) (- (* z t) (* z a))) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.95e+61) || !(z <= 3.1e+56)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.95d+61)) .or. (.not. (z <= 3.1d+56))) then
tmp = (t - a) / (b - y)
else
tmp = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.95e+61) || !(z <= 3.1e+56)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.95e+61) or not (z <= 3.1e+56): tmp = (t - a) / (b - y) else: tmp = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.95e+61) || !(z <= 3.1e+56)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(z * a))) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.95e+61) || ~((z <= 3.1e+56))) tmp = (t - a) / (b - y); else tmp = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.95e+61], N[Not[LessEqual[z, 3.1e+56]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{+61} \lor \neg \left(z \leq 3.1 \cdot 10^{+56}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -1.94999999999999994e61 or 3.10000000000000005e56 < z Initial program 44.5%
Taylor expanded in z around inf 84.4%
if -1.94999999999999994e61 < z < 3.10000000000000005e56Initial program 85.7%
sub-neg85.7%
distribute-lft-in85.8%
Applied egg-rr85.8%
Final simplification85.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.7e+60) (not (<= z 5.4e+57))) (/ (- t a) (- b y)) (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.7e+60) || !(z <= 5.4e+57)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-2.7d+60)) .or. (.not. (z <= 5.4d+57))) then
tmp = (t - a) / (b - y)
else
tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.7e+60) || !(z <= 5.4e+57)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.7e+60) or not (z <= 5.4e+57): tmp = (t - a) / (b - y) else: tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.7e+60) || !(z <= 5.4e+57)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.7e+60) || ~((z <= 5.4e+57))) tmp = (t - a) / (b - y); else tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.7e+60], N[Not[LessEqual[z, 5.4e+57]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+60} \lor \neg \left(z \leq 5.4 \cdot 10^{+57}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -2.6999999999999999e60 or 5.3999999999999997e57 < z Initial program 44.5%
Taylor expanded in z around inf 84.4%
if -2.6999999999999999e60 < z < 5.3999999999999997e57Initial program 85.7%
Final simplification85.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6.2e+18) (not (<= z 3e+15))) (/ (- t a) (- b y)) (/ (+ (* x y) (* z t)) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.2e+18) || !(z <= 3e+15)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + (z * t)) / (y + (z * (b - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-6.2d+18)) .or. (.not. (z <= 3d+15))) then
tmp = (t - a) / (b - y)
else
tmp = ((x * y) + (z * t)) / (y + (z * (b - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.2e+18) || !(z <= 3e+15)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + (z * t)) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6.2e+18) or not (z <= 3e+15): tmp = (t - a) / (b - y) else: tmp = ((x * y) + (z * t)) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6.2e+18) || !(z <= 3e+15)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6.2e+18) || ~((z <= 3e+15))) tmp = (t - a) / (b - y); else tmp = ((x * y) + (z * t)) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6.2e+18], N[Not[LessEqual[z, 3e+15]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+18} \lor \neg \left(z \leq 3 \cdot 10^{+15}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + z \cdot t}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -6.2e18 or 3e15 < z Initial program 49.4%
Taylor expanded in z around inf 82.2%
if -6.2e18 < z < 3e15Initial program 85.8%
Taylor expanded in a around 0 69.5%
Final simplification75.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ (- a t) y) (/ x (+ z -1.0)))))
(if (<= y -35.0)
t_1
(if (<= y -4.8e-115)
(* (/ z y) (/ (- t a) (- 1.0 z)))
(if (<= y 1.2e+21) (/ (- t a) (- b y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((a - t) / y) - (x / (z + -1.0));
double tmp;
if (y <= -35.0) {
tmp = t_1;
} else if (y <= -4.8e-115) {
tmp = (z / y) * ((t - a) / (1.0 - z));
} else if (y <= 1.2e+21) {
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 = ((a - t) / y) - (x / (z + (-1.0d0)))
if (y <= (-35.0d0)) then
tmp = t_1
else if (y <= (-4.8d-115)) then
tmp = (z / y) * ((t - a) / (1.0d0 - z))
else if (y <= 1.2d+21) 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 = ((a - t) / y) - (x / (z + -1.0));
double tmp;
if (y <= -35.0) {
tmp = t_1;
} else if (y <= -4.8e-115) {
tmp = (z / y) * ((t - a) / (1.0 - z));
} else if (y <= 1.2e+21) {
tmp = (t - a) / (b - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((a - t) / y) - (x / (z + -1.0)) tmp = 0 if y <= -35.0: tmp = t_1 elif y <= -4.8e-115: tmp = (z / y) * ((t - a) / (1.0 - z)) elif y <= 1.2e+21: tmp = (t - a) / (b - y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))) tmp = 0.0 if (y <= -35.0) tmp = t_1; elseif (y <= -4.8e-115) tmp = Float64(Float64(z / y) * Float64(Float64(t - a) / Float64(1.0 - z))); elseif (y <= 1.2e+21) 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 = ((a - t) / y) - (x / (z + -1.0)); tmp = 0.0; if (y <= -35.0) tmp = t_1; elseif (y <= -4.8e-115) tmp = (z / y) * ((t - a) / (1.0 - z)); elseif (y <= 1.2e+21) 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[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -35.0], t$95$1, If[LessEqual[y, -4.8e-115], N[(N[(z / y), $MachinePrecision] * N[(N[(t - a), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e+21], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{if}\;y \leq -35:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4.8 \cdot 10^{-115}:\\
\;\;\;\;\frac{z}{y} \cdot \frac{t - a}{1 - z}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+21}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -35 or 1.2e21 < y Initial program 51.7%
Taylor expanded in y around -inf 63.8%
mul-1-neg63.8%
unsub-neg63.8%
associate-*r/63.8%
neg-mul-163.8%
sub-neg63.8%
metadata-eval63.8%
Simplified74.0%
Taylor expanded in z around inf 65.6%
if -35 < y < -4.80000000000000042e-115Initial program 93.5%
Taylor expanded in x around 0 75.5%
associate-/l*63.9%
+-commutative63.9%
fma-def63.9%
Simplified63.9%
Taylor expanded in b around 0 63.7%
*-lft-identity63.7%
mul-1-neg63.7%
*-commutative63.7%
distribute-lft-neg-in63.7%
mul-1-neg63.7%
distribute-rgt-in63.8%
times-frac64.0%
mul-1-neg64.0%
sub-neg64.0%
Simplified64.0%
if -4.80000000000000042e-115 < y < 1.2e21Initial program 86.9%
Taylor expanded in z around inf 73.2%
Final simplification68.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.5e-10) (not (<= z 1.95e-35))) (/ (- t a) (- b y)) (/ (+ (* x y) (- (* z t) (* z a))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.5e-10) || !(z <= 1.95e-35)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + ((z * t) - (z * 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 <= (-2.5d-10)) .or. (.not. (z <= 1.95d-35))) then
tmp = (t - a) / (b - y)
else
tmp = ((x * y) + ((z * t) - (z * 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 <= -2.5e-10) || !(z <= 1.95e-35)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + ((z * t) - (z * a))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.5e-10) or not (z <= 1.95e-35): tmp = (t - a) / (b - y) else: tmp = ((x * y) + ((z * t) - (z * a))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.5e-10) || !(z <= 1.95e-35)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(z * a))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.5e-10) || ~((z <= 1.95e-35))) tmp = (t - a) / (b - y); else tmp = ((x * y) + ((z * t) - (z * a))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.5e-10], N[Not[LessEqual[z, 1.95e-35]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{-10} \lor \neg \left(z \leq 1.95 \cdot 10^{-35}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{y}\\
\end{array}
\end{array}
if z < -2.50000000000000016e-10 or 1.9499999999999999e-35 < z Initial program 52.6%
Taylor expanded in z around inf 77.4%
if -2.50000000000000016e-10 < z < 1.9499999999999999e-35Initial program 87.1%
sub-neg87.1%
distribute-lft-in87.1%
Applied egg-rr87.1%
Taylor expanded in z around 0 61.4%
Final simplification69.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -1.24e-39)
t_1
(if (<= z -5.5e-95)
(/ x (- 1.0 z))
(if (or (<= z -1.2e-167) (not (<= z 4.8e-29))) t_1 x)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.24e-39) {
tmp = t_1;
} else if (z <= -5.5e-95) {
tmp = x / (1.0 - z);
} else if ((z <= -1.2e-167) || !(z <= 4.8e-29)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-1.24d-39)) then
tmp = t_1
else if (z <= (-5.5d-95)) then
tmp = x / (1.0d0 - z)
else if ((z <= (-1.2d-167)) .or. (.not. (z <= 4.8d-29))) then
tmp = t_1
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 t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.24e-39) {
tmp = t_1;
} else if (z <= -5.5e-95) {
tmp = x / (1.0 - z);
} else if ((z <= -1.2e-167) || !(z <= 4.8e-29)) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -1.24e-39: tmp = t_1 elif z <= -5.5e-95: tmp = x / (1.0 - z) elif (z <= -1.2e-167) or not (z <= 4.8e-29): tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.24e-39) tmp = t_1; elseif (z <= -5.5e-95) tmp = Float64(x / Float64(1.0 - z)); elseif ((z <= -1.2e-167) || !(z <= 4.8e-29)) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.24e-39) tmp = t_1; elseif (z <= -5.5e-95) tmp = x / (1.0 - z); elseif ((z <= -1.2e-167) || ~((z <= 4.8e-29))) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.24e-39], t$95$1, If[LessEqual[z, -5.5e-95], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1.2e-167], N[Not[LessEqual[z, 4.8e-29]], $MachinePrecision]], t$95$1, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.24 \cdot 10^{-39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-95}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-167} \lor \neg \left(z \leq 4.8 \cdot 10^{-29}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.24000000000000004e-39 or -5.50000000000000003e-95 < z < -1.19999999999999997e-167 or 4.79999999999999984e-29 < z Initial program 58.0%
Taylor expanded in z around inf 73.9%
if -1.24000000000000004e-39 < z < -5.50000000000000003e-95Initial program 90.1%
Taylor expanded in y around inf 51.0%
mul-1-neg51.0%
unsub-neg51.0%
Simplified51.0%
if -1.19999999999999997e-167 < z < 4.79999999999999984e-29Initial program 85.8%
Taylor expanded in z around 0 52.5%
Final simplification65.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -1.75e-42)
t_1
(if (<= z -1.05e-96)
(/ (* x y) (+ y (* z b)))
(if (or (<= z -1.2e-167) (not (<= z 1.75e-39))) t_1 x)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.75e-42) {
tmp = t_1;
} else if (z <= -1.05e-96) {
tmp = (x * y) / (y + (z * b));
} else if ((z <= -1.2e-167) || !(z <= 1.75e-39)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-1.75d-42)) then
tmp = t_1
else if (z <= (-1.05d-96)) then
tmp = (x * y) / (y + (z * b))
else if ((z <= (-1.2d-167)) .or. (.not. (z <= 1.75d-39))) then
tmp = t_1
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 t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.75e-42) {
tmp = t_1;
} else if (z <= -1.05e-96) {
tmp = (x * y) / (y + (z * b));
} else if ((z <= -1.2e-167) || !(z <= 1.75e-39)) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -1.75e-42: tmp = t_1 elif z <= -1.05e-96: tmp = (x * y) / (y + (z * b)) elif (z <= -1.2e-167) or not (z <= 1.75e-39): tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.75e-42) tmp = t_1; elseif (z <= -1.05e-96) tmp = Float64(Float64(x * y) / Float64(y + Float64(z * b))); elseif ((z <= -1.2e-167) || !(z <= 1.75e-39)) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.75e-42) tmp = t_1; elseif (z <= -1.05e-96) tmp = (x * y) / (y + (z * b)); elseif ((z <= -1.2e-167) || ~((z <= 1.75e-39))) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.75e-42], t$95$1, If[LessEqual[z, -1.05e-96], N[(N[(x * y), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1.2e-167], N[Not[LessEqual[z, 1.75e-39]], $MachinePrecision]], t$95$1, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.75 \cdot 10^{-42}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-96}:\\
\;\;\;\;\frac{x \cdot y}{y + z \cdot b}\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-167} \lor \neg \left(z \leq 1.75 \cdot 10^{-39}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.7500000000000001e-42 or -1.05000000000000001e-96 < z < -1.19999999999999997e-167 or 1.75e-39 < z Initial program 58.0%
Taylor expanded in z around inf 73.9%
if -1.7500000000000001e-42 < z < -1.05000000000000001e-96Initial program 90.1%
Taylor expanded in x around inf 52.0%
*-commutative52.0%
Simplified52.0%
Taylor expanded in b around inf 52.0%
*-commutative52.0%
Simplified52.0%
if -1.19999999999999997e-167 < z < 1.75e-39Initial program 85.8%
Taylor expanded in z around 0 52.5%
Final simplification65.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -6.9e-40)
t_1
(if (<= z -7.4e-97)
(/ (* x y) (+ y (* z (- b y))))
(if (or (<= z -1.2e-167) (not (<= z 4.8e-40))) t_1 x)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -6.9e-40) {
tmp = t_1;
} else if (z <= -7.4e-97) {
tmp = (x * y) / (y + (z * (b - y)));
} else if ((z <= -1.2e-167) || !(z <= 4.8e-40)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-6.9d-40)) then
tmp = t_1
else if (z <= (-7.4d-97)) then
tmp = (x * y) / (y + (z * (b - y)))
else if ((z <= (-1.2d-167)) .or. (.not. (z <= 4.8d-40))) then
tmp = t_1
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 t_1 = (t - a) / (b - y);
double tmp;
if (z <= -6.9e-40) {
tmp = t_1;
} else if (z <= -7.4e-97) {
tmp = (x * y) / (y + (z * (b - y)));
} else if ((z <= -1.2e-167) || !(z <= 4.8e-40)) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -6.9e-40: tmp = t_1 elif z <= -7.4e-97: tmp = (x * y) / (y + (z * (b - y))) elif (z <= -1.2e-167) or not (z <= 4.8e-40): tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -6.9e-40) tmp = t_1; elseif (z <= -7.4e-97) tmp = Float64(Float64(x * y) / Float64(y + Float64(z * Float64(b - y)))); elseif ((z <= -1.2e-167) || !(z <= 4.8e-40)) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -6.9e-40) tmp = t_1; elseif (z <= -7.4e-97) tmp = (x * y) / (y + (z * (b - y))); elseif ((z <= -1.2e-167) || ~((z <= 4.8e-40))) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.9e-40], t$95$1, If[LessEqual[z, -7.4e-97], N[(N[(x * y), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1.2e-167], N[Not[LessEqual[z, 4.8e-40]], $MachinePrecision]], t$95$1, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -6.9 \cdot 10^{-40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -7.4 \cdot 10^{-97}:\\
\;\;\;\;\frac{x \cdot y}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-167} \lor \neg \left(z \leq 4.8 \cdot 10^{-40}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -6.8999999999999996e-40 or -7.39999999999999951e-97 < z < -1.19999999999999997e-167 or 4.79999999999999982e-40 < z Initial program 58.0%
Taylor expanded in z around inf 73.9%
if -6.8999999999999996e-40 < z < -7.39999999999999951e-97Initial program 90.1%
Taylor expanded in x around inf 52.0%
*-commutative52.0%
Simplified52.0%
if -1.19999999999999997e-167 < z < 4.79999999999999982e-40Initial program 85.8%
Taylor expanded in z around 0 52.5%
Final simplification65.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))) (t_2 (/ x (- 1.0 z))))
(if (<= y -5.5e-50)
t_2
(if (<= y 1.1e-244)
t_1
(if (<= y 4.8e-190) (/ (- a) b) (if (<= y 2.95e-36) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -5.5e-50) {
tmp = t_2;
} else if (y <= 1.1e-244) {
tmp = t_1;
} else if (y <= 4.8e-190) {
tmp = -a / b;
} else if (y <= 2.95e-36) {
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 = t / (b - y)
t_2 = x / (1.0d0 - z)
if (y <= (-5.5d-50)) then
tmp = t_2
else if (y <= 1.1d-244) then
tmp = t_1
else if (y <= 4.8d-190) then
tmp = -a / b
else if (y <= 2.95d-36) 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 = t / (b - y);
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -5.5e-50) {
tmp = t_2;
} else if (y <= 1.1e-244) {
tmp = t_1;
} else if (y <= 4.8e-190) {
tmp = -a / b;
} else if (y <= 2.95e-36) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) t_2 = x / (1.0 - z) tmp = 0 if y <= -5.5e-50: tmp = t_2 elif y <= 1.1e-244: tmp = t_1 elif y <= 4.8e-190: tmp = -a / b elif y <= 2.95e-36: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) t_2 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -5.5e-50) tmp = t_2; elseif (y <= 1.1e-244) tmp = t_1; elseif (y <= 4.8e-190) tmp = Float64(Float64(-a) / b); elseif (y <= 2.95e-36) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); t_2 = x / (1.0 - z); tmp = 0.0; if (y <= -5.5e-50) tmp = t_2; elseif (y <= 1.1e-244) tmp = t_1; elseif (y <= 4.8e-190) tmp = -a / b; elseif (y <= 2.95e-36) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.5e-50], t$95$2, If[LessEqual[y, 1.1e-244], t$95$1, If[LessEqual[y, 4.8e-190], N[((-a) / b), $MachinePrecision], If[LessEqual[y, 2.95e-36], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
t_2 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{-50}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{-244}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-190}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;y \leq 2.95 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -5.49999999999999975e-50 or 2.94999999999999998e-36 < y Initial program 54.7%
Taylor expanded in y around inf 47.3%
mul-1-neg47.3%
unsub-neg47.3%
Simplified47.3%
if -5.49999999999999975e-50 < y < 1.09999999999999992e-244 or 4.8000000000000001e-190 < y < 2.94999999999999998e-36Initial program 89.2%
Taylor expanded in a around 0 63.7%
Taylor expanded in z around inf 50.1%
if 1.09999999999999992e-244 < y < 4.8000000000000001e-190Initial program 90.2%
Taylor expanded in a around inf 55.4%
mul-1-neg55.4%
distribute-lft-neg-out55.4%
*-commutative55.4%
Simplified55.4%
Taylor expanded in y around 0 64.5%
associate-*r/64.5%
mul-1-neg64.5%
Simplified64.5%
Final simplification49.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.95e-150)
x
(if (<= y 1.26e-244)
(/ t b)
(if (<= y 3.3e-188) (/ (- a) b) (if (<= y 2.05e-47) (/ t b) x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.95e-150) {
tmp = x;
} else if (y <= 1.26e-244) {
tmp = t / b;
} else if (y <= 3.3e-188) {
tmp = -a / b;
} else if (y <= 2.05e-47) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.95d-150)) then
tmp = x
else if (y <= 1.26d-244) then
tmp = t / b
else if (y <= 3.3d-188) then
tmp = -a / b
else if (y <= 2.05d-47) then
tmp = t / b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.95e-150) {
tmp = x;
} else if (y <= 1.26e-244) {
tmp = t / b;
} else if (y <= 3.3e-188) {
tmp = -a / b;
} else if (y <= 2.05e-47) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.95e-150: tmp = x elif y <= 1.26e-244: tmp = t / b elif y <= 3.3e-188: tmp = -a / b elif y <= 2.05e-47: tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.95e-150) tmp = x; elseif (y <= 1.26e-244) tmp = Float64(t / b); elseif (y <= 3.3e-188) tmp = Float64(Float64(-a) / b); elseif (y <= 2.05e-47) tmp = Float64(t / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.95e-150) tmp = x; elseif (y <= 1.26e-244) tmp = t / b; elseif (y <= 3.3e-188) tmp = -a / b; elseif (y <= 2.05e-47) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.95e-150], x, If[LessEqual[y, 1.26e-244], N[(t / b), $MachinePrecision], If[LessEqual[y, 3.3e-188], N[((-a) / b), $MachinePrecision], If[LessEqual[y, 2.05e-47], N[(t / b), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{-150}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.26 \cdot 10^{-244}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-188}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{-47}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.9500000000000001e-150 or 2.05000000000000001e-47 < y Initial program 58.2%
Taylor expanded in z around 0 34.6%
if -1.9500000000000001e-150 < y < 1.25999999999999998e-244 or 3.3000000000000002e-188 < y < 2.05000000000000001e-47Initial program 88.4%
Taylor expanded in a around 0 68.9%
Taylor expanded in y around 0 54.8%
if 1.25999999999999998e-244 < y < 3.3000000000000002e-188Initial program 90.2%
Taylor expanded in a around inf 55.4%
mul-1-neg55.4%
distribute-lft-neg-out55.4%
*-commutative55.4%
Simplified55.4%
Taylor expanded in y around 0 64.5%
associate-*r/64.5%
mul-1-neg64.5%
Simplified64.5%
Final simplification42.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.95e-150)
(+ x (* x z))
(if (<= y 1.15e-244)
(/ t b)
(if (<= y 1.05e-187) (/ (- a) b) (if (<= y 2.5e-34) (/ t b) x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.95e-150) {
tmp = x + (x * z);
} else if (y <= 1.15e-244) {
tmp = t / b;
} else if (y <= 1.05e-187) {
tmp = -a / b;
} else if (y <= 2.5e-34) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.95d-150)) then
tmp = x + (x * z)
else if (y <= 1.15d-244) then
tmp = t / b
else if (y <= 1.05d-187) then
tmp = -a / b
else if (y <= 2.5d-34) then
tmp = t / b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.95e-150) {
tmp = x + (x * z);
} else if (y <= 1.15e-244) {
tmp = t / b;
} else if (y <= 1.05e-187) {
tmp = -a / b;
} else if (y <= 2.5e-34) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.95e-150: tmp = x + (x * z) elif y <= 1.15e-244: tmp = t / b elif y <= 1.05e-187: tmp = -a / b elif y <= 2.5e-34: tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.95e-150) tmp = Float64(x + Float64(x * z)); elseif (y <= 1.15e-244) tmp = Float64(t / b); elseif (y <= 1.05e-187) tmp = Float64(Float64(-a) / b); elseif (y <= 2.5e-34) tmp = Float64(t / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.95e-150) tmp = x + (x * z); elseif (y <= 1.15e-244) tmp = t / b; elseif (y <= 1.05e-187) tmp = -a / b; elseif (y <= 2.5e-34) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.95e-150], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e-244], N[(t / b), $MachinePrecision], If[LessEqual[y, 1.05e-187], N[((-a) / b), $MachinePrecision], If[LessEqual[y, 2.5e-34], N[(t / b), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{-150}:\\
\;\;\;\;x + x \cdot z\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-244}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{-187}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-34}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.9500000000000001e-150Initial program 60.5%
Taylor expanded in y around inf 39.4%
mul-1-neg39.4%
unsub-neg39.4%
Simplified39.4%
Taylor expanded in z around 0 34.2%
if -1.9500000000000001e-150 < y < 1.15e-244 or 1.04999999999999996e-187 < y < 2.5000000000000001e-34Initial program 88.4%
Taylor expanded in a around 0 68.9%
Taylor expanded in y around 0 54.8%
if 1.15e-244 < y < 1.04999999999999996e-187Initial program 90.2%
Taylor expanded in a around inf 55.4%
mul-1-neg55.4%
distribute-lft-neg-out55.4%
*-commutative55.4%
Simplified55.4%
Taylor expanded in y around 0 64.5%
associate-*r/64.5%
mul-1-neg64.5%
Simplified64.5%
if 2.5000000000000001e-34 < y Initial program 55.4%
Taylor expanded in z around 0 35.2%
Final simplification42.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.2e-28) (not (<= z 2.35e-23))) (/ t (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.2e-28) || !(z <= 2.35e-23)) {
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 <= (-5.2d-28)) .or. (.not. (z <= 2.35d-23))) 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 <= -5.2e-28) || !(z <= 2.35e-23)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.2e-28) or not (z <= 2.35e-23): tmp = t / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.2e-28) || !(z <= 2.35e-23)) 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 <= -5.2e-28) || ~((z <= 2.35e-23))) tmp = t / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.2e-28], N[Not[LessEqual[z, 2.35e-23]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{-28} \lor \neg \left(z \leq 2.35 \cdot 10^{-23}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -5.2e-28 or 2.35e-23 < z Initial program 52.6%
Taylor expanded in a around 0 34.5%
Taylor expanded in z around inf 44.6%
if -5.2e-28 < z < 2.35e-23Initial program 87.1%
Taylor expanded in z around 0 48.4%
Final simplification46.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.6e-70) (not (<= y 4e-36))) (/ 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 <= -4.6e-70) || !(y <= 4e-36)) {
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 <= (-4.6d-70)) .or. (.not. (y <= 4d-36))) 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 <= -4.6e-70) || !(y <= 4e-36)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.6e-70) or not (y <= 4e-36): 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 <= -4.6e-70) || !(y <= 4e-36)) 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 <= -4.6e-70) || ~((y <= 4e-36))) 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, -4.6e-70], N[Not[LessEqual[y, 4e-36]], $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 -4.6 \cdot 10^{-70} \lor \neg \left(y \leq 4 \cdot 10^{-36}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -4.60000000000000001e-70 or 3.9999999999999998e-36 < y Initial program 55.6%
Taylor expanded in y around inf 46.5%
mul-1-neg46.5%
unsub-neg46.5%
Simplified46.5%
if -4.60000000000000001e-70 < y < 3.9999999999999998e-36Initial program 89.0%
Taylor expanded in y around 0 65.6%
Final simplification54.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.95e-150) x (if (<= y 9e-40) (/ t b) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.95e-150) {
tmp = x;
} else if (y <= 9e-40) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.95d-150)) then
tmp = x
else if (y <= 9d-40) then
tmp = t / b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.95e-150) {
tmp = x;
} else if (y <= 9e-40) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.95e-150: tmp = x elif y <= 9e-40: tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.95e-150) tmp = x; elseif (y <= 9e-40) tmp = Float64(t / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.95e-150) tmp = x; elseif (y <= 9e-40) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.95e-150], x, If[LessEqual[y, 9e-40], N[(t / b), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{-150}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 9 \cdot 10^{-40}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.9500000000000001e-150 or 9.0000000000000002e-40 < y Initial program 58.2%
Taylor expanded in z around 0 34.6%
if -1.9500000000000001e-150 < y < 9.0000000000000002e-40Initial program 88.6%
Taylor expanded in a around 0 65.2%
Taylor expanded in y around 0 49.7%
Final simplification40.0%
(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 69.2%
Taylor expanded in z around 0 25.4%
Final simplification25.4%
(FPCore (x y z t a b) :precision binary64 (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
def code(x, y, z, t, a, b): return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(z * t) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))) - Float64(a / Float64(Float64(b - y) + Float64(y / z)))) end
function tmp = code(x, y, z, t, a, b) tmp = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(z * t), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{z \cdot t + y \cdot x}{y + z \cdot \left(b - y\right)} - \frac{a}{\left(b - y\right) + \frac{y}{z}}
\end{array}
herbie shell --seed 2023271
(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)))))