
(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 22 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
(if (or (<= z -6700000000000.0) (not (<= z 19000000.0)))
(+
(/ t (- b y))
(-
(* (/ x z) (/ y (- b y)))
(+ (/ a (- b y)) (/ y (/ (* z (pow (- b y) 2.0)) (- t a))))))
(/ (fma x y (* z (- t a))) (fma z (- b y) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6700000000000.0) || !(z <= 19000000.0)) {
tmp = (t / (b - y)) + (((x / z) * (y / (b - y))) - ((a / (b - y)) + (y / ((z * pow((b - y), 2.0)) / (t - a)))));
} else {
tmp = fma(x, y, (z * (t - a))) / fma(z, (b - y), y);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6700000000000.0) || !(z <= 19000000.0)) tmp = Float64(Float64(t / Float64(b - y)) + Float64(Float64(Float64(x / z) * Float64(y / Float64(b - y))) - Float64(Float64(a / Float64(b - y)) + Float64(y / Float64(Float64(z * (Float64(b - y) ^ 2.0)) / Float64(t - a)))))); else tmp = Float64(fma(x, y, Float64(z * Float64(t - a))) / fma(z, Float64(b - y), y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6700000000000.0], N[Not[LessEqual[z, 19000000.0]], $MachinePrecision]], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[(z * N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6700000000000 \lor \neg \left(z \leq 19000000\right):\\
\;\;\;\;\frac{t}{b - y} + \left(\frac{x}{z} \cdot \frac{y}{b - y} - \left(\frac{a}{b - y} + \frac{y}{\frac{z \cdot {\left(b - y\right)}^{2}}{t - a}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\
\end{array}
\end{array}
if z < -6.7e12 or 1.9e7 < z Initial program 36.9%
Taylor expanded in z around inf 75.8%
associate--l+75.8%
times-frac84.1%
associate-/l*97.5%
Simplified97.5%
if -6.7e12 < z < 1.9e7Initial program 92.1%
fma-def92.1%
+-commutative92.1%
fma-def92.1%
Simplified92.1%
Final simplification94.6%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -29000000000000.0) (not (<= z 31000000.0)))
(+
(/ t (- b y))
(-
(* (/ x z) (/ y (- b y)))
(+ (/ a (- b y)) (/ y (/ (* z (pow (- b y) 2.0)) (- t a))))))
(/ (fma x y (* z (- t a))) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -29000000000000.0) || !(z <= 31000000.0)) {
tmp = (t / (b - y)) + (((x / z) * (y / (b - y))) - ((a / (b - y)) + (y / ((z * pow((b - y), 2.0)) / (t - a)))));
} else {
tmp = fma(x, y, (z * (t - a))) / (y + (z * (b - y)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -29000000000000.0) || !(z <= 31000000.0)) tmp = Float64(Float64(t / Float64(b - y)) + Float64(Float64(Float64(x / z) * Float64(y / Float64(b - y))) - Float64(Float64(a / Float64(b - y)) + Float64(y / Float64(Float64(z * (Float64(b - y) ^ 2.0)) / Float64(t - a)))))); else tmp = Float64(fma(x, y, Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -29000000000000.0], N[Not[LessEqual[z, 31000000.0]], $MachinePrecision]], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[(z * N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -29000000000000 \lor \neg \left(z \leq 31000000\right):\\
\;\;\;\;\frac{t}{b - y} + \left(\frac{x}{z} \cdot \frac{y}{b - y} - \left(\frac{a}{b - y} + \frac{y}{\frac{z \cdot {\left(b - y\right)}^{2}}{t - a}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -2.9e13 or 3.1e7 < z Initial program 36.9%
Taylor expanded in z around inf 75.8%
associate--l+75.8%
times-frac84.1%
associate-/l*97.5%
Simplified97.5%
if -2.9e13 < z < 3.1e7Initial program 92.1%
fma-def92.1%
Simplified92.1%
Final simplification94.6%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -2.6e+16) (not (<= z 4.35e+24)))
(+
(+ (* (/ y z) (/ x (- b y))) (/ (- t a) (- b y)))
(* (/ y z) (/ (- a t) (pow (- b y) 2.0))))
(/ (fma x y (* z (- t a))) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.6e+16) || !(z <= 4.35e+24)) {
tmp = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + ((y / z) * ((a - t) / pow((b - y), 2.0)));
} else {
tmp = fma(x, y, (z * (t - a))) / (y + (z * (b - y)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.6e+16) || !(z <= 4.35e+24)) tmp = Float64(Float64(Float64(Float64(y / z) * Float64(x / Float64(b - y))) + Float64(Float64(t - a) / Float64(b - y))) + Float64(Float64(y / z) * Float64(Float64(a - t) / (Float64(b - y) ^ 2.0)))); else tmp = Float64(fma(x, y, Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.6e+16], N[Not[LessEqual[z, 4.35e+24]], $MachinePrecision]], N[(N[(N[(N[(y / z), $MachinePrecision] * N[(x / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+16} \lor \neg \left(z \leq 4.35 \cdot 10^{+24}\right):\\
\;\;\;\;\left(\frac{y}{z} \cdot \frac{x}{b - y} + \frac{t - a}{b - y}\right) + \frac{y}{z} \cdot \frac{a - t}{{\left(b - y\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -2.6e16 or 4.34999999999999995e24 < z Initial program 34.1%
Taylor expanded in z around inf 74.8%
associate--r+74.8%
+-commutative74.8%
associate--l+74.8%
*-commutative74.8%
times-frac83.1%
div-sub84.0%
times-frac89.3%
Simplified89.3%
if -2.6e16 < z < 4.34999999999999995e24Initial program 92.4%
fma-def92.4%
Simplified92.4%
Final simplification91.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.3e+76) (not (<= z 1.5e+68))) (/ (- t a) (- b y)) (/ (fma x y (* z (- t a))) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.3e+76) || !(z <= 1.5e+68)) {
tmp = (t - a) / (b - y);
} else {
tmp = fma(x, y, (z * (t - a))) / (y + (z * (b - y)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.3e+76) || !(z <= 1.5e+68)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(fma(x, y, Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.3e+76], N[Not[LessEqual[z, 1.5e+68]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(x * y + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+76} \lor \neg \left(z \leq 1.5 \cdot 10^{+68}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -1.3e76 or 1.5000000000000001e68 < z Initial program 29.8%
Taylor expanded in z around inf 87.2%
if -1.3e76 < z < 1.5000000000000001e68Initial program 89.9%
fma-def89.9%
Simplified89.9%
Final simplification88.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (+ x (/ t_1 y)))
(t_3 (/ (- t a) (- b y)))
(t_4 (/ t_1 (+ y (* z (- b y))))))
(if (<= z -2.3e-29)
t_3
(if (<= z -2.25e-144)
t_2
(if (<= z -8.2e-202)
t_4
(if (<= z 2.45e-83)
t_2
(if (<= z 3.9e+16)
t_4
(if (<= z 1.45e+68) (- (/ a y) (/ x (+ z -1.0))) t_3))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = x + (t_1 / y);
double t_3 = (t - a) / (b - y);
double t_4 = t_1 / (y + (z * (b - y)));
double tmp;
if (z <= -2.3e-29) {
tmp = t_3;
} else if (z <= -2.25e-144) {
tmp = t_2;
} else if (z <= -8.2e-202) {
tmp = t_4;
} else if (z <= 2.45e-83) {
tmp = t_2;
} else if (z <= 3.9e+16) {
tmp = t_4;
} else if (z <= 1.45e+68) {
tmp = (a / y) - (x / (z + -1.0));
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = z * (t - a)
t_2 = x + (t_1 / y)
t_3 = (t - a) / (b - y)
t_4 = t_1 / (y + (z * (b - y)))
if (z <= (-2.3d-29)) then
tmp = t_3
else if (z <= (-2.25d-144)) then
tmp = t_2
else if (z <= (-8.2d-202)) then
tmp = t_4
else if (z <= 2.45d-83) then
tmp = t_2
else if (z <= 3.9d+16) then
tmp = t_4
else if (z <= 1.45d+68) then
tmp = (a / y) - (x / (z + (-1.0d0)))
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = x + (t_1 / y);
double t_3 = (t - a) / (b - y);
double t_4 = t_1 / (y + (z * (b - y)));
double tmp;
if (z <= -2.3e-29) {
tmp = t_3;
} else if (z <= -2.25e-144) {
tmp = t_2;
} else if (z <= -8.2e-202) {
tmp = t_4;
} else if (z <= 2.45e-83) {
tmp = t_2;
} else if (z <= 3.9e+16) {
tmp = t_4;
} else if (z <= 1.45e+68) {
tmp = (a / y) - (x / (z + -1.0));
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = x + (t_1 / y) t_3 = (t - a) / (b - y) t_4 = t_1 / (y + (z * (b - y))) tmp = 0 if z <= -2.3e-29: tmp = t_3 elif z <= -2.25e-144: tmp = t_2 elif z <= -8.2e-202: tmp = t_4 elif z <= 2.45e-83: tmp = t_2 elif z <= 3.9e+16: tmp = t_4 elif z <= 1.45e+68: tmp = (a / y) - (x / (z + -1.0)) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(x + Float64(t_1 / y)) t_3 = Float64(Float64(t - a) / Float64(b - y)) t_4 = Float64(t_1 / Float64(y + Float64(z * Float64(b - y)))) tmp = 0.0 if (z <= -2.3e-29) tmp = t_3; elseif (z <= -2.25e-144) tmp = t_2; elseif (z <= -8.2e-202) tmp = t_4; elseif (z <= 2.45e-83) tmp = t_2; elseif (z <= 3.9e+16) tmp = t_4; elseif (z <= 1.45e+68) tmp = Float64(Float64(a / y) - Float64(x / Float64(z + -1.0))); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = x + (t_1 / y); t_3 = (t - a) / (b - y); t_4 = t_1 / (y + (z * (b - y))); tmp = 0.0; if (z <= -2.3e-29) tmp = t_3; elseif (z <= -2.25e-144) tmp = t_2; elseif (z <= -8.2e-202) tmp = t_4; elseif (z <= 2.45e-83) tmp = t_2; elseif (z <= 3.9e+16) tmp = t_4; elseif (z <= 1.45e+68) tmp = (a / y) - (x / (z + -1.0)); else tmp = t_3; 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[(x + N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.3e-29], t$95$3, If[LessEqual[z, -2.25e-144], t$95$2, If[LessEqual[z, -8.2e-202], t$95$4, If[LessEqual[z, 2.45e-83], t$95$2, If[LessEqual[z, 3.9e+16], t$95$4, If[LessEqual[z, 1.45e+68], N[(N[(a / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := x + \frac{t_1}{y}\\
t_3 := \frac{t - a}{b - y}\\
t_4 := \frac{t_1}{y + z \cdot \left(b - y\right)}\\
\mathbf{if}\;z \leq -2.3 \cdot 10^{-29}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -2.25 \cdot 10^{-144}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-202}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-83}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{+16}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+68}:\\
\;\;\;\;\frac{a}{y} - \frac{x}{z + -1}\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if z < -2.29999999999999991e-29 or 1.45000000000000006e68 < z Initial program 35.8%
Taylor expanded in z around inf 83.7%
if -2.29999999999999991e-29 < z < -2.2499999999999999e-144 or -8.2000000000000008e-202 < z < 2.45e-83Initial program 91.5%
Taylor expanded in z around 0 76.6%
Taylor expanded in x around 0 82.9%
if -2.2499999999999999e-144 < z < -8.2000000000000008e-202 or 2.45e-83 < z < 3.9e16Initial program 94.9%
Taylor expanded in x around 0 67.9%
if 3.9e16 < z < 1.45000000000000006e68Initial program 70.7%
Taylor expanded in y around -inf 80.0%
mul-1-neg80.0%
unsub-neg80.0%
associate-*r/80.0%
neg-mul-180.0%
sub-neg80.0%
metadata-eval80.0%
Simplified90.0%
Taylor expanded in z around inf 90.0%
Taylor expanded in t around 0 90.0%
+-commutative90.0%
mul-1-neg90.0%
sub-neg90.0%
metadata-eval90.0%
unsub-neg90.0%
Simplified90.0%
Final simplification81.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.3e+76) (not (<= z 9.2e+68))) (/ (- t a) (- b y)) (/ (+ (* z (- t a)) (* y x)) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.3e+76) || !(z <= 9.2e+68)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.3d+76)) .or. (.not. (z <= 9.2d+68))) then
tmp = (t - a) / (b - y)
else
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.3e+76) || !(z <= 9.2e+68)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.3e+76) or not (z <= 9.2e+68): tmp = (t - a) / (b - y) else: tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.3e+76) || !(z <= 9.2e+68)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.3e+76) || ~((z <= 9.2e+68))) tmp = (t - a) / (b - y); else tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.3e+76], N[Not[LessEqual[z, 9.2e+68]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+76} \lor \neg \left(z \leq 9.2 \cdot 10^{+68}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -1.3e76 or 9.1999999999999999e68 < z Initial program 29.8%
Taylor expanded in z around inf 87.2%
if -1.3e76 < z < 9.1999999999999999e68Initial program 89.9%
Final simplification88.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -1.2e-25)
t_1
(if (<= z 1.3e-66)
(+ x (/ (* z (- t a)) y))
(if (<= z 0.0074)
(/ (- (+ t (/ (* y x) z)) a) b)
(if (<= z 1.45e+68) (- (/ (- a t) y) (/ x (+ z -1.0))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.2e-25) {
tmp = t_1;
} else if (z <= 1.3e-66) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 0.0074) {
tmp = ((t + ((y * x) / z)) - a) / b;
} else if (z <= 1.45e+68) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-1.2d-25)) then
tmp = t_1
else if (z <= 1.3d-66) then
tmp = x + ((z * (t - a)) / y)
else if (z <= 0.0074d0) then
tmp = ((t + ((y * x) / z)) - a) / b
else if (z <= 1.45d+68) then
tmp = ((a - t) / y) - (x / (z + (-1.0d0)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.2e-25) {
tmp = t_1;
} else if (z <= 1.3e-66) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 0.0074) {
tmp = ((t + ((y * x) / z)) - a) / b;
} else if (z <= 1.45e+68) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -1.2e-25: tmp = t_1 elif z <= 1.3e-66: tmp = x + ((z * (t - a)) / y) elif z <= 0.0074: tmp = ((t + ((y * x) / z)) - a) / b elif z <= 1.45e+68: tmp = ((a - t) / y) - (x / (z + -1.0)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.2e-25) tmp = t_1; elseif (z <= 1.3e-66) tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); elseif (z <= 0.0074) tmp = Float64(Float64(Float64(t + Float64(Float64(y * x) / z)) - a) / b); elseif (z <= 1.45e+68) tmp = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.2e-25) tmp = t_1; elseif (z <= 1.3e-66) tmp = x + ((z * (t - a)) / y); elseif (z <= 0.0074) tmp = ((t + ((y * x) / z)) - a) / b; elseif (z <= 1.45e+68) tmp = ((a - t) / y) - (x / (z + -1.0)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.2e-25], t$95$1, If[LessEqual[z, 1.3e-66], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.0074], N[(N[(N[(t + N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 1.45e+68], N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{-25}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-66}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq 0.0074:\\
\;\;\;\;\frac{\left(t + \frac{y \cdot x}{z}\right) - a}{b}\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+68}:\\
\;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.20000000000000005e-25 or 1.45000000000000006e68 < z Initial program 35.8%
Taylor expanded in z around inf 83.7%
if -1.20000000000000005e-25 < z < 1.2999999999999999e-66Initial program 92.7%
Taylor expanded in z around 0 71.0%
Taylor expanded in x around 0 76.3%
if 1.2999999999999999e-66 < z < 0.0074000000000000003Initial program 89.0%
Taylor expanded in z around inf 66.3%
associate--r+66.3%
+-commutative66.3%
associate--l+66.3%
*-commutative66.3%
times-frac66.2%
div-sub66.2%
times-frac66.3%
Simplified66.3%
Taylor expanded in b around inf 66.7%
if 0.0074000000000000003 < z < 1.45000000000000006e68Initial program 82.7%
Taylor expanded in y around -inf 77.0%
mul-1-neg77.0%
unsub-neg77.0%
associate-*r/77.0%
neg-mul-177.0%
sub-neg77.0%
metadata-eval77.0%
Simplified82.8%
Taylor expanded in z around inf 74.4%
Final simplification78.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.1e-24)
t_1
(if (<= z 7.2e-22)
(+ x (/ (* z (- t a)) y))
(if (or (<= z 3.9e+16) (not (<= z 1.45e+68)))
t_1
(- (/ a y) (/ x (+ z -1.0))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.1e-24) {
tmp = t_1;
} else if (z <= 7.2e-22) {
tmp = x + ((z * (t - a)) / y);
} else if ((z <= 3.9e+16) || !(z <= 1.45e+68)) {
tmp = t_1;
} else {
tmp = (a / y) - (x / (z + -1.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-2.1d-24)) then
tmp = t_1
else if (z <= 7.2d-22) then
tmp = x + ((z * (t - a)) / y)
else if ((z <= 3.9d+16) .or. (.not. (z <= 1.45d+68))) then
tmp = t_1
else
tmp = (a / y) - (x / (z + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.1e-24) {
tmp = t_1;
} else if (z <= 7.2e-22) {
tmp = x + ((z * (t - a)) / y);
} else if ((z <= 3.9e+16) || !(z <= 1.45e+68)) {
tmp = t_1;
} else {
tmp = (a / y) - (x / (z + -1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -2.1e-24: tmp = t_1 elif z <= 7.2e-22: tmp = x + ((z * (t - a)) / y) elif (z <= 3.9e+16) or not (z <= 1.45e+68): tmp = t_1 else: tmp = (a / y) - (x / (z + -1.0)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.1e-24) tmp = t_1; elseif (z <= 7.2e-22) tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); elseif ((z <= 3.9e+16) || !(z <= 1.45e+68)) tmp = t_1; else tmp = Float64(Float64(a / y) - Float64(x / Float64(z + -1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -2.1e-24) tmp = t_1; elseif (z <= 7.2e-22) tmp = x + ((z * (t - a)) / y); elseif ((z <= 3.9e+16) || ~((z <= 1.45e+68))) tmp = t_1; else tmp = (a / y) - (x / (z + -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.1e-24], t$95$1, If[LessEqual[z, 7.2e-22], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 3.9e+16], N[Not[LessEqual[z, 1.45e+68]], $MachinePrecision]], t$95$1, N[(N[(a / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{-24}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-22}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{+16} \lor \neg \left(z \leq 1.45 \cdot 10^{+68}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y} - \frac{x}{z + -1}\\
\end{array}
\end{array}
if z < -2.0999999999999999e-24 or 7.1999999999999996e-22 < z < 3.9e16 or 1.45000000000000006e68 < z Initial program 42.8%
Taylor expanded in z around inf 81.4%
if -2.0999999999999999e-24 < z < 7.1999999999999996e-22Initial program 91.7%
Taylor expanded in z around 0 67.2%
Taylor expanded in x around 0 73.6%
if 3.9e16 < z < 1.45000000000000006e68Initial program 70.7%
Taylor expanded in y around -inf 80.0%
mul-1-neg80.0%
unsub-neg80.0%
associate-*r/80.0%
neg-mul-180.0%
sub-neg80.0%
metadata-eval80.0%
Simplified90.0%
Taylor expanded in z around inf 90.0%
Taylor expanded in t around 0 90.0%
+-commutative90.0%
mul-1-neg90.0%
sub-neg90.0%
metadata-eval90.0%
unsub-neg90.0%
Simplified90.0%
Final simplification78.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -5.4e-30)
t_1
(if (<= z 6e-23)
(+ x (/ (* z (- t a)) y))
(if (or (<= z 43000000000000.0) (not (<= z 3.6e+68)))
t_1
(- (/ (- a t) y) (/ x z)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -5.4e-30) {
tmp = t_1;
} else if (z <= 6e-23) {
tmp = x + ((z * (t - a)) / y);
} else if ((z <= 43000000000000.0) || !(z <= 3.6e+68)) {
tmp = t_1;
} else {
tmp = ((a - t) / y) - (x / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-5.4d-30)) then
tmp = t_1
else if (z <= 6d-23) then
tmp = x + ((z * (t - a)) / y)
else if ((z <= 43000000000000.0d0) .or. (.not. (z <= 3.6d+68))) then
tmp = t_1
else
tmp = ((a - t) / y) - (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -5.4e-30) {
tmp = t_1;
} else if (z <= 6e-23) {
tmp = x + ((z * (t - a)) / y);
} else if ((z <= 43000000000000.0) || !(z <= 3.6e+68)) {
tmp = t_1;
} else {
tmp = ((a - t) / y) - (x / z);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -5.4e-30: tmp = t_1 elif z <= 6e-23: tmp = x + ((z * (t - a)) / y) elif (z <= 43000000000000.0) or not (z <= 3.6e+68): tmp = t_1 else: tmp = ((a - t) / y) - (x / z) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -5.4e-30) tmp = t_1; elseif (z <= 6e-23) tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); elseif ((z <= 43000000000000.0) || !(z <= 3.6e+68)) tmp = t_1; else tmp = Float64(Float64(Float64(a - t) / y) - Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -5.4e-30) tmp = t_1; elseif (z <= 6e-23) tmp = x + ((z * (t - a)) / y); elseif ((z <= 43000000000000.0) || ~((z <= 3.6e+68))) tmp = t_1; else tmp = ((a - t) / y) - (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.4e-30], t$95$1, If[LessEqual[z, 6e-23], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 43000000000000.0], N[Not[LessEqual[z, 3.6e+68]], $MachinePrecision]], t$95$1, N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -5.4 \cdot 10^{-30}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-23}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq 43000000000000 \lor \neg \left(z \leq 3.6 \cdot 10^{+68}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{a - t}{y} - \frac{x}{z}\\
\end{array}
\end{array}
if z < -5.39999999999999975e-30 or 6.00000000000000006e-23 < z < 4.3e13 or 3.5999999999999999e68 < z Initial program 42.3%
Taylor expanded in z around inf 81.4%
if -5.39999999999999975e-30 < z < 6.00000000000000006e-23Initial program 91.7%
Taylor expanded in z around 0 67.2%
Taylor expanded in x around 0 73.6%
if 4.3e13 < z < 3.5999999999999999e68Initial program 73.4%
Taylor expanded in y around -inf 81.8%
mul-1-neg81.8%
unsub-neg81.8%
associate-*r/81.8%
neg-mul-181.8%
sub-neg81.8%
metadata-eval81.8%
Simplified90.9%
Taylor expanded in z around inf 89.9%
Taylor expanded in z around inf 89.9%
associate--l+89.9%
mul-1-neg89.9%
div-sub89.9%
Simplified89.9%
Final simplification78.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2e-24)
t_1
(if (<= z 1.55e-33)
(+ x (/ (* z (- t a)) y))
(if (<= z 19500000000.0)
(/ (* z t) (+ y (* z (- b y))))
(if (<= z 1.45e+68) (- (/ (- a t) y) (/ x z)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2e-24) {
tmp = t_1;
} else if (z <= 1.55e-33) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 19500000000.0) {
tmp = (z * t) / (y + (z * (b - y)));
} else if (z <= 1.45e+68) {
tmp = ((a - t) / y) - (x / z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-2d-24)) then
tmp = t_1
else if (z <= 1.55d-33) then
tmp = x + ((z * (t - a)) / y)
else if (z <= 19500000000.0d0) then
tmp = (z * t) / (y + (z * (b - y)))
else if (z <= 1.45d+68) then
tmp = ((a - t) / y) - (x / z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2e-24) {
tmp = t_1;
} else if (z <= 1.55e-33) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 19500000000.0) {
tmp = (z * t) / (y + (z * (b - y)));
} else if (z <= 1.45e+68) {
tmp = ((a - t) / y) - (x / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -2e-24: tmp = t_1 elif z <= 1.55e-33: tmp = x + ((z * (t - a)) / y) elif z <= 19500000000.0: tmp = (z * t) / (y + (z * (b - y))) elif z <= 1.45e+68: tmp = ((a - t) / y) - (x / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2e-24) tmp = t_1; elseif (z <= 1.55e-33) tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); elseif (z <= 19500000000.0) tmp = Float64(Float64(z * t) / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= 1.45e+68) tmp = Float64(Float64(Float64(a - t) / y) - Float64(x / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -2e-24) tmp = t_1; elseif (z <= 1.55e-33) tmp = x + ((z * (t - a)) / y); elseif (z <= 19500000000.0) tmp = (z * t) / (y + (z * (b - y))); elseif (z <= 1.45e+68) tmp = ((a - t) / y) - (x / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2e-24], t$95$1, If[LessEqual[z, 1.55e-33], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 19500000000.0], N[(N[(z * t), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e+68], N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2 \cdot 10^{-24}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-33}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq 19500000000:\\
\;\;\;\;\frac{z \cdot t}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+68}:\\
\;\;\;\;\frac{a - t}{y} - \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.99999999999999985e-24 or 1.45000000000000006e68 < z Initial program 35.8%
Taylor expanded in z around inf 83.7%
if -1.99999999999999985e-24 < z < 1.54999999999999998e-33Initial program 91.4%
Taylor expanded in z around 0 67.8%
Taylor expanded in x around 0 74.4%
if 1.54999999999999998e-33 < z < 1.95e10Initial program 99.4%
Taylor expanded in t around inf 59.3%
*-commutative59.3%
Simplified59.3%
if 1.95e10 < z < 1.45000000000000006e68Initial program 73.4%
Taylor expanded in y around -inf 81.8%
mul-1-neg81.8%
unsub-neg81.8%
associate-*r/81.8%
neg-mul-181.8%
sub-neg81.8%
metadata-eval81.8%
Simplified90.9%
Taylor expanded in z around inf 89.9%
Taylor expanded in z around inf 89.9%
associate--l+89.9%
mul-1-neg89.9%
div-sub89.9%
Simplified89.9%
Final simplification78.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.1e-28)
t_1
(if (<= z 3.6e-66)
(+ x (/ (* z (- t a)) y))
(if (<= z 47000000000000.0)
(/ (+ t (- (/ x (/ z y)) a)) b)
(if (<= z 1.45e+68) (- (/ (- a t) y) (/ x z)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.1e-28) {
tmp = t_1;
} else if (z <= 3.6e-66) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 47000000000000.0) {
tmp = (t + ((x / (z / y)) - a)) / b;
} else if (z <= 1.45e+68) {
tmp = ((a - t) / y) - (x / z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-2.1d-28)) then
tmp = t_1
else if (z <= 3.6d-66) then
tmp = x + ((z * (t - a)) / y)
else if (z <= 47000000000000.0d0) then
tmp = (t + ((x / (z / y)) - a)) / b
else if (z <= 1.45d+68) then
tmp = ((a - t) / y) - (x / z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.1e-28) {
tmp = t_1;
} else if (z <= 3.6e-66) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 47000000000000.0) {
tmp = (t + ((x / (z / y)) - a)) / b;
} else if (z <= 1.45e+68) {
tmp = ((a - t) / y) - (x / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -2.1e-28: tmp = t_1 elif z <= 3.6e-66: tmp = x + ((z * (t - a)) / y) elif z <= 47000000000000.0: tmp = (t + ((x / (z / y)) - a)) / b elif z <= 1.45e+68: tmp = ((a - t) / y) - (x / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.1e-28) tmp = t_1; elseif (z <= 3.6e-66) tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); elseif (z <= 47000000000000.0) tmp = Float64(Float64(t + Float64(Float64(x / Float64(z / y)) - a)) / b); elseif (z <= 1.45e+68) tmp = Float64(Float64(Float64(a - t) / y) - Float64(x / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -2.1e-28) tmp = t_1; elseif (z <= 3.6e-66) tmp = x + ((z * (t - a)) / y); elseif (z <= 47000000000000.0) tmp = (t + ((x / (z / y)) - a)) / b; elseif (z <= 1.45e+68) tmp = ((a - t) / y) - (x / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.1e-28], t$95$1, If[LessEqual[z, 3.6e-66], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 47000000000000.0], N[(N[(t + N[(N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 1.45e+68], N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{-28}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-66}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq 47000000000000:\\
\;\;\;\;\frac{t + \left(\frac{x}{\frac{z}{y}} - a\right)}{b}\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+68}:\\
\;\;\;\;\frac{a - t}{y} - \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.10000000000000006e-28 or 1.45000000000000006e68 < z Initial program 35.8%
Taylor expanded in z around inf 83.7%
if -2.10000000000000006e-28 < z < 3.60000000000000012e-66Initial program 92.7%
Taylor expanded in z around 0 71.0%
Taylor expanded in x around 0 76.3%
if 3.60000000000000012e-66 < z < 4.7e13Initial program 91.7%
Taylor expanded in z around inf 54.0%
associate--r+54.0%
+-commutative54.0%
associate--l+54.0%
*-commutative54.0%
times-frac54.0%
div-sub54.0%
times-frac58.2%
Simplified58.2%
Taylor expanded in b around inf 59.0%
associate--l+59.0%
associate-/l*58.9%
Simplified58.9%
if 4.7e13 < z < 1.45000000000000006e68Initial program 73.4%
Taylor expanded in y around -inf 81.8%
mul-1-neg81.8%
unsub-neg81.8%
associate-*r/81.8%
neg-mul-181.8%
sub-neg81.8%
metadata-eval81.8%
Simplified90.9%
Taylor expanded in z around inf 89.9%
Taylor expanded in z around inf 89.9%
associate--l+89.9%
mul-1-neg89.9%
div-sub89.9%
Simplified89.9%
Final simplification78.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -8e-25)
t_1
(if (<= z 9.8e-71)
(+ x (/ (* z (- t a)) y))
(if (<= z 54000000000000.0)
(/ (- (+ t (/ (* y x) z)) a) b)
(if (<= z 3.6e+68) (- (/ (- a t) y) (/ x z)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -8e-25) {
tmp = t_1;
} else if (z <= 9.8e-71) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 54000000000000.0) {
tmp = ((t + ((y * x) / z)) - a) / b;
} else if (z <= 3.6e+68) {
tmp = ((a - t) / y) - (x / z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-8d-25)) then
tmp = t_1
else if (z <= 9.8d-71) then
tmp = x + ((z * (t - a)) / y)
else if (z <= 54000000000000.0d0) then
tmp = ((t + ((y * x) / z)) - a) / b
else if (z <= 3.6d+68) then
tmp = ((a - t) / y) - (x / z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -8e-25) {
tmp = t_1;
} else if (z <= 9.8e-71) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 54000000000000.0) {
tmp = ((t + ((y * x) / z)) - a) / b;
} else if (z <= 3.6e+68) {
tmp = ((a - t) / y) - (x / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -8e-25: tmp = t_1 elif z <= 9.8e-71: tmp = x + ((z * (t - a)) / y) elif z <= 54000000000000.0: tmp = ((t + ((y * x) / z)) - a) / b elif z <= 3.6e+68: tmp = ((a - t) / y) - (x / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -8e-25) tmp = t_1; elseif (z <= 9.8e-71) tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); elseif (z <= 54000000000000.0) tmp = Float64(Float64(Float64(t + Float64(Float64(y * x) / z)) - a) / b); elseif (z <= 3.6e+68) tmp = Float64(Float64(Float64(a - t) / y) - Float64(x / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -8e-25) tmp = t_1; elseif (z <= 9.8e-71) tmp = x + ((z * (t - a)) / y); elseif (z <= 54000000000000.0) tmp = ((t + ((y * x) / z)) - a) / b; elseif (z <= 3.6e+68) tmp = ((a - t) / y) - (x / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e-25], t$95$1, If[LessEqual[z, 9.8e-71], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 54000000000000.0], N[(N[(N[(t + N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 3.6e+68], N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -8 \cdot 10^{-25}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{-71}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq 54000000000000:\\
\;\;\;\;\frac{\left(t + \frac{y \cdot x}{z}\right) - a}{b}\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+68}:\\
\;\;\;\;\frac{a - t}{y} - \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -8.00000000000000031e-25 or 3.5999999999999999e68 < z Initial program 35.8%
Taylor expanded in z around inf 83.7%
if -8.00000000000000031e-25 < z < 9.7999999999999994e-71Initial program 92.7%
Taylor expanded in z around 0 71.0%
Taylor expanded in x around 0 76.3%
if 9.7999999999999994e-71 < z < 5.4e13Initial program 91.7%
Taylor expanded in z around inf 54.0%
associate--r+54.0%
+-commutative54.0%
associate--l+54.0%
*-commutative54.0%
times-frac54.0%
div-sub54.0%
times-frac58.2%
Simplified58.2%
Taylor expanded in b around inf 59.0%
if 5.4e13 < z < 3.5999999999999999e68Initial program 73.4%
Taylor expanded in y around -inf 81.8%
mul-1-neg81.8%
unsub-neg81.8%
associate-*r/81.8%
neg-mul-181.8%
sub-neg81.8%
metadata-eval81.8%
Simplified90.9%
Taylor expanded in z around inf 89.9%
Taylor expanded in z around inf 89.9%
associate--l+89.9%
mul-1-neg89.9%
div-sub89.9%
Simplified89.9%
Final simplification78.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6.2e-27) (not (<= z 2.6e-21))) (/ (- t a) (- b y)) (+ x (* z (/ (- t a) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.2e-27) || !(z <= 2.6e-21)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (z * ((t - a) / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-6.2d-27)) .or. (.not. (z <= 2.6d-21))) then
tmp = (t - a) / (b - y)
else
tmp = x + (z * ((t - a) / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.2e-27) || !(z <= 2.6e-21)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (z * ((t - a) / y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6.2e-27) or not (z <= 2.6e-21): tmp = (t - a) / (b - y) else: tmp = x + (z * ((t - a) / y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6.2e-27) || !(z <= 2.6e-21)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(z * Float64(Float64(t - a) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6.2e-27) || ~((z <= 2.6e-21))) tmp = (t - a) / (b - y); else tmp = x + (z * ((t - a) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6.2e-27], N[Not[LessEqual[z, 2.6e-21]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{-27} \lor \neg \left(z \leq 2.6 \cdot 10^{-21}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{t - a}{y}\\
\end{array}
\end{array}
if z < -6.1999999999999997e-27 or 2.60000000000000017e-21 < z Initial program 44.8%
Taylor expanded in z around inf 78.6%
if -6.1999999999999997e-27 < z < 2.60000000000000017e-21Initial program 91.7%
Taylor expanded in z around 0 67.2%
Taylor expanded in z around 0 68.8%
div-sub69.7%
Simplified69.7%
Final simplification74.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.5e-26) (not (<= z 7e-23))) (/ (- t a) (- b y)) (+ x (/ (* z (- t a)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.5e-26) || !(z <= 7e-23)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - a)) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.5d-26)) .or. (.not. (z <= 7d-23))) then
tmp = (t - a) / (b - y)
else
tmp = x + ((z * (t - a)) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.5e-26) || !(z <= 7e-23)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - a)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.5e-26) or not (z <= 7e-23): tmp = (t - a) / (b - y) else: tmp = x + ((z * (t - a)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.5e-26) || !(z <= 7e-23)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.5e-26) || ~((z <= 7e-23))) tmp = (t - a) / (b - y); else tmp = x + ((z * (t - a)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.5e-26], N[Not[LessEqual[z, 7e-23]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{-26} \lor \neg \left(z \leq 7 \cdot 10^{-23}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\end{array}
\end{array}
if z < -1.50000000000000006e-26 or 6.99999999999999987e-23 < z Initial program 44.8%
Taylor expanded in z around inf 78.6%
if -1.50000000000000006e-26 < z < 6.99999999999999987e-23Initial program 91.7%
Taylor expanded in z around 0 67.2%
Taylor expanded in x around 0 73.6%
Final simplification76.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.85e+40) (not (<= y 7e+20))) (/ x (- 1.0 z)) (/ (- t a) (- b y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.85e+40) || !(y <= 7e+20)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.85d+40)) .or. (.not. (y <= 7d+20))) then
tmp = x / (1.0d0 - z)
else
tmp = (t - a) / (b - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.85e+40) || !(y <= 7e+20)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.85e+40) or not (y <= 7e+20): tmp = x / (1.0 - z) else: tmp = (t - a) / (b - y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.85e+40) || !(y <= 7e+20)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.85e+40) || ~((y <= 7e+20))) tmp = x / (1.0 - z); else tmp = (t - a) / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.85e+40], N[Not[LessEqual[y, 7e+20]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+40} \lor \neg \left(y \leq 7 \cdot 10^{+20}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\end{array}
\end{array}
if y < -1.85e40 or 7e20 < y Initial program 58.4%
Taylor expanded in y around inf 61.5%
mul-1-neg61.5%
unsub-neg61.5%
Simplified61.5%
if -1.85e40 < y < 7e20Initial program 71.7%
Taylor expanded in z around inf 67.7%
Final simplification65.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.6e+79) (not (<= z 9.4e+61))) (/ (- a t) y) (/ x (- 1.0 z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.6e+79) || !(z <= 9.4e+61)) {
tmp = (a - t) / y;
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-5.6d+79)) .or. (.not. (z <= 9.4d+61))) then
tmp = (a - t) / y
else
tmp = x / (1.0d0 - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.6e+79) || !(z <= 9.4e+61)) {
tmp = (a - t) / y;
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.6e+79) or not (z <= 9.4e+61): tmp = (a - t) / y else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.6e+79) || !(z <= 9.4e+61)) tmp = Float64(Float64(a - t) / y); else tmp = Float64(x / Float64(1.0 - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.6e+79) || ~((z <= 9.4e+61))) tmp = (a - t) / y; else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.6e+79], N[Not[LessEqual[z, 9.4e+61]], $MachinePrecision]], N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{+79} \lor \neg \left(z \leq 9.4 \cdot 10^{+61}\right):\\
\;\;\;\;\frac{a - t}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -5.6000000000000002e79 or 9.3999999999999997e61 < z Initial program 29.8%
Taylor expanded in y around -inf 21.9%
mul-1-neg21.9%
unsub-neg21.9%
associate-*r/21.9%
neg-mul-121.9%
sub-neg21.9%
metadata-eval21.9%
Simplified38.4%
Taylor expanded in z around inf 46.6%
Taylor expanded in x around 0 34.9%
div-sub35.0%
Simplified35.0%
if -5.6000000000000002e79 < z < 9.3999999999999997e61Initial program 89.9%
Taylor expanded in y around inf 45.3%
mul-1-neg45.3%
unsub-neg45.3%
Simplified45.3%
Final simplification41.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.6e-39) (not (<= y 1.1e-15))) (/ x (- 1.0 z)) (/ (- t a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.6e-39) || !(y <= 1.1e-15)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-5.6d-39)) .or. (.not. (y <= 1.1d-15))) then
tmp = x / (1.0d0 - z)
else
tmp = (t - a) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.6e-39) || !(y <= 1.1e-15)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.6e-39) or not (y <= 1.1e-15): tmp = x / (1.0 - z) else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5.6e-39) || !(y <= 1.1e-15)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -5.6e-39) || ~((y <= 1.1e-15))) tmp = x / (1.0 - z); else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5.6e-39], N[Not[LessEqual[y, 1.1e-15]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{-39} \lor \neg \left(y \leq 1.1 \cdot 10^{-15}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -5.6000000000000003e-39 or 1.09999999999999993e-15 < y Initial program 60.3%
Taylor expanded in y around inf 56.2%
mul-1-neg56.2%
unsub-neg56.2%
Simplified56.2%
if -5.6000000000000003e-39 < y < 1.09999999999999993e-15Initial program 72.6%
Taylor expanded in y around 0 67.9%
Final simplification62.0%
(FPCore (x y z t a b) :precision binary64 (if (<= z -0.00027) (/ (- x) z) (if (<= z 12.0) (+ x (* z x)) (/ a y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.00027) {
tmp = -x / z;
} else if (z <= 12.0) {
tmp = x + (z * x);
} else {
tmp = a / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-0.00027d0)) then
tmp = -x / z
else if (z <= 12.0d0) then
tmp = x + (z * x)
else
tmp = a / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.00027) {
tmp = -x / z;
} else if (z <= 12.0) {
tmp = x + (z * x);
} else {
tmp = a / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -0.00027: tmp = -x / z elif z <= 12.0: tmp = x + (z * x) else: tmp = a / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.00027) tmp = Float64(Float64(-x) / z); elseif (z <= 12.0) tmp = Float64(x + Float64(z * x)); else tmp = Float64(a / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -0.00027) tmp = -x / z; elseif (z <= 12.0) tmp = x + (z * x); else tmp = a / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.00027], N[((-x) / z), $MachinePrecision], If[LessEqual[z, 12.0], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], N[(a / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00027:\\
\;\;\;\;\frac{-x}{z}\\
\mathbf{elif}\;z \leq 12:\\
\;\;\;\;x + z \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\
\end{array}
\end{array}
if z < -2.70000000000000003e-4Initial program 36.9%
Taylor expanded in y around inf 22.6%
mul-1-neg22.6%
unsub-neg22.6%
Simplified22.6%
Taylor expanded in z around inf 22.4%
associate-*r/22.4%
mul-1-neg22.4%
Simplified22.4%
if -2.70000000000000003e-4 < z < 12Initial program 91.7%
Taylor expanded in y around inf 45.8%
mul-1-neg45.8%
unsub-neg45.8%
Simplified45.8%
Taylor expanded in z around 0 45.3%
if 12 < z Initial program 42.9%
Taylor expanded in y around -inf 36.2%
mul-1-neg36.2%
unsub-neg36.2%
associate-*r/36.2%
neg-mul-136.2%
sub-neg36.2%
metadata-eval36.2%
Simplified44.7%
Taylor expanded in x around 0 36.1%
times-frac48.4%
sub-neg48.4%
metadata-eval48.4%
Simplified48.4%
Taylor expanded in a around inf 20.0%
Taylor expanded in z around inf 27.6%
Final simplification35.4%
(FPCore (x y z t a b) :precision binary64 (if (<= z -3.2e+89) (/ a y) (if (<= z 10.5) x (/ a y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.2e+89) {
tmp = a / y;
} else if (z <= 10.5) {
tmp = x;
} else {
tmp = a / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-3.2d+89)) then
tmp = a / y
else if (z <= 10.5d0) then
tmp = x
else
tmp = a / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.2e+89) {
tmp = a / y;
} else if (z <= 10.5) {
tmp = x;
} else {
tmp = a / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.2e+89: tmp = a / y elif z <= 10.5: tmp = x else: tmp = a / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.2e+89) tmp = Float64(a / y); elseif (z <= 10.5) tmp = x; else tmp = Float64(a / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.2e+89) tmp = a / y; elseif (z <= 10.5) tmp = x; else tmp = a / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.2e+89], N[(a / y), $MachinePrecision], If[LessEqual[z, 10.5], x, N[(a / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+89}:\\
\;\;\;\;\frac{a}{y}\\
\mathbf{elif}\;z \leq 10.5:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\
\end{array}
\end{array}
if z < -3.19999999999999987e89 or 10.5 < z Initial program 35.4%
Taylor expanded in y around -inf 28.1%
mul-1-neg28.1%
unsub-neg28.1%
associate-*r/28.1%
neg-mul-128.1%
sub-neg28.1%
metadata-eval28.1%
Simplified43.1%
Taylor expanded in x around 0 31.0%
times-frac45.0%
sub-neg45.0%
metadata-eval45.0%
Simplified45.0%
Taylor expanded in a around inf 15.4%
Taylor expanded in z around inf 24.4%
if -3.19999999999999987e89 < z < 10.5Initial program 89.8%
Taylor expanded in z around 0 40.9%
Final simplification33.8%
(FPCore (x y z t a b) :precision binary64 (if (<= z -0.00062) (/ (- x) z) (if (<= z 10.5) x (/ a y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.00062) {
tmp = -x / z;
} else if (z <= 10.5) {
tmp = x;
} else {
tmp = a / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-0.00062d0)) then
tmp = -x / z
else if (z <= 10.5d0) then
tmp = x
else
tmp = a / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.00062) {
tmp = -x / z;
} else if (z <= 10.5) {
tmp = x;
} else {
tmp = a / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -0.00062: tmp = -x / z elif z <= 10.5: tmp = x else: tmp = a / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.00062) tmp = Float64(Float64(-x) / z); elseif (z <= 10.5) tmp = x; else tmp = Float64(a / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -0.00062) tmp = -x / z; elseif (z <= 10.5) tmp = x; else tmp = a / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.00062], N[((-x) / z), $MachinePrecision], If[LessEqual[z, 10.5], x, N[(a / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00062:\\
\;\;\;\;\frac{-x}{z}\\
\mathbf{elif}\;z \leq 10.5:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\
\end{array}
\end{array}
if z < -6.2e-4Initial program 36.9%
Taylor expanded in y around inf 22.6%
mul-1-neg22.6%
unsub-neg22.6%
Simplified22.6%
Taylor expanded in z around inf 22.4%
associate-*r/22.4%
mul-1-neg22.4%
Simplified22.4%
if -6.2e-4 < z < 10.5Initial program 91.7%
Taylor expanded in z around 0 44.9%
if 10.5 < z Initial program 42.9%
Taylor expanded in y around -inf 36.2%
mul-1-neg36.2%
unsub-neg36.2%
associate-*r/36.2%
neg-mul-136.2%
sub-neg36.2%
metadata-eval36.2%
Simplified44.7%
Taylor expanded in x around 0 36.1%
times-frac48.4%
sub-neg48.4%
metadata-eval48.4%
Simplified48.4%
Taylor expanded in a around inf 20.0%
Taylor expanded in z around inf 27.6%
Final simplification35.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z 5e+46) (/ x (- 1.0 z)) (/ a y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 5e+46) {
tmp = x / (1.0 - z);
} else {
tmp = a / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= 5d+46) then
tmp = x / (1.0d0 - z)
else
tmp = a / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 5e+46) {
tmp = x / (1.0 - z);
} else {
tmp = a / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= 5e+46: tmp = x / (1.0 - z) else: tmp = a / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 5e+46) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(a / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= 5e+46) tmp = x / (1.0 - z); else tmp = a / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 5e+46], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(a / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 5 \cdot 10^{+46}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\
\end{array}
\end{array}
if z < 5.0000000000000002e46Initial program 74.3%
Taylor expanded in y around inf 38.9%
mul-1-neg38.9%
unsub-neg38.9%
Simplified38.9%
if 5.0000000000000002e46 < z Initial program 35.6%
Taylor expanded in y around -inf 27.6%
mul-1-neg27.6%
unsub-neg27.6%
associate-*r/27.6%
neg-mul-127.6%
sub-neg27.6%
metadata-eval27.6%
Simplified37.8%
Taylor expanded in x around 0 27.5%
times-frac42.1%
sub-neg42.1%
metadata-eval42.1%
Simplified42.1%
Taylor expanded in a around inf 19.3%
Taylor expanded in z around inf 29.5%
Final simplification37.0%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 66.4%
Taylor expanded in z around 0 24.6%
Final simplification24.6%
(FPCore (x y z t a b) :precision binary64 (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
def code(x, y, z, t, a, b): return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(z * t) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))) - Float64(a / Float64(Float64(b - y) + Float64(y / z)))) end
function tmp = code(x, y, z, t, a, b) tmp = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(z * t), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{z \cdot t + y \cdot x}{y + z \cdot \left(b - y\right)} - \frac{a}{\left(b - y\right) + \frac{y}{z}}
\end{array}
herbie shell --seed 2023297
(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)))))