
(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 24 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 (/ (- a t) (- y b)))
(t_2 (* z (- t a)))
(t_3 (+ (* x y) t_2))
(t_4 (/ t_3 (+ y (* z (- b y)))))
(t_5
(-
(- (/ x (+ z -1.0)))
(/
(+
(/ z (/ (+ z -1.0) (- t a)))
(/ b (/ (pow (+ z -1.0) 2.0) (* x z))))
y))))
(if (<= t_4 (- INFINITY))
t_5
(if (<= t_4 -1e-269)
(/ (fma x y t_2) (fma z (- b y) y))
(if (<= t_4 0.0)
(- t_1 (* (/ x z) (/ y (- y b))))
(if (<= t_4 1e+267)
(/ t_3 (+ y (- (* z b) (* y z))))
(if (<= t_4 INFINITY)
t_5
(-
t_1
(/
(+ (/ x (/ (- y b) y)) (/ y (/ (pow (- y b) 2.0) (- t a))))
z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - t) / (y - b);
double t_2 = z * (t - a);
double t_3 = (x * y) + t_2;
double t_4 = t_3 / (y + (z * (b - y)));
double t_5 = -(x / (z + -1.0)) - (((z / ((z + -1.0) / (t - a))) + (b / (pow((z + -1.0), 2.0) / (x * z)))) / y);
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_5;
} else if (t_4 <= -1e-269) {
tmp = fma(x, y, t_2) / fma(z, (b - y), y);
} else if (t_4 <= 0.0) {
tmp = t_1 - ((x / z) * (y / (y - b)));
} else if (t_4 <= 1e+267) {
tmp = t_3 / (y + ((z * b) - (y * z)));
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_5;
} else {
tmp = t_1 - (((x / ((y - b) / y)) + (y / (pow((y - b), 2.0) / (t - a)))) / z);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - t) / Float64(y - b)) t_2 = Float64(z * Float64(t - a)) t_3 = Float64(Float64(x * y) + t_2) t_4 = Float64(t_3 / Float64(y + Float64(z * Float64(b - y)))) t_5 = Float64(Float64(-Float64(x / Float64(z + -1.0))) - Float64(Float64(Float64(z / Float64(Float64(z + -1.0) / Float64(t - a))) + Float64(b / Float64((Float64(z + -1.0) ^ 2.0) / Float64(x * z)))) / y)) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_5; elseif (t_4 <= -1e-269) tmp = Float64(fma(x, y, t_2) / fma(z, Float64(b - y), y)); elseif (t_4 <= 0.0) tmp = Float64(t_1 - Float64(Float64(x / z) * Float64(y / Float64(y - b)))); elseif (t_4 <= 1e+267) tmp = Float64(t_3 / Float64(y + Float64(Float64(z * b) - Float64(y * z)))); elseif (t_4 <= Inf) tmp = t_5; else tmp = Float64(t_1 - Float64(Float64(Float64(x / Float64(Float64(y - b) / y)) + Float64(y / Float64((Float64(y - b) ^ 2.0) / Float64(t - a)))) / z)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[((-N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]) - N[(N[(N[(z / N[(N[(z + -1.0), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b / N[(N[Power[N[(z + -1.0), $MachinePrecision], 2.0], $MachinePrecision] / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$5, If[LessEqual[t$95$4, -1e-269], N[(N[(x * y + t$95$2), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[(t$95$1 - N[(N[(x / z), $MachinePrecision] * N[(y / N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 1e+267], N[(t$95$3 / N[(y + N[(N[(z * b), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], t$95$5, N[(t$95$1 - N[(N[(N[(x / N[(N[(y - b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[Power[N[(y - b), $MachinePrecision], 2.0], $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b}\\
t_2 := z \cdot \left(t - a\right)\\
t_3 := x \cdot y + t_2\\
t_4 := \frac{t_3}{y + z \cdot \left(b - y\right)}\\
t_5 := \left(-\frac{x}{z + -1}\right) - \frac{\frac{z}{\frac{z + -1}{t - a}} + \frac{b}{\frac{{\left(z + -1\right)}^{2}}{x \cdot z}}}{y}\\
\mathbf{if}\;t_4 \leq -\infty:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t_4 \leq -1 \cdot 10^{-269}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t_2\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\
\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;t_1 - \frac{x}{z} \cdot \frac{y}{y - b}\\
\mathbf{elif}\;t_4 \leq 10^{+267}:\\
\;\;\;\;\frac{t_3}{y + \left(z \cdot b - y \cdot z\right)}\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;t_5\\
\mathbf{else}:\\
\;\;\;\;t_1 - \frac{\frac{x}{\frac{y - b}{y}} + \frac{y}{\frac{{\left(y - b\right)}^{2}}{t - a}}}{z}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or 9.9999999999999997e266 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 26.4%
Taylor expanded in y around -inf 70.7%
mul-1-neg70.7%
unsub-neg70.7%
associate-*r/70.7%
neg-mul-170.7%
sub-neg70.7%
metadata-eval70.7%
Simplified82.8%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.9999999999999996e-270Initial program 99.6%
fma-def99.6%
+-commutative99.6%
fma-def99.6%
Simplified99.6%
if -9.9999999999999996e-270 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 23.7%
sub-neg23.7%
distribute-lft-in23.1%
Applied egg-rr23.1%
Taylor expanded in z around -inf 76.2%
mul-1-neg76.2%
unsub-neg76.2%
mul-1-neg76.2%
mul-1-neg76.2%
unsub-neg76.2%
Simplified92.3%
Taylor expanded in x around inf 63.8%
times-frac94.0%
Simplified94.0%
if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 9.9999999999999997e266Initial program 99.5%
sub-neg99.5%
distribute-lft-in99.6%
Applied egg-rr99.6%
if +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 0.0%
sub-neg0.0%
distribute-lft-in0.0%
Applied egg-rr0.0%
Taylor expanded in z around -inf 43.9%
mul-1-neg43.9%
unsub-neg43.9%
mul-1-neg43.9%
mul-1-neg43.9%
unsub-neg43.9%
Simplified99.9%
Final simplification95.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* x y) (* z (- t a))))
(t_2 (/ (- a t) (- y b)))
(t_3 (/ t_1 (+ y (* z (- b y)))))
(t_4
(-
(- (/ x (+ z -1.0)))
(/
(+
(/ z (/ (+ z -1.0) (- t a)))
(/ b (/ (pow (+ z -1.0) 2.0) (* x z))))
y))))
(if (<= t_3 (- INFINITY))
t_4
(if (<= t_3 -1e-269)
t_3
(if (<= t_3 0.0)
(- t_2 (* (/ x z) (/ y (- y b))))
(if (<= t_3 1e+267)
(/ t_1 (+ y (- (* z b) (* y z))))
(if (<= t_3 INFINITY)
t_4
(-
t_2
(/
(+ (/ x (/ (- y b) y)) (/ y (/ (pow (- y b) 2.0) (- t a))))
z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * y) + (z * (t - a));
double t_2 = (a - t) / (y - b);
double t_3 = t_1 / (y + (z * (b - y)));
double t_4 = -(x / (z + -1.0)) - (((z / ((z + -1.0) / (t - a))) + (b / (pow((z + -1.0), 2.0) / (x * z)))) / y);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_4;
} else if (t_3 <= -1e-269) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = t_2 - ((x / z) * (y / (y - b)));
} else if (t_3 <= 1e+267) {
tmp = t_1 / (y + ((z * b) - (y * z)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_4;
} else {
tmp = t_2 - (((x / ((y - b) / y)) + (y / (pow((y - b), 2.0) / (t - a)))) / z);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * y) + (z * (t - a));
double t_2 = (a - t) / (y - b);
double t_3 = t_1 / (y + (z * (b - y)));
double t_4 = -(x / (z + -1.0)) - (((z / ((z + -1.0) / (t - a))) + (b / (Math.pow((z + -1.0), 2.0) / (x * z)))) / y);
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = t_4;
} else if (t_3 <= -1e-269) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = t_2 - ((x / z) * (y / (y - b)));
} else if (t_3 <= 1e+267) {
tmp = t_1 / (y + ((z * b) - (y * z)));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_4;
} else {
tmp = t_2 - (((x / ((y - b) / y)) + (y / (Math.pow((y - b), 2.0) / (t - a)))) / z);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * y) + (z * (t - a)) t_2 = (a - t) / (y - b) t_3 = t_1 / (y + (z * (b - y))) t_4 = -(x / (z + -1.0)) - (((z / ((z + -1.0) / (t - a))) + (b / (math.pow((z + -1.0), 2.0) / (x * z)))) / y) tmp = 0 if t_3 <= -math.inf: tmp = t_4 elif t_3 <= -1e-269: tmp = t_3 elif t_3 <= 0.0: tmp = t_2 - ((x / z) * (y / (y - b))) elif t_3 <= 1e+267: tmp = t_1 / (y + ((z * b) - (y * z))) elif t_3 <= math.inf: tmp = t_4 else: tmp = t_2 - (((x / ((y - b) / y)) + (y / (math.pow((y - b), 2.0) / (t - a)))) / z) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * y) + Float64(z * Float64(t - a))) t_2 = Float64(Float64(a - t) / Float64(y - b)) t_3 = Float64(t_1 / Float64(y + Float64(z * Float64(b - y)))) t_4 = Float64(Float64(-Float64(x / Float64(z + -1.0))) - Float64(Float64(Float64(z / Float64(Float64(z + -1.0) / Float64(t - a))) + Float64(b / Float64((Float64(z + -1.0) ^ 2.0) / Float64(x * z)))) / y)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_4; elseif (t_3 <= -1e-269) tmp = t_3; elseif (t_3 <= 0.0) tmp = Float64(t_2 - Float64(Float64(x / z) * Float64(y / Float64(y - b)))); elseif (t_3 <= 1e+267) tmp = Float64(t_1 / Float64(y + Float64(Float64(z * b) - Float64(y * z)))); elseif (t_3 <= Inf) tmp = t_4; else tmp = Float64(t_2 - Float64(Float64(Float64(x / Float64(Float64(y - b) / y)) + Float64(y / Float64((Float64(y - b) ^ 2.0) / Float64(t - a)))) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * y) + (z * (t - a)); t_2 = (a - t) / (y - b); t_3 = t_1 / (y + (z * (b - y))); t_4 = -(x / (z + -1.0)) - (((z / ((z + -1.0) / (t - a))) + (b / (((z + -1.0) ^ 2.0) / (x * z)))) / y); tmp = 0.0; if (t_3 <= -Inf) tmp = t_4; elseif (t_3 <= -1e-269) tmp = t_3; elseif (t_3 <= 0.0) tmp = t_2 - ((x / z) * (y / (y - b))); elseif (t_3 <= 1e+267) tmp = t_1 / (y + ((z * b) - (y * z))); elseif (t_3 <= Inf) tmp = t_4; else tmp = t_2 - (((x / ((y - b) / y)) + (y / (((y - b) ^ 2.0) / (t - a)))) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[((-N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]) - N[(N[(N[(z / N[(N[(z + -1.0), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b / N[(N[Power[N[(z + -1.0), $MachinePrecision], 2.0], $MachinePrecision] / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, -1e-269], t$95$3, If[LessEqual[t$95$3, 0.0], N[(t$95$2 - N[(N[(x / z), $MachinePrecision] * N[(y / N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+267], N[(t$95$1 / N[(y + N[(N[(z * b), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$4, N[(t$95$2 - N[(N[(N[(x / N[(N[(y - b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[Power[N[(y - b), $MachinePrecision], 2.0], $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot \left(t - a\right)\\
t_2 := \frac{a - t}{y - b}\\
t_3 := \frac{t_1}{y + z \cdot \left(b - y\right)}\\
t_4 := \left(-\frac{x}{z + -1}\right) - \frac{\frac{z}{\frac{z + -1}{t - a}} + \frac{b}{\frac{{\left(z + -1\right)}^{2}}{x \cdot z}}}{y}\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_3 \leq -1 \cdot 10^{-269}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_3 \leq 0:\\
\;\;\;\;t_2 - \frac{x}{z} \cdot \frac{y}{y - b}\\
\mathbf{elif}\;t_3 \leq 10^{+267}:\\
\;\;\;\;\frac{t_1}{y + \left(z \cdot b - y \cdot z\right)}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_2 - \frac{\frac{x}{\frac{y - b}{y}} + \frac{y}{\frac{{\left(y - b\right)}^{2}}{t - a}}}{z}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or 9.9999999999999997e266 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 26.4%
Taylor expanded in y around -inf 70.7%
mul-1-neg70.7%
unsub-neg70.7%
associate-*r/70.7%
neg-mul-170.7%
sub-neg70.7%
metadata-eval70.7%
Simplified82.8%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.9999999999999996e-270Initial program 99.6%
if -9.9999999999999996e-270 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 23.7%
sub-neg23.7%
distribute-lft-in23.1%
Applied egg-rr23.1%
Taylor expanded in z around -inf 76.2%
mul-1-neg76.2%
unsub-neg76.2%
mul-1-neg76.2%
mul-1-neg76.2%
unsub-neg76.2%
Simplified92.3%
Taylor expanded in x around inf 63.8%
times-frac94.0%
Simplified94.0%
if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 9.9999999999999997e266Initial program 99.5%
sub-neg99.5%
distribute-lft-in99.6%
Applied egg-rr99.6%
if +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 0.0%
sub-neg0.0%
distribute-lft-in0.0%
Applied egg-rr0.0%
Taylor expanded in z around -inf 43.9%
mul-1-neg43.9%
unsub-neg43.9%
mul-1-neg43.9%
mul-1-neg43.9%
unsub-neg43.9%
Simplified99.9%
Final simplification95.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (/ (- a t) (- y b)))
(t_3 (+ y (* z (- b y)))))
(if (<= z -18000000000000.0)
(- t_2 (* (/ x z) (/ y (- y b))))
(if (<= z -4.7e-240)
(+ (/ (* x y) t_3) (/ t_1 t_3))
(if (<= z 1.12e-244)
(/ x (/ (fma z (- b y) y) y))
(if (<= z 480000000000.0)
(/ (+ (* x y) t_1) t_3)
(-
t_2
(/
(+ (/ x (/ (- y b) y)) (/ y (/ (pow (- y b) 2.0) (- t a))))
z))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (a - t) / (y - b);
double t_3 = y + (z * (b - y));
double tmp;
if (z <= -18000000000000.0) {
tmp = t_2 - ((x / z) * (y / (y - b)));
} else if (z <= -4.7e-240) {
tmp = ((x * y) / t_3) + (t_1 / t_3);
} else if (z <= 1.12e-244) {
tmp = x / (fma(z, (b - y), y) / y);
} else if (z <= 480000000000.0) {
tmp = ((x * y) + t_1) / t_3;
} else {
tmp = t_2 - (((x / ((y - b) / y)) + (y / (pow((y - b), 2.0) / (t - a)))) / z);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(Float64(a - t) / Float64(y - b)) t_3 = Float64(y + Float64(z * Float64(b - y))) tmp = 0.0 if (z <= -18000000000000.0) tmp = Float64(t_2 - Float64(Float64(x / z) * Float64(y / Float64(y - b)))); elseif (z <= -4.7e-240) tmp = Float64(Float64(Float64(x * y) / t_3) + Float64(t_1 / t_3)); elseif (z <= 1.12e-244) tmp = Float64(x / Float64(fma(z, Float64(b - y), y) / y)); elseif (z <= 480000000000.0) tmp = Float64(Float64(Float64(x * y) + t_1) / t_3); else tmp = Float64(t_2 - Float64(Float64(Float64(x / Float64(Float64(y - b) / y)) + Float64(y / Float64((Float64(y - b) ^ 2.0) / Float64(t - a)))) / z)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -18000000000000.0], N[(t$95$2 - N[(N[(x / z), $MachinePrecision] * N[(y / N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.7e-240], N[(N[(N[(x * y), $MachinePrecision] / t$95$3), $MachinePrecision] + N[(t$95$1 / t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.12e-244], N[(x / N[(N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 480000000000.0], N[(N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision] / t$95$3), $MachinePrecision], N[(t$95$2 - N[(N[(N[(x / N[(N[(y - b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[Power[N[(y - b), $MachinePrecision], 2.0], $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{a - t}{y - b}\\
t_3 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -18000000000000:\\
\;\;\;\;t_2 - \frac{x}{z} \cdot \frac{y}{y - b}\\
\mathbf{elif}\;z \leq -4.7 \cdot 10^{-240}:\\
\;\;\;\;\frac{x \cdot y}{t_3} + \frac{t_1}{t_3}\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{-244}:\\
\;\;\;\;\frac{x}{\frac{\mathsf{fma}\left(z, b - y, y\right)}{y}}\\
\mathbf{elif}\;z \leq 480000000000:\\
\;\;\;\;\frac{x \cdot y + t_1}{t_3}\\
\mathbf{else}:\\
\;\;\;\;t_2 - \frac{\frac{x}{\frac{y - b}{y}} + \frac{y}{\frac{{\left(y - b\right)}^{2}}{t - a}}}{z}\\
\end{array}
\end{array}
if z < -1.8e13Initial program 50.5%
sub-neg50.5%
distribute-lft-in50.4%
Applied egg-rr50.4%
Taylor expanded in z around -inf 64.1%
mul-1-neg64.1%
unsub-neg64.1%
mul-1-neg64.1%
mul-1-neg64.1%
unsub-neg64.1%
Simplified90.1%
Taylor expanded in x around inf 81.0%
times-frac99.9%
Simplified99.9%
if -1.8e13 < z < -4.70000000000000012e-240Initial program 86.0%
Taylor expanded in x around 0 86.0%
if -4.70000000000000012e-240 < z < 1.1200000000000001e-244Initial program 64.0%
Taylor expanded in x around inf 57.3%
associate-/l*90.1%
+-commutative90.1%
fma-def90.1%
Simplified90.1%
if 1.1200000000000001e-244 < z < 4.8e11Initial program 84.1%
if 4.8e11 < z Initial program 33.2%
sub-neg33.2%
distribute-lft-in33.1%
Applied egg-rr33.1%
Taylor expanded in z around -inf 71.1%
mul-1-neg71.1%
unsub-neg71.1%
mul-1-neg71.1%
mul-1-neg71.1%
unsub-neg71.1%
Simplified98.3%
Final simplification92.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (- (/ (- a t) (- y b)) (* (/ x z) (/ y (- y b)))))
(t_3 (+ y (* z (- b y)))))
(if (<= z -2150000000000.0)
t_2
(if (<= z -1.32e-244)
(+ (/ (* x y) t_3) (/ t_1 t_3))
(if (<= z 7e-245)
(/ x (/ (fma z (- b y) y) y))
(if (<= z 430000000000.0) (/ (+ (* x y) t_1) t_3) 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 = ((a - t) / (y - b)) - ((x / z) * (y / (y - b)));
double t_3 = y + (z * (b - y));
double tmp;
if (z <= -2150000000000.0) {
tmp = t_2;
} else if (z <= -1.32e-244) {
tmp = ((x * y) / t_3) + (t_1 / t_3);
} else if (z <= 7e-245) {
tmp = x / (fma(z, (b - y), y) / y);
} else if (z <= 430000000000.0) {
tmp = ((x * y) + t_1) / t_3;
} 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(Float64(a - t) / Float64(y - b)) - Float64(Float64(x / z) * Float64(y / Float64(y - b)))) t_3 = Float64(y + Float64(z * Float64(b - y))) tmp = 0.0 if (z <= -2150000000000.0) tmp = t_2; elseif (z <= -1.32e-244) tmp = Float64(Float64(Float64(x * y) / t_3) + Float64(t_1 / t_3)); elseif (z <= 7e-245) tmp = Float64(x / Float64(fma(z, Float64(b - y), y) / y)); elseif (z <= 430000000000.0) tmp = Float64(Float64(Float64(x * y) + t_1) / t_3); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision] - N[(N[(x / z), $MachinePrecision] * N[(y / N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2150000000000.0], t$95$2, If[LessEqual[z, -1.32e-244], N[(N[(N[(x * y), $MachinePrecision] / t$95$3), $MachinePrecision] + N[(t$95$1 / t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e-245], N[(x / N[(N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 430000000000.0], N[(N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision] / t$95$3), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{a - t}{y - b} - \frac{x}{z} \cdot \frac{y}{y - b}\\
t_3 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -2150000000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.32 \cdot 10^{-244}:\\
\;\;\;\;\frac{x \cdot y}{t_3} + \frac{t_1}{t_3}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-245}:\\
\;\;\;\;\frac{x}{\frac{\mathsf{fma}\left(z, b - y, y\right)}{y}}\\
\mathbf{elif}\;z \leq 430000000000:\\
\;\;\;\;\frac{x \cdot y + t_1}{t_3}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -2.15e12 or 4.3e11 < z Initial program 42.1%
sub-neg42.1%
distribute-lft-in41.9%
Applied egg-rr41.9%
Taylor expanded in z around -inf 67.5%
mul-1-neg67.5%
unsub-neg67.5%
mul-1-neg67.5%
mul-1-neg67.5%
unsub-neg67.5%
Simplified94.1%
Taylor expanded in x around inf 80.5%
times-frac99.1%
Simplified99.1%
if -2.15e12 < z < -1.32e-244Initial program 86.0%
Taylor expanded in x around 0 86.0%
if -1.32e-244 < z < 7.00000000000000033e-245Initial program 64.0%
Taylor expanded in x around inf 57.3%
associate-/l*90.1%
+-commutative90.1%
fma-def90.1%
Simplified90.1%
if 7.00000000000000033e-245 < z < 4.3e11Initial program 84.1%
Final simplification92.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (- (/ (- a t) (- y b)) (* (/ x z) (/ y (- y b)))))
(t_3 (+ y (* z (- b y)))))
(if (<= z -3700000000000.0)
t_2
(if (<= z -1.35e-243)
(+ (/ (* x y) t_3) (/ t_1 t_3))
(if (<= z 6e-245)
x
(if (<= z 1.16e+14) (/ (+ (* x y) t_1) t_3) 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 = ((a - t) / (y - b)) - ((x / z) * (y / (y - b)));
double t_3 = y + (z * (b - y));
double tmp;
if (z <= -3700000000000.0) {
tmp = t_2;
} else if (z <= -1.35e-243) {
tmp = ((x * y) / t_3) + (t_1 / t_3);
} else if (z <= 6e-245) {
tmp = x;
} else if (z <= 1.16e+14) {
tmp = ((x * y) + t_1) / t_3;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = z * (t - a)
t_2 = ((a - t) / (y - b)) - ((x / z) * (y / (y - b)))
t_3 = y + (z * (b - y))
if (z <= (-3700000000000.0d0)) then
tmp = t_2
else if (z <= (-1.35d-243)) then
tmp = ((x * y) / t_3) + (t_1 / t_3)
else if (z <= 6d-245) then
tmp = x
else if (z <= 1.16d+14) then
tmp = ((x * y) + t_1) / t_3
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 = ((a - t) / (y - b)) - ((x / z) * (y / (y - b)));
double t_3 = y + (z * (b - y));
double tmp;
if (z <= -3700000000000.0) {
tmp = t_2;
} else if (z <= -1.35e-243) {
tmp = ((x * y) / t_3) + (t_1 / t_3);
} else if (z <= 6e-245) {
tmp = x;
} else if (z <= 1.16e+14) {
tmp = ((x * y) + t_1) / t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = ((a - t) / (y - b)) - ((x / z) * (y / (y - b))) t_3 = y + (z * (b - y)) tmp = 0 if z <= -3700000000000.0: tmp = t_2 elif z <= -1.35e-243: tmp = ((x * y) / t_3) + (t_1 / t_3) elif z <= 6e-245: tmp = x elif z <= 1.16e+14: tmp = ((x * y) + t_1) / t_3 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(Float64(a - t) / Float64(y - b)) - Float64(Float64(x / z) * Float64(y / Float64(y - b)))) t_3 = Float64(y + Float64(z * Float64(b - y))) tmp = 0.0 if (z <= -3700000000000.0) tmp = t_2; elseif (z <= -1.35e-243) tmp = Float64(Float64(Float64(x * y) / t_3) + Float64(t_1 / t_3)); elseif (z <= 6e-245) tmp = x; elseif (z <= 1.16e+14) tmp = Float64(Float64(Float64(x * y) + t_1) / t_3); 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 = ((a - t) / (y - b)) - ((x / z) * (y / (y - b))); t_3 = y + (z * (b - y)); tmp = 0.0; if (z <= -3700000000000.0) tmp = t_2; elseif (z <= -1.35e-243) tmp = ((x * y) / t_3) + (t_1 / t_3); elseif (z <= 6e-245) tmp = x; elseif (z <= 1.16e+14) tmp = ((x * y) + t_1) / t_3; 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[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision] - N[(N[(x / z), $MachinePrecision] * N[(y / N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3700000000000.0], t$95$2, If[LessEqual[z, -1.35e-243], N[(N[(N[(x * y), $MachinePrecision] / t$95$3), $MachinePrecision] + N[(t$95$1 / t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-245], x, If[LessEqual[z, 1.16e+14], N[(N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision] / t$95$3), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{a - t}{y - b} - \frac{x}{z} \cdot \frac{y}{y - b}\\
t_3 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -3700000000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{-243}:\\
\;\;\;\;\frac{x \cdot y}{t_3} + \frac{t_1}{t_3}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-245}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.16 \cdot 10^{+14}:\\
\;\;\;\;\frac{x \cdot y + t_1}{t_3}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -3.7e12 or 1.16e14 < z Initial program 42.1%
sub-neg42.1%
distribute-lft-in41.9%
Applied egg-rr41.9%
Taylor expanded in z around -inf 67.5%
mul-1-neg67.5%
unsub-neg67.5%
mul-1-neg67.5%
mul-1-neg67.5%
unsub-neg67.5%
Simplified94.1%
Taylor expanded in x around inf 80.5%
times-frac99.1%
Simplified99.1%
if -3.7e12 < z < -1.35000000000000005e-243Initial program 86.0%
Taylor expanded in x around 0 86.0%
if -1.35000000000000005e-243 < z < 6.0000000000000004e-245Initial program 64.0%
Taylor expanded in z around 0 83.4%
if 6.0000000000000004e-245 < z < 1.16e14Initial program 84.1%
Final simplification91.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ (- a t) (- y b)) (/ x z)))
(t_2 (+ y (* z (- b y))))
(t_3 (/ (+ (* x y) (* z t)) t_2)))
(if (<= z -4.4e-5)
t_1
(if (<= z -1.12e-244)
t_3
(if (<= z 5.5e-113)
x
(if (<= z 4.5e-59)
(/ (* z (- t a)) t_2)
(if (<= z 440000000000.0) t_3 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((a - t) / (y - b)) - (x / z);
double t_2 = y + (z * (b - y));
double t_3 = ((x * y) + (z * t)) / t_2;
double tmp;
if (z <= -4.4e-5) {
tmp = t_1;
} else if (z <= -1.12e-244) {
tmp = t_3;
} else if (z <= 5.5e-113) {
tmp = x;
} else if (z <= 4.5e-59) {
tmp = (z * (t - a)) / t_2;
} else if (z <= 440000000000.0) {
tmp = t_3;
} 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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = ((a - t) / (y - b)) - (x / z)
t_2 = y + (z * (b - y))
t_3 = ((x * y) + (z * t)) / t_2
if (z <= (-4.4d-5)) then
tmp = t_1
else if (z <= (-1.12d-244)) then
tmp = t_3
else if (z <= 5.5d-113) then
tmp = x
else if (z <= 4.5d-59) then
tmp = (z * (t - a)) / t_2
else if (z <= 440000000000.0d0) then
tmp = t_3
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 - b)) - (x / z);
double t_2 = y + (z * (b - y));
double t_3 = ((x * y) + (z * t)) / t_2;
double tmp;
if (z <= -4.4e-5) {
tmp = t_1;
} else if (z <= -1.12e-244) {
tmp = t_3;
} else if (z <= 5.5e-113) {
tmp = x;
} else if (z <= 4.5e-59) {
tmp = (z * (t - a)) / t_2;
} else if (z <= 440000000000.0) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((a - t) / (y - b)) - (x / z) t_2 = y + (z * (b - y)) t_3 = ((x * y) + (z * t)) / t_2 tmp = 0 if z <= -4.4e-5: tmp = t_1 elif z <= -1.12e-244: tmp = t_3 elif z <= 5.5e-113: tmp = x elif z <= 4.5e-59: tmp = (z * (t - a)) / t_2 elif z <= 440000000000.0: tmp = t_3 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(a - t) / Float64(y - b)) - Float64(x / z)) t_2 = Float64(y + Float64(z * Float64(b - y))) t_3 = Float64(Float64(Float64(x * y) + Float64(z * t)) / t_2) tmp = 0.0 if (z <= -4.4e-5) tmp = t_1; elseif (z <= -1.12e-244) tmp = t_3; elseif (z <= 5.5e-113) tmp = x; elseif (z <= 4.5e-59) tmp = Float64(Float64(z * Float64(t - a)) / t_2); elseif (z <= 440000000000.0) tmp = t_3; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((a - t) / (y - b)) - (x / z); t_2 = y + (z * (b - y)); t_3 = ((x * y) + (z * t)) / t_2; tmp = 0.0; if (z <= -4.4e-5) tmp = t_1; elseif (z <= -1.12e-244) tmp = t_3; elseif (z <= 5.5e-113) tmp = x; elseif (z <= 4.5e-59) tmp = (z * (t - a)) / t_2; elseif (z <= 440000000000.0) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[z, -4.4e-5], t$95$1, If[LessEqual[z, -1.12e-244], t$95$3, If[LessEqual[z, 5.5e-113], x, If[LessEqual[z, 4.5e-59], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[z, 440000000000.0], t$95$3, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b} - \frac{x}{z}\\
t_2 := y + z \cdot \left(b - y\right)\\
t_3 := \frac{x \cdot y + z \cdot t}{t_2}\\
\mathbf{if}\;z \leq -4.4 \cdot 10^{-5}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.12 \cdot 10^{-244}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-113}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-59}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{t_2}\\
\mathbf{elif}\;z \leq 440000000000:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -4.3999999999999999e-5 or 4.4e11 < z Initial program 43.6%
sub-neg43.6%
distribute-lft-in43.5%
Applied egg-rr43.5%
Taylor expanded in z around -inf 66.4%
mul-1-neg66.4%
unsub-neg66.4%
mul-1-neg66.4%
mul-1-neg66.4%
unsub-neg66.4%
Simplified92.7%
Taylor expanded in y around inf 86.3%
if -4.3999999999999999e-5 < z < -1.1200000000000001e-244 or 4.50000000000000012e-59 < z < 4.4e11Initial program 86.3%
Taylor expanded in t around inf 75.7%
*-commutative75.7%
Simplified75.7%
if -1.1200000000000001e-244 < z < 5.50000000000000053e-113Initial program 70.0%
Taylor expanded in z around 0 74.6%
if 5.50000000000000053e-113 < z < 4.50000000000000012e-59Initial program 93.7%
Taylor expanded in x around 0 81.4%
Final simplification80.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
(t_2 (- (/ (- a t) (- y b)) (/ x z))))
(if (<= z -1.62e+22)
t_2
(if (<= z -6.7e-245)
t_1
(if (<= z 5e-245) x (if (<= z 3.2e+14) 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 - a))) / (y + (z * (b - y)));
double t_2 = ((a - t) / (y - b)) - (x / z);
double tmp;
if (z <= -1.62e+22) {
tmp = t_2;
} else if (z <= -6.7e-245) {
tmp = t_1;
} else if (z <= 5e-245) {
tmp = x;
} else if (z <= 3.2e+14) {
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 - a))) / (y + (z * (b - y)))
t_2 = ((a - t) / (y - b)) - (x / z)
if (z <= (-1.62d+22)) then
tmp = t_2
else if (z <= (-6.7d-245)) then
tmp = t_1
else if (z <= 5d-245) then
tmp = x
else if (z <= 3.2d+14) 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 - a))) / (y + (z * (b - y)));
double t_2 = ((a - t) / (y - b)) - (x / z);
double tmp;
if (z <= -1.62e+22) {
tmp = t_2;
} else if (z <= -6.7e-245) {
tmp = t_1;
} else if (z <= 5e-245) {
tmp = x;
} else if (z <= 3.2e+14) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y))) t_2 = ((a - t) / (y - b)) - (x / z) tmp = 0 if z <= -1.62e+22: tmp = t_2 elif z <= -6.7e-245: tmp = t_1 elif z <= 5e-245: tmp = x elif z <= 3.2e+14: 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 * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) t_2 = Float64(Float64(Float64(a - t) / Float64(y - b)) - Float64(x / z)) tmp = 0.0 if (z <= -1.62e+22) tmp = t_2; elseif (z <= -6.7e-245) tmp = t_1; elseif (z <= 5e-245) tmp = x; elseif (z <= 3.2e+14) 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 - a))) / (y + (z * (b - y))); t_2 = ((a - t) / (y - b)) - (x / z); tmp = 0.0; if (z <= -1.62e+22) tmp = t_2; elseif (z <= -6.7e-245) tmp = t_1; elseif (z <= 5e-245) tmp = x; elseif (z <= 3.2e+14) 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 * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.62e+22], t$95$2, If[LessEqual[z, -6.7e-245], t$95$1, If[LessEqual[z, 5e-245], x, If[LessEqual[z, 3.2e+14], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
t_2 := \frac{a - t}{y - b} - \frac{x}{z}\\
\mathbf{if}\;z \leq -1.62 \cdot 10^{+22}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -6.7 \cdot 10^{-245}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-245}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+14}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.62e22 or 3.2e14 < z Initial program 40.1%
sub-neg40.1%
distribute-lft-in39.9%
Applied egg-rr39.9%
Taylor expanded in z around -inf 67.2%
mul-1-neg67.2%
unsub-neg67.2%
mul-1-neg67.2%
mul-1-neg67.2%
unsub-neg67.2%
Simplified94.7%
Taylor expanded in y around inf 87.7%
if -1.62e22 < z < -6.7e-245 or 4.9999999999999997e-245 < z < 3.2e14Initial program 85.6%
if -6.7e-245 < z < 4.9999999999999997e-245Initial program 64.0%
Taylor expanded in z around 0 83.4%
Final simplification86.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
(t_2 (- (/ (- a t) (- y b)) (* (/ x z) (/ y (- y b))))))
(if (<= z -6500000000000.0)
t_2
(if (<= z -1.35e-243)
t_1
(if (<= z 2.25e-244) x (if (<= z 1400000000000.0) 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 - a))) / (y + (z * (b - y)));
double t_2 = ((a - t) / (y - b)) - ((x / z) * (y / (y - b)));
double tmp;
if (z <= -6500000000000.0) {
tmp = t_2;
} else if (z <= -1.35e-243) {
tmp = t_1;
} else if (z <= 2.25e-244) {
tmp = x;
} else if (z <= 1400000000000.0) {
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 - a))) / (y + (z * (b - y)))
t_2 = ((a - t) / (y - b)) - ((x / z) * (y / (y - b)))
if (z <= (-6500000000000.0d0)) then
tmp = t_2
else if (z <= (-1.35d-243)) then
tmp = t_1
else if (z <= 2.25d-244) then
tmp = x
else if (z <= 1400000000000.0d0) 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 - a))) / (y + (z * (b - y)));
double t_2 = ((a - t) / (y - b)) - ((x / z) * (y / (y - b)));
double tmp;
if (z <= -6500000000000.0) {
tmp = t_2;
} else if (z <= -1.35e-243) {
tmp = t_1;
} else if (z <= 2.25e-244) {
tmp = x;
} else if (z <= 1400000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y))) t_2 = ((a - t) / (y - b)) - ((x / z) * (y / (y - b))) tmp = 0 if z <= -6500000000000.0: tmp = t_2 elif z <= -1.35e-243: tmp = t_1 elif z <= 2.25e-244: tmp = x elif z <= 1400000000000.0: 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 * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) t_2 = Float64(Float64(Float64(a - t) / Float64(y - b)) - Float64(Float64(x / z) * Float64(y / Float64(y - b)))) tmp = 0.0 if (z <= -6500000000000.0) tmp = t_2; elseif (z <= -1.35e-243) tmp = t_1; elseif (z <= 2.25e-244) tmp = x; elseif (z <= 1400000000000.0) 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 - a))) / (y + (z * (b - y))); t_2 = ((a - t) / (y - b)) - ((x / z) * (y / (y - b))); tmp = 0.0; if (z <= -6500000000000.0) tmp = t_2; elseif (z <= -1.35e-243) tmp = t_1; elseif (z <= 2.25e-244) tmp = x; elseif (z <= 1400000000000.0) 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 * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision] - N[(N[(x / z), $MachinePrecision] * N[(y / N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6500000000000.0], t$95$2, If[LessEqual[z, -1.35e-243], t$95$1, If[LessEqual[z, 2.25e-244], x, If[LessEqual[z, 1400000000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
t_2 := \frac{a - t}{y - b} - \frac{x}{z} \cdot \frac{y}{y - b}\\
\mathbf{if}\;z \leq -6500000000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{-243}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{-244}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1400000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -6.5e12 or 1.4e12 < z Initial program 42.1%
sub-neg42.1%
distribute-lft-in41.9%
Applied egg-rr41.9%
Taylor expanded in z around -inf 67.5%
mul-1-neg67.5%
unsub-neg67.5%
mul-1-neg67.5%
mul-1-neg67.5%
unsub-neg67.5%
Simplified94.1%
Taylor expanded in x around inf 80.5%
times-frac99.1%
Simplified99.1%
if -6.5e12 < z < -1.35000000000000005e-243 or 2.2500000000000001e-244 < z < 1.4e12Initial program 85.1%
if -1.35000000000000005e-243 < z < 2.2500000000000001e-244Initial program 64.0%
Taylor expanded in z around 0 83.4%
Final simplification91.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* z (- t a)) (+ y (* z (- b y)))))
(t_2 (- (/ (- a t) (- y b)) (/ x z))))
(if (<= z -2.6e+20)
t_2
(if (<= z -2.3e-173)
t_1
(if (<= z 1.3e-112)
x
(if (<= z 2.8e-36)
t_1
(if (<= z 88000000000.0) (/ x (- 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)) / (y + (z * (b - y)));
double t_2 = ((a - t) / (y - b)) - (x / z);
double tmp;
if (z <= -2.6e+20) {
tmp = t_2;
} else if (z <= -2.3e-173) {
tmp = t_1;
} else if (z <= 1.3e-112) {
tmp = x;
} else if (z <= 2.8e-36) {
tmp = t_1;
} else if (z <= 88000000000.0) {
tmp = x / (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)) / (y + (z * (b - y)))
t_2 = ((a - t) / (y - b)) - (x / z)
if (z <= (-2.6d+20)) then
tmp = t_2
else if (z <= (-2.3d-173)) then
tmp = t_1
else if (z <= 1.3d-112) then
tmp = x
else if (z <= 2.8d-36) then
tmp = t_1
else if (z <= 88000000000.0d0) then
tmp = x / (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)) / (y + (z * (b - y)));
double t_2 = ((a - t) / (y - b)) - (x / z);
double tmp;
if (z <= -2.6e+20) {
tmp = t_2;
} else if (z <= -2.3e-173) {
tmp = t_1;
} else if (z <= 1.3e-112) {
tmp = x;
} else if (z <= 2.8e-36) {
tmp = t_1;
} else if (z <= 88000000000.0) {
tmp = x / (1.0 - z);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * (t - a)) / (y + (z * (b - y))) t_2 = ((a - t) / (y - b)) - (x / z) tmp = 0 if z <= -2.6e+20: tmp = t_2 elif z <= -2.3e-173: tmp = t_1 elif z <= 1.3e-112: tmp = x elif z <= 2.8e-36: tmp = t_1 elif z <= 88000000000.0: tmp = x / (1.0 - z) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(t - a)) / Float64(y + Float64(z * Float64(b - y)))) t_2 = Float64(Float64(Float64(a - t) / Float64(y - b)) - Float64(x / z)) tmp = 0.0 if (z <= -2.6e+20) tmp = t_2; elseif (z <= -2.3e-173) tmp = t_1; elseif (z <= 1.3e-112) tmp = x; elseif (z <= 2.8e-36) tmp = t_1; elseif (z <= 88000000000.0) tmp = Float64(x / 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)) / (y + (z * (b - y))); t_2 = ((a - t) / (y - b)) - (x / z); tmp = 0.0; if (z <= -2.6e+20) tmp = t_2; elseif (z <= -2.3e-173) tmp = t_1; elseif (z <= 1.3e-112) tmp = x; elseif (z <= 2.8e-36) tmp = t_1; elseif (z <= 88000000000.0) tmp = x / (1.0 - z); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.6e+20], t$95$2, If[LessEqual[z, -2.3e-173], t$95$1, If[LessEqual[z, 1.3e-112], x, If[LessEqual[z, 2.8e-36], t$95$1, If[LessEqual[z, 88000000000.0], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
t_2 := \frac{a - t}{y - b} - \frac{x}{z}\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+20}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-173}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-112}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 88000000000:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -2.6e20 or 8.8e10 < z Initial program 40.1%
sub-neg40.1%
distribute-lft-in39.9%
Applied egg-rr39.9%
Taylor expanded in z around -inf 67.2%
mul-1-neg67.2%
unsub-neg67.2%
mul-1-neg67.2%
mul-1-neg67.2%
unsub-neg67.2%
Simplified94.7%
Taylor expanded in y around inf 87.7%
if -2.6e20 < z < -2.29999999999999988e-173 or 1.29999999999999996e-112 < z < 2.8000000000000001e-36Initial program 89.2%
Taylor expanded in x around 0 64.3%
if -2.29999999999999988e-173 < z < 1.29999999999999996e-112Initial program 73.7%
Taylor expanded in z around 0 71.7%
if 2.8000000000000001e-36 < z < 8.8e10Initial program 80.9%
Taylor expanded in y around inf 70.9%
mul-1-neg70.9%
unsub-neg70.9%
Simplified70.9%
Final simplification77.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a))) (t_2 (- (/ (- a t) (- y b)) (/ x z))))
(if (<= z -3.1e+20)
t_2
(if (<= z -1.65e-166)
(/ t_1 (- (* z b) (* y (+ z -1.0))))
(if (<= z 1.3e-112)
x
(if (<= z 4e-36)
(/ t_1 (+ y (* z (- b y))))
(if (<= z 88000000000.0) (/ x (- 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 = ((a - t) / (y - b)) - (x / z);
double tmp;
if (z <= -3.1e+20) {
tmp = t_2;
} else if (z <= -1.65e-166) {
tmp = t_1 / ((z * b) - (y * (z + -1.0)));
} else if (z <= 1.3e-112) {
tmp = x;
} else if (z <= 4e-36) {
tmp = t_1 / (y + (z * (b - y)));
} else if (z <= 88000000000.0) {
tmp = x / (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 = ((a - t) / (y - b)) - (x / z)
if (z <= (-3.1d+20)) then
tmp = t_2
else if (z <= (-1.65d-166)) then
tmp = t_1 / ((z * b) - (y * (z + (-1.0d0))))
else if (z <= 1.3d-112) then
tmp = x
else if (z <= 4d-36) then
tmp = t_1 / (y + (z * (b - y)))
else if (z <= 88000000000.0d0) then
tmp = x / (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 = ((a - t) / (y - b)) - (x / z);
double tmp;
if (z <= -3.1e+20) {
tmp = t_2;
} else if (z <= -1.65e-166) {
tmp = t_1 / ((z * b) - (y * (z + -1.0)));
} else if (z <= 1.3e-112) {
tmp = x;
} else if (z <= 4e-36) {
tmp = t_1 / (y + (z * (b - y)));
} else if (z <= 88000000000.0) {
tmp = x / (1.0 - z);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = ((a - t) / (y - b)) - (x / z) tmp = 0 if z <= -3.1e+20: tmp = t_2 elif z <= -1.65e-166: tmp = t_1 / ((z * b) - (y * (z + -1.0))) elif z <= 1.3e-112: tmp = x elif z <= 4e-36: tmp = t_1 / (y + (z * (b - y))) elif z <= 88000000000.0: tmp = x / (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(Float64(a - t) / Float64(y - b)) - Float64(x / z)) tmp = 0.0 if (z <= -3.1e+20) tmp = t_2; elseif (z <= -1.65e-166) tmp = Float64(t_1 / Float64(Float64(z * b) - Float64(y * Float64(z + -1.0)))); elseif (z <= 1.3e-112) tmp = x; elseif (z <= 4e-36) tmp = Float64(t_1 / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= 88000000000.0) tmp = Float64(x / 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 = ((a - t) / (y - b)) - (x / z); tmp = 0.0; if (z <= -3.1e+20) tmp = t_2; elseif (z <= -1.65e-166) tmp = t_1 / ((z * b) - (y * (z + -1.0))); elseif (z <= 1.3e-112) tmp = x; elseif (z <= 4e-36) tmp = t_1 / (y + (z * (b - y))); elseif (z <= 88000000000.0) tmp = x / (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[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.1e+20], t$95$2, If[LessEqual[z, -1.65e-166], N[(t$95$1 / N[(N[(z * b), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e-112], x, If[LessEqual[z, 4e-36], N[(t$95$1 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 88000000000.0], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{a - t}{y - b} - \frac{x}{z}\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{+20}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{-166}:\\
\;\;\;\;\frac{t_1}{z \cdot b - y \cdot \left(z + -1\right)}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-112}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-36}:\\
\;\;\;\;\frac{t_1}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 88000000000:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -3.1e20 or 8.8e10 < z Initial program 40.1%
sub-neg40.1%
distribute-lft-in39.9%
Applied egg-rr39.9%
Taylor expanded in z around -inf 67.2%
mul-1-neg67.2%
unsub-neg67.2%
mul-1-neg67.2%
mul-1-neg67.2%
unsub-neg67.2%
Simplified94.7%
Taylor expanded in y around inf 87.7%
if -3.1e20 < z < -1.65000000000000009e-166Initial program 86.8%
Taylor expanded in x around 0 55.7%
Taylor expanded in y around -inf 55.8%
+-commutative55.8%
*-commutative55.8%
mul-1-neg55.8%
unsub-neg55.8%
*-commutative55.8%
sub-neg55.8%
metadata-eval55.8%
Simplified55.8%
if -1.65000000000000009e-166 < z < 1.29999999999999996e-112Initial program 73.7%
Taylor expanded in z around 0 71.7%
if 1.29999999999999996e-112 < z < 3.9999999999999998e-36Initial program 94.6%
Taylor expanded in x around 0 84.2%
if 3.9999999999999998e-36 < z < 8.8e10Initial program 80.9%
Taylor expanded in y around inf 70.9%
mul-1-neg70.9%
unsub-neg70.9%
Simplified70.9%
Final simplification77.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -9.5e+145)
t_1
(if (<= y -4.6e+131)
(/ t (- b y))
(if (<= y -1.3e+114)
t_1
(if (<= y -4.4e+48)
(/ (- a t) y)
(if (<= y -1.25e+17)
(/ a (- y b))
(if (<= y -5e-29)
(+ x (* x z))
(if (<= y 1.15e-19) (/ (- t a) b) t_1)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -9.5e+145) {
tmp = t_1;
} else if (y <= -4.6e+131) {
tmp = t / (b - y);
} else if (y <= -1.3e+114) {
tmp = t_1;
} else if (y <= -4.4e+48) {
tmp = (a - t) / y;
} else if (y <= -1.25e+17) {
tmp = a / (y - b);
} else if (y <= -5e-29) {
tmp = x + (x * z);
} else if (y <= 1.15e-19) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-9.5d+145)) then
tmp = t_1
else if (y <= (-4.6d+131)) then
tmp = t / (b - y)
else if (y <= (-1.3d+114)) then
tmp = t_1
else if (y <= (-4.4d+48)) then
tmp = (a - t) / y
else if (y <= (-1.25d+17)) then
tmp = a / (y - b)
else if (y <= (-5d-29)) then
tmp = x + (x * z)
else if (y <= 1.15d-19) then
tmp = (t - a) / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -9.5e+145) {
tmp = t_1;
} else if (y <= -4.6e+131) {
tmp = t / (b - y);
} else if (y <= -1.3e+114) {
tmp = t_1;
} else if (y <= -4.4e+48) {
tmp = (a - t) / y;
} else if (y <= -1.25e+17) {
tmp = a / (y - b);
} else if (y <= -5e-29) {
tmp = x + (x * z);
} else if (y <= 1.15e-19) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -9.5e+145: tmp = t_1 elif y <= -4.6e+131: tmp = t / (b - y) elif y <= -1.3e+114: tmp = t_1 elif y <= -4.4e+48: tmp = (a - t) / y elif y <= -1.25e+17: tmp = a / (y - b) elif y <= -5e-29: tmp = x + (x * z) elif y <= 1.15e-19: tmp = (t - a) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -9.5e+145) tmp = t_1; elseif (y <= -4.6e+131) tmp = Float64(t / Float64(b - y)); elseif (y <= -1.3e+114) tmp = t_1; elseif (y <= -4.4e+48) tmp = Float64(Float64(a - t) / y); elseif (y <= -1.25e+17) tmp = Float64(a / Float64(y - b)); elseif (y <= -5e-29) tmp = Float64(x + Float64(x * z)); elseif (y <= 1.15e-19) tmp = Float64(Float64(t - a) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -9.5e+145) tmp = t_1; elseif (y <= -4.6e+131) tmp = t / (b - y); elseif (y <= -1.3e+114) tmp = t_1; elseif (y <= -4.4e+48) tmp = (a - t) / y; elseif (y <= -1.25e+17) tmp = a / (y - b); elseif (y <= -5e-29) tmp = x + (x * z); elseif (y <= 1.15e-19) tmp = (t - a) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.5e+145], t$95$1, If[LessEqual[y, -4.6e+131], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.3e+114], t$95$1, If[LessEqual[y, -4.4e+48], N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -1.25e+17], N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5e-29], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e-19], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{+145}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4.6 \cdot 10^{+131}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{+114}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4.4 \cdot 10^{+48}:\\
\;\;\;\;\frac{a - t}{y}\\
\mathbf{elif}\;y \leq -1.25 \cdot 10^{+17}:\\
\;\;\;\;\frac{a}{y - b}\\
\mathbf{elif}\;y \leq -5 \cdot 10^{-29}:\\
\;\;\;\;x + x \cdot z\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-19}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -9.49999999999999948e145 or -4.59999999999999983e131 < y < -1.3e114 or 1.1499999999999999e-19 < y Initial program 44.3%
Taylor expanded in y around inf 62.7%
mul-1-neg62.7%
unsub-neg62.7%
Simplified62.7%
if -9.49999999999999948e145 < y < -4.59999999999999983e131Initial program 15.9%
Taylor expanded in t around inf 15.9%
*-commutative15.9%
Simplified15.9%
Taylor expanded in z around inf 72.5%
if -1.3e114 < y < -4.3999999999999999e48Initial program 72.5%
Taylor expanded in x around 0 59.2%
Taylor expanded in y around inf 52.1%
mul-1-neg52.1%
sub-neg52.1%
Simplified52.1%
Taylor expanded in z around inf 45.5%
mul-1-neg45.5%
Simplified45.5%
if -4.3999999999999999e48 < y < -1.25e17Initial program 76.5%
sub-neg76.5%
distribute-lft-in76.5%
Applied egg-rr76.5%
Taylor expanded in z around -inf 27.3%
mul-1-neg27.3%
unsub-neg27.3%
mul-1-neg27.3%
mul-1-neg27.3%
unsub-neg27.3%
Simplified52.3%
Taylor expanded in x around inf 52.7%
times-frac52.7%
Simplified52.7%
Taylor expanded in a around inf 40.9%
if -1.25e17 < y < -4.99999999999999986e-29Initial program 62.9%
Taylor expanded in y around inf 60.8%
mul-1-neg60.8%
unsub-neg60.8%
Simplified60.8%
Taylor expanded in z around 0 61.8%
if -4.99999999999999986e-29 < y < 1.1499999999999999e-19Initial program 82.8%
Taylor expanded in y around 0 59.5%
Final simplification60.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))) (t_2 (- (/ (- a t) (- y b)) (/ x z))))
(if (<= z -750.0)
t_2
(if (<= z 1.6e-126)
t_1
(if (<= z 2.4e-40)
(/ (- (+ t (/ (* x y) z)) a) b)
(if (<= z 88000000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double t_2 = ((a - t) / (y - b)) - (x / z);
double tmp;
if (z <= -750.0) {
tmp = t_2;
} else if (z <= 1.6e-126) {
tmp = t_1;
} else if (z <= 2.4e-40) {
tmp = ((t + ((x * y) / z)) - a) / b;
} else if (z <= 88000000000.0) {
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 / (1.0d0 - z)
t_2 = ((a - t) / (y - b)) - (x / z)
if (z <= (-750.0d0)) then
tmp = t_2
else if (z <= 1.6d-126) then
tmp = t_1
else if (z <= 2.4d-40) then
tmp = ((t + ((x * y) / z)) - a) / b
else if (z <= 88000000000.0d0) 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 / (1.0 - z);
double t_2 = ((a - t) / (y - b)) - (x / z);
double tmp;
if (z <= -750.0) {
tmp = t_2;
} else if (z <= 1.6e-126) {
tmp = t_1;
} else if (z <= 2.4e-40) {
tmp = ((t + ((x * y) / z)) - a) / b;
} else if (z <= 88000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) t_2 = ((a - t) / (y - b)) - (x / z) tmp = 0 if z <= -750.0: tmp = t_2 elif z <= 1.6e-126: tmp = t_1 elif z <= 2.4e-40: tmp = ((t + ((x * y) / z)) - a) / b elif z <= 88000000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) t_2 = Float64(Float64(Float64(a - t) / Float64(y - b)) - Float64(x / z)) tmp = 0.0 if (z <= -750.0) tmp = t_2; elseif (z <= 1.6e-126) tmp = t_1; elseif (z <= 2.4e-40) tmp = Float64(Float64(Float64(t + Float64(Float64(x * y) / z)) - a) / b); elseif (z <= 88000000000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); t_2 = ((a - t) / (y - b)) - (x / z); tmp = 0.0; if (z <= -750.0) tmp = t_2; elseif (z <= 1.6e-126) tmp = t_1; elseif (z <= 2.4e-40) tmp = ((t + ((x * y) / z)) - a) / b; elseif (z <= 88000000000.0) 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[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -750.0], t$95$2, If[LessEqual[z, 1.6e-126], t$95$1, If[LessEqual[z, 2.4e-40], N[(N[(N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 88000000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
t_2 := \frac{a - t}{y - b} - \frac{x}{z}\\
\mathbf{if}\;z \leq -750:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-126}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-40}:\\
\;\;\;\;\frac{\left(t + \frac{x \cdot y}{z}\right) - a}{b}\\
\mathbf{elif}\;z \leq 88000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -750 or 8.8e10 < z Initial program 43.5%
sub-neg43.5%
distribute-lft-in43.3%
Applied egg-rr43.3%
Taylor expanded in z around -inf 67.5%
mul-1-neg67.5%
unsub-neg67.5%
mul-1-neg67.5%
mul-1-neg67.5%
unsub-neg67.5%
Simplified94.1%
Taylor expanded in y around inf 87.4%
if -750 < z < 1.6e-126 or 2.39999999999999991e-40 < z < 8.8e10Initial program 78.2%
Taylor expanded in y around inf 60.7%
mul-1-neg60.7%
unsub-neg60.7%
Simplified60.7%
if 1.6e-126 < z < 2.39999999999999991e-40Initial program 90.9%
Taylor expanded in y around 0 40.7%
associate--l+40.7%
associate-/r*40.7%
times-frac40.7%
mul-1-neg40.7%
div-sub40.7%
Simplified40.7%
Taylor expanded in b around inf 63.6%
Final simplification73.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))) (t_2 (/ (- t a) (- b y))))
(if (<= z -0.56)
t_2
(if (<= z 1.65e-126)
t_1
(if (<= z 5.8e-41)
(/ (+ t (- (/ x (/ z y)) a)) b)
(if (<= z 1.5e+39) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -0.56) {
tmp = t_2;
} else if (z <= 1.65e-126) {
tmp = t_1;
} else if (z <= 5.8e-41) {
tmp = (t + ((x / (z / y)) - a)) / b;
} else if (z <= 1.5e+39) {
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 / (1.0d0 - z)
t_2 = (t - a) / (b - y)
if (z <= (-0.56d0)) then
tmp = t_2
else if (z <= 1.65d-126) then
tmp = t_1
else if (z <= 5.8d-41) then
tmp = (t + ((x / (z / y)) - a)) / b
else if (z <= 1.5d+39) 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 / (1.0 - z);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -0.56) {
tmp = t_2;
} else if (z <= 1.65e-126) {
tmp = t_1;
} else if (z <= 5.8e-41) {
tmp = (t + ((x / (z / y)) - a)) / b;
} else if (z <= 1.5e+39) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) t_2 = (t - a) / (b - y) tmp = 0 if z <= -0.56: tmp = t_2 elif z <= 1.65e-126: tmp = t_1 elif z <= 5.8e-41: tmp = (t + ((x / (z / y)) - a)) / b elif z <= 1.5e+39: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -0.56) tmp = t_2; elseif (z <= 1.65e-126) tmp = t_1; elseif (z <= 5.8e-41) tmp = Float64(Float64(t + Float64(Float64(x / Float64(z / y)) - a)) / b); elseif (z <= 1.5e+39) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -0.56) tmp = t_2; elseif (z <= 1.65e-126) tmp = t_1; elseif (z <= 5.8e-41) tmp = (t + ((x / (z / y)) - a)) / b; elseif (z <= 1.5e+39) 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[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.56], t$95$2, If[LessEqual[z, 1.65e-126], t$95$1, If[LessEqual[z, 5.8e-41], N[(N[(t + N[(N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 1.5e+39], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -0.56:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{-126}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-41}:\\
\;\;\;\;\frac{t + \left(\frac{x}{\frac{z}{y}} - a\right)}{b}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+39}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -0.56000000000000005 or 1.5e39 < z Initial program 44.4%
Taylor expanded in z around inf 78.4%
if -0.56000000000000005 < z < 1.65e-126 or 5.79999999999999955e-41 < z < 1.5e39Initial program 76.3%
Taylor expanded in y around inf 60.0%
mul-1-neg60.0%
unsub-neg60.0%
Simplified60.0%
if 1.65e-126 < z < 5.79999999999999955e-41Initial program 90.9%
Taylor expanded in y around 0 40.7%
associate--l+40.7%
associate-/r*40.7%
times-frac40.7%
mul-1-neg40.7%
div-sub40.7%
Simplified40.7%
Taylor expanded in b around inf 63.6%
associate--l+63.6%
associate-/l*63.6%
Simplified63.6%
Final simplification68.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))) (t_2 (/ (- t a) (- b y))))
(if (<= z -3.8)
t_2
(if (<= z 3.2e-127)
t_1
(if (<= z 7.2e-40)
(/ (- (+ t (/ (* x y) z)) a) b)
(if (<= z 2e+39) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -3.8) {
tmp = t_2;
} else if (z <= 3.2e-127) {
tmp = t_1;
} else if (z <= 7.2e-40) {
tmp = ((t + ((x * y) / z)) - a) / b;
} else if (z <= 2e+39) {
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 / (1.0d0 - z)
t_2 = (t - a) / (b - y)
if (z <= (-3.8d0)) then
tmp = t_2
else if (z <= 3.2d-127) then
tmp = t_1
else if (z <= 7.2d-40) then
tmp = ((t + ((x * y) / z)) - a) / b
else if (z <= 2d+39) 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 / (1.0 - z);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -3.8) {
tmp = t_2;
} else if (z <= 3.2e-127) {
tmp = t_1;
} else if (z <= 7.2e-40) {
tmp = ((t + ((x * y) / z)) - a) / b;
} else if (z <= 2e+39) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) t_2 = (t - a) / (b - y) tmp = 0 if z <= -3.8: tmp = t_2 elif z <= 3.2e-127: tmp = t_1 elif z <= 7.2e-40: tmp = ((t + ((x * y) / z)) - a) / b elif z <= 2e+39: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -3.8) tmp = t_2; elseif (z <= 3.2e-127) tmp = t_1; elseif (z <= 7.2e-40) tmp = Float64(Float64(Float64(t + Float64(Float64(x * y) / z)) - a) / b); elseif (z <= 2e+39) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -3.8) tmp = t_2; elseif (z <= 3.2e-127) tmp = t_1; elseif (z <= 7.2e-40) tmp = ((t + ((x * y) / z)) - a) / b; elseif (z <= 2e+39) 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[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8], t$95$2, If[LessEqual[z, 3.2e-127], t$95$1, If[LessEqual[z, 7.2e-40], N[(N[(N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 2e+39], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3.8:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-127}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-40}:\\
\;\;\;\;\frac{\left(t + \frac{x \cdot y}{z}\right) - a}{b}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+39}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -3.7999999999999998 or 1.99999999999999988e39 < z Initial program 44.4%
Taylor expanded in z around inf 78.4%
if -3.7999999999999998 < z < 3.20000000000000017e-127 or 7.2e-40 < z < 1.99999999999999988e39Initial program 76.3%
Taylor expanded in y around inf 60.0%
mul-1-neg60.0%
unsub-neg60.0%
Simplified60.0%
if 3.20000000000000017e-127 < z < 7.2e-40Initial program 90.9%
Taylor expanded in y around 0 40.7%
associate--l+40.7%
associate-/r*40.7%
times-frac40.7%
mul-1-neg40.7%
div-sub40.7%
Simplified40.7%
Taylor expanded in b around inf 63.6%
Final simplification68.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* x z))) (t_2 (/ a (- y b))))
(if (<= z -0.37)
t_2
(if (<= z 8.5e-113)
t_1
(if (<= z 3.8e-37)
(/ t b)
(if (<= z 1.0) t_1 (if (<= z 7.5e+161) (/ (- t) y) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (x * z);
double t_2 = a / (y - b);
double tmp;
if (z <= -0.37) {
tmp = t_2;
} else if (z <= 8.5e-113) {
tmp = t_1;
} else if (z <= 3.8e-37) {
tmp = t / b;
} else if (z <= 1.0) {
tmp = t_1;
} else if (z <= 7.5e+161) {
tmp = -t / 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 = x + (x * z)
t_2 = a / (y - b)
if (z <= (-0.37d0)) then
tmp = t_2
else if (z <= 8.5d-113) then
tmp = t_1
else if (z <= 3.8d-37) then
tmp = t / b
else if (z <= 1.0d0) then
tmp = t_1
else if (z <= 7.5d+161) then
tmp = -t / 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 = x + (x * z);
double t_2 = a / (y - b);
double tmp;
if (z <= -0.37) {
tmp = t_2;
} else if (z <= 8.5e-113) {
tmp = t_1;
} else if (z <= 3.8e-37) {
tmp = t / b;
} else if (z <= 1.0) {
tmp = t_1;
} else if (z <= 7.5e+161) {
tmp = -t / y;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (x * z) t_2 = a / (y - b) tmp = 0 if z <= -0.37: tmp = t_2 elif z <= 8.5e-113: tmp = t_1 elif z <= 3.8e-37: tmp = t / b elif z <= 1.0: tmp = t_1 elif z <= 7.5e+161: tmp = -t / y else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(x * z)) t_2 = Float64(a / Float64(y - b)) tmp = 0.0 if (z <= -0.37) tmp = t_2; elseif (z <= 8.5e-113) tmp = t_1; elseif (z <= 3.8e-37) tmp = Float64(t / b); elseif (z <= 1.0) tmp = t_1; elseif (z <= 7.5e+161) tmp = Float64(Float64(-t) / y); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (x * z); t_2 = a / (y - b); tmp = 0.0; if (z <= -0.37) tmp = t_2; elseif (z <= 8.5e-113) tmp = t_1; elseif (z <= 3.8e-37) tmp = t / b; elseif (z <= 1.0) tmp = t_1; elseif (z <= 7.5e+161) tmp = -t / y; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.37], t$95$2, If[LessEqual[z, 8.5e-113], t$95$1, If[LessEqual[z, 3.8e-37], N[(t / b), $MachinePrecision], If[LessEqual[z, 1.0], t$95$1, If[LessEqual[z, 7.5e+161], N[((-t) / y), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + x \cdot z\\
t_2 := \frac{a}{y - b}\\
\mathbf{if}\;z \leq -0.37:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-113}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-37}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+161}:\\
\;\;\;\;\frac{-t}{y}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -0.37 or 7.4999999999999995e161 < z Initial program 41.8%
sub-neg41.8%
distribute-lft-in41.6%
Applied egg-rr41.6%
Taylor expanded in z around -inf 69.3%
mul-1-neg69.3%
unsub-neg69.3%
mul-1-neg69.3%
mul-1-neg69.3%
unsub-neg69.3%
Simplified93.5%
Taylor expanded in x around inf 78.9%
times-frac99.7%
Simplified99.7%
Taylor expanded in a around inf 40.2%
if -0.37 < z < 8.4999999999999995e-113 or 3.8000000000000004e-37 < z < 1Initial program 77.6%
Taylor expanded in y around inf 60.2%
mul-1-neg60.2%
unsub-neg60.2%
Simplified60.2%
Taylor expanded in z around 0 59.1%
if 8.4999999999999995e-113 < z < 3.8000000000000004e-37Initial program 94.6%
Taylor expanded in t around inf 50.8%
*-commutative50.8%
Simplified50.8%
Taylor expanded in y around 0 30.5%
if 1 < z < 7.4999999999999995e161Initial program 51.8%
Taylor expanded in x around 0 40.8%
Taylor expanded in y around inf 22.4%
mul-1-neg22.4%
sub-neg22.4%
Simplified22.4%
Taylor expanded in t around inf 22.8%
times-frac37.9%
Simplified37.9%
Taylor expanded in z around inf 37.9%
associate-*r/37.9%
neg-mul-137.9%
Simplified37.9%
Final simplification47.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))) (t_2 (/ (- t a) (- b y))))
(if (<= z -31.5)
t_2
(if (<= z 1.35e-112)
t_1
(if (<= z 1.95e-40) (/ (- t a) b) (if (<= z 1.7e+39) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -31.5) {
tmp = t_2;
} else if (z <= 1.35e-112) {
tmp = t_1;
} else if (z <= 1.95e-40) {
tmp = (t - a) / b;
} else if (z <= 1.7e+39) {
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 / (1.0d0 - z)
t_2 = (t - a) / (b - y)
if (z <= (-31.5d0)) then
tmp = t_2
else if (z <= 1.35d-112) then
tmp = t_1
else if (z <= 1.95d-40) then
tmp = (t - a) / b
else if (z <= 1.7d+39) 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 / (1.0 - z);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -31.5) {
tmp = t_2;
} else if (z <= 1.35e-112) {
tmp = t_1;
} else if (z <= 1.95e-40) {
tmp = (t - a) / b;
} else if (z <= 1.7e+39) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) t_2 = (t - a) / (b - y) tmp = 0 if z <= -31.5: tmp = t_2 elif z <= 1.35e-112: tmp = t_1 elif z <= 1.95e-40: tmp = (t - a) / b elif z <= 1.7e+39: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -31.5) tmp = t_2; elseif (z <= 1.35e-112) tmp = t_1; elseif (z <= 1.95e-40) tmp = Float64(Float64(t - a) / b); elseif (z <= 1.7e+39) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -31.5) tmp = t_2; elseif (z <= 1.35e-112) tmp = t_1; elseif (z <= 1.95e-40) tmp = (t - a) / b; elseif (z <= 1.7e+39) 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[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -31.5], t$95$2, If[LessEqual[z, 1.35e-112], t$95$1, If[LessEqual[z, 1.95e-40], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 1.7e+39], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -31.5:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-112}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-40}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+39}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -31.5 or 1.6999999999999999e39 < z Initial program 44.4%
Taylor expanded in z around inf 78.4%
if -31.5 < z < 1.35e-112 or 1.9499999999999999e-40 < z < 1.6999999999999999e39Initial program 76.0%
Taylor expanded in y around inf 59.9%
mul-1-neg59.9%
unsub-neg59.9%
Simplified59.9%
if 1.35e-112 < z < 1.9499999999999999e-40Initial program 94.6%
Taylor expanded in y around 0 59.0%
Final simplification68.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -9.5e+145)
t_1
(if (<= y -4.6e+131)
(/ t (- b y))
(if (or (<= y -3.6e-28) (not (<= y 4.9e-21))) t_1 (/ (- t a) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -9.5e+145) {
tmp = t_1;
} else if (y <= -4.6e+131) {
tmp = t / (b - y);
} else if ((y <= -3.6e-28) || !(y <= 4.9e-21)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-9.5d+145)) then
tmp = t_1
else if (y <= (-4.6d+131)) then
tmp = t / (b - y)
else if ((y <= (-3.6d-28)) .or. (.not. (y <= 4.9d-21))) then
tmp = t_1
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 t_1 = x / (1.0 - z);
double tmp;
if (y <= -9.5e+145) {
tmp = t_1;
} else if (y <= -4.6e+131) {
tmp = t / (b - y);
} else if ((y <= -3.6e-28) || !(y <= 4.9e-21)) {
tmp = t_1;
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -9.5e+145: tmp = t_1 elif y <= -4.6e+131: tmp = t / (b - y) elif (y <= -3.6e-28) or not (y <= 4.9e-21): tmp = t_1 else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -9.5e+145) tmp = t_1; elseif (y <= -4.6e+131) tmp = Float64(t / Float64(b - y)); elseif ((y <= -3.6e-28) || !(y <= 4.9e-21)) tmp = t_1; else tmp = Float64(Float64(t - a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -9.5e+145) tmp = t_1; elseif (y <= -4.6e+131) tmp = t / (b - y); elseif ((y <= -3.6e-28) || ~((y <= 4.9e-21))) tmp = t_1; else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.5e+145], t$95$1, If[LessEqual[y, -4.6e+131], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -3.6e-28], N[Not[LessEqual[y, 4.9e-21]], $MachinePrecision]], t$95$1, N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{+145}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4.6 \cdot 10^{+131}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{-28} \lor \neg \left(y \leq 4.9 \cdot 10^{-21}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -9.49999999999999948e145 or -4.59999999999999983e131 < y < -3.5999999999999999e-28 or 4.9000000000000002e-21 < y Initial program 49.6%
Taylor expanded in y around inf 56.8%
mul-1-neg56.8%
unsub-neg56.8%
Simplified56.8%
if -9.49999999999999948e145 < y < -4.59999999999999983e131Initial program 15.9%
Taylor expanded in t around inf 15.9%
*-commutative15.9%
Simplified15.9%
Taylor expanded in z around inf 72.5%
if -3.5999999999999999e-28 < y < 4.9000000000000002e-21Initial program 82.8%
Taylor expanded in y around 0 59.5%
Final simplification58.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -4400.0)
(/ a y)
(if (<= z 1.55e-112)
x
(if (<= z 3.2e-41) (/ t b) (if (<= z 1.0) (+ x (* x z)) (/ (- t) y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4400.0) {
tmp = a / y;
} else if (z <= 1.55e-112) {
tmp = x;
} else if (z <= 3.2e-41) {
tmp = t / b;
} else if (z <= 1.0) {
tmp = x + (x * z);
} else {
tmp = -t / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-4400.0d0)) then
tmp = a / y
else if (z <= 1.55d-112) then
tmp = x
else if (z <= 3.2d-41) then
tmp = t / b
else if (z <= 1.0d0) then
tmp = x + (x * z)
else
tmp = -t / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4400.0) {
tmp = a / y;
} else if (z <= 1.55e-112) {
tmp = x;
} else if (z <= 3.2e-41) {
tmp = t / b;
} else if (z <= 1.0) {
tmp = x + (x * z);
} else {
tmp = -t / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -4400.0: tmp = a / y elif z <= 1.55e-112: tmp = x elif z <= 3.2e-41: tmp = t / b elif z <= 1.0: tmp = x + (x * z) else: tmp = -t / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -4400.0) tmp = Float64(a / y); elseif (z <= 1.55e-112) tmp = x; elseif (z <= 3.2e-41) tmp = Float64(t / b); elseif (z <= 1.0) tmp = Float64(x + Float64(x * z)); else tmp = Float64(Float64(-t) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -4400.0) tmp = a / y; elseif (z <= 1.55e-112) tmp = x; elseif (z <= 3.2e-41) tmp = t / b; elseif (z <= 1.0) tmp = x + (x * z); else tmp = -t / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4400.0], N[(a / y), $MachinePrecision], If[LessEqual[z, 1.55e-112], x, If[LessEqual[z, 3.2e-41], N[(t / b), $MachinePrecision], If[LessEqual[z, 1.0], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision], N[((-t) / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4400:\\
\;\;\;\;\frac{a}{y}\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-112}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-41}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x + x \cdot z\\
\mathbf{else}:\\
\;\;\;\;\frac{-t}{y}\\
\end{array}
\end{array}
if z < -4400Initial program 52.0%
Taylor expanded in x around 0 46.2%
Taylor expanded in y around inf 26.2%
mul-1-neg26.2%
sub-neg26.2%
Simplified26.2%
Taylor expanded in z around inf 41.7%
mul-1-neg41.7%
Simplified41.7%
Taylor expanded in t around 0 26.7%
neg-mul-126.7%
distribute-neg-frac26.7%
Simplified26.7%
if -4400 < z < 1.5499999999999999e-112Initial program 77.7%
Taylor expanded in z around 0 58.3%
if 1.5499999999999999e-112 < z < 3.20000000000000012e-41Initial program 94.6%
Taylor expanded in t around inf 50.8%
*-commutative50.8%
Simplified50.8%
Taylor expanded in y around 0 30.5%
if 3.20000000000000012e-41 < z < 1Initial program 78.8%
Taylor expanded in y around inf 67.6%
mul-1-neg67.6%
unsub-neg67.6%
Simplified67.6%
Taylor expanded in z around 0 63.3%
if 1 < z Initial program 34.3%
Taylor expanded in x around 0 29.6%
Taylor expanded in y around inf 21.4%
mul-1-neg21.4%
sub-neg21.4%
Simplified21.4%
Taylor expanded in t around inf 14.9%
times-frac30.3%
Simplified30.3%
Taylor expanded in z around inf 30.3%
associate-*r/30.3%
neg-mul-130.3%
Simplified30.3%
Final simplification42.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* x z))))
(if (<= z -0.38)
(/ a (- y b))
(if (<= z 1.55e-112)
t_1
(if (<= z 3.4e-41) (/ t b) (if (<= z 0.43) t_1 (/ t (- b y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (x * z);
double tmp;
if (z <= -0.38) {
tmp = a / (y - b);
} else if (z <= 1.55e-112) {
tmp = t_1;
} else if (z <= 3.4e-41) {
tmp = t / b;
} else if (z <= 0.43) {
tmp = t_1;
} else {
tmp = t / (b - y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (x * z)
if (z <= (-0.38d0)) then
tmp = a / (y - b)
else if (z <= 1.55d-112) then
tmp = t_1
else if (z <= 3.4d-41) then
tmp = t / b
else if (z <= 0.43d0) then
tmp = t_1
else
tmp = t / (b - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (x * z);
double tmp;
if (z <= -0.38) {
tmp = a / (y - b);
} else if (z <= 1.55e-112) {
tmp = t_1;
} else if (z <= 3.4e-41) {
tmp = t / b;
} else if (z <= 0.43) {
tmp = t_1;
} else {
tmp = t / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (x * z) tmp = 0 if z <= -0.38: tmp = a / (y - b) elif z <= 1.55e-112: tmp = t_1 elif z <= 3.4e-41: tmp = t / b elif z <= 0.43: tmp = t_1 else: tmp = t / (b - y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(x * z)) tmp = 0.0 if (z <= -0.38) tmp = Float64(a / Float64(y - b)); elseif (z <= 1.55e-112) tmp = t_1; elseif (z <= 3.4e-41) tmp = Float64(t / b); elseif (z <= 0.43) tmp = t_1; else tmp = Float64(t / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (x * z); tmp = 0.0; if (z <= -0.38) tmp = a / (y - b); elseif (z <= 1.55e-112) tmp = t_1; elseif (z <= 3.4e-41) tmp = t / b; elseif (z <= 0.43) tmp = t_1; else tmp = t / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.38], N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e-112], t$95$1, If[LessEqual[z, 3.4e-41], N[(t / b), $MachinePrecision], If[LessEqual[z, 0.43], t$95$1, N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + x \cdot z\\
\mathbf{if}\;z \leq -0.38:\\
\;\;\;\;\frac{a}{y - b}\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-112}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-41}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 0.43:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y}\\
\end{array}
\end{array}
if z < -0.38Initial program 52.8%
sub-neg52.8%
distribute-lft-in52.6%
Applied egg-rr52.6%
Taylor expanded in z around -inf 64.2%
mul-1-neg64.2%
unsub-neg64.2%
mul-1-neg64.2%
mul-1-neg64.2%
unsub-neg64.2%
Simplified90.3%
Taylor expanded in x around inf 81.6%
times-frac99.6%
Simplified99.6%
Taylor expanded in a around inf 41.8%
if -0.38 < z < 1.5499999999999999e-112 or 3.3999999999999998e-41 < z < 0.429999999999999993Initial program 77.6%
Taylor expanded in y around inf 60.2%
mul-1-neg60.2%
unsub-neg60.2%
Simplified60.2%
Taylor expanded in z around 0 59.1%
if 1.5499999999999999e-112 < z < 3.3999999999999998e-41Initial program 94.6%
Taylor expanded in t around inf 50.8%
*-commutative50.8%
Simplified50.8%
Taylor expanded in y around 0 30.5%
if 0.429999999999999993 < z Initial program 34.3%
Taylor expanded in t around inf 23.6%
*-commutative23.6%
Simplified23.6%
Taylor expanded in z around inf 49.8%
Final simplification50.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= z -19000000.0)
(/ a (- y b))
(if (<= z 1.55e-112)
t_1
(if (<= z 2.32e-38) (/ t b) (if (<= z 8.8e+14) t_1 (/ t (- b y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (z <= -19000000.0) {
tmp = a / (y - b);
} else if (z <= 1.55e-112) {
tmp = t_1;
} else if (z <= 2.32e-38) {
tmp = t / b;
} else if (z <= 8.8e+14) {
tmp = t_1;
} else {
tmp = t / (b - y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (z <= (-19000000.0d0)) then
tmp = a / (y - b)
else if (z <= 1.55d-112) then
tmp = t_1
else if (z <= 2.32d-38) then
tmp = t / b
else if (z <= 8.8d+14) then
tmp = t_1
else
tmp = t / (b - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (z <= -19000000.0) {
tmp = a / (y - b);
} else if (z <= 1.55e-112) {
tmp = t_1;
} else if (z <= 2.32e-38) {
tmp = t / b;
} else if (z <= 8.8e+14) {
tmp = t_1;
} else {
tmp = t / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if z <= -19000000.0: tmp = a / (y - b) elif z <= 1.55e-112: tmp = t_1 elif z <= 2.32e-38: tmp = t / b elif z <= 8.8e+14: tmp = t_1 else: tmp = t / (b - y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (z <= -19000000.0) tmp = Float64(a / Float64(y - b)); elseif (z <= 1.55e-112) tmp = t_1; elseif (z <= 2.32e-38) tmp = Float64(t / b); elseif (z <= 8.8e+14) tmp = t_1; else tmp = Float64(t / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (z <= -19000000.0) tmp = a / (y - b); elseif (z <= 1.55e-112) tmp = t_1; elseif (z <= 2.32e-38) tmp = t / b; elseif (z <= 8.8e+14) tmp = t_1; else tmp = t / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -19000000.0], N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e-112], t$95$1, If[LessEqual[z, 2.32e-38], N[(t / b), $MachinePrecision], If[LessEqual[z, 8.8e+14], t$95$1, N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;z \leq -19000000:\\
\;\;\;\;\frac{a}{y - b}\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-112}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.32 \cdot 10^{-38}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{+14}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y}\\
\end{array}
\end{array}
if z < -1.9e7Initial program 52.0%
sub-neg52.0%
distribute-lft-in51.9%
Applied egg-rr51.9%
Taylor expanded in z around -inf 63.6%
mul-1-neg63.6%
unsub-neg63.6%
mul-1-neg63.6%
mul-1-neg63.6%
unsub-neg63.6%
Simplified90.1%
Taylor expanded in x around inf 81.3%
times-frac99.6%
Simplified99.6%
Taylor expanded in a around inf 42.4%
if -1.9e7 < z < 1.5499999999999999e-112 or 2.3199999999999999e-38 < z < 8.8e14Initial program 78.0%
Taylor expanded in y around inf 60.0%
mul-1-neg60.0%
unsub-neg60.0%
Simplified60.0%
if 1.5499999999999999e-112 < z < 2.3199999999999999e-38Initial program 94.6%
Taylor expanded in t around inf 50.8%
*-commutative50.8%
Simplified50.8%
Taylor expanded in y around 0 30.5%
if 8.8e14 < z Initial program 33.2%
Taylor expanded in t around inf 22.2%
*-commutative22.2%
Simplified22.2%
Taylor expanded in z around inf 50.5%
Final simplification51.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -0.37)
(/ t b)
(if (<= z 1.55e-112)
x
(if (<= z 2.7e-39) (/ t b) (if (<= z 0.74) x (/ (- t) y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.37) {
tmp = t / b;
} else if (z <= 1.55e-112) {
tmp = x;
} else if (z <= 2.7e-39) {
tmp = t / b;
} else if (z <= 0.74) {
tmp = x;
} else {
tmp = -t / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-0.37d0)) then
tmp = t / b
else if (z <= 1.55d-112) then
tmp = x
else if (z <= 2.7d-39) then
tmp = t / b
else if (z <= 0.74d0) then
tmp = x
else
tmp = -t / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.37) {
tmp = t / b;
} else if (z <= 1.55e-112) {
tmp = x;
} else if (z <= 2.7e-39) {
tmp = t / b;
} else if (z <= 0.74) {
tmp = x;
} else {
tmp = -t / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -0.37: tmp = t / b elif z <= 1.55e-112: tmp = x elif z <= 2.7e-39: tmp = t / b elif z <= 0.74: tmp = x else: tmp = -t / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.37) tmp = Float64(t / b); elseif (z <= 1.55e-112) tmp = x; elseif (z <= 2.7e-39) tmp = Float64(t / b); elseif (z <= 0.74) tmp = x; else tmp = Float64(Float64(-t) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -0.37) tmp = t / b; elseif (z <= 1.55e-112) tmp = x; elseif (z <= 2.7e-39) tmp = t / b; elseif (z <= 0.74) tmp = x; else tmp = -t / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.37], N[(t / b), $MachinePrecision], If[LessEqual[z, 1.55e-112], x, If[LessEqual[z, 2.7e-39], N[(t / b), $MachinePrecision], If[LessEqual[z, 0.74], x, N[((-t) / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.37:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-112}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-39}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 0.74:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{-t}{y}\\
\end{array}
\end{array}
if z < -0.37 or 1.5499999999999999e-112 < z < 2.7000000000000001e-39Initial program 62.3%
Taylor expanded in t around inf 36.6%
*-commutative36.6%
Simplified36.6%
Taylor expanded in y around 0 27.2%
if -0.37 < z < 1.5499999999999999e-112 or 2.7000000000000001e-39 < z < 0.73999999999999999Initial program 77.6%
Taylor expanded in z around 0 58.9%
if 0.73999999999999999 < z Initial program 34.3%
Taylor expanded in x around 0 29.6%
Taylor expanded in y around inf 21.4%
mul-1-neg21.4%
sub-neg21.4%
Simplified21.4%
Taylor expanded in t around inf 14.9%
times-frac30.3%
Simplified30.3%
Taylor expanded in z around inf 30.3%
associate-*r/30.3%
neg-mul-130.3%
Simplified30.3%
Final simplification42.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -2800000.0)
(/ a y)
(if (<= z 1.55e-112)
x
(if (<= z 6e-40) (/ t b) (if (<= z 1.0) x (/ (- t) y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2800000.0) {
tmp = a / y;
} else if (z <= 1.55e-112) {
tmp = x;
} else if (z <= 6e-40) {
tmp = t / b;
} else if (z <= 1.0) {
tmp = x;
} else {
tmp = -t / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-2800000.0d0)) then
tmp = a / y
else if (z <= 1.55d-112) then
tmp = x
else if (z <= 6d-40) then
tmp = t / b
else if (z <= 1.0d0) then
tmp = x
else
tmp = -t / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2800000.0) {
tmp = a / y;
} else if (z <= 1.55e-112) {
tmp = x;
} else if (z <= 6e-40) {
tmp = t / b;
} else if (z <= 1.0) {
tmp = x;
} else {
tmp = -t / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2800000.0: tmp = a / y elif z <= 1.55e-112: tmp = x elif z <= 6e-40: tmp = t / b elif z <= 1.0: tmp = x else: tmp = -t / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2800000.0) tmp = Float64(a / y); elseif (z <= 1.55e-112) tmp = x; elseif (z <= 6e-40) tmp = Float64(t / b); elseif (z <= 1.0) tmp = x; else tmp = Float64(Float64(-t) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2800000.0) tmp = a / y; elseif (z <= 1.55e-112) tmp = x; elseif (z <= 6e-40) tmp = t / b; elseif (z <= 1.0) tmp = x; else tmp = -t / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2800000.0], N[(a / y), $MachinePrecision], If[LessEqual[z, 1.55e-112], x, If[LessEqual[z, 6e-40], N[(t / b), $MachinePrecision], If[LessEqual[z, 1.0], x, N[((-t) / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2800000:\\
\;\;\;\;\frac{a}{y}\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-112}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-40}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{-t}{y}\\
\end{array}
\end{array}
if z < -2.8e6Initial program 52.0%
Taylor expanded in x around 0 46.2%
Taylor expanded in y around inf 26.2%
mul-1-neg26.2%
sub-neg26.2%
Simplified26.2%
Taylor expanded in z around inf 41.7%
mul-1-neg41.7%
Simplified41.7%
Taylor expanded in t around 0 26.7%
neg-mul-126.7%
distribute-neg-frac26.7%
Simplified26.7%
if -2.8e6 < z < 1.5499999999999999e-112 or 6.00000000000000039e-40 < z < 1Initial program 77.8%
Taylor expanded in z around 0 58.5%
if 1.5499999999999999e-112 < z < 6.00000000000000039e-40Initial program 94.6%
Taylor expanded in t around inf 50.8%
*-commutative50.8%
Simplified50.8%
Taylor expanded in y around 0 30.5%
if 1 < z Initial program 34.3%
Taylor expanded in x around 0 29.6%
Taylor expanded in y around inf 21.4%
mul-1-neg21.4%
sub-neg21.4%
Simplified21.4%
Taylor expanded in t around inf 14.9%
times-frac30.3%
Simplified30.3%
Taylor expanded in z around inf 30.3%
associate-*r/30.3%
neg-mul-130.3%
Simplified30.3%
Final simplification42.1%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -0.37)
(and (not (<= z 1.45e-112))
(or (<= z 1.75e-40) (not (<= z 88000000000.0)))))
(/ t b)
x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -0.37) || (!(z <= 1.45e-112) && ((z <= 1.75e-40) || !(z <= 88000000000.0)))) {
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 <= (-0.37d0)) .or. (.not. (z <= 1.45d-112)) .and. (z <= 1.75d-40) .or. (.not. (z <= 88000000000.0d0))) 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 <= -0.37) || (!(z <= 1.45e-112) && ((z <= 1.75e-40) || !(z <= 88000000000.0)))) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -0.37) or (not (z <= 1.45e-112) and ((z <= 1.75e-40) or not (z <= 88000000000.0))): tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -0.37) || (!(z <= 1.45e-112) && ((z <= 1.75e-40) || !(z <= 88000000000.0)))) 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 <= -0.37) || (~((z <= 1.45e-112)) && ((z <= 1.75e-40) || ~((z <= 88000000000.0))))) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -0.37], And[N[Not[LessEqual[z, 1.45e-112]], $MachinePrecision], Or[LessEqual[z, 1.75e-40], N[Not[LessEqual[z, 88000000000.0]], $MachinePrecision]]]], N[(t / b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.37 \lor \neg \left(z \leq 1.45 \cdot 10^{-112}\right) \land \left(z \leq 1.75 \cdot 10^{-40} \lor \neg \left(z \leq 88000000000\right)\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -0.37 or 1.44999999999999996e-112 < z < 1.7500000000000001e-40 or 8.8e10 < z Initial program 50.4%
Taylor expanded in t around inf 30.7%
*-commutative30.7%
Simplified30.7%
Taylor expanded in y around 0 25.4%
if -0.37 < z < 1.44999999999999996e-112 or 1.7500000000000001e-40 < z < 8.8e10Initial program 77.8%
Taylor expanded in z around 0 58.5%
Final simplification40.2%
(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 62.7%
Taylor expanded in z around 0 28.5%
Final simplification28.5%
(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 2023322
(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)))))